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
I have lots of custom components, each with their own styleable properties... for example a Section component might have aspect-ratio while a Paragraph doesn't...
I realize just now (I feel dumb honestly) that if I apply a class to a Section, and that class has some aspect-ratio value and then apply that same class to a Paragraph; it carries over those styles (as well it should, I guess... but) it's a workaround around unstyleable properties that I would like to prevent.
I guess I could load a stylesheet that sets all the unstyleable properties for every kind of component with their right value and maybe even add !important... like p{aspect-ratio:auto !important} but it seems like a lot of work (and has room for [human] error)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have lots of custom components, each with their own
styleable
properties... for example aSection
component might haveaspect-ratio
while aParagraph
doesn't...I realize just now (I feel dumb honestly) that if I apply a
class
to aSection
, and that class has someaspect-ratio
value and then apply that sameclass
to aParagraph
; it carries over those styles (as well it should, I guess... but) it's a workaround aroundunstyleable
properties that I would like to prevent.I guess I could load a stylesheet that sets all the unstyleable properties for every kind of component with their right value and maybe even add !important... like
p{aspect-ratio:auto !important}
but it seems like a lot of work (and has room for [human] error)Any advice?
Beta Was this translation helpful? Give feedback.
All reactions