Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a CSS variable to set the cursor property #852

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/emoji-mart-website/example-custom-styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
--category-icon-size: 24px;
--color-border-over: rgba(0, 0, 0, 0.1);
--color-border: rgba(0, 0, 0, 0.05);
--cursor: pointer;
--font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
--font-size: 20px;
--rgb-accent: 255, 105, 180;
Expand Down
9 changes: 5 additions & 4 deletions packages/emoji-mart/src/components/Picker/PickerStyles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

--border-radius: 10px;
--category-icon-size: 18px;
--cursor: pointer;
--font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
--font-size: 15px;

Expand Down Expand Up @@ -68,8 +69,8 @@
background-color: rgb(var(--em-rgb-background));

&[data-menu] {
button { cursor: auto }
.menu button { cursor: pointer }
button { cursor: var(--cursor) }
.menu button { cursor: var(--cursor) }
}
}

Expand Down Expand Up @@ -136,7 +137,7 @@
}

a {
cursor: pointer;
cursor: var(--cursor);
color: rgb(var(--em-rgb-accent));

&:hover { text-decoration: underline }
Expand Down Expand Up @@ -274,7 +275,7 @@ svg {

button {
appearance: none;
cursor: pointer;
cursor: var(--cursor);
color: currentColor;
border: 0;
background-color: transparent;
Expand Down
Loading