Skip to content

Commit

Permalink
Merge pull request #294 from wpmudev/fix/high-contrast
Browse files Browse the repository at this point in the history
Fix/high contrast
  • Loading branch information
emgk authored Jun 28, 2024
2 parents 4d8a4dd + a8fd673 commit 05e2213
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
.sui-box-group {
padding-top: $spacing-xl;
padding-bottom: $spacing-xl;
border-top: $border-width-sm solid $color-extended-neutral-80;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
border-radius: $border-radius-md;
}

@include modifier(no-shadow-content) {
@include modifier(content-no-shadow) {
border-radius: $border-radius-md;
}
}
Expand All @@ -42,10 +42,18 @@
// Block wrapper.
@include block($block) {
@include element(panel) {
@include modifier(content) {
@include modifier(content, content-no-shadow) {
border: $border-width-sm solid $color-extended-neutral-0;
}
}

@include modifier(flushed) {
@include modifies-element(panel) {
.sui-#{$block}__panel--content {
border: none;
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

.sui-#{$block}__item--footer {
padding-top: $spacing-xl;
border: none;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,15 @@ $colors-high-contrast: (
}

&.sui-#{$block-name}--focus {
border-color: $value;
background: transparent;
color: inherit;
@if $name == white {
color: $value;
}

&:after {
border-color: $value;
}
}
} @else if $theme == secondary {
border-color: $value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@

@include modifier(select) {
outline-color: $color-extended-neutral-0;
color: $color-extended-neutral-0;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,16 @@
}
}
}

// DIR: Left to right.
// THEME: Dark.
@include sui-class($rtl: false, $theme: dark) {
@include block($block) {
@include element(info) {
@include modifier(desc) {
color: $color-extended-neutral-0;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@
@include sui-class($rtl: false, $theme: dark) {
@include block($block) {
border: $border-width-sm solid $color-extended-neutral-0;

.sui-dropdown__popover {
.sui-dropdown__menu-item {
color: $color-extended-neutral-0;

&.sui-dropdown__menu-item--hover {
color: $color-extended-neutral-100;
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
}
}

@include element(table) {
@include modifier(footer) {
border-top: $border-width-sm solid $color-extended-neutral-80;
}
}

@include modifier(sticky) {
@include modifies-element(body) {
td {
Expand Down Expand Up @@ -116,17 +122,28 @@
// Block wrapper.
@include block($block) {
@include element(row) {
box-shadow: 0 -#{$shadow-offset-2xs} 0 0 $color-extended-neutral-0,
0 -#{$shadow-offset-2xs} 0 0 $color-extended-neutral-0;
border-color: $color-extended-neutral-0;

@include modifier(expanded, content) {
background: $color-extended-neutral-100;
}

@include modifier(expanded) {
.sui-#{$block}__cell--sticky {
background: $color-extended-neutral-100;
}
}

@include modifier(content) {
box-shadow: unset;
}
}

@include element(table) {
@include modifier(footer) {
border-color: $color-extended-neutral-0;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
overflow: hidden;
}
}

// DIR: Left to right.
// THEME: Dark.
@include sui-class($rtl: false, $theme: dark) {
// Block wrapper.
@include block($block) {
border-color: $color-extended-neutral-0;
}
}
}
2 changes: 1 addition & 1 deletion packages/ui/accordion/src/accordion-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const AccordionItem: React.FC<AccordionItemProps> = ({
// Panel content className
const panelContentClassName = contentShadow
? "sui-accordion__panel--content"
: "sui-accordion__panel--content-no-shadow"
: "sui-accordion__panel--content sui-accordion__panel--content-no-shadow"

// Render the AccordionItem component with proper accessibility attributes.
return (
Expand Down

0 comments on commit 05e2213

Please sign in to comment.