New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support configuring top level element #1199
Comments
I think we do need this for other cases so the trick would be to just add an ids-enterprise top level class and let it cascade only after that. Would be a breaking change we can mitigate easily. Could also add it to initialize() when you call that (if people use it). |
Would it be possible to add support for soho to add support for ignoring elements? e.g. elements with class would be ignored
perhaps :not() selector would be of help? |
I'm not sure that would be easy @Fruko I guess we would have to add an entire second style sheet where we :not() EVERY single css rule? For example what if you use a tree class in there or a dropdown or anything else it could still cause problems. I think the other way to do this is just not put on the
|
Thanks for looking into it @tmcconechy ! This and a couple other issues (which I will log) are preventing Infor Nexus from migrating to IDS (we're on a years-old forked version of Soho), so this would be a big help. |
Cool yes enough use cases to add this. Will look into it soon. I think just requiring the top level element but may mean a 5.0 version just to follow semantic versioning with a small number of breaking changes. |
@tmcconechy but what about scenario like this
given code above, how can we make sure that ids-enteprise css won't mess with "some-component-with-own-styles? From my point of view adding root element to cascade css from is a good idea for a start, but I believe in order to make enteprise css usable, there has to be a way of making it not fiddle with other parts of apps, if :not selector is not an option, what about prefixing all ids-enterprise classes with ids-enterprise? |
yeah i thought about prefixing all options with For this exact case i think we could come up with something that negates any styling in the accordion-content but i think that would be a separate issue. And would have to do this component by component. Im just doubting there is any good way to make a |
Wonder if a more simple reset would help tho? Fx...
Sort of a reverse reset? Might help in some cases but definitely not all? |
that might do the trick |
Ok will take a look along with this. Thats not as bad as i was expecting initially. |
I like the idea of prefix with ids. Actually it's called "branding" concept. Definitely it's a breaking change but it should be the way to go for ids-enterprisd css structure in the future. |
I agree have to weight the value over the breaking change. |
Checked this further. It cant be done without a prefix added to the root. Was hoping i could find a way. |
We have a solution in the 5.0 next version where each component is a web component with encapsulated css and all css is namespaced. This would satisfy this issue so closing |
@tmcconechy that's great news! Is there a good way to track when this is generally available? |
You can keep an eye on this project https://github.com/infor-design/enterprise-wc -> it is a ways off but sometime next year should have something released |
Looks really promising! |
Is your feature request related to a problem? Please describe.
Our usage of IDS is limited to a section of the page, not the full body. Therefore in order to use it we have resorted to forking many of the components that make this assumption, replacing references to the body selector with a selector that we have specified.
For example, in the tabs component, we've replaced this line:
menuHtml = $(``<ul id="tab-container-popupmenu" class="tab-list-spillover${shouldBeSelectable}">``).appendTo('body');
with this:
menuHtml = $(``<ul id="tab-container-popupmenu" class="tab-list-spillover${shouldBeSelectable}">``).appendTo(window.$FEF_TOP_LEVEL_ELEMENT_SELECTOR);
Describe the solution you'd like
A way to configure the top level element where IDS/Soho will be referenced.
Describe alternatives you've considered
Other than continuing to fork, we don't have any. Also another alternative is to prefix all components for example ids-grid, ids-dropdown ect. This may be more work but might be more flexible
Additional context
This is a request from the GT Nexus Front-End Framework team.
The text was updated successfully, but these errors were encountered: