Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,14 @@ html:not([data-whatinput=touch]) .dnb-date-picker__container table.dnb-no-focus:
background-color: transparent;
}
}
html:not([data-whatintent=mouse]) .dnb-date-picker__day--within-selection:not(.dnb-date-picker__day--start-date):not(.dnb-date-picker__day--end-date) .dnb-button:not(:active):not(:focus-visible) {
background-color: transparent;
}
@supports not (selector(:focus-visible)) {
html:not([data-whatintent=mouse]) .dnb-date-picker__day--within-selection:not(.dnb-date-picker__day--start-date):not(.dnb-date-picker__day--end-date) .dnb-button:not(:active) {
background-color: transparent;
}
}
.dnb-date-picker__day--preview:not(.dnb-date-picker__day--inactive):not(.dnb-date-picker__day--outside-month):not(.dnb-date-picker__day--start-date):not(.dnb-date-picker__day--end-date), .dnb-date-picker__day--within-selection:not(.dnb-date-picker__day--inactive):not(.dnb-date-picker__day--outside-month):not(.dnb-date-picker__day--start-date):not(.dnb-date-picker__day--end-date) {
background-color: var(--token-color-background-action-hover-subtle);
}
Expand All @@ -2150,7 +2158,7 @@ html:not([data-whatinput=touch]) .dnb-date-picker__container table.dnb-no-focus:
.dnb-date-picker__day--start-date:not(.dnb-date-picker__day--inactive):not(.dnb-date-picker__day--outside-month):not(.dnb-date-picker__day--preview) .dnb-button:hover, .dnb-date-picker__day--end-date:not(.dnb-date-picker__day--inactive):not(.dnb-date-picker__day--outside-month):not(.dnb-date-picker__day--preview) .dnb-button:hover {
box-shadow: none;
}
html:not([data-whatintent=touch]) .dnb-date-picker__day--within-selection:not(.dnb-date-picker__day--start-date):not(.dnb-date-picker__day--end-date) .dnb-button:hover:not([disabled]), html:not([data-whatintent=touch]) .dnb-date-picker__day--start-date.dnb-date-picker__day--within-selection .dnb-button:hover:not([disabled]), html:not([data-whatintent=touch]) .dnb-date-picker__day--end-date.dnb-date-picker__day--within-selection .dnb-button:hover:not([disabled]) {
html[data-whatintent=mouse] .dnb-date-picker__day--within-selection:not(.dnb-date-picker__day--start-date):not(.dnb-date-picker__day--end-date) .dnb-button:hover:not([disabled]), html[data-whatintent=mouse] .dnb-date-picker__day--start-date.dnb-date-picker__day--within-selection .dnb-button:hover:not([disabled]), html[data-whatintent=mouse] .dnb-date-picker__day--end-date.dnb-date-picker__day--within-selection .dnb-button:hover:not([disabled]) {
color: var(--token-color-text-action);
background-color: var(--token-color-background-neutral);
--border-color: var(--token-color-stroke-action-pressed);
Expand Down Expand Up @@ -2197,11 +2205,19 @@ html:not([data-whatintent=touch]) .dnb-date-picker__day--inactive .dnb-button[di
box-shadow: none;
}
}
.dnb-date-picker__header__nav .dnb-button:hover:not(:active):not(:focus-visible) {
html:not([data-whatintent=mouse]) .dnb-date-picker__header__nav .dnb-button:not(:active):not(:focus-visible) {
box-shadow: none;
}
@supports not (selector(:focus-visible)) {
html:not([data-whatintent=mouse]) .dnb-date-picker__header__nav .dnb-button:not(:active) {
box-shadow: none;
}
}
html[data-whatintent=mouse] .dnb-date-picker__header__nav .dnb-button:hover:not(:active):not(:focus-visible) {
background-color: var(--token-color-background-neutral);
}
@supports not (selector(:focus-visible)) {
.dnb-date-picker__header__nav .dnb-button:hover:not(:active) {
html[data-whatintent=mouse] .dnb-date-picker__header__nav .dnb-button:hover:not(:active) {
background-color: var(--token-color-background-neutral);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,15 @@
}
}

// Touch browsers keep :hover on the last tapped element
html:not([data-whatintent='mouse'])
&--within-selection:not(#{&}--start-date):not(#{&}--end-date)
.dnb-button:not(:active) {
@include utilities.notFocusVisible() {
background-color: transparent;
}
}

&--preview:not(#{&}--inactive):not(#{&}--outside-month):not(
#{&}--start-date
):not(#{&}--end-date),
Expand Down Expand Up @@ -463,13 +472,13 @@
}

// Hover states for checked date buttons
html:not([data-whatintent='touch'])
html[data-whatintent='mouse']
&--within-selection:not(#{&}--start-date):not(#{&}--end-date)
.dnb-button:hover:not([disabled]),
html:not([data-whatintent='touch'])
html[data-whatintent='mouse']
&--start-date#{&}--within-selection
.dnb-button:hover:not([disabled]),
html:not([data-whatintent='touch'])
html[data-whatintent='mouse']
&--end-date#{&}--within-selection
.dnb-button:hover:not([disabled]) {
color: var(--token-color-text-action);
Expand Down Expand Up @@ -545,7 +554,16 @@
box-shadow: none;
}
}
.dnb-button:hover:not(:active) {

// Touch browsers keep :hover on the last tapped element, so style a
// tapped button like one without the mouse over it
html:not([data-whatintent='mouse']) & .dnb-button:not(:active) {
@include utilities.notFocusVisible() {
box-shadow: none;
}
}

html[data-whatintent='mouse'] & .dnb-button:hover:not(:active) {
@include utilities.notFocusVisible() {
background-color: var(--token-color-background-neutral);
}
Expand Down
Loading