refactor(docs-infra): grab scss constants using scss use syntax instead of the global imports (#41129)

move away from using global constants in scss files because @import will be deprecated soon

PR Close #41129
This commit is contained in:
AleksanderBodurri 2021-03-08 19:23:10 -05:00 committed by Andrew Kushnir
parent eff26e1be8
commit 21e35ece79
34 changed files with 69 additions and 7 deletions

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
html { html {
font-size: 62.5%; font-size: 62.5%;
} }

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
html, body { html, body {
height: 100%; height: 100%;
} }

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.nf-container { .nf-container {
align-items: center; align-items: center;
padding: 32px; padding: 32px;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
// Disable sidenav animations for the initial render. // Disable sidenav animations for the initial render.
.starting.mat-drawer-transition .mat-drawer-content { .starting.mat-drawer-transition .mat-drawer-content {
transition: none; transition: none;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
// VARIABLES // VARIABLES
$showTopMenuWidth: 1048px; $showTopMenuWidth: 1048px;
$hideTopMenuWidth: $showTopMenuWidth - 1; $hideTopMenuWidth: $showTopMenuWidth - 1;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.alert { .alert {
padding: 16px; padding: 16px;
margin: 24px 0px; margin: 24px 0px;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
/* API LIST STYLES */ /* API LIST STYLES */
aio-api-list { aio-api-list {

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.api-body { .api-body {
max-width: 1200px; max-width: 1200px;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
/* API SYMBOLS */ /* API SYMBOLS */
/* SYMBOL CLASS */ /* SYMBOL CLASS */

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
/* Button Styles */ /* Button Styles */
button { button {

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.callout { .callout {
@extend .alert; @extend .alert;
padding: 0px; padding: 0px;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.card-container { .card-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
code-example, code-example,
code-tabs { code-tabs {
clear: both; clear: both;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
aio-contributor-list { aio-contributor-list {
.contributor-group { .contributor-group {
display: flex; display: flex;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
aio-shell.mode-archive { aio-shell.mode-archive {
@include deploy-theme($blue-grey-900, $blue-grey-400); @include deploy-theme($blue-grey-900, $blue-grey-400);
} }

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
/* /*
* General styling to make detail/summary tags look a bit more material * General styling to make detail/summary tags look a bit more material
* To get the best out of it you should structure your usage like this: * To get the best out of it you should structure your usage like this:

View File

@ -1,3 +1,4 @@
@use '../constants' as *;
.error-list { .error-list {
display: grid; display: grid;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
// FEATURES MARKETING PAGE SPECIFIC STYLES // FEATURES MARKETING PAGE SPECIFIC STYLES
.feature-section { .feature-section {

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.filetree { .filetree {
background: $white; background: $white;
border: 4px solid $lightgray; border: 4px solid $lightgray;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.reviewed { .reviewed {
color: lighten($darkgray, 10); color: lighten($darkgray, 10);
@include font-size(13); @include font-size(13);

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.sidenav-content { .sidenav-content {
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
hr { hr {
border: none; border: none;
background: $lightgray; background: $lightgray;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.content { .content {
img { img {

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.api-header label { .api-header label {
border-radius: 4px; border-radius: 4px;
padding: 2px 10px; padding: 2px 10px;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
$notificationHeight: 56px; $notificationHeight: 56px;
// we need to override some of the toolbar styling // we need to override some of the toolbar styling

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
.presskit-container { .presskit-container {
padding: 0 32px 32px 32px; padding: 0 32px 32px 32px;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
aio-resource-list { aio-resource-list {
.showcase { .showcase {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
aio-search-results { aio-search-results {
z-index: 10; z-index: 10;

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
/* SELECT MENU */ /* SELECT MENU */
aio-select { aio-select {

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
table { table {
margin: 24px 0px; margin: 24px 0px;
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12); box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12);

View File

@ -1,3 +1,5 @@
@use '../constants' as *;
$tocItemLineHeight: 24; $tocItemLineHeight: 24;
$tocItemTopPadding: 9; $tocItemTopPadding: 9;
$tocMarkerRailSize: 1; $tocMarkerRailSize: 1;

View File

@ -1,3 +1,5 @@
@use './constants';
// REM Font Adjustments // REM Font Adjustments
@mixin font-size($sizeValue) { @mixin font-size($sizeValue) {
font-size: ($sizeValue) + px; font-size: ($sizeValue) + px;
@ -46,14 +48,14 @@
@mixin card($height, $width) { @mixin card($height, $width) {
height: $height; height: $height;
width: $width; width: $width;
background-color: $white; background-color: constants.$white;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12); box-shadow: 0 2px 2px rgba(constants.$black, 0.24), 0 0 2px rgba(constants.$black, 0.12);
box-sizing: border-box; box-sizing: border-box;
transition: box-shadow .5s; transition: box-shadow .5s;
&:hover { &:hover {
box-shadow: 0 8px 8px rgba($black, 0.24), 0 0 8px rgba($black, 0.12); box-shadow: 0 8px 8px rgba(constants.$black, 0.24), 0 0 8px rgba(constants.$black, 0.12);
text-decoration: none; text-decoration: none;
} }
} }

View File

@ -1,3 +1,5 @@
@use './constants' as *;
@media print { @media print {
// General Adjustments // General Adjustments

View File

@ -1,8 +1,5 @@
// import global themes // import global themes
@import './ng-io-theme'; @use './ng-io-theme';
// import global variables
@import './constants';
// import global mixins // import global mixins
@import './mixins'; @import './mixins';