Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

form-choice__label doesn't wrap in IE #4

Open
remco-freshheads opened this issue Oct 30, 2017 · 6 comments
Open

form-choice__label doesn't wrap in IE #4

remco-freshheads opened this issue Oct 30, 2017 · 6 comments
Labels

Comments

@remco-freshheads
Copy link
Contributor

remco-freshheads commented Oct 30, 2017

Text in <label class="form-choice__label">...</label> breaks through the width set on a layout__item, found in IE10:

screen shot 2017-10-30 at 09 13 27

@martinbroos
Copy link
Member

@remco-freshheads
Copy link
Contributor Author

remco-freshheads commented Oct 31, 2017

I've already tried it with max-width: 100%;, but that won't change a thing, even when i've set it to 10px. The other attributes are already there (box-sizing: border-box + padding on the container).

@martinbroos
Copy link
Member

martinbroos commented Nov 7, 2017

It looks like we can only solve this by adding a browser hack to target IE10. The problem is that this is not possible without javascript. CSS browser hacks like:

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { .selector { property:value; } }

Will also target IE11 where the problem doesn't occur. We could also stop using inline-flex but that's a step back in my opinion.
I suggest we leave this to the developer, if you have long radio / checkbox labels and you want to support IE10 and below you must insert a browser hack in your code.
For options see: https://gist.github.com/vidaaudrey/c16774076391d09e7ec7dbb7ed7a3189

@remco-freshheads
Copy link
Contributor Author

Another problem found caused by the styling from this label.

screen shot 2017-12-05 at 14 58 36

This is solved if the :before has display: inline-block instead of block. And the label shouldn't have display: inline-flex..

@martinbroos
Copy link
Member

Ok if more problems occur with using flexbox we should drop it and go for the safer option of using display inline-block. There are not many advantages of using inline-flex in this situation anyway.

remco-freshheads added a commit to remco-freshheads/maatcss that referenced this issue Jun 26, 2019
…ng document and ugly styling when there are HTMLElements in the form label
@martinbroos
Copy link
Member

Let't check if this problem still occurs and if PR should be merged. IE10 support is no longer required but it should also wrapping when other html elements are used it checkbox label.

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

No branches or pull requests

2 participants