Skip to content
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

Review the use of utility classes #5

Open
MattMcAdams opened this issue Jun 15, 2021 · 0 comments
Open

Review the use of utility classes #5

MattMcAdams opened this issue Jun 15, 2021 · 0 comments
Labels

Comments

@MattMcAdams
Copy link
Owner

I want to avoid including css classes as much as possible in core, leaving those kind of things to components. There are sometimes though when it makes sense to include classes to avoid duplicating code and to help encourage better markup.

.callout for example is included to style a box as if it were a blockquote. I made this decision because often we reach for <blockquote> when we're really writing an admonishment or to call attention to some bit of information, which is not the correct use of the element.

There is also an argument that an admonishment should not be styled like a blockquote because it could be considered deceitful to present one ui element as another when they are semantically different.

That's just one example, but I also want to review the inclusion of utility classes like those for typography sizes, such as .txt-h2 which styles an element as though it were an h2 (which again, could fall into the same argument above). This is not meant to be a utility heavy css boilerplate. Its not the direction I want to go, so I may eventually remove these.

Other classes, such as the video and table wrappers are necessary for those to be responsive, so those will likely be left in unless there is a more semantic way of doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant