Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[list] fix styling of multi-digit ordered lists (#1130)#2142

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
SnirBroshi wants to merge1 commit intofomantic:develop
base:develop
Choose a base branch
Loading
fromSnirBroshi:patch-3

Conversation

SnirBroshi
Copy link
Contributor

@SnirBroshiSnirBroshi commentedOct 23, 2021
edited
Loading

Description

Fixes styling of multi-digit ordered lists - made the number aligned to the right of the text, so that when more digits are required they will be added on the left and the right edge of the number will stay in place.

I usedtranslateX(-100%) to keep the right edge in a constant position, and adjusted the margin a bit since it previously accounted for the width of the number itself. The number I adjusted it to is to keep the look of numbers with single digits the same.

Testcase

https://jsfiddle.net/futybd2v/

Screenshot

Current (left) vs fixed (right)
image

Closes

Fixes#1130

@lubber-delubber-de added state/awaiting-reviewsPull requests which are waiting for reviews lang/cssAnything involving CSS labelsOct 23, 2021
@lubber-delubber-de added this to the2.9.0 milestoneOct 23, 2021
@lubber-delubber-de added the type/bugAny issue which is a bug or PR which fixes a bug labelOct 23, 2021
Copy link
Member

@lubber-delubber-de left a comment
edited
Loading

Choose a reason for hiding this comment

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

Thanks for the PR. I changed your jsfiddle to use the same selector as used by the patch itself.
https://jsfiddle.net/lubber/L8f627oy/9/
You will recognize that nested ordered lists are not properly positioned anymore:
image
To fix this, you shouldremove the following code, because it is not needed by your translatex(-100%) approach anymore (as the variable@orderedChildCountOffset is then not used, you can also remove it fromlist.variables OR simply set the variable to 0.65rem as well (somehow more backward compatible if people might have changed it in their custom themes)..

ol.ui.listolli:before,
.ui.ordered.list.list>.item:before {
margin-left:@orderedChildCountOffset;
}

Seehttps://jsfiddle.net/lubber/L8f627oy/11/
image

Also, such kinda long lists now do not have a nice left padding space anymore (at least when the counter reaches 100), so i suggest 2 additional changes

  • Change the suffixed list margin left from 1.25rem to 1.5rem (because the dot moves even single numbers too much to the left otherwise) ONLY to the first list element (not for nested ones)
  • Invent a newlong variant which further increases the left margin to 2rem, again ONLY to the first list element (not for nested ones)
ol.ui.suffixed.list,.ui.suffixed.ordered.list,ol.ui.suffixed.listol {margin-left:1.5rem;}ol.ui.long.list,.ui.ordered.long.list,ol.ui.long.listol {margin-left:2rem;}

Seehttps://jsfiddle.net/lubber/L8f627oy/24/

@lubber-de
Copy link
Member

@NotWearingPants Are you interested in continuation to work on this PR? Please see my review 😉

@SnirBroshi
Copy link
ContributorAuthor

@lubber-de I am, but finding the time isn't always easy :) I'mma try now

lubber-de reacted with thumbs up emoji

@lubber-delubber-de added the state/awaiting-changesAnything which is awaiting changes labelNov 9, 2021
@lubber-de
Copy link
Member

@NotWearingPants Do you think you can work on this again?

@lubber-delubber-de removed the state/awaiting-reviewsPull requests which are waiting for reviews labelJan 6, 2022
@lubber-delubber-de modified the milestones:2.9.0,2.9.xJan 6, 2022
@lubber-delubber-de added state/awaiting-changesAnything which is awaiting changes state/on-holdIssues and pull requests which are on hold for any reason state/awaiting-responseIssues or pull requests waiting for a response and removed state/awaiting-changesAnything which is awaiting changes labelsFeb 1, 2022
@lubber-de
Copy link
Member

@NotWearingPants Maybe this got forgotten: Do you think you can work on this again? Please see my review

@lubber-delubber-de marked this pull request as draftAugust 2, 2023 07:13
@ko2in
Copy link
Member

@lubber-de It's been too long for not replying. Should I take over or would you like to finish with your reviews?

@lubber-de
Copy link
Member

@lubber-de It's been too long for not replying. Should I take over or would you like to finish with your reviews?

My review was done already, so if you like you can take over

@lubber-delubber-de modified the milestones:2.9.x,2.10.xNov 22, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lubber-delubber-delubber-de requested changes

@ColinFrickColinFrickAwaiting requested review from ColinFrick

@exoegoexoegoAwaiting requested review from exoego

@y0hamiy0hamiAwaiting requested review from y0hami

@ko2inko2inAwaiting requested review from ko2in

@prudhoprudhoAwaiting requested review from prudho

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

lang/cssAnything involving CSSstate/awaiting-responseIssues or pull requests waiting for a responsestate/on-holdIssues and pull requests which are on hold for any reasontype/bugAny issue which is a bug or PR which fixes a bug

Projects

None yet

Milestone

2.10.x

Development

Successfully merging this pull request may close these issues.

Ordered and suffix list styles bug after 9.

3 participants

@SnirBroshi@lubber-de@ko2in

[8]ページ先頭

©2009-2025 Movatter.jp