You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do you think about adding the ability to choose class names?
For example, I don't like the .hamburger-inner, and I want to change it. Now for this, I need to manually change classes in all files. It would be great if there was an opportunity to choose the names of the classes. #41 is about replacing .is-active to .active. You sad:
I believe the use of is-active is better practice. The is-* prefix is used to define selectors that are specifically for altering the state of a component.
That said, a dash in a CSS name should not lead to any problems—it is extremely common practice.
I agree. But what if I want e.g. rename .is-active to .isActive.
Hi.
What do you think about adding the ability to choose class names?
For example, I don't like the
.hamburger-inner
, and I want to change it. Now for this, I need to manually change classes in all files. It would be great if there was an opportunity to choose the names of the classes. #41 is about replacing.is-active
to.active
. You sad:I agree. But what if I want e.g. rename
.is-active
to.isActive
.How this can be implemented:
$hamburgerClassName: 'Hamburger';
$hamburgerBoxClassName: 'Hamburger-box';
$hamburgerSliceClassName: 'Hamburger-slice';
$hamburgerActiveClassName: 'is-active';
.#{$hamburgerClassName} {
cursor: pointer;
display: inline-block;
padding: $hamburgerIndentY $hamburgerIndentX;
transition-duration: 0.15s;
transition-property: opacity, filter;
transition-timing-function: linear;
/* ... */
}
CSS-tricks article Use a Sass Variable for a Selector by Chris Coyier
The text was updated successfully, but these errors were encountered: