-
Notifications
You must be signed in to change notification settings - Fork 75
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
fix(list-item): Improve focus outline appearance #9653
Changes from 1 commit
393e519
6542464
29f1852
2bc8f9a
d04fd24
caf9b66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
|
||
@include disabled(); | ||
|
||
.indent { | ||
@apply flex | ||
flex-col | ||
border-solid | ||
border-0 | ||
border-color-3; | ||
|
||
margin-inline-start: var(--calcite-list-item-spacing-indent, theme("spacing.6")); | ||
} | ||
|
||
.container { | ||
@apply bg-foreground-1 | ||
box-border | ||
|
@@ -52,16 +62,11 @@ | |
} | ||
|
||
.nested-container { | ||
@apply hidden flex-col | ||
border-solid | ||
border-0 | ||
border-color-3; | ||
|
||
margin-inline-start: var(--calcite-list-item-spacing-indent, theme("spacing.6")); | ||
@apply flex flex-col; | ||
} | ||
|
||
.nested-container--open { | ||
@apply flex; | ||
.nested-container--hidden { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be reverted as well. |
||
@apply hidden; | ||
} | ||
|
||
.content-container { | ||
|
@@ -79,9 +84,14 @@ td { | |
@apply focus-base; | ||
} | ||
|
||
tr { | ||
@apply relative; | ||
} | ||
|
||
tr:focus, | ||
td:focus { | ||
@apply focus-inset; | ||
z-index: var(--calcite-app-z-index-sticky); | ||
outline: 2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand)); | ||
} | ||
|
||
.content, | ||
|
@@ -195,7 +205,7 @@ td:focus { | |
|
||
.actions-start, | ||
.actions-end { | ||
@apply p-0; | ||
@apply p-0 relative; | ||
::slotted(calcite-action), | ||
::slotted(calcite-action-menu), | ||
::slotted(calcite-handle), | ||
|
@@ -206,6 +216,40 @@ td:focus { | |
} | ||
} | ||
|
||
tr:focus { | ||
.actions-start, | ||
.actions-end { | ||
inset-block: theme("spacing[0.5]"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: At some point these theme() vars will need to be updated to use calcite css vars. |
||
.close, | ||
::slotted(calcite-action), | ||
::slotted(calcite-action-menu), | ||
::slotted(calcite-handle), | ||
::slotted(calcite-dropdown) { | ||
block-size: calc(100% - theme("spacing[1]")); | ||
} | ||
} | ||
|
||
&::after, | ||
&::before { | ||
@apply absolute; | ||
content: ""; | ||
inline-size: theme("spacing[0]"); | ||
z-index: theme("zIndex.header"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. optional: Might be able to use a css var here for z-index. |
||
background-color: theme("colors.brand"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. optional: Might be able to use a css var here for brand. |
||
inset-block: 0; | ||
} | ||
&::before { | ||
inset-inline-start: 0; | ||
} | ||
&::after { | ||
inset-inline-end: 0; | ||
} | ||
} | ||
|
||
.container--border:focus::before { | ||
display: none; | ||
} | ||
|
||
::slotted(calcite-list:empty) { | ||
@apply border-t-0; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent isn't a valid class on the list-item. Can this part be reverted? It should be on
.nested-container
. I'm guessing this was copied from a previous release.