Fix wrong body css while toggling visibility
closes #648 (closed)
"display: initial" caused the issue. we can avoid this using css class.
Merge request reports
Activity
20 20 </div> 21 21 <button 22 22 class="new-status-button" 23 :class="{ 'hidden': isHidden }" 23 :class="{ 'new-status-button-hidden': isHidden }" well as far as I understand the reason is that global
.hidden
rule was added, which is IMO bad.alternatives are BEM-style
_hidden_yes
(or_hidden
) modifier, i.e..new-status-button_hidden
, which is sorta done here and lastly there's.new-status-button.hidden
which i would prefer.overall our CSS needs to be groomed, we just need to agree on style.
changed this line in version 3 of the diff
block__element block_modifier_modifier-value block__element_element-modifier_element-modifier-value
so in short,
__
two underscores for elements,_
one underscore for modifier and modifier value (if given)at least that's how it was in a certain company related to BEM creation back in 2015, maybe they changed it, which seems to be the case on (new) official site.
again as I mentioned in other place, changing that place will remove necessity for this change altogether
51 51 -moz-osx-font-smoothing: grayscale; 52 52 } 53 53 54 .hidden { yeah but it breeds inconsistency and CSS cruft. You have
.hidden
and you have.some-component_hidden
, let's say you want to make a component but the context requires you to usetransform: translate(-99999px)
instead ofdisplay: none
but you write rule like.some-other-component.hidden
and wonder why it doesn't work properly and have to figure out that you have.hidden
rule defined globally and have to do either.tucked-away
global rule which does thetranslate(-9999px)
or.some-other-component_hidden
and both are kinda screwy.It's been time-tested that overly-generic global css rules like
.hidden
.float
and others do not do much good and do more harm than intended.I'm gonna make an issue about grooming our CSS...
moved to !930 (merged)