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

style(Select): sync v10 and v11 styles #10679

Merged
merged 6 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
14 changes: 14 additions & 0 deletions packages/components/src/components/pagination/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ $css--helpers: true;
background: $hover-ui;
}

.#{$prefix}--pagination
.#{$prefix}--select--inline
.#{$prefix}--select-input:focus,
.#{$prefix}--pagination
.#{$prefix}--select--inline
.#{$prefix}--select-input:focus
option,
.#{$prefix}--pagination
.#{$prefix}--select--inline
.#{$prefix}--select-input:focus
optgroup {
background-color: $layer;
}

.#{$prefix}--pagination .#{$prefix}--select__arrow {
top: 50%;
transform: translate(-0.5rem, -50%);
Expand Down
9 changes: 8 additions & 1 deletion packages/components/src/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
border-radius: 0;
color: $text-01;
cursor: pointer;
font-family: inherit;
// reset disabled <select> opacity
opacity: 1;

Expand Down Expand Up @@ -212,10 +213,16 @@
padding-right: $spacing-07;
padding-left: $carbon--spacing-03;
border-bottom: none;
background-color: $background;
background-color: transparent;
color: $text-01;
}

.#{$prefix}--select--inline .#{$prefix}--select-input:focus,
.#{$prefix}--select--inline .#{$prefix}--select-input:focus option,
.#{$prefix}--select--inline .#{$prefix}--select-input:focus optgroup {
background-color: $background;
}

.#{$prefix}--select--inline .#{$prefix}--select-input[disabled],
.#{$prefix}--select--inline .#{$prefix}--select-input[disabled]:hover {
background-color: $disabled-01;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Inline = () => {
inline
id="select-1"
defaultValue="placeholder-item"
labelText=""
labelText="Select"
helperText="Optional helper text">
<SelectItem
disabled
Expand Down
8 changes: 7 additions & 1 deletion packages/styles/scss/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,15 @@
opacity: 1;
}

.#{$prefix}--select-optgroup,
optgroup.#{$prefix}--select-optgroup,
.#{$prefix}--select-option {
// For the options to show in IE11
background-color: $background-hover;
color: $text-primary;

&:disabled {
color: $text-disabled;
}
}

.#{$prefix}--select--inline {
Expand Down Expand Up @@ -214,6 +219,7 @@
color: $text-primary;
}

.#{$prefix}--select--inline .#{$prefix}--select-input:focus,
.#{$prefix}--select--inline .#{$prefix}--select-input:focus option,
.#{$prefix}--select--inline .#{$prefix}--select-input:focus optgroup {
background-color: $background;
Expand Down