-
Notifications
You must be signed in to change notification settings - Fork 22
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(pagination): Colors, right to left demo, and logical properties #2116
base: staging/cubone
Are you sure you want to change the base?
Changes from all commits
ad740e5
4ee8c5a
8e4f0f4
7072657
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
--_stepper-size: var(--rh-length-3xl, 48px); | ||
|
||
display: block; | ||
min-height: 4em; | ||
min-block-size: 4em; | ||
} | ||
|
||
:host([size='sm']) { | ||
|
@@ -20,17 +20,23 @@ | |
gap: var(--rh-space-2xl, 32px) calc(var(--rh-space-xs, 4px) / 2); | ||
flex-wrap: wrap; | ||
|
||
--rh-pagination-accent-color: var(--rh-color-interactive-primary-default); | ||
/* stylelint-disable-next-line */ | ||
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. why do we have to disable this rule? it's there for a reason. perhaps there's a bug lower down in the stack we need to fix? Try putting it in a surface. 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. Thanks for the review. This is the same issue we're seeing in this comment on #2043. If pagination is not wrapped in a surface, the tokens are undefined; thus, all the colors are incorrect. See the note in this PR's body under "Notes to reviewers". |
||
--rh-pagination-accent-color: var(--rh-color-interactive-primary-default, #0066cc); | ||
--_numeric-a-color: var(--rh-pagination-accent-color); | ||
--_numeric-a-color-hover: var(--rh-color-interactive-primary-hover); | ||
/* stylelint-disable-next-line */ | ||
--_numeric-a-color-hover: var(--rh-color-interactive-primary-hover, #003366); | ||
--_numeric-a-color-focus: var(--rh-pagination-accent-color); | ||
--_numeric-a-color-focus-outline: var(--rh-pagination-accent-color); | ||
--_numeric-a-color-visited: var(--rh-color-interactive-primary-visited-default); | ||
--_numeric-a-color-visited-hover: var(--rh-color-interactive-primary-visited-hover); | ||
/* stylelint-disable-next-line */ | ||
--_numeric-a-color-visited: var(--rh-color-interactive-primary-visited-default, #5e40be); | ||
/* stylelint-disable-next-line */ | ||
--_numeric-a-color-visited-hover: var(--rh-color-interactive-primary-visited-hover, #21134d); | ||
--_list-a-bg-color: var(--rh-color-surface-lighter, #f2f2f2); | ||
--_list-a-current-page-border-color: var(--rh-color-border-subtle); | ||
/* stylelint-disable-next-line */ | ||
--_list-a-current-page-border-color: var(--rh-color-border-subtle, #c7c7c7); | ||
--_list-a-current-page-bg-color: var(--rh-color-surface-lightest, #ffffff); | ||
--_list-a-text-color: var(--rh-color-text-primary); | ||
/* stylelint-disable-next-line */ | ||
--_list-a-text-color: var(--rh-color-text-primary, #151515); | ||
--_stepper-bg-color: var(--rh-color-surface-lighter, #f2f2f2); | ||
--_stepper-hover-focus-color: var(--rh-color-text-primary-on-dark, #ffffff); | ||
--_border-top-hover-color: var(--rh-color-gray-60, #4d4d4d); | ||
|
@@ -55,39 +61,39 @@ | |
.visually-hidden { | ||
border: 0; | ||
clip: rect(0, 0, 0, 0); | ||
height: 1px; | ||
block-size: 1px; | ||
margin: -1px; | ||
overflow: hidden; | ||
padding: 0; | ||
position: absolute; | ||
white-space: nowrap; | ||
width: 1px; | ||
inline-size: 1px; | ||
} | ||
|
||
@container pagination (min-width: 344px) { | ||
.xxs-visually-hidden { | ||
border: 0; | ||
clip: rect(0, 0, 0, 0); | ||
height: 1px; | ||
block-size: 1px; | ||
margin: -1px; | ||
overflow: hidden; | ||
padding: 0; | ||
position: absolute; | ||
white-space: nowrap; | ||
width: 1px; | ||
inline-size: 1px; | ||
} | ||
} | ||
|
||
@container pagination (min-width: 768px) { | ||
.sm-visually-visible { | ||
clip: auto; | ||
height: auto; | ||
block-size: auto; | ||
margin: 0; | ||
overflow: visible; | ||
padding: 0; | ||
position: static; | ||
white-space: normal; | ||
width: auto; | ||
inline-size: auto; | ||
} | ||
} | ||
|
||
|
@@ -112,11 +118,11 @@ svg { | |
display: grid; | ||
font-family: var(--rh-font-family-heading, RedHatDisplay, 'Red Hat Display', 'Noto Sans Arabic', 'Noto Sans Hebrew', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans Thai', Helvetica, Arial, sans-serif); | ||
font-size: var(--rh-font-size-heading-xs, 1.25rem); | ||
height: var(--_stepper-size); | ||
block-size: var(--_stepper-size); | ||
place-content: center; | ||
position: relative; | ||
text-decoration: none; | ||
width: var(--_stepper-size); | ||
inline-size: var(--_stepper-size); | ||
} | ||
|
||
.stepper:focus { | ||
|
@@ -131,10 +137,10 @@ svg { | |
.stepper:focus:after { | ||
border-block-start-style: solid; | ||
content: ''; | ||
left: -1px; | ||
inset-inline-start: -1px; | ||
position: absolute; | ||
top: -1px; | ||
width: 104%; | ||
inset-block-start: -1px; | ||
inline-size: 104%; | ||
} | ||
|
||
.stepper:hover:after, | ||
|
@@ -149,7 +155,7 @@ svg { | |
} | ||
|
||
.stepper svg { | ||
height: 14px; | ||
block-size: 14px; | ||
} | ||
|
||
:is(#next, #last) svg, | ||
|
@@ -173,11 +179,12 @@ svg { | |
} | ||
|
||
input { | ||
height: var(--rh-length-2xl, 32px); | ||
width: var(--rh-length-4xl, 64px); | ||
block-size: var(--rh-length-2xl, 32px); | ||
inline-size: var(--rh-length-4xl, 64px); | ||
font-size: var(--rh-font-size-body-text-md, 1rem); | ||
background: var(--rh-color-surface-lightest, #ffffff); | ||
border: var(--rh-border-width-sm, 1px) solid var(--rh-color-border-subtle); | ||
/* stylelint-disable-next-line */ | ||
border: var(--rh-border-width-sm, 1px) solid var(--rh-color-border-subtle, #c7c7c7); | ||
border-block-end-color: var(--rh-color-gray-40, #a3a3a3); | ||
box-sizing: border-box; | ||
padding-block: var(--rh-space-sm, 6px); | ||
|
@@ -212,7 +219,7 @@ input:invalid:focus { | |
|
||
#numeric-end { | ||
display: block; | ||
width: 100%; | ||
inline-size: 100%; | ||
} | ||
|
||
#numeric { | ||
|
@@ -223,13 +230,13 @@ input:invalid:focus { | |
gap: 0.5em; | ||
margin-block: 0; | ||
margin-inline: 0 var(--rh-space-lg, 16px); | ||
min-height: var(--_stepper-size); | ||
width: 100%; | ||
min-block-size: var(--_stepper-size); | ||
inline-size: 100%; | ||
} | ||
|
||
#numeric input { | ||
align-self: stretch; | ||
height: auto; | ||
block-size: auto; | ||
} | ||
|
||
#numeric a { | ||
|
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.
needs a changeset