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
First they aren't single declaration by nature. 99% of utilities are (or should be).
The fact that they look different/ugly _my-hack-class triggers the spider of other developers "🤔 something's not right here"
At the moment the only hack that we have is that workaround for min-height flex bug in Internet Explorer, and it could be an utility but then people would question its usage "the why it's there"
<!-- this is applying a min-heigh to c-somecompnent, no questions asked --><divclass="c-somecomponent u-flex-min-height"><divclass="c-hero"><!-- this is applying min-height to c-somecomponent, 🤔 but why the ugly duck name? --><divclass="c-somecomponent _flex-min-height"><divclass="c-hero">
The guru Roberts, also says to one off hacks related to component, but i don't buy it:
// Roberts example@mediascreenand (max-width: 30em) {
/** * We need to force the footer to be a fixed height on smaller screens.*/._c-footer-mobile {
height: 80px;
}
}
// me@mediascreenand (max-width: 30em) {
/** * Well if We need to force the footer, that's part of the component so*/.c-footer {
height: 80px;
}
}
This is more like a meta question, but thanks for your interest!
Reasons:
_
looks like lodash_
looks an element that is missing its block (BEM)_
looks like fake private vars in javascriptCons:
h-
is not immediately recognisable, but we may argue that non of the others isAlternatives:
hk-
but i looks like hong konghack-
is not that long and is explicit, so bonus points for clarity, but minus on consistency.The text was updated successfully, but these errors were encountered: