This repository was archived by the owner on Mar 4, 2020. It is now read-only.
fix(Checkbox): fix gap styling in RTL#1683
Merged
layershifter merged 6 commits intomasterfrom Jul 19, 2019
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1683 +/- ##
==========================================
+ Coverage 71.2% 71.27% +0.06%
==========================================
Files 857 855 -2
Lines 7098 7056 -42
Branches 2028 2012 -16
==========================================
- Hits 5054 5029 -25
+ Misses 2038 2021 -17
Partials 6 6
Continue to review full report at Codecov.
|
kuzhelov
reviewed
Jul 19, 2019
| position: 'relative', | ||
|
|
||
| display: 'inline-flex', | ||
| // CSS Grid is polifilled only with latest inline-style-prefixer |
Contributor
There was a problem hiding this comment.
could you, please, provide exact version you are implying here?
Member
Author
There was a problem hiding this comment.
I created an issue #1686, so it will be tracked. We use 5.0.3, but it works from 5.1.0: https://github.com/weserio/inline-style-prefixer/blob/master/CHANGELOG.md#510
kuzhelov
reviewed
Jul 19, 2019
| }, | ||
| label: ({ props: p }): ICSSInJSStyle => ({ | ||
| '-ms-grid-column': p.labelPosition === 'start' ? 1 : 3, | ||
| display: 'block', // IE11: should be forced `block`, `inline-block` will be broken |
Contributor
There was a problem hiding this comment.
nit:
IE11: should be forced to be
block, asinline-blockis not supported
kuzhelov
approved these changes
Jul 19, 2019
alinais
approved these changes
Jul 19, 2019
layershifter
added a commit
that referenced
this pull request
Jul 19, 2019
* fix(Checkbox): fix gap styling in RTL * polish styles * add CHANGELOG and new screener test * apply review comment (cherry picked from commit c965ce6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1676.
Problem
We need to have a gap between
labelandiconslots. There are three options to solve this issue.Flex-like approach
CONS:
marginRightwill be applied in unpredictable way and will overridemarginprovided by user on slots.Element approach
Create a new element and specify a margin/width on it.
CONS: We will have a useless element in markup.
Grid approach
CSS Grid has a native support for a gap. There are issues with support in IE11, but all of them are resolved via prefixed properties. Approach with a gap support was taken from
autoprefixer.✅ Winner
Look across browsers in RTL
IE11
Firefox
Chrome
Layout fix
Using Grid has more one benefit, it stratches columsn and it is actually fixes the common use case.
0.34.1Current PR