Cleaned up margins to use functions for computation

This commit is contained in:
squidfunk 2020-03-17 11:57:42 +01:00
parent dd2f2c879a
commit 6892fdebd9
3 changed files with 17 additions and 17 deletions

View File

@ -301,11 +301,11 @@ kbd {
// Superscript and subscript // Superscript and subscript
sup, sup,
sub { sub {
margin-left: 0.0625em * 1 / 0.8; margin-left: px2em(1px, 12.8px);
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: 0.0625em * 1 / 0.8; margin-right: px2em(1px, 12.8px);
margin-left: initial; margin-left: initial;
} }
} }
@ -333,12 +333,12 @@ kbd {
// Unordered and ordered lists // Unordered and ordered lists
ul, ul,
ol { ol {
margin-left: 0.625em; margin-left: px2em(10px, 16px);
padding: 0; padding: 0;
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: 0.625em; margin-right: px2em(10px, 16px);
margin-left: initial; margin-left: initial;
} }
@ -355,11 +355,11 @@ kbd {
// List elements // List elements
li { li {
margin-bottom: 0.5em; margin-bottom: 0.5em;
margin-left: 1.25em; margin-left: px2em(20px, 16px);
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: 1.25em; margin-right: px2em(20px, 16px);
margin-left: initial; margin-left: initial;
} }
@ -377,11 +377,11 @@ kbd {
// Nested lists // Nested lists
ul, ul,
ol { ol {
margin: 0.5em 0 0.5em 0.625em; margin: 0.5em 0 0.5em px2em(10px, 16px);
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: 0.625em; margin-right: px2em(10px, 16px);
margin-left: initial; margin-left: initial;
} }
} }
@ -390,11 +390,11 @@ kbd {
// Definition lists // Definition lists
dd { dd {
margin: 1em 0 1em 1.875em; margin: 1em 0 1em px2em(30px, 16px);
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: 1.875em; margin-right: px2em(30px, 16px);
margin-left: initial; margin-left: initial;
} }
} }

View File

@ -31,8 +31,8 @@
del.critic, del.critic,
ins.critic, ins.critic,
.critic.comment { .critic.comment {
margin: 0 0.25em; margin: 0 px2em(4px, 16px);
padding: 0.0625em 0; padding: px2em(1px, 16px) 0;
border-radius: px2rem(2px); border-radius: px2rem(2px);
box-decoration-break: clone; box-decoration-break: clone;
} }
@ -41,16 +41,16 @@
del.critic { del.critic {
background-color: $codehilite-diff-deleted; background-color: $codehilite-diff-deleted;
box-shadow: box-shadow:
+0.25em 0 0 $codehilite-diff-deleted, px2em( 4px, 16px) 0 0 $codehilite-diff-deleted,
-0.25em 0 0 $codehilite-diff-deleted; px2em(-4px, 16px) 0 0 $codehilite-diff-deleted;
} }
// Addition // Addition
ins.critic { ins.critic {
background-color: $codehilite-diff-inserted; background-color: $codehilite-diff-inserted;
box-shadow: box-shadow:
+0.25em 0 0 $codehilite-diff-inserted, px2em( 4px, 16px) 0 0 $codehilite-diff-inserted,
-0.25em 0 0 $codehilite-diff-inserted; px2em(-4px, 16px) 0 0 $codehilite-diff-inserted;
} }
// Comment // Comment