Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Colour chooser functions

@use "sass:math";

@function color-chooser($dark, $light) {
@return unquote('color-chooser(') + $dark + unquote(', ') + $light + unquote(')');
}
Expand Down Expand Up @@ -144,7 +146,7 @@ $font-size-h6: 14px !default;
$font-size-body: 14px !default;
$font-size-caption: 12px !default;

$font-size-sm: percentage($font-size-caption / $font-size-body) !default;
$font-size-sm: percentage(math.div($font-size-caption, $font-size-body)) !default;

$material-icon-size: 24px !default;

Expand Down Expand Up @@ -231,9 +233,9 @@ $btn-line-height: 1 !default;
$btn-padding-x: $spacer !default;
$btn-padding-x-lg: $spacer !default;
$btn-padding-x-sm: $spacer !default;
$btn-padding-y: (($btn-height - $btn-font-size * $btn-line-height) / 2) !default;
$btn-padding-y-lg: (($btn-height-lg - $btn-font-size-lg * $btn-line-height) / 2) !default;
$btn-padding-y-sm: (($btn-height-sm - $btn-font-size-sm * $btn-line-height) / 2) !default;
$btn-padding-y: (($btn-height - $btn-font-size * $btn-line-height) * 0.5) !default;
$btn-padding-y-lg: (($btn-height-lg - $btn-font-size-lg * $btn-line-height) * 0.5) !default;
$btn-padding-y-sm: (($btn-height-sm - $btn-font-size-sm * $btn-line-height) * 0.5) !default;



Expand Down Expand Up @@ -268,7 +270,7 @@ $chip-icon-color-light: $black-secondary !default;
$chip-inner-spacer-x: $spacer-x-inline !default;
$chip-line-height: $line-height-base !default;
$chip-padding-x: $spacer !default;
$chip-padding-y: (($chip-height - $chip-font-size * $chip-line-height) / 2) !default;
$chip-padding-y: (($chip-height - $chip-font-size * $chip-line-height) * 0.5) !default;
$chip-sm-scale: .75 !default;


Expand Down Expand Up @@ -303,7 +305,7 @@ $dropdown-link-bg-hover-dark: $white-divider !default;
$dropdown-link-bg-hover-light: $black-divider !default;
$dropdown-link-height: $control-height-sm !default;
$dropdown-link-padding-x: $spacer-lg !default;
$dropdown-link-padding-y: (($dropdown-link-height - $dropdown-font-size * $dropdown-line-height) / 2) !default;
$dropdown-link-padding-y: (($dropdown-link-height - $dropdown-font-size * $dropdown-line-height) * 0.5) !default;
$dropdown-padding-x: 0 !default;
$dropdown-padding-y: $spacer !default;

Expand Down Expand Up @@ -373,7 +375,7 @@ $nav-link-line-height: 1 !default;
$nav-link-opacity: .7 !default;
$nav-link-opacity-active: 1 !default;
$nav-link-padding-x: $spacer !default;
$nav-link-padding-y: (($control-height - $nav-link-font-size * $nav-link-line-height) / 2) !default;
$nav-link-padding-y: (($control-height - $nav-link-font-size * $nav-link-line-height) * 0.5) !default;
$nav-item-spacer-x: 1px !default;
$nav-item-spacer-y: 1px !default;

