Skip to content

Add CSS to clock module to prevent line breaking of sunrise/sunset information #3816

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

dathbe
Copy link

@dathbe dathbe commented Jun 23, 2025

  1. Base your pull requests against the develop branch.
    Done
  2. Include these infos in the description:
  • Does the pull request solve a related issue?
    No
  • If so, can you reference the issue like this Fixes #<issue_number>?
    N/A
  • What does the pull request accomplish? Use a list if needed.
    With some combinations of sunrise and sunset times (usually when the time till rise/set is >9:59), the information will break across multiple lines. This prevents that by adding CSS.
  • If it includes major visual changes please add screenshots.
    I don't consider it major.
  1. Please run npm run lint:prettier before submitting so that style issues are fixed.
    Done
  2. Don't forget to add an entry about your changes to the CHANGELOG.md file.
    Done

@dathbe dathbe changed the title Patch 2 Add CSS to clock module to prevent line breaking of sunrise/sunset information Jun 23, 2025
@KristjanESPERANTO
Copy link
Collaborator

Looks good, but as there is not an open issue: Could you please provide a screenshot from before and one from after your changes?

@dathbe
Copy link
Author

dathbe commented Jun 23, 2025

Before:
before

After:
after

@dathbe
Copy link
Author

dathbe commented Jun 23, 2025

After spacing cleaned up:

after2

Copy link
Collaborator

@rejas rejas left a comment

Choose a reason for hiding this comment

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

thanks for the cleanup. some paddings can be done more elegantly though.

@@ -90,13 +90,25 @@
.module.clock .sun,
.module.clock .moon {
display: flex;
white-space: nowrap;
padding-top: 3px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this padding should be a gap between all child-elements of the "digital" parent. add a flex and this padding there.

}

.module.clock .sun > *,
.module.clock .moon > * {
flex: 1;
}

.module.clock .fa-sun,
.module.clock .fa-moon {
padding-left: 3px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

the sun and moon classes should get this padding as a gap property too.


.module.clock .fa-arrow-up,
.module.clock .fa-arrow.down {
padding-left: 10px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here, add ing the gap to the sun/moon should get rid of this padding.

@dathbe
Copy link
Author

dathbe commented Jun 24, 2025

I've simplified it, but I think the padding-top for .sun and .moon is still needed because adding flex to the digital class completely rearranges the elements of the module.

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.

3 participants