This repository has been archived by the owner on Aug 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
[General Discussion] Are internal class names considered public API? #107
Comments
I would prefer the first option, but docs question is open. But since we're going to use CSS Modules I guess the second option is better. Third optionAnother option is to provide data attributes to elements (E from BEM), so even if we will switch to CSS Modules they will still remain. and you will write something like:
|
Third option sounds good to me, we can clearly separate what is intended for internal use and what is intended as a hook for customisation. This also allows us to move along without breaking changes. The only con being I guess is having |
Any thoughts @mAiNiNfEcTiOn @EduardTrutsyk @iwwwi ? |
Any thoughts @mAiNiNfEcTiOn @EduardTrutsyk @iwwwi ? |
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So my use case is the following: I'm working with the Modal component, when I want to set a header, the component will automatically overwrite my passed in header's className property to use
ui-modal__header
, this css class has a fixedmin-height: 120px
attached to it.This gives me some options:
First option
To pass a mod into the Modal component that I'm rendering and via a really specific css selector, overwrite this property. Since none of the internal class names are documented in any way, they seem subject to change and break my selectors. I've also heard moving to CSS Modules is being considered, this would mean that we can't rely on the same css selectors that our stylesheets are using.
Second Option
To modify the Modal component to allow passing in my own class names for sections of the component:
I want to start a discussion about the following subjects:
The text was updated successfully, but these errors were encountered: