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

Revert "Full width by default in SimpleDropdown" #57870

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

All notable changes to this project will be documented in this file.

## [0.4.0](https://github.com/code-dot-org/code-dot-org/pull/57105)
* use `width: 100%` instead of `width: auto` as default when styling `select` element.

## [0.3.0](https://github.com/code-dot-org/code-dot-org/pull/57105)
* moved `SimpleDropdown` to dropdown folder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const SimpleDropdown: React.FunctionComponent<SimpleDropdownProps> = ({
onChange={onChange}
value={selectedValue}
id={id}
className={moduleStyles.dropdown}
disabled={disabled}
>
{itemGroups.length > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
display: block;
}

select {
.dropdown {
display: inline-flex;
align-items: center;
align-self: stretch;
width: 100%;
width: auto;
background-color: unset;
border-radius: 0.25rem;
border: 1px solid;
Expand Down Expand Up @@ -51,7 +51,7 @@
color: $light_black;
}

select {
.dropdown {
color: $light_black;
border-color: $light_black;
}
Expand Down Expand Up @@ -83,7 +83,7 @@
}

&:has(.dropdown:disabled) {
select {
.dropdown {
color: $light_gray_200;
border-color: $light_gray_200;
}
Expand All @@ -99,7 +99,7 @@
color: $light_white;
}

select {
.dropdown {
color: $light_white;
border-color: $light_white;
}
Expand Down Expand Up @@ -127,7 +127,7 @@
}

&:has(.dropdown:disabled) {
select {
.dropdown {
color: $light_gray_900;
border-color: $light_gray_900;
}
Expand All @@ -149,7 +149,7 @@
margin-bottom: 0.37rem;
}

select {
.dropdown {
@include button-one-text;
height: 3rem;
padding: 0.625rem 1rem;
Expand All @@ -172,7 +172,7 @@
margin-bottom: 0.37rem;
}

select {
.dropdown {
@include button-two-text;
height: 2.5rem;
padding: 0.5rem 1rem;
Expand All @@ -195,7 +195,7 @@
margin-bottom: 0.37rem;
}

select {
.dropdown {
@include button-three-text;
height: 2rem;
padding: 0.3125rem 1rem;
Expand All @@ -218,7 +218,7 @@
margin-bottom: 0.37rem;
}

select {
.dropdown {
@include button-four-text;
height: 1.5rem;
padding: 0.125rem 0.5rem;
Expand Down