Closed Graxi closed 3 years ago
✔️ Deploy Preview for svgomg ready!
🔨 Explore the source changes: 5fe55d6a2257c5120eb44023485a1a3bc1d596b7
🔍 Inspect the deploy log: https://app.netlify.com/sites/svgomg/deploys/616d3d936466450008a1e190
😎 Browse the preview: https://deploy-preview-351--svgomg.netlify.app/
Shouldn't we wrap all items, though? It seems a little fragile to only do this for specific options only.
This change feels a bit hacky to me, but it's not your fault, it's flexbox's fault. I avoid flexbox these days if I can, it just doesn't behave how I expect in cases like this, or it requires extra markup to do simple things 😄
Could you fix this by making each
setting-item-toggle
a two column grid? Also, make the gap between the switch and text agap
rather than a margin on thematerial-switch
.You should be able to revert the markup change to
index.html
.
Hi I have updated the PR and made setting-item-toggle
two column structure. Would you like to review again? Let me know if further changes are needed please.
Shouldn't we wrap all items, though? It seems a little fragile to only do this for specific options only.
Hmm what do you mean? I think I have wrapped all setting-item-toggle
in index.html. Is there anywhere else?
@XhmikosR
Shouldn't we wrap all items, though? It seems a little fragile to only do this for specific options only.
I'm not suggesting doing this for specific options, I'm suggesting doing it for all of them.
@Graxi
Hi I have updated the PR and made
setting-item-toggle
two column structure.
I think there's been a mixup! The layout is still flexbox, and the HTML has still been modified.
Flexbox has a lot of confusing edge cases around this stuff, so I'm suggesting using grid instead.
As in, in the CSS, make each setting-item-toggle
a two-column, one-row grid rather than a flexbox. Also, make the gap between the switch and text a gap
rather than a margin
on the material-switch
.
Using grid means the HTML doesn't need to change at all, since it doesn't have these flexbox edge cases.
I know you are but I thought the current patch doesn't do that, my bad.
@Graxi
Hi I have updated the PR and made
setting-item-toggle
two column structure.I think there's been a mixup! The layout is still flexbox, and the HTML has still been modified.
Flexbox has a lot of confusing edge cases around this stuff, so I'm suggesting using grid instead.
As in, in the CSS, make each
setting-item-toggle
a two-column, one-row grid rather than a flexbox. Also, make the gap between the switch and text agap
rather than amargin
on thematerial-switch
.Using grid means the HTML doesn't need to change at all, since it doesn't have these flexbox edge cases.
@jakearchibald A little off the topic but IMHO Flexbox is still handy in this case. For example, it helps to do center alignment easily when the text has multiple lines. If we use two-column grid instead of the previous Flexbox, there is gonna be extra markup to deal with the center alignment of the two column. What I did is to wrap the elements and keep the existing styles.
Flexbox is still handy in this case. For example, it helps to do center alignment easily when the text has multiple lines. If we use two-column grid instead of the previous Flexbox, there is gonna be extra markup to deal with the center alignment of the two column
It seems fine in https://github.com/jakearchibald/svgomg/pull/352. Am I missing something?
Flexbox is still handy in this case. For example, it helps to do center alignment easily when the text has multiple lines. If we use two-column grid instead of the previous Flexbox, there is gonna be extra markup to deal with the center alignment of the two column
It seems fine in #352. Am I missing something?
Yeah it seems I misunderstood what you meant. Thanks for pointing it out
Fixes #307