mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
add left padding for ordered list
In osu-md.less, this rule style[1] removes padding left in ordered list. But in this rule style[2], pseudo element `::before` is used as marker or counter and has minimal width 30px. So we use this as left padding size. [1]5b0e3ac3ff/resources/assets/less/bem/osu-md.less (L196-L200)
[2]5b0e3ac3ff/resources/assets/less/bem/osu-md.less (L210-L219)
This commit is contained in:
parent
c0d9f9f8c6
commit
e6579352f9
@ -14,7 +14,9 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
private readonly int level;
|
||||
private readonly int order;
|
||||
private readonly bool isOrdered;
|
||||
private const float default_left_padding = 20;
|
||||
|
||||
private const float ordered_left_padding = 30;
|
||||
private const float unordered_left_padding = 20;
|
||||
|
||||
[Resolved]
|
||||
private IMarkdownTextComponent parentTextComponent { get; set; }
|
||||
@ -29,7 +31,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
AutoSizeAxes = Axes.Y;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Padding = new MarginPadding { Left = default_left_padding };
|
||||
Padding = new MarginPadding { Left = isOrdered ? ordered_left_padding : unordered_left_padding };
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user