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

Restrict Line height in style attributes is not !important to multi-line elements? [78fd32] #1686

Closed
WilcoFiers opened this issue Aug 18, 2021 · 3 comments
Assignees

Comments

@WilcoFiers
Copy link
Member

The Line height in style attributes is not !important rule applies to any element, regardless of position or size. What struck me is that the examples are all one-line texts, in which case it doesn't seem like it should matter if the line-height can be adjusted.

I'm not even entirely convinced the line-height between different elements should be adjustable. Adding margin or padding might be another way in which the distance between two lines can be arranged. The same is even true of inline elements. If my text is full of links with a top-margin of .5em, those lines will be spaced out 1.5x, even if the line-height property itself is set to 1.

@tbostic32
Copy link
Collaborator

For the first suggestion, should we add some examples where we force there to be multiple lines of text? During our meeting I recall discussing that we could zoom in enough to cause it to wrap to multiple lines, but we could just as easily add an example (or make most examples) use multiline text.

I'm not sure I understand what you mean about the line-height between elements being adjustable. At least for this rule it is specific to a single element. Were you thinking we expand this definition and include new examples or create a new rule that handles these cases?

@WilcoFiers
Copy link
Member Author

  1. Yeah, I think forcing multi-line could work. Probably just stick in a p element with a max-width and text that's longer than that.

  2. I think we keep the rule as is, but I think an example that shows how padding can be used to create enough space between two elements so that even if the line-height is pinned with !important, that there isn't an issue.

@WilcoFiers
Copy link
Member Author

This has been resolved. Closing the issue.

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

No branches or pull requests

2 participants