-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(style): add cursor class utilities (#17033)
Co-authored-by: John Leider <[email protected]>
- Loading branch information
1 parent
d121f54
commit a25aac9
Showing
4 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ | |
}, | ||
"border-radius", | ||
"content", | ||
"cursor", | ||
"display", | ||
"elevation", | ||
"flex", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<v-container> | ||
<v-row justify="space-between"> | ||
<v-col v-for="cursor in cursors" :key="cursor" cols="3"> | ||
<v-btn | ||
:text="cursor" | ||
:class="`cursor-${cursor}`" | ||
block | ||
></v-btn> | ||
</v-col> | ||
</v-row> | ||
</v-container> | ||
</template> | ||
|
||
<script setup> | ||
const cursors = [ | ||
'auto', | ||
'default', | ||
'grab', | ||
'grabbing', | ||
'help', | ||
'move', | ||
'none', | ||
'not-allowed', | ||
'pointer', | ||
'progress', | ||
'text', | ||
'wait', | ||
] | ||
</script> | ||
|
||
<script> | ||
export default { | ||
data: () => ({ | ||
cursors: [ | ||
'auto', | ||
'default', | ||
'grab', | ||
'grabbing', | ||
'help', | ||
'move', | ||
'none', | ||
'not-allowed', | ||
'pointer', | ||
'progress', | ||
'text', | ||
'wait', | ||
], | ||
}), | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
emphasized: true | ||
meta: | ||
title: Cursor | ||
description: Assign a custom cursor to any element. | ||
keywords: cursor, utility, helper, class | ||
related: | ||
- /styles/content/ | ||
- /styles/spacing/ | ||
- /styles/text-and-typography/ | ||
--- | ||
|
||
# Cursor | ||
|
||
Utilities for controlling the cursor styling when hovering over elements. | ||
|
||
<page-features /> | ||
|
||
## Usage | ||
|
||
Apply custom cursor styling to a component or element. | ||
|
||
<example file="cursor/usage" /> | ||
|
||
| Class | Properties | | | ||
| - | - | - | | ||
| **cursor-auto** | cursor: auto; | | | ||
| **cursor-default** | cursor: default; | | | ||
| **cursor-grab** | cursor: grab; | | | ||
| **cursor-grabbing** | cursor: grabbing; | | | ||
| **cursor-help** | cursor: help; | | | ||
| **cursor-move** | cursor: move; | | | ||
| **cursor-none** | cursor: none; | | | ||
| **cursor-not-allowed** | cursor: not-allowed; | | | ||
| **cursor-pointer** | cursor: pointer; | | | ||
| **cursor-progress** | cursor: progress; | | | ||
| **cursor-text** | cursor: text; | | | ||
| **cursor-wait** | cursor: wait; | | | ||
|
||
<entry /> | ||
|
||
## Disable | ||
|
||
Disable the generation of **cursor** utility classes by overwriting the utilities value: | ||
|
||
```scss { resource="src/styles/settings.scss" } | ||
@use 'vuetify/settings' with ( | ||
$utilities: ( | ||
"cursor": false, | ||
), | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters