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

C2LC-400: Removed seemingly unnecessary margin-bottom from toggle switch inner circle. #204

Open
wants to merge 5 commits into
base: develop-1.0
Choose a base branch
from

Conversation

the-t-in-rtf
Copy link
Contributor

@the-t-in-rtf the-t-in-rtf commented Jun 23, 2021

See C2LC-400 for details.

@the-t-in-rtf
Copy link
Contributor Author

In working on C2LC-333, Sepi pointed out issues with the vertical alignment of the toggle switch inner circle. Although I suspect those issues were unique to the pull, I did notice that the bottom margin seemingly has no effect, this pull cleans that up.

@@ -26,7 +26,6 @@
background: #F1F1F1;
border-radius: 50%;
display: inline-block;
margin-bottom: 0.1rem;
Copy link
Contributor

@chosww chosww Jun 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this margin has no effect at all -- I changed it to 100rem and still look the same, which means that we can get rid of margin-top on the next line as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned this up and a similar one in the Audio Feedback toggle. I checked the expand add node as well.

@chosww
Copy link
Contributor

chosww commented Jun 28, 2021

Thanks for the work @the-t-in-rtf and I apologize for the late review. I have checked and what's causing that weird vertical alignment issue was max-height set on ToggleSwitch component on line https://github.com/the-t-in-rtf/c2lc-coding-environment/blob/027ed1953ca00c8f8e93c24f7a75887fe53216ed/src/ToggleSwitch.scss#L5. AudioToggleSwitch has the value set to 2.6 and other toggle switches have 2.5rem specified in ToggleSwitch component. After I changed the max-height value set in ToggleSwitch to 2.6rem, every toggle switches look vertically centred. We can also remove all the margins (not just margin bottoms you removed, but also margin-tops) specified for the inner circle of the toggle switches.

@the-t-in-rtf
Copy link
Contributor Author

The max height was already set to 2.6rem?

I was able to remove the margin-top from the audio feedback toggle's inner circle, but it appears necessary for the main toggles. If I comment it out the alignment for those is off again. With the margin:

with-margin-top

And without:

without-margin-top

@chosww
Copy link
Contributor

chosww commented Jun 30, 2021

The max height was already set to 2.6rem?

I was able to remove the margin-top from the audio feedback toggle's inner circle, but it appears necessary for the main toggles. If I comment it out the alignment for those is off again. With the margin:

with-margin-top

And without:

without-margin-top

Currently that AudioToggleSwitch's max height is 2.6 but the ToggleSwitch's max height is set to 2.5.

@the-t-in-rtf
Copy link
Contributor Author

I get it now, you changed all of the toggles to use 2.6rem. I thought you meant that one of them didn't have rem units.

@the-t-in-rtf the-t-in-rtf changed the base branch from develop-0.9 to develop-0.9.1 September 27, 2021 14:42
@the-t-in-rtf the-t-in-rtf changed the base branch from develop-0.9.1 to develop-1.0 October 12, 2021 12:41
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

Successfully merging this pull request may close these issues.

Vertical alignment of toggle inner circle is off for some text sizes
2 participants