-
Notifications
You must be signed in to change notification settings - Fork 76
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
Tooling: Make sure that components are honoring a correct default display value. #2513
Comments
Other components with issues:
We should probably just have a test for every component I think. |
A few questions on this one.
In any case, I think we could enhance the renders("calcite-foo", { displayAs: "block" }); |
No, I don't think so. It depends on the component.
Yes, I know that some of our components are displayed as block, flex, or inline-flex by default. We should just keep them consistent once we decide and probably document their default display as well. The problem I'm seeing at this time is that some do not set a display at all and by default that makes them |
@jcfranco I can take this one if you want. |
Thanks for tackling this one, @driskull! I had asked if we had a default display based on our common component structure (I think most use an internal wrapper) to possibly define a default on the global CSS and define needed overrides in individual component stylesheets. If applicable, this could slightly reduce the file size while simplifying the pattern and test util. WDYT? |
Gotcha. I don't think we're supposed to define It seems like we don't really have a default display anyway. Our "inline" components are displayed as either Maybe we could work to make these all |
Even if we can't/won't do it on a calcite-global selector level, I think we could define the default on
A custom JSDoc tag would be useful. |
Yeah that kind of makes sense since most native elements are either block or inline by default. Maybe we should follow. That means any parent component would need to style slotted children to be flex. |
Verified locally! |
Summary
I've noticed a few components that are by default displayed as inline but should probably be displayed as block by default.
For example, a new component
calcite-list
is displayed asinline
by default. cc @asangmacalcite-alert
is also displayed asinline
by default.It seems this is an issue with more than a few components.
Measure of Success
All components are displayed correctly by default.
Resources
Maybe we can add a common test to help make sure that the components are honoring a default display?
cc @jcfranco @julio8a can you please prioritize?
The text was updated successfully, but these errors were encountered: