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

[Resolved : Styling <select> by changing less variables in Luma theme… #15734

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions app/design/frontend/Magento/luma/web/css/source/_forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@
.select-styling() {
.lib-css(appearance, none, 1);
appearance: none;
background: @select__background url('../images/select-bg.svg') no-repeat 100% 45%;
background-size: 30px 60px;
border: 1px solid @border-color__base;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are the @select__border and other variables defined / used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's define in lib/web/css/source/lib/variables/_forms.less

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I do not (directly) see its usage anywhere. I'm speaking about the newly added variables.

Copy link
Contributor Author

@hitesh-wagento hitesh-wagento Jun 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't created/added any new variables. all variables are in lib/web/css/source/lib/variables/_forms.less I have just moved _forms.less CSS in _theme.less so we can change select CSS without using !important

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, found them =) @{@{_type}__background} and so on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just want to check the inheritance and usage of the variables to understand the issue better and detect similar issues.

height: 32px;
padding-right: 25px;
text-indent: .01em;
text-overflow: '';

Expand Down
7 changes: 7 additions & 0 deletions app/design/frontend/Magento/luma/web/css/source/_theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@
// Forms
// ---------------------------------------------


// Select
@select__background: @form-element-input__background url('../images/select-bg.svg') no-repeat 100% 45%;
@select__border: 1px solid @border-color__base;
@select__height: 32px;
@select__padding: 4px 25px @indent__xs @indent__s;

// Form fieldset
@form-fieldset-legend__font-size: 18px;
@form-fieldset-legend__font-weight: @font-weight__light;
Expand Down
2 changes: 1 addition & 1 deletion lib/web/css/source/lib/variables/_forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
@select__disabled__font-style: @form-element-input__disabled__font-style;

// Focus state
@select__focus__background: @form-element-input__focus__background;
@select__focus__background: false;
@select__focus__border: @form-element-input__focus__border;
@select__focus__color: @form-element-input__focus__color;
@select__focus__font-style: @form-element-input__focus__font-style;
Expand Down