Expand Down Expand Up @@ -456,4 +458,4 @@ $text-field-line-height: 1.5 !default;
$text-field-margin-y: $spacer-y-inline !default;
$text-field-min-width: 200px !default;
$text-field-padding-x: 12px !default;
$text-field-padding-y: (($text-field-height - $text-field-border-width * 2 - $text-field-font-size * $text-field-line-height) / 2) !default;
$text-field-padding-y: (($text-field-height - $text-field-border-width * 2 - $text-field-font-size * $text-field-line-height) * 0.5) !default;
22 changes: 11 additions & 11 deletions scss/common/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ table {
margin-bottom: $spacer-y;

button {
margin-right: ($card-inner-spacer-x / 2);
margin-right: ($card-inner-spacer-x * 0.5);
}

label {
Expand Down Expand Up @@ -183,7 +183,7 @@ table {
margin-left: auto;

&:not(:first-child) {
padding-left: ($card-inner-spacer-x / 2 - $nav-item-spacer-x);
padding-left: ($card-inner-spacer-x * 0.5 - $nav-item-spacer-x);
}
}
}
Expand Down Expand Up @@ -442,7 +442,7 @@ table {
.components-list {
@include typography-caption;

margin-top: ($spacer-y-inline / 2);
margin-top: ($spacer-y-inline * 0.5);
}

.info {
Expand Down Expand Up @@ -556,7 +556,7 @@ table {
}

.external-link {
margin-bottom: ($spacer-y / 2);
margin-bottom: ($spacer-y * 0.5);

&:last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -913,7 +913,7 @@ table {
}

.close {
margin-top: (($font-size-h4 * $line-height-h4 - $font-size-base * $line-height-base) / 2);
margin-top: (($font-size-h4 * $line-height-h4 - $font-size-base * $line-height-base) * 0.5);
}

.inline-spinner {
Expand Down Expand Up @@ -1246,11 +1246,11 @@ table {
.staff-action-logs-controls {
a {
&.filter {
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
font-size: $chip-font-size;
line-height: 1;
margin-top: ($spacer-y-inline / 2);
margin-bottom: ($spacer-y-inline / 2);
margin-top: ($spacer-y-inline * 0.5);
margin-bottom: ($spacer-y-inline * 0.5);
padding: $chip-padding-y $chip-padding-x;

i {
Expand Down Expand Up @@ -1374,7 +1374,7 @@ table {
}

&.topic-map-examples .topic-map {
margin-top: ($btn-height + $card-inner-spacer-y / 2);
margin-top: ($btn-height + $card-inner-spacer-y * 0.5);
}

.section-description {
Expand All @@ -1394,7 +1394,7 @@ table {

border-bottom-color: color-chooser($white-divider, $black-divider);
margin-bottom: 0;
padding: ($card-padding-y / 2) $card-padding-x;
padding: ($card-padding-y * 0.5) $card-padding-x;
}

.rendered {
Expand Down Expand Up @@ -1531,7 +1531,7 @@ table {

.watched-word-box {
background-color: color-chooser($chip-bg-dark, $chip-bg-light);
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
color: inherit;
font-size: $font-size-sm;
margin-right: $spacer-x-inline;
Expand Down
26 changes: 13 additions & 13 deletions scss/common/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

.btn {
flex-shrink: 0;
margin-left: ($spacer-x / 2);
margin-left: ($spacer-x * 0.5);
}
}
}
Expand All @@ -42,7 +42,7 @@
.badge-group,
.badge-notification {
align-items: center;
border-radius: ($font-size-base * $line-height-base / 2);
border-radius: ($font-size-base * $line-height-base * 0.5);
display: inline-flex;
font-size: $font-size-sm;
justify-content: center;
Expand Down Expand Up @@ -72,7 +72,7 @@
&.bar {
align-items: center;
background-color: color-chooser($chip-bg-dark, $chip-bg-light);
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
font-size: $chip-font-size;
line-height: $chip-line-height;
margin-right: $spacer-x-inline;
Expand Down Expand Up @@ -101,25 +101,25 @@
}

&.box {
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
font-size: $chip-font-size;
line-height: $chip-line-height;
margin-right: $spacer-x-inline;
padding: 0;

.badge-category {
align-items: center;
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
min-height: $chip-height;
padding: $chip-padding-y $chip-padding-x;
}

.badge-category-bg {
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
}

.badge-category-parent-bg {
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
width: calc(100% - #{$chip-inner-spacer-x});

+ .badge-category-bg {
Expand All @@ -140,7 +140,7 @@
&.bullet {
align-items: center;
background-color: color-chooser($chip-bg-dark, $chip-bg-light);
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
font-size: $chip-font-size;
line-height: $line-height-base;
margin-right: $spacer-x-inline;
Expand All @@ -149,7 +149,7 @@

.badge-category {
align-items: center;
border-radius: ($chip-height / 2);
border-radius: ($chip-height * 0.5);
min-height: $chip-height;
padding: $chip-padding-y 0 $chip-padding-y $chip-inner-spacer-x;
}
Expand All @@ -162,13 +162,13 @@
}

.badge-category-parent-bg {
border-radius: ($material-icon-size / 2) 0 0 ($material-icon-size / 2);
border-radius: ($material-icon-size * 0.5) 0 0 ($material-icon-size * 0.5);
height: $material-icon-size;
width: ($material-icon-size / 2);
width: ($material-icon-size * 0.5);

+ .badge-category-bg {
border-radius: 0 ($material-icon-size / 2) ($material-icon-size / 2) 0;
width: ($material-icon-size / 2);
border-radius: 0 ($material-icon-size * 0.5) ($material-icon-size * 0.5) 0;
width: ($material-icon-size * 0.5);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions scss/common/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ blockquote {
}

&::after {
right: ($material-icon-size / 2);
bottom: ($material-icon-size / 2);
right: ($material-icon-size * 0.5);
bottom: ($material-icon-size * 0.5);
}

&::before {
top: ($material-icon-size / 2);
left: ($material-icon-size / 2);
top: ($material-icon-size * 0.5);
left: ($material-icon-size * 0.5);
transform: rotate(180deg);
}
}
Expand Down
24 changes: 12 additions & 12 deletions scss/common/_cooked-aside.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ aside {
}

header {
margin-bottom: ($card-inner-spacer-y / 2);
margin-bottom: ($card-inner-spacer-y * 0.5);
}

+ .onebox {
Expand All @@ -53,7 +53,7 @@ aside {
h4 {
@include typography-h5;

margin-bottom: ($card-inner-spacer-y / 2);
margin-bottom: ($card-inner-spacer-y * 0.5);
overflow: hidden;
}

Expand All @@ -74,14 +74,14 @@ aside {
}

.aspect-image {
margin-top: (($font-size-h5 * $line-height-h5 - $font-size-h5) / 2);
margin-top: (($font-size-h5 * $line-height-h5 - $font-size-h5) * 0.5);
margin-right: ($card-inner-spacer-x * 2);
margin-bottom: ($card-inner-spacer-y / 2);
margin-bottom: ($card-inner-spacer-y * 0.5);
width: ($card-padding-x * 6);
}

.date {
margin-bottom: ($card-inner-spacer-y / 2);
margin-bottom: ($card-inner-spacer-y * 0.5);
overflow: hidden;

&,
Expand All @@ -102,9 +102,9 @@ aside {
.onebox-avatar {
border-radius: 50%;
height: $card-avatar-size;
margin-top: ($card-inner-spacer-y / 4);
margin-top: ($card-inner-spacer-y * 0.25);
margin-right: $card-inner-spacer-x;
margin-bottom: ($card-inner-spacer-y / 4);
margin-bottom: ($card-inner-spacer-y * 0.25);
width: $card-avatar-size;
}
}
Expand Down Expand Up @@ -230,7 +230,7 @@ div {

.poll-buttons {
border-top-color: color-chooser($table-border-color-dark, $table-border-color-light);
padding: ($card-padding-y / 2) ($card-padding-x - $card-inner-spacer-x);
padding: ($card-padding-y * 0.5) ($card-padding-x - $card-inner-spacer-x);

a {
@include btn-base;
Expand Down Expand Up @@ -286,13 +286,13 @@ div {

li {
display: block;
margin-right: ($card-inner-spacer-x / 2);
margin-right: ($card-inner-spacer-x * 0.5);
margin-bottom: 0;
}
}

.poll-voters-list {
margin-top: ($card-inner-spacer-y / 4);
margin-top: ($card-inner-spacer-y * 0.25);
}

.results {
Expand Down Expand Up @@ -337,7 +337,7 @@ div {
}

.option {
margin-bottom: ($card-inner-spacer-y / 4);
margin-bottom: ($card-inner-spacer-y * 0.25);
padding-bottom: 0;
}
}
Expand All @@ -348,7 +348,7 @@ div {
&.gfycat,
&.whitelistedgeneric {
.site-icon {
margin-right: ($card-inner-spacer-x / 2);
margin-right: ($card-inner-spacer-x * 0.5);
vertical-align: text-top;
}
}
Expand Down
4 changes: 2 additions & 2 deletions scss/common/_cooked.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
h4,
h5,
h6 {
margin: 0 0 ($card-inner-spacer-y / 2);
margin: 0 0 ($card-inner-spacer-y * 0.5);
}

h1 {
Expand Down Expand Up @@ -127,7 +127,7 @@
h4,
h5,
h6 {
margin: 0 0 ($card-inner-spacer-y / 2);
margin: 0 0 ($card-inner-spacer-y * 0.5);
}

h1 {
Expand Down
Loading