From d152e7c8c306cae753754c00766dd038058d1730 Mon Sep 17 00:00:00 2001 From: b-l-i-n-d Date: Tue, 20 Oct 2026 08:51:20 +0600 Subject: [PATCH 1/6] fix(scss): modernize legacy Sass APIs and resolve deprecations - Modernize math functions (abs, unit, comparable) to sass:math (abs, unit, compatible, percentage) - Modernize list and meta builtins to sass:list (length, nth, index, append, zip) and sass:meta (type-of, variable-exists) - Modernize string functions to sass:string (slice, index, length, unquote) - Replace legacy color functions (darken, lighten) with sass:color (adjust, mix, channel, change) - Retain only 'import' in rspack silenceDeprecations, eliminating abs-percent, color-functions, global-builtin, and legacy-js-api --- .../src/scss/admin-dashboard/v2/_general.scss | 9 +-- .../v2/conditionals/conditionals.scss | 3 +- assets/src/scss/modules/certificate-list.scss | 3 +- rspack.config.mjs | 2 +- .../scss/components/_thumbnail-ulopader.scss | 6 +- v2-library/src/scss/mixins/_grid.scss | 11 ++-- v2-library/src/scss/mixins/_utilities.scss | 15 +++-- v2-library/src/scss/structure/_functions.scss | 65 ++++++++++--------- v2-library/src/scss/structure/vendor/rfs.scss | 35 +++++----- v2-library/src/scss/utility/_api.scss | 7 +- 10 files changed, 87 insertions(+), 69 deletions(-) diff --git a/assets/src/scss/admin-dashboard/v2/_general.scss b/assets/src/scss/admin-dashboard/v2/_general.scss index 2eb6afaf2f..3e4659671d 100644 --- a/assets/src/scss/admin-dashboard/v2/_general.scss +++ b/assets/src/scss/admin-dashboard/v2/_general.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; // WordPress Notices .tutor-screen-backend-settings { #wpbody-content { @@ -392,9 +393,9 @@ &:hover, &:focus { - background: darken(#e9edfb, 2); - box-shadow: 0 0 0 3px lighten(#e9edfb, 3); - border-color: lighten(#3e64de, 36); + background: color.adjust(#e9edfb, $lightness: -2%); + box-shadow: 0 0 0 3px color.adjust(#e9edfb, $lightness: 3%); + border-color: color.adjust(#3e64de, $lightness: 36%); } } } @@ -783,7 +784,7 @@ inset-inline-end: -12px; &:hover { - background-color: darken($color-danger, 6); + background-color: color.adjust($color-danger, $lightness: -6%); } } diff --git a/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss b/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss index c5039f3b52..c098aec8cb 100644 --- a/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss +++ b/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; // Toggle Disable -> Monitization > Monitization fees .monetization-fees.is-disable { .tutor-option-field-row { @@ -29,7 +30,7 @@ .revenue-percentage { input.warning { border-color: var(--tutor-danger-color) !important; - box-shadow: 0 0 0 3px lighten(red, 45) !important; + box-shadow: 0 0 0 3px color.adjust(red, $lightness: 45%) !important; } } diff --git a/assets/src/scss/modules/certificate-list.scss b/assets/src/scss/modules/certificate-list.scss index 366507886b..3028e9642f 100644 --- a/assets/src/scss/modules/certificate-list.scss +++ b/assets/src/scss/modules/certificate-list.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; // Tab -> #certificate .tutor-option-nav-page, .tutor-cb-templates-table { @@ -190,7 +191,7 @@ inset-inline-end: -12px; &:hover { - background-color: darken($color: $color-danger, $amount: 6); + background-color: color.adjust($color-danger, $lightness: -6%); } } diff --git a/rspack.config.mjs b/rspack.config.mjs index cd8c252e80..8521cb8c42 100644 --- a/rspack.config.mjs +++ b/rspack.config.mjs @@ -80,7 +80,7 @@ const createConfig = (env, options) => { implementation: 'sass', sassOptions: { outputStyle: isDevelopment ? 'expanded' : 'compressed', - silenceDeprecations: ['abs-percent', 'color-functions', 'global-builtin', 'import', 'legacy-js-api'], + silenceDeprecations: ['import'], }, }, }; diff --git a/v2-library/src/scss/components/_thumbnail-ulopader.scss b/v2-library/src/scss/components/_thumbnail-ulopader.scss index f0dc232e29..dcaab80e87 100644 --- a/v2-library/src/scss/components/_thumbnail-ulopader.scss +++ b/v2-library/src/scss/components/_thumbnail-ulopader.scss @@ -1,3 +1,5 @@ +@use 'sass:color'; + .tutor-thumbnail-uploader { width: 100%; @@ -63,7 +65,7 @@ inset-inline-end: -12px; &:hover { - background-color: darken($color: $color-danger, $amount: 6); + background-color: color.adjust($color-danger, $lightness: -6%); } } } @@ -85,4 +87,4 @@ } } } -} \ No newline at end of file +} diff --git a/v2-library/src/scss/mixins/_grid.scss b/v2-library/src/scss/mixins/_grid.scss index f10a60d3ca..e3d05dac2a 100644 --- a/v2-library/src/scss/mixins/_grid.scss +++ b/v2-library/src/scss/mixins/_grid.scss @@ -1,4 +1,6 @@ @use 'sass:map'; +@use 'sass:math'; +@use 'sass:meta'; // Grid system // @@ -19,7 +21,7 @@ @mixin make-col-ready($gutter: $grid-gutter-width) { // Add box sizing if only the grid is loaded - box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null); + box-sizing: if(meta.variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null); // Prevent columns from becoming too narrow when at smaller grid tiers by // always setting `width: 100%;`. This works because we set the width @@ -35,7 +37,7 @@ @mixin make-col($size: false, $columns: $grid-columns) { @if $size { flex: 0 0 auto; - width: percentage(divide($size, $columns)); + width: math.percentage(divide($size, $columns)); } @else { flex: 1 1 0; @@ -51,7 +53,7 @@ @mixin make-col-offset($size, $columns: $grid-columns) { $num: divide($size, $columns); - margin-inline-start: if($num == 0, 0, percentage($num)); + margin-inline-start: if($num == 0, 0, math.percentage($num)); } // Row columns @@ -69,8 +71,7 @@ // Framework grid generation // // Used only by Bootstrap to generate the correct number of grid classes given -// any value of `$grid-columns`. - +// any value of `$grid-columns`.\n @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { @each $breakpoint in map.keys($breakpoints) { $infix: breakpoint-infix($breakpoint, $breakpoints); diff --git a/v2-library/src/scss/mixins/_utilities.scss b/v2-library/src/scss/mixins/_utilities.scss index 09e588b14b..e03e97df5f 100644 --- a/v2-library/src/scss/mixins/_utilities.scss +++ b/v2-library/src/scss/mixins/_utilities.scss @@ -1,4 +1,7 @@ +@use 'sass:list'; @use 'sass:map'; +@use 'sass:meta'; +@use 'sass:string'; // Utility generator // Used to generate utilities & print utilities @@ -6,20 +9,20 @@ $values: map.get($utility, values); // If the values are a list or string, convert it into a map - @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" { - $values: zip($values, $values); + @if meta.type-of($values) == "string" or meta.type-of(list.nth($values, 1)) != "list" { + $values: list.zip($values, $values); } @each $key, $value in $values { $properties: map.get($utility, property); // Multiple properties are possible, for example with vertical or horizontal margins or paddings - @if type-of($properties) == "string" { - $properties: append((), $properties); + @if meta.type-of($properties) == "string" { + $properties: list.append((), $properties); } // Use custom class if present - $property-class: if(map.has-key($utility, class), map.get($utility, class), nth($properties, 1)); + $property-class: if(map.has-key($utility, class), map.get($utility, class), list.nth($properties, 1)); $property-class: if($property-class == null, "", $property-class); // is important @@ -28,7 +31,7 @@ // State params to generate pseudo-classes $state: if(map.has-key($utility, state), map.get($utility, state), ()); - $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix); + $infix: if($property-class == "" and string.slice($infix, 1, 1) == "-", string.slice($infix, 2), $infix); // Don't prefix if value key is null (eg. with shadow class) $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, ""); diff --git a/v2-library/src/scss/structure/_functions.scss b/v2-library/src/scss/structure/_functions.scss index efa0cf544e..21922c8b0e 100644 --- a/v2-library/src/scss/structure/_functions.scss +++ b/v2-library/src/scss/structure/_functions.scss @@ -1,4 +1,9 @@ +@use 'sass:color'; +@use 'sass:list'; @use 'sass:map'; +@use 'sass:math'; +@use 'sass:meta'; +@use 'sass:string'; // Bootstrap functions // @@ -11,9 +16,9 @@ $prev-num: null; @each $key, $num in $map { - @if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" { + @if $prev-num == null or math.unit($num) == "%" or math.unit($prev-num) == "%" { // Do nothing - } @else if not comparable($prev-num, $num) { + } @else if not math.compatible($prev-num, $num) { @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !"; } @else if $prev-num >= $num { @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; @@ -27,9 +32,9 @@ // Starts at zero // Used to ensure the min-width of the lowest breakpoint starts at 0. @mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") { - @if length($map) > 0 { + @if list.length($map) > 0 { $values: map.values($map); - $first-value: nth($values, 1); + $first-value: list.nth($values, 1); @if $first-value != 0 { @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}."; @@ -39,7 +44,7 @@ // Colors @function to-rgb($value) { - @return red($value), green($value), blue($value); + @return color.channel($value, "red"), color.channel($value, "green"), color.channel($value, "blue"); } // stylelint-disable scss/dollar-variable-pattern @@ -63,7 +68,7 @@ $_args: (); @each $arg in $args { - $_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg))); + $_args: list.append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg))); } $_map: map.merge($_map, ($key: call(get-function($func), $_args...))); @@ -77,7 +82,7 @@ $result: null; @each $entry in $list { - $result: append($result, var(--#{$variable-prefix}#{$entry}), space); + $result: list.append($result, var(--#{$variable-prefix}#{$entry}), space); } @return $result; @@ -102,7 +107,7 @@ $result: (); @each $key, $value in $map { - @if index($values, $key) != null { + @if list.index($values, $key) != null { $result: map.merge($result, ($key: $value)); } } @@ -130,10 +135,10 @@ // @param {String} $replace ('') - New value // @return {String} - Updated string @function str-replace($string, $search, $replace: "") { - $index: str-index($string, $search); + $index: string.index($string, $search); @if $index { - @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); + @return string.slice($string, 1, $index - 1) + $replace + str-replace(string.slice($string, $index + string.length($search)), $search, $replace); } @return $string; @@ -144,11 +149,11 @@ // Requires the use of quotes around data URIs. @function escape-svg($string) { - @if str-index($string, "data:image/svg+xml") { + @if string.index($string, "data:image/svg+xml") { @each $char, $encoded in $escaped-characters { // Do not escape the url brackets - @if str-index($string, "url(") == 1 { - $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}"); + @if string.index($string, "url(") == 1 { + $string: url("#{str-replace(string.slice($string, 6, -3), $char, $encoded)}"); } @else { $string: str-replace($string, $char, $encoded); } @@ -197,13 +202,13 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 // See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests @function luminance($color) { $rgb: ( - "r": red($color), - "g": green($color), - "b": blue($color) + "r": color.channel($color, "red"), + "g": color.channel($color, "green"), + "b": color.channel($color, "blue") ); @each $name, $value in $rgb { - $value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1)); + $value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), list.nth($_luminance-list, $value + 1)); $rgb: map.merge($rgb, ($name: $value)); } @@ -213,18 +218,18 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 // Return opaque color // opaque(#fff, rgba(0, 0, 0, .5)) => #808080 @function opaque($background, $foreground) { - @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100); + @return color.mix(color.change($foreground, $alpha: 1), $background, color.channel($foreground, "alpha") * 100%); } // scss-docs-start color-functions // Tint a color: mix a color with white @function tint-color($color, $weight) { - @return mix(white, $color, $weight); + @return color.mix(white, $color, $weight); } // Shade a color: mix a color with black @function shade-color($color, $weight) { - @return mix(black, $color, $weight); + @return color.mix(black, $color, $weight); } // Shade the color if the weight is positive, else tint it @@ -244,11 +249,11 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 @return $value1; } - @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) { + @if meta.type-of($value1) == number and meta.type-of($value2) == number { @return $value1 + $value2; } - @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2); + @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + string.unquote(" + ") + $value2); } @function subtract($value1, $value2, $return-calc: true) { @@ -264,21 +269,21 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 @return $value1; } - @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) { + @if meta.type-of($value1) == number and meta.type-of($value2) == number { @return $value1 - $value2; } - @if type-of($value2) != number { - $value2: unquote("(") + $value2 + unquote(")"); + @if meta.type-of($value2) != number { + $value2: string.unquote("(") + $value2 + string.unquote(")"); } - @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2); + @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + string.unquote(" - ") + $value2); } @function divide($dividend, $divisor, $precision: 10) { $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1); - $dividend: abs($dividend); - $divisor: abs($divisor); + $dividend: math.abs($dividend); + $divisor: math.abs($divisor); @if $dividend == 0 { @return 0; @@ -311,8 +316,8 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 } $result: $result * $factor * $sign; - $dividend-unit: unit($dividend); - $divisor-unit: unit($divisor); + $dividend-unit: math.unit($dividend); + $divisor-unit: math.unit($divisor); $unit-map: ( "px": 1px, "rem": 1rem, diff --git a/v2-library/src/scss/structure/vendor/rfs.scss b/v2-library/src/scss/structure/vendor/rfs.scss index 22f05f5b23..8ea6d22c8e 100644 --- a/v2-library/src/scss/structure/vendor/rfs.scss +++ b/v2-library/src/scss/structure/vendor/rfs.scss @@ -1,4 +1,7 @@ @use 'sass:map'; +@use 'sass:math'; +@use 'sass:meta'; +@use 'sass:string'; // stylelint-disable property-blacklist, scss/dollar-variable-default @@ -32,7 +35,7 @@ $rfs-two-dimensional: false !default; // Factor of decrease $rfs-factor: 10 !default; -@if type-of($rfs-factor) != number or $rfs-factor <= 1 { +@if meta.type-of($rfs-factor) != number or $rfs-factor <= 1 { @error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1."; } @@ -52,12 +55,12 @@ $rfs-safari-iframe-resize-bug-fix: false !default; $enable-rfs: true !default; // Cache $rfs-base-value unit -$rfs-base-value-unit: unit($rfs-base-value); +$rfs-base-value-unit: math.unit($rfs-base-value); @function divide($dividend, $divisor, $precision: 10) { $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1); - $dividend: abs($dividend); - $divisor: abs($divisor); + $dividend: math.abs($dividend); + $divisor: math.abs($divisor); @if $dividend == 0 { @return 0; @@ -90,8 +93,8 @@ $rfs-base-value-unit: unit($rfs-base-value); } $result: $result * $factor * $sign; - $dividend-unit: unit($dividend); - $divisor-unit: unit($divisor); + $dividend-unit: math.unit($dividend); + $divisor-unit: math.unit($divisor); $unit-map: ( "px": 1px, "rem": 1rem, @@ -114,7 +117,7 @@ $rfs-base-value-unit: unit($rfs-base-value); } // Cache $rfs-breakpoint unit to prevent multiple calls -$rfs-breakpoint-unit-cache: unit($rfs-breakpoint); +$rfs-breakpoint-unit-cache: math.unit($rfs-breakpoint); // Remove unit from $rfs-breakpoint for calculations @if $rfs-breakpoint-unit-cache == px { @@ -196,7 +199,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height // Helper function to get the formatted non-responsive value @function rfs-value($values) { // Convert to list - $values: if(type-of($values) != list, ($values,), $values); + $values: if(meta.type-of($values) != list, ($values,), $values); $val: ''; // Loop over each value and calculate value @@ -205,7 +208,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height $val: $val + ' 0'; } @else { // Cache $value unit - $unit: if(type-of($value) == "number", unit($value), false); + $unit: if(meta.type-of($value) == "number", math.unit($value), false); @if $unit == px { // Convert to rem if needed @@ -221,13 +224,13 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height } // Remove first space - @return unquote(str-slice($val, 2)); + @return string.unquote(string.slice($val, 2)); } // Helper function to get the responsive value calculated by RFS @function rfs-fluid-value($values) { // Convert to list - $values: if(type-of($values) != list, ($values,), $values); + $values: if(meta.type-of($values) != list, ($values,), $values); $val: ''; // Loop over each value and calculate value @@ -236,7 +239,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height $val: $val + ' 0'; } @else { // Cache $value unit - $unit: if(type-of($value) == "number", unit($value), false); + $unit: if(meta.type-of($value) == "number", math.unit($value), false); // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value @if not $unit or $unit != px and $unit != rem { @@ -246,14 +249,14 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height $value: divide($value, $value * 0 + if($unit == px, 1, divide(1, $rfs-rem-value))); // Only add the media query if the value is greater than the minimum value - @if abs($value) <= $rfs-base-value or not $enable-rfs { + @if math.abs($value) <= $rfs-base-value or not $enable-rfs { $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px); } @else { // Calculate the minimum value - $value-min: $rfs-base-value + divide(abs($value) - $rfs-base-value, $rfs-factor); + $value-min: $rfs-base-value + divide(math.abs($value) - $rfs-base-value, $rfs-factor); // Calculate difference between $value and the minimum value - $value-diff: abs($value) - $value-min; + $value-diff: math.abs($value) - $value-min; // Base value formatting $min-width: if($rfs-unit == rem, #{divide($value-min, $rfs-rem-value)}rem, #{$value-min}px); @@ -275,7 +278,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height } // Remove first space - @return unquote(str-slice($val, 2)); + @return string.unquote(string.slice($val, 2)); } // RFS mixin diff --git a/v2-library/src/scss/utility/_api.scss b/v2-library/src/scss/utility/_api.scss index fba196fa3e..058eb6ef25 100644 --- a/v2-library/src/scss/utility/_api.scss +++ b/v2-library/src/scss/utility/_api.scss @@ -1,4 +1,5 @@ @use 'sass:map'; +@use 'sass:meta'; // Loop over each breakpoint @each $breakpoint in map.keys($grid-breakpoints) { @@ -10,7 +11,7 @@ @each $key, $utility in $utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Only proceed if responsive media queries are enabled or if it's the base media query - @if type-of($utility) == "map" and (map.get($utility, responsive) or $infix == "") { + @if meta.type-of($utility) == "map" and (map.get($utility, responsive) or $infix == "") { @include generate-utility($utility, $infix); } } @@ -27,7 +28,7 @@ @each $key, $utility in $utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Only proceed if responsive media queries are enabled or if it's the base media query - @if type-of($utility) == "map" and map.get($utility, rfs) and (map.get($utility, responsive) or $infix == "") { + @if meta.type-of($utility) == "map" and map.get($utility, rfs) and (map.get($utility, responsive) or $infix == "") { @include generate-utility($utility, $infix, true); } } @@ -41,7 +42,7 @@ @each $key, $utility in $utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Then check if the utility needs print styles - @if type-of($utility) == "map" and map.get($utility, print) == true { + @if meta.type-of($utility) == "map" and map.get($utility, print) == true { @include generate-utility($utility, "-print"); } } From a1021df7a7df2f79b57234f022f18b84676e31ce Mon Sep 17 00:00:00 2001 From: b-l-i-n-d Date: Tue, 20 Oct 2026 08:57:23 +0600 Subject: [PATCH 2/6] fix(stylelint): restore strict selector-not-notation and at-mixin rules and remove import silencing - Remove 'scss/at-mixin-argumentless-call-parentheses: null' and 'selector-not-notation: null' overrides in stylelint.config.mjs - Update mixin calls and complex :not() pseudo-class selectors across core and frontend SCSS - Remove silenceDeprecations: ['import'] from rspack.config.mjs --- assets/core/scss/components/_accordion.scss | 2 +- assets/core/scss/components/_button.scss | 2 +- assets/core/scss/components/_calendar.scss | 4 +- .../core/scss/components/_file-uploader.scss | 2 +- .../scss/components/_loading-spinner.scss | 4 +- assets/core/scss/components/_nav.scss | 4 +- assets/core/scss/components/_popover.scss | 8 ++-- assets/core/scss/components/_select.scss | 6 +-- assets/core/scss/components/_star-rating.scss | 2 +- assets/core/scss/components/_tabs.scss | 6 +-- assets/core/scss/components/_toast.scss | 2 +- assets/core/scss/mixins/_buttons.scss | 44 +++++++++---------- assets/core/scss/mixins/_inputs.scss | 6 +-- .../frontend/components/_discussion-card.scss | 2 +- .../components/_discussion-single.scss | 4 +- .../components/_quiz-attempt-details.scss | 8 ++-- .../frontend/components/_quiz-attempts.scss | 2 +- .../frontend/components/_quiz-question.scss | 8 ++-- .../frontend/components/_quiz-summary.scss | 2 +- .../components/_upcoming-lesson-card.scss | 2 +- .../src/scss/frontend/dashboard/_billing.scss | 4 +- .../src/scss/frontend/dashboard/_profile.scss | 2 +- .../frontend/dashboard/_progress-card.scss | 4 +- .../scss/frontend/dashboard/_stat-card.scss | 4 +- .../scss/frontend/dashboard/_withdrawals.scss | 4 +- .../frontend/dashboard/layout/_account.scss | 2 +- .../frontend/dashboard/layout/_header.scss | 8 ++-- .../frontend/dashboard/layout/_layout.scss | 2 +- .../dashboard/layout/_nav-mobile.scss | 2 +- .../frontend/dashboard/layout/_sidebar.scss | 2 +- .../pages/_instructor-dashboard.scss | 12 ++--- .../frontend/dashboard/pages/_my-courses.scss | 6 +-- .../dashboard/pages/_student-dashboard.scss | 6 +-- .../frontend/dashboard/settings/_account.scss | 4 +- .../dashboard/settings/_preferences.scss | 2 +- .../frontend/dashboard/settings/_profile.scss | 2 +- .../dashboard/settings/_social-accounts.scss | 2 +- .../learning-area/_lesson-comments.scss | 2 +- .../learning-area/_lesson-content.scss | 8 ++-- .../scss/frontend/learning-area/_quiz.scss | 14 +++--- .../learning-area/layout/_footer.scss | 2 +- .../learning-area/layout/_header.scss | 6 +-- .../learning-area/layout/_layout.scss | 2 +- .../learning-area/layout/_sidebar.scss | 16 +++---- .../learning-area/pages/_course-info.scss | 4 +- .../learning-area/pages/_quiz-intro.scss | 6 +-- rspack.config.mjs | 1 - stylelint.config.mjs | 4 -- 48 files changed, 121 insertions(+), 132 deletions(-) diff --git a/assets/core/scss/components/_accordion.scss b/assets/core/scss/components/_accordion.scss index bf13c78f7f..cbea67cc49 100644 --- a/assets/core/scss/components/_accordion.scss +++ b/assets/core/scss/components/_accordion.scss @@ -42,7 +42,7 @@ } &-icon { - @include tutor-flex-center(); + @include tutor-flex-center; flex-shrink: 0; color: $tutor-icon-idle; diff --git a/assets/core/scss/components/_button.scss b/assets/core/scss/components/_button.scss index 06a3522e5d..f1b37d4aa1 100644 --- a/assets/core/scss/components/_button.scss +++ b/assets/core/scss/components/_button.scss @@ -127,7 +127,7 @@ a.tutor-btn-large, button.tutor-btn-block, a.tutor-btn-block, .tutor-btn-block { - @include tutor-button-block(); + @include tutor-button-block; } // Button group diff --git a/assets/core/scss/components/_calendar.scss b/assets/core/scss/components/_calendar.scss index 882d239d7a..e89f7b1a82 100644 --- a/assets/core/scss/components/_calendar.scss +++ b/assets/core/scss/components/_calendar.scss @@ -28,7 +28,7 @@ .vc-months__month.vc-months__month, .vc-years__year.vc-years__year { - @include tutor-button-base(); + @include tutor-button-base; @include tutor-button-variant('ghost'); color: $tutor-text-primary; @@ -136,7 +136,7 @@ @include tutor-flex(column); button { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(tiny, medium); @include tutor-flex(row, center, space-between); diff --git a/assets/core/scss/components/_file-uploader.scss b/assets/core/scss/components/_file-uploader.scss index ec5502a1f2..d0c7ea69f5 100644 --- a/assets/core/scss/components/_file-uploader.scss +++ b/assets/core/scss/components/_file-uploader.scss @@ -12,7 +12,7 @@ cursor: pointer; position: relative; - @include tutor-transition(); + @include tutor-transition; &.tutor-file-uploader-drag-over { background-color: $tutor-surface-brand-secondary; diff --git a/assets/core/scss/components/_loading-spinner.scss b/assets/core/scss/components/_loading-spinner.scss index 551438afd0..554752431c 100644 --- a/assets/core/scss/components/_loading-spinner.scss +++ b/assets/core/scss/components/_loading-spinner.scss @@ -2,8 +2,8 @@ @use '../mixins/' as *; .tutor-loading-spinner { - @include tutor-flex(); - @include tutor-loading-spinner(); + @include tutor-flex; + @include tutor-loading-spinner; padding: $tutor-spacing-8; position: relative; diff --git a/assets/core/scss/components/_nav.scss b/assets/core/scss/components/_nav.scss index 6b664ab572..c32003e081 100644 --- a/assets/core/scss/components/_nav.scss +++ b/assets/core/scss/components/_nav.scss @@ -11,7 +11,7 @@ button.tutor-nav-item, .tutor-nav-item { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(small, medium, secondary); @include tutor-flex(row, center); @@ -75,7 +75,7 @@ padding: $tutor-spacing-2 0; &-item { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(small); @include tutor-flex(row, center); diff --git a/assets/core/scss/components/_popover.scss b/assets/core/scss/components/_popover.scss index 360a935680..9209f8c8ed 100644 --- a/assets/core/scss/components/_popover.scss +++ b/assets/core/scss/components/_popover.scss @@ -36,8 +36,8 @@ color: $tutor-icon-idle; cursor: pointer; - @include tutor-transition(); - @include tutor-flex-center(); + @include tutor-transition; + @include tutor-flex-center; &:hover, &:focus { @@ -76,10 +76,10 @@ .tutor-popover-menu-item { width: 100%; - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-flex(row, center, flex-start); @include tutor-typography(small); - @include tutor-text-truncate(); + @include tutor-text-truncate; gap: $tutor-spacing-5; padding: $tutor-spacing-4 $tutor-spacing-5; diff --git a/assets/core/scss/components/_select.scss b/assets/core/scss/components/_select.scss index 181dcc41e4..0e25d2eb5e 100644 --- a/assets/core/scss/components/_select.scss +++ b/assets/core/scss/components/_select.scss @@ -26,11 +26,11 @@ cursor: pointer; text-align: start; - @include tutor-transition(); + @include tutor-transition; &:hover, &:focus { - @include tutor-focus-ring(); + @include tutor-focus-ring; border-color: $tutor-border-brand-tertiary; background-color: $tutor-surface-l1; @@ -226,7 +226,7 @@ } .tutor-select-search-input { - @include tutor-input-base(); + @include tutor-input-base; padding-block: $tutor-spacing-3; padding-inline-start: $tutor-spacing-9; diff --git a/assets/core/scss/components/_star-rating.scss b/assets/core/scss/components/_star-rating.scss index 6ff84f3d58..5b9f834ea4 100644 --- a/assets/core/scss/components/_star-rating.scss +++ b/assets/core/scss/components/_star-rating.scss @@ -5,7 +5,7 @@ @include tutor-flex(row, center, space-between); button.tutor-star-rating-icon-btn { - @include tutor-button-reset(); + @include tutor-button-reset; min-height: unset; } diff --git a/assets/core/scss/components/_tabs.scss b/assets/core/scss/components/_tabs.scss index ceebe8bdb8..ac0e018fa9 100644 --- a/assets/core/scss/components/_tabs.scss +++ b/assets/core/scss/components/_tabs.scss @@ -64,8 +64,8 @@ button.tutor-tabs-tab, height: $tutor-tab-height-sm; } - &:hover:not(:disabled):not(.tutor-tabs-tab-active), - &:focus:not(:disabled):not(.tutor-tabs-tab-active) { + &:hover:not(:disabled, .tutor-tabs-tab-active), + &:focus:not(:disabled, .tutor-tabs-tab-active) { color: $tutor-text-primary; background-color: $tutor-tab-l3-active-hover; outline: none; @@ -85,7 +85,7 @@ button.tutor-tabs-tab, } &:focus-visible { - @include tutor-focus-ring(); + @include tutor-focus-ring; } } diff --git a/assets/core/scss/components/_toast.scss b/assets/core/scss/components/_toast.scss index a97831b0d0..cfbb072097 100644 --- a/assets/core/scss/components/_toast.scss +++ b/assets/core/scss/components/_toast.scss @@ -329,7 +329,7 @@ } button.tutor-toast-close { - @include tutor-button-base(); + @include tutor-button-base; border: 0; background: transparent; diff --git a/assets/core/scss/mixins/_buttons.scss b/assets/core/scss/mixins/_buttons.scss index 7bf01db751..cd959caf78 100644 --- a/assets/core/scss/mixins/_buttons.scss +++ b/assets/core/scss/mixins/_buttons.scss @@ -28,8 +28,8 @@ @include tutor-transition((color, background-color)); - &:hover:not(:disabled):not(.disabled), - &:focus:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled), + &:focus:not(:disabled, .disabled) { background-color: transparent; border: none; outline: none; @@ -38,7 +38,7 @@ --tutor-button-border-shadow: #{$tutor-button-primary-border-shadow}; } - &:focus-visible:not(:disabled):not(.disabled) { + &:focus-visible:not(:disabled, .disabled) { @include tutor-focus-ring; } @@ -70,14 +70,14 @@ color: $tutor-icon-idle-inverse; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-primary-hover; color: $tutor-text-primary-inverse; --tutor-button-border-shadow: #{$tutor-button-primary-border-shadow-hover}; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-primary-focused; color: $tutor-text-primary-inverse; @@ -105,14 +105,14 @@ color: $tutor-icon-brand; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-primary-soft-hover; color: $tutor-text-brand; --tutor-button-border-shadow: #{$tutor-button-primary-soft-border-shadow-hover}; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-primary-soft-focused; color: $tutor-text-brand; @@ -135,14 +135,14 @@ color: $tutor-icon-idle-inverse; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-destructive-hover; color: $tutor-text-primary-inverse; --tutor-button-border-shadow: #{$tutor-button-destructive-border-shadow-hover}; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-destructive-focused; color: $tutor-text-primary-inverse; @@ -165,14 +165,14 @@ color: $tutor-icon-critical; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-destructive-soft-hover; color: $tutor-text-critical; --tutor-button-border-shadow: #{$tutor-button-destructive-soft-border-shadow-hover}; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-destructive-soft-focused; color: $tutor-text-critical; @@ -193,12 +193,12 @@ color: $tutor-icon-idle-inverse; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-success-hover; color: $tutor-text-primary-inverse; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-success-focused; color: $tutor-text-primary-inverse; } @@ -212,14 +212,14 @@ color: $tutor-icon-idle; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-secondary-hover; color: $tutor-text-primary; --tutor-button-border-shadow: #{$tutor-button-secondary-border-shadow-hover}; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-secondary-focused; color: $tutor-text-primary; @@ -242,14 +242,14 @@ color: $tutor-icon-idle; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-outline-hover; color: $tutor-text-primary; --tutor-button-border-shadow: #{$tutor-button-outline-border-shadow-hover}; } - &:focus:not(:disabled):not(.disabled) { + &:focus:not(:disabled, .disabled) { background-color: $tutor-button-outline-focused-inverse; color: $tutor-text-primary; @@ -272,7 +272,7 @@ color: $tutor-icon-idle; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-ghost-hover; color: $tutor-text-primary; @@ -295,7 +295,7 @@ color: $tutor-icon-brand; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { background-color: $tutor-button-primary-soft; color: $tutor-text-brand; @@ -316,7 +316,7 @@ color: $tutor-icon-brand; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { color: $tutor-text-brand-hover; box-shadow: none !important; @@ -332,7 +332,7 @@ color: $tutor-icon-subdued; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { color: $tutor-text-secondary; svg:not([class]) { @@ -347,7 +347,7 @@ color: $tutor-icon-critical; } - &:hover:not(:disabled):not(.disabled) { + &:hover:not(:disabled, .disabled) { color: $tutor-text-critical-hover; svg:not([class]) { diff --git a/assets/core/scss/mixins/_inputs.scss b/assets/core/scss/mixins/_inputs.scss index f418fee929..474e4b2ffb 100644 --- a/assets/core/scss/mixins/_inputs.scss +++ b/assets/core/scss/mixins/_inputs.scss @@ -41,7 +41,7 @@ margin: 0; } - &:placeholder-shown:not(:focus):not(:disabled) { + &:placeholder-shown:not(:focus, :disabled) { background-color: $tutor-surface-l3; } @@ -50,7 +50,7 @@ } &:focus { - @include tutor-focus-ring(); + @include tutor-focus-ring; background-color: $tutor-surface-l1; border-color: $tutor-border-brand-tertiary; @@ -267,7 +267,7 @@ } &:focus { - @include tutor-focus-ring(); + @include tutor-focus-ring; border-color: $tutor-border-brand-tertiary; } diff --git a/assets/src/scss/frontend/components/_discussion-card.scss b/assets/src/scss/frontend/components/_discussion-card.scss index 79fb466ea8..78132c3094 100644 --- a/assets/src/scss/frontend/components/_discussion-card.scss +++ b/assets/src/scss/frontend/components/_discussion-card.scss @@ -137,7 +137,7 @@ } .tutor-discussion-card-meta-reply-button { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(tiny, medium, subdued); margin-inline-end: auto; diff --git a/assets/src/scss/frontend/components/_discussion-single.scss b/assets/src/scss/frontend/components/_discussion-single.scss index 27ac90beae..40f2307891 100644 --- a/assets/src/scss/frontend/components/_discussion-single.scss +++ b/assets/src/scss/frontend/components/_discussion-single.scss @@ -16,7 +16,7 @@ border-bottom: 1px solid $tutor-border-idle; .tutor-discussion-avatar-list { - @include tutor-flex(); + @include tutor-flex; .tutor-avatar { border: 1px solid $tutor-border-inverse; @@ -39,7 +39,7 @@ } .tutor-discussion-thumb-button { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-flex(0); } } diff --git a/assets/src/scss/frontend/components/_quiz-attempt-details.scss b/assets/src/scss/frontend/components/_quiz-attempt-details.scss index 11c915adb6..edd4de897a 100644 --- a/assets/src/scss/frontend/components/_quiz-attempt-details.scss +++ b/assets/src/scss/frontend/components/_quiz-attempt-details.scss @@ -35,7 +35,7 @@ border-bottom: 1px solid $tutor-border-idle; &-inner { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; @include tutor-flex(row, center, space-between); min-height: var(--tutor-quiz-summary-header-height); @@ -206,7 +206,7 @@ } .tutor-quiz-questions { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; @include tutor-flex(column); padding-inline: 0; @@ -378,9 +378,7 @@ padding: $tutor-spacing-6; border-radius: $tutor-radius-lg; - &:hover:not(:has(:checked)):not([data-option='correct']):not([data-option='incorrect']):not( - [data-option='draggable'] - ) { + &:hover:not(:has(:checked), [data-option='correct'], [data-option='incorrect'], [data-option='draggable']) { background-color: $tutor-surface-base; } diff --git a/assets/src/scss/frontend/components/_quiz-attempts.scss b/assets/src/scss/frontend/components/_quiz-attempts.scss index 80bb946729..b2b08baf5d 100644 --- a/assets/src/scss/frontend/components/_quiz-attempts.scss +++ b/assets/src/scss/frontend/components/_quiz-attempts.scss @@ -159,7 +159,7 @@ } .tutor-quiz-attempts-expand-btn { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-flex(row, center); gap: $tutor-spacing-2; diff --git a/assets/src/scss/frontend/components/_quiz-question.scss b/assets/src/scss/frontend/components/_quiz-question.scss index 2e7cee237d..06e9858b16 100644 --- a/assets/src/scss/frontend/components/_quiz-question.scss +++ b/assets/src/scss/frontend/components/_quiz-question.scss @@ -12,7 +12,7 @@ width: 100%; min-width: 0; - &:has(:focus-visible:not(input):not(textarea):not(select)) { + &:has(:focus-visible:not(input, textarea, select)) { @include tutor-focus-ring(#{$tutor-border-idle2}, true); outline-offset: $tutor-spacing-2; @@ -240,7 +240,7 @@ &:focus, &:focus-within { - &:not(:has(:checked)):not(:has(:disabled)) { + &:not(:has(:checked), :has(:disabled)) { border-color: $tutor-border-hover; background-color: $tutor-quiz-hover; } @@ -325,9 +325,7 @@ border: none; line-height: 2.5; - &:hover:not(:has(:checked)):not(:has(:disabled)):not([data-readonly='true']):not([data-option='correct']):not( - [data-option='incorrect'] - ):not([data-option='draggable']) { + &:hover:not(:has(:checked), :has(:disabled), [data-readonly='true'], [data-option='correct'], [data-option='incorrect'], [data-option='draggable']) { background-color: transparent; cursor: default; } diff --git a/assets/src/scss/frontend/components/_quiz-summary.scss b/assets/src/scss/frontend/components/_quiz-summary.scss index 09671a53fc..9c96107ba6 100644 --- a/assets/src/scss/frontend/components/_quiz-summary.scss +++ b/assets/src/scss/frontend/components/_quiz-summary.scss @@ -2,7 +2,7 @@ @use '@Core/scss/mixins' as *; .tutor-quiz-summary { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; margin: 0 auto; padding-block: $tutor-spacing-13; diff --git a/assets/src/scss/frontend/components/_upcoming-lesson-card.scss b/assets/src/scss/frontend/components/_upcoming-lesson-card.scss index 362d8bbdde..9b13ba46c9 100644 --- a/assets/src/scss/frontend/components/_upcoming-lesson-card.scss +++ b/assets/src/scss/frontend/components/_upcoming-lesson-card.scss @@ -80,7 +80,7 @@ display: block; @include tutor-typography('small', 'medium', 'primary', 'body'); - @include tutor-text-truncate(); + @include tutor-text-truncate; margin: 0 0 $tutor-spacing-5; diff --git a/assets/src/scss/frontend/dashboard/_billing.scss b/assets/src/scss/frontend/dashboard/_billing.scss index 167df9dee8..fc58d101e4 100644 --- a/assets/src/scss/frontend/dashboard/_billing.scss +++ b/assets/src/scss/frontend/dashboard/_billing.scss @@ -109,7 +109,7 @@ } .tutor-billing-card-payment-method { - @include tutor-flex(); + @include tutor-flex; } } @@ -124,7 +124,7 @@ &-title { @include tutor-flex(row, start, flex-start); @include tutor-typography('small', 'medium'); - @include tutor-text-truncate(); + @include tutor-text-truncate; min-width: 0; width: 100%; diff --git a/assets/src/scss/frontend/dashboard/_profile.scss b/assets/src/scss/frontend/dashboard/_profile.scss index 345c9b4707..ebf6903849 100644 --- a/assets/src/scss/frontend/dashboard/_profile.scss +++ b/assets/src/scss/frontend/dashboard/_profile.scss @@ -31,7 +31,7 @@ } .tutor-edit-profile-btn { - @include tutor-button-base(); + @include tutor-button-base; @include tutor-button-variant(outline); @include tutor-button-size(x-small); diff --git a/assets/src/scss/frontend/dashboard/_progress-card.scss b/assets/src/scss/frontend/dashboard/_progress-card.scss index 0e7f1c9789..53b96be8d4 100644 --- a/assets/src/scss/frontend/dashboard/_progress-card.scss +++ b/assets/src/scss/frontend/dashboard/_progress-card.scss @@ -56,7 +56,7 @@ &-category { @include tutor-typography('tiny', 'regular', 'secondary'); - @include tutor-text-truncate(); + @include tutor-text-truncate; min-width: 0; max-width: 100%; @@ -138,7 +138,7 @@ } &:focus-visible { - @include tutor-focus-ring(); + @include tutor-focus-ring; border-radius: $tutor-radius-2xl !important; z-index: $tutor-z-positive; diff --git a/assets/src/scss/frontend/dashboard/_stat-card.scss b/assets/src/scss/frontend/dashboard/_stat-card.scss index a4be7d9c3d..b0684dfe42 100644 --- a/assets/src/scss/frontend/dashboard/_stat-card.scss +++ b/assets/src/scss/frontend/dashboard/_stat-card.scss @@ -33,7 +33,7 @@ } &:focus-visible { - @include tutor-focus-ring(); + @include tutor-focus-ring; } &-header { @@ -47,7 +47,7 @@ } &-icon { - @include tutor-flex(); + @include tutor-flex; } &-value { diff --git a/assets/src/scss/frontend/dashboard/_withdrawals.scss b/assets/src/scss/frontend/dashboard/_withdrawals.scss index 5085325e41..abf37cf273 100644 --- a/assets/src/scss/frontend/dashboard/_withdrawals.scss +++ b/assets/src/scss/frontend/dashboard/_withdrawals.scss @@ -169,7 +169,7 @@ } .tutor-withdrawal-available-balance { - @include tutor-flex(); + @include tutor-flex; gap: $tutor-spacing-5; padding: $tutor-spacing-5 $tutor-spacing-6; @@ -178,7 +178,7 @@ border-radius: $tutor-radius-lg; &-icon { - @include tutor-flex-center(); + @include tutor-flex-center; width: 44px; height: 44px; diff --git a/assets/src/scss/frontend/dashboard/layout/_account.scss b/assets/src/scss/frontend/dashboard/layout/_account.scss index 99d185e050..3f3514010f 100644 --- a/assets/src/scss/frontend/dashboard/layout/_account.scss +++ b/assets/src/scss/frontend/dashboard/layout/_account.scss @@ -47,7 +47,7 @@ body:has(#wpadminbar) .tutor-account-page-wrapper.tutor-has-site-shell .tutor-ac } .tutor-account-container { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; padding-inline: $tutor-spacing-6; } diff --git a/assets/src/scss/frontend/dashboard/layout/_header.scss b/assets/src/scss/frontend/dashboard/layout/_header.scss index 29456f6002..08db242280 100644 --- a/assets/src/scss/frontend/dashboard/layout/_header.scss +++ b/assets/src/scss/frontend/dashboard/layout/_header.scss @@ -33,7 +33,7 @@ } &-inner { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; @include tutor-flex(row, center, space-between); height: 100%; @@ -100,7 +100,7 @@ } &-user-avatar { - @include tutor-button-reset(); + @include tutor-button-reset; border: 1px solid $tutor-border-idle; border-radius: $tutor-radius-full; @@ -114,7 +114,7 @@ } &:focus-visible { - @include tutor-focus-ring(); + @include tutor-focus-ring; } } @@ -191,7 +191,7 @@ height: 60px; .tutor-dashboard-header-user-avatar { - @include tutor-button-base(); + @include tutor-button-base; @include tutor-button-variant(ghost); padding: 9px; diff --git a/assets/src/scss/frontend/dashboard/layout/_layout.scss b/assets/src/scss/frontend/dashboard/layout/_layout.scss index 7baefd82cf..f53ca7ad42 100644 --- a/assets/src/scss/frontend/dashboard/layout/_layout.scss +++ b/assets/src/scss/frontend/dashboard/layout/_layout.scss @@ -17,7 +17,7 @@ } .tutor-dashboard-page { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; padding-inline: $tutor-spacing-6; padding-bottom: $tutor-spacing-7; diff --git a/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss b/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss index 027aec585e..5d8afc4b92 100644 --- a/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss +++ b/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss @@ -32,7 +32,7 @@ > a, > button { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(tiny, medium); @include tutor-flex(column, center); diff --git a/assets/src/scss/frontend/dashboard/layout/_sidebar.scss b/assets/src/scss/frontend/dashboard/layout/_sidebar.scss index 495ee940a1..e0af87700b 100644 --- a/assets/src/scss/frontend/dashboard/layout/_sidebar.scss +++ b/assets/src/scss/frontend/dashboard/layout/_sidebar.scss @@ -53,7 +53,7 @@ padding: $tutor-spacing-8 $tutor-spacing-6; ul { - @include tutor-flex-column(); + @include tutor-flex-column; gap: $tutor-spacing-2; list-style: none; diff --git a/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss b/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss index c3b5c8e9c6..0a5f26f196 100644 --- a/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss +++ b/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss @@ -51,7 +51,7 @@ gap: $tutor-spacing-2; &::before { - @include tutor-flex-center(); + @include tutor-flex-center; content: ''; height: 2px; @@ -148,13 +148,13 @@ } &-avatar { - @include tutor-flex-center(); + @include tutor-flex-center; flex-shrink: 0; } &-icon { - @include tutor-flex-center(); + @include tutor-flex-center; @include tutor-typography('tiny', 'regular', 'subdued'); width: 16px; @@ -177,7 +177,7 @@ &-index { @include tutor-typography('p3', 'medium', 'secondary'); - @include tutor-flex-center(); + @include tutor-flex-center; width: 32px; height: 32px; @@ -218,7 +218,7 @@ } &-icon { - @include tutor-flex-center(); + @include tutor-flex-center; width: 32px; height: 32px; @@ -276,7 +276,7 @@ padding: $tutor-spacing-5; &-avatar { - @include tutor-flex-center(); + @include tutor-flex-center; flex-shrink: 0; align-self: flex-start; diff --git a/assets/src/scss/frontend/dashboard/pages/_my-courses.scss b/assets/src/scss/frontend/dashboard/pages/_my-courses.scss index c9a49eef1d..a64238e8e2 100644 --- a/assets/src/scss/frontend/dashboard/pages/_my-courses.scss +++ b/assets/src/scss/frontend/dashboard/pages/_my-courses.scss @@ -31,8 +31,8 @@ .tutor-my-courses-card { @include tutor-flex(column); - @include tutor-card-base(); - @include tutor-card-radius(); + @include tutor-card-base; + @include tutor-card-radius; position: relative; @@ -62,7 +62,7 @@ } &-actions { - @include tutor-flex-center(); + @include tutor-flex-center; gap: $tutor-spacing-4; position: absolute; diff --git a/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss b/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss index 00ba8c9851..ef2ef9d8e7 100644 --- a/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss +++ b/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss @@ -3,7 +3,7 @@ .tutor-dashboard-welcome-card { @include tutor-flex(row, center, space-between); - @include tutor-card-base(); + @include tutor-card-base; @include tutor-card-radius(2xl); margin-bottom: $tutor-spacing-7; @@ -33,7 +33,7 @@ width: 248px; height: 248px; - @include tutor-flex-center(); + @include tutor-flex-center; @include tutor-breakpoint-down(sm) { width: 100%; @@ -43,7 +43,7 @@ .tutor-dashboard-quick-tips-card { @include tutor-flex(row, start, space-between); - @include tutor-card-base(); + @include tutor-card-base; @include tutor-card-radius(2xl); padding: $tutor-spacing-8; diff --git a/assets/src/scss/frontend/dashboard/settings/_account.scss b/assets/src/scss/frontend/dashboard/settings/_account.scss index 9b9a8ce239..7211c07d57 100644 --- a/assets/src/scss/frontend/dashboard/settings/_account.scss +++ b/assets/src/scss/frontend/dashboard/settings/_account.scss @@ -27,7 +27,7 @@ } .tutor-account-cover-photo-action { - @include tutor-flex(); + @include tutor-flex; gap: $tutor-spacing-3; position: absolute; @@ -45,7 +45,7 @@ z-index: $tutor-z-positive; .tutor-account-avatar { - @include tutor-avatar-base(); + @include tutor-avatar-base; width: 104px; height: 104px; diff --git a/assets/src/scss/frontend/dashboard/settings/_preferences.scss b/assets/src/scss/frontend/dashboard/settings/_preferences.scss index f90cef1794..26723b723d 100644 --- a/assets/src/scss/frontend/dashboard/settings/_preferences.scss +++ b/assets/src/scss/frontend/dashboard/settings/_preferences.scss @@ -78,7 +78,7 @@ } &-vision-preview { - @include tutor-flex-center(); + @include tutor-flex-center; background-color: $tutor-surface-l1-hover; border-radius: $tutor-radius-md; diff --git a/assets/src/scss/frontend/dashboard/settings/_profile.scss b/assets/src/scss/frontend/dashboard/settings/_profile.scss index 7eb99a719c..93da43bf9a 100644 --- a/assets/src/scss/frontend/dashboard/settings/_profile.scss +++ b/assets/src/scss/frontend/dashboard/settings/_profile.scss @@ -19,7 +19,7 @@ .tutor-tabs-tab { gap: $tutor-spacing-6; - &:hover:not(:disabled):not(.tutor-tabs-tab-active) { + &:hover:not(:disabled, .tutor-tabs-tab-active) { background: transparent; } } diff --git a/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss b/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss index cbac3136f0..9385d623c9 100644 --- a/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss +++ b/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss @@ -19,7 +19,7 @@ } &-field { - @include tutor-flex(); + @include tutor-flex; gap: $tutor-spacing-3; } diff --git a/assets/src/scss/frontend/learning-area/_lesson-comments.scss b/assets/src/scss/frontend/learning-area/_lesson-comments.scss index dad617670d..d2ca8751fc 100644 --- a/assets/src/scss/frontend/learning-area/_lesson-comments.scss +++ b/assets/src/scss/frontend/learning-area/_lesson-comments.scss @@ -63,7 +63,7 @@ } &:focus-visible { - @include tutor-focus-ring(); + @include tutor-focus-ring; } } diff --git a/assets/src/scss/frontend/learning-area/_lesson-content.scss b/assets/src/scss/frontend/learning-area/_lesson-content.scss index b90908d04b..91580336a8 100644 --- a/assets/src/scss/frontend/learning-area/_lesson-content.scss +++ b/assets/src/scss/frontend/learning-area/_lesson-content.scss @@ -10,9 +10,9 @@ button.tutor-mark-as-complete-button, a.tutor-mark-as-complete-button, .tutor-mark-as-complete-button { - @include tutor-button-base(); + @include tutor-button-base; @include tutor-button-variant(primary-soft); - @include tutor-button-size(); + @include tutor-button-size; gap: $tutor-spacing-4; min-width: 160px; @@ -25,7 +25,7 @@ flex-shrink: 0; } - &:hover:not(.completed):not(:disabled) { + &:hover:not(.completed, :disabled) { background-color: $tutor-surface-l1; svg { @@ -107,7 +107,7 @@ } .tutor-lesson-image-wrapper { - @include tutor-flex-center(); + @include tutor-flex-center; aspect-ratio: 16 / 9; diff --git a/assets/src/scss/frontend/learning-area/_quiz.scss b/assets/src/scss/frontend/learning-area/_quiz.scss index ea525429e8..ea39e30c68 100644 --- a/assets/src/scss/frontend/learning-area/_quiz.scss +++ b/assets/src/scss/frontend/learning-area/_quiz.scss @@ -195,7 +195,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-progress { @include tutor-flex(column); - @include tutor-frontend-layout(); + @include tutor-frontend-layout; padding-inline: 0; padding-block: $tutor-spacing-5; @@ -434,7 +434,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-questions { @include tutor-flex(column); - @include tutor-frontend-layout(); + @include tutor-frontend-layout; padding-inline: 0; width: 100%; @@ -478,7 +478,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} } &-question-meta { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; @include tutor-flex(row, center, space-between); width: 100%; @@ -547,7 +547,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &[data-pagination-style='shape'], &[data-pagination-style='radio'], &[data-pagination-style='number'] { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; width: calc(100dvw - #{$tutor-spacing-8}); justify-content: flex-start; @@ -938,9 +938,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &:hover, &:focus { - &:not(:has(:checked)):not(:has(:disabled)):not([data-readonly='true']):not([data-option='correct']):not( - [data-option='incorrect'] - ):not([data-option='draggable']) { + &:not(:has(:checked), :has(:disabled), [data-readonly='true'], [data-option='correct'], [data-option='incorrect'], [data-option='draggable']) { border-color: $tutor-border-hover; background-color: $tutor-quiz-hover; } @@ -1428,7 +1426,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-inner { @include tutor-flex(row, center, flex-start); - @include tutor-frontend-layout(); + @include tutor-frontend-layout; gap: $tutor-spacing-4; width: 100%; diff --git a/assets/src/scss/frontend/learning-area/layout/_footer.scss b/assets/src/scss/frontend/learning-area/layout/_footer.scss index edf8776b2b..7c67e73eee 100644 --- a/assets/src/scss/frontend/learning-area/layout/_footer.scss +++ b/assets/src/scss/frontend/learning-area/layout/_footer.scss @@ -21,7 +21,7 @@ justify-content: space-between; .tutor-has-site-shell & { - @include tutor-card-base(); + @include tutor-card-base; margin-top: $tutor-spacing-6; border-radius: $tutor-radius-2xl; diff --git a/assets/src/scss/frontend/learning-area/layout/_header.scss b/assets/src/scss/frontend/learning-area/layout/_header.scss index fa4ff30495..c34730fe83 100644 --- a/assets/src/scss/frontend/learning-area/layout/_header.scss +++ b/assets/src/scss/frontend/learning-area/layout/_header.scss @@ -55,8 +55,8 @@ } &-back { - @include tutor-button-reset(); - @include tutor-flex-center(); + @include tutor-button-reset; + @include tutor-flex-center; flex-shrink: 0; height: 48px; @@ -74,7 +74,7 @@ &-title { @include tutor-typography(h5, semibold, primary, heading); - @include tutor-text-truncate(); + @include tutor-text-truncate; @include tutor-breakpoint-down(sm) { @include tutor-typography(medium, semibold); diff --git a/assets/src/scss/frontend/learning-area/layout/_layout.scss b/assets/src/scss/frontend/learning-area/layout/_layout.scss index 1980829f29..0e35cb55b4 100644 --- a/assets/src/scss/frontend/learning-area/layout/_layout.scss +++ b/assets/src/scss/frontend/learning-area/layout/_layout.scss @@ -114,7 +114,7 @@ $tutor-fixed-footer-offset: $tutor-spacing-6; } .tutor-learning-area-container { - @include tutor-frontend-layout(); + @include tutor-frontend-layout; padding-bottom: $tutor-spacing-6; diff --git a/assets/src/scss/frontend/learning-area/layout/_sidebar.scss b/assets/src/scss/frontend/learning-area/layout/_sidebar.scss index 3fb1a4b717..ff28ad928a 100644 --- a/assets/src/scss/frontend/learning-area/layout/_sidebar.scss +++ b/assets/src/scss/frontend/learning-area/layout/_sidebar.scss @@ -142,7 +142,7 @@ &-title { @include tutor-typography(small, medium, secondary); - @include tutor-text-truncate(); + @include tutor-text-truncate; } &-actions { @@ -157,11 +157,11 @@ } &-summary { - @include tutor-flex-center(); + @include tutor-flex-center; } &-arrow { - @include tutor-flex-center(); + @include tutor-flex-center; color: $tutor-icon-secondary; @@ -215,7 +215,7 @@ } .tutor-learning-nav-item { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(small, medium, secondary); @include tutor-flex(row, flex-start); @@ -306,7 +306,7 @@ height: 12px; cursor: ns-resize; - @include tutor-flex-center(); + @include tutor-flex-center; z-index: $tutor-z-sidebar; @@ -338,7 +338,7 @@ bottom: 100%; button { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-flex(row, center, center); background-color: $tutor-surface-l1; @@ -378,7 +378,7 @@ } &:focus-visible { - @include tutor-focus-ring(); + @include tutor-focus-ring; &::before, &::after { @@ -416,7 +416,7 @@ } &-item { - @include tutor-button-reset(); + @include tutor-button-reset; @include tutor-typography(small); @include tutor-flex(row, center); diff --git a/assets/src/scss/frontend/learning-area/pages/_course-info.scss b/assets/src/scss/frontend/learning-area/pages/_course-info.scss index 53469ad01f..5da3cb3685 100644 --- a/assets/src/scss/frontend/learning-area/pages/_course-info.scss +++ b/assets/src/scss/frontend/learning-area/pages/_course-info.scss @@ -25,7 +25,7 @@ padding: $tutor-spacing-4; .tutor-course-thumb { - @include tutor-flex(); + @include tutor-flex; max-width: 106px; } @@ -36,7 +36,7 @@ margin-top: $tutor-spacing-8; a { - @include tutor-transition(); + @include tutor-transition; &:hover { color: $tutor-text-brand; diff --git a/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss b/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss index 4d8274be49..3cb6bb10d9 100644 --- a/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss +++ b/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss @@ -2,7 +2,7 @@ @use '@Core/scss/mixins' as *; .tutor-quiz-intro { - @include tutor-card-base(); + @include tutor-card-base; @include tutor-card-padding(medium); @include tutor-card-radius(2xl); @@ -19,7 +19,7 @@ @include tutor-flex(column, stretch, flex-start); @include tutor-breakpoint-down(sm) { - @include tutor-card-base(); + @include tutor-card-base; @include tutor-card-radius(2xl); padding: $tutor-spacing-5; @@ -296,7 +296,7 @@ display: none; @include tutor-breakpoint-down(sm) { - @include tutor-flex(); + @include tutor-flex; margin-inline-start: $tutor-spacing-4; } diff --git a/rspack.config.mjs b/rspack.config.mjs index 8521cb8c42..e342d68f0c 100644 --- a/rspack.config.mjs +++ b/rspack.config.mjs @@ -80,7 +80,6 @@ const createConfig = (env, options) => { implementation: 'sass', sassOptions: { outputStyle: isDevelopment ? 'expanded' : 'compressed', - silenceDeprecations: ['import'], }, }, }; diff --git a/stylelint.config.mjs b/stylelint.config.mjs index ad2e09f3e5..973e59d1d9 100644 --- a/stylelint.config.mjs +++ b/stylelint.config.mjs @@ -40,10 +40,6 @@ export default { // Public and third-party class names (BEM, Plyr, vanilla-calendar) are // not ours to rename. 'selector-class-pattern': null, - // The codebase calls argumentless mixins with (), so keep that style. - 'scss/at-mixin-argumentless-call-parentheses': null, - // Both :not() forms are used intentionally; converting changes specificity. - 'selector-not-notation': null, // Keep min-/max-width for browsers without range syntax. 'media-feature-range-notation': 'prefix', From e2609fea24a0a8c5634d96f989283a130c3c6c3a Mon Sep 17 00:00:00 2001 From: b-l-i-n-d Date: Wed, 4 Nov 2026 12:16:56 +0600 Subject: [PATCH 3/6] fix(stylelint): keep parentheses on mixin calls per review finding --- assets/core/scss/components/_accordion.scss | 2 +- assets/core/scss/components/_avatar.scss | 6 ++-- assets/core/scss/components/_badge.scss | 2 +- assets/core/scss/components/_button.scss | 6 ++-- assets/core/scss/components/_calendar.scss | 4 +-- assets/core/scss/components/_card.scss | 2 +- .../core/scss/components/_file-uploader.scss | 2 +- assets/core/scss/components/_input.scss | 16 +++++------ .../scss/components/_loading-spinner.scss | 4 +-- assets/core/scss/components/_modal.scss | 2 +- assets/core/scss/components/_nav.scss | 4 +-- assets/core/scss/components/_pagination.scss | 10 +++---- assets/core/scss/components/_popover.scss | 8 +++--- assets/core/scss/components/_select.scss | 10 +++---- assets/core/scss/components/_star-rating.scss | 8 +++--- assets/core/scss/components/_tabs.scss | 4 +-- assets/core/scss/components/_time-input.scss | 4 +-- assets/core/scss/components/_toast.scss | 2 +- assets/core/scss/mixins/_avatars.scss | 2 +- assets/core/scss/mixins/_badges.scss | 2 +- assets/core/scss/mixins/_buttons.scss | 2 +- assets/core/scss/mixins/_inputs.scss | 10 +++---- assets/core/scss/mixins/_paginations.scss | 4 +-- assets/core/scss/themes/_dark.scss | 4 +-- assets/core/scss/themes/_deuteranomaly.scss | 6 ++-- assets/core/scss/themes/_deuteranopia.scss | 6 ++-- assets/core/scss/themes/_high-contrast.scss | 6 ++-- assets/core/scss/themes/_protanopia.scss | 6 ++-- assets/core/scss/utilities/_colors.scss | 2 +- assets/core/scss/utilities/_typography.scss | 2 +- .../frontend/components/_discussion-card.scss | 2 +- .../components/_discussion-single.scss | 4 +-- .../frontend/components/_event-badge.scss | 2 +- .../components/_quiz-attempt-details.scss | 10 +++---- .../frontend/components/_quiz-attempts.scss | 6 ++-- .../frontend/components/_quiz-question.scss | 2 +- .../frontend/components/_quiz-summary.scss | 2 +- .../components/_upcoming-lesson-card.scss | 4 +-- .../src/scss/frontend/dashboard/_billing.scss | 8 +++--- .../src/scss/frontend/dashboard/_profile.scss | 6 ++-- .../frontend/dashboard/_progress-card.scss | 4 +-- .../scss/frontend/dashboard/_stat-card.scss | 4 +-- .../scss/frontend/dashboard/_withdrawals.scss | 4 +-- .../frontend/dashboard/layout/_account.scss | 2 +- .../frontend/dashboard/layout/_header.scss | 8 +++--- .../frontend/dashboard/layout/_layout.scss | 2 +- .../dashboard/layout/_nav-mobile.scss | 4 +-- .../frontend/dashboard/layout/_sidebar.scss | 2 +- .../pages/_instructor-dashboard.scss | 28 +++++++++---------- .../frontend/dashboard/pages/_my-courses.scss | 6 ++-- .../dashboard/pages/_student-dashboard.scss | 6 ++-- .../frontend/dashboard/settings/_account.scss | 4 +-- .../dashboard/settings/_preferences.scss | 8 +++--- .../dashboard/settings/_social-accounts.scss | 2 +- assets/src/scss/frontend/kids/_dashboard.scss | 4 +-- .../learning-area/_lesson-comments.scss | 6 ++-- .../learning-area/_lesson-content.scss | 6 ++-- .../scss/frontend/learning-area/_quiz.scss | 24 ++++++++-------- .../learning-area/layout/_footer.scss | 2 +- .../learning-area/layout/_header.scss | 6 ++-- .../learning-area/layout/_layout.scss | 2 +- .../learning-area/layout/_sidebar.scss | 16 +++++------ .../learning-area/pages/_announcements.scss | 4 +-- .../learning-area/pages/_course-info.scss | 4 +-- .../learning-area/pages/_quiz-intro.scss | 8 +++--- stylelint.config.mjs | 2 ++ 66 files changed, 182 insertions(+), 180 deletions(-) diff --git a/assets/core/scss/components/_accordion.scss b/assets/core/scss/components/_accordion.scss index cbea67cc49..bf13c78f7f 100644 --- a/assets/core/scss/components/_accordion.scss +++ b/assets/core/scss/components/_accordion.scss @@ -42,7 +42,7 @@ } &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); flex-shrink: 0; color: $tutor-icon-idle; diff --git a/assets/core/scss/components/_avatar.scss b/assets/core/scss/components/_avatar.scss index 1a4ae42820..0e4b45a49c 100644 --- a/assets/core/scss/components/_avatar.scss +++ b/assets/core/scss/components/_avatar.scss @@ -3,16 +3,16 @@ @use '../mixins' as *; .tutor-avatar { - @include tutor-avatar-base; + @include tutor-avatar-base(); @include tutor-avatar-size(48); } .tutor-avatar-image { - @include tutor-avatar-image; + @include tutor-avatar-image(); } .tutor-avatar-initials { - @include tutor-avatar-initials; + @include tutor-avatar-initials(); } // Avatar sizes diff --git a/assets/core/scss/components/_badge.scss b/assets/core/scss/components/_badge.scss index 8a624a202a..4c7284457b 100644 --- a/assets/core/scss/components/_badge.scss +++ b/assets/core/scss/components/_badge.scss @@ -2,7 +2,7 @@ @use '../mixins' as *; .tutor-badge { - @include tutor-badge-base; + @include tutor-badge-base(); &-primary { @include tutor-badge-variant(primary); diff --git a/assets/core/scss/components/_button.scss b/assets/core/scss/components/_button.scss index f1b37d4aa1..29de72c82a 100644 --- a/assets/core/scss/components/_button.scss +++ b/assets/core/scss/components/_button.scss @@ -5,7 +5,7 @@ button.tutor-btn, a.tutor-btn, .tutor-btn { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-size(medium); } @@ -120,14 +120,14 @@ a.tutor-btn-large, // Button states .tutor-btn-loading { - @include tutor-button-loading; + @include tutor-button-loading(); } // Button with full width button.tutor-btn-block, a.tutor-btn-block, .tutor-btn-block { - @include tutor-button-block; + @include tutor-button-block(); } // Button group diff --git a/assets/core/scss/components/_calendar.scss b/assets/core/scss/components/_calendar.scss index e89f7b1a82..882d239d7a 100644 --- a/assets/core/scss/components/_calendar.scss +++ b/assets/core/scss/components/_calendar.scss @@ -28,7 +28,7 @@ .vc-months__month.vc-months__month, .vc-years__year.vc-years__year { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant('ghost'); color: $tutor-text-primary; @@ -136,7 +136,7 @@ @include tutor-flex(column); button { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(tiny, medium); @include tutor-flex(row, center, space-between); diff --git a/assets/core/scss/components/_card.scss b/assets/core/scss/components/_card.scss index 9e8f6af6f0..85eba6a410 100644 --- a/assets/core/scss/components/_card.scss +++ b/assets/core/scss/components/_card.scss @@ -5,7 +5,7 @@ @use '../mixins' as *; .tutor-card { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-padding(medium); @include tutor-card-radius(lg); } diff --git a/assets/core/scss/components/_file-uploader.scss b/assets/core/scss/components/_file-uploader.scss index d0c7ea69f5..ec5502a1f2 100644 --- a/assets/core/scss/components/_file-uploader.scss +++ b/assets/core/scss/components/_file-uploader.scss @@ -12,7 +12,7 @@ cursor: pointer; position: relative; - @include tutor-transition; + @include tutor-transition(); &.tutor-file-uploader-drag-over { background-color: $tutor-surface-brand-secondary; diff --git a/assets/core/scss/components/_input.scss b/assets/core/scss/components/_input.scss index 2cc87285d5..c671b89f76 100644 --- a/assets/core/scss/components/_input.scss +++ b/assets/core/scss/components/_input.scss @@ -24,7 +24,7 @@ } .tutor-input { - @include tutor-input-base; + @include tutor-input-base(); &.tutor-input-content { &-left { @@ -50,7 +50,7 @@ } .tutor-text-area { - @include tutor-textarea; + @include tutor-textarea(); } .tutor-wp-editor-container { @@ -136,7 +136,7 @@ } .tutor-checkbox { - @include tutor-checkbox; + @include tutor-checkbox(); &-md { @include tutor-checkbox(md); @@ -148,7 +148,7 @@ } .tutor-radio { - @include tutor-radio; + @include tutor-radio(); &-md { @include tutor-radio(md); @@ -156,7 +156,7 @@ } .tutor-switch { - @include tutor-switch; + @include tutor-switch(); &-md { @include tutor-switch(md); @@ -180,7 +180,7 @@ } .tutor-input-help-icon { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(row, center, center); color: $tutor-icon-subdued; @@ -189,7 +189,7 @@ .tutor-input-clear-button { @include tutor-flex(row, center, center); - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant('ghost'); padding: $tutor-spacing-1; @@ -223,7 +223,7 @@ } .tutor-input-password-toggle { - @include tutor-button-reset; + @include tutor-button-reset(); pointer-events: auto; cursor: pointer; diff --git a/assets/core/scss/components/_loading-spinner.scss b/assets/core/scss/components/_loading-spinner.scss index 554752431c..551438afd0 100644 --- a/assets/core/scss/components/_loading-spinner.scss +++ b/assets/core/scss/components/_loading-spinner.scss @@ -2,8 +2,8 @@ @use '../mixins/' as *; .tutor-loading-spinner { - @include tutor-flex; - @include tutor-loading-spinner; + @include tutor-flex(); + @include tutor-loading-spinner(); padding: $tutor-spacing-8; position: relative; diff --git a/assets/core/scss/components/_modal.scss b/assets/core/scss/components/_modal.scss index 39e7760be3..e60937b624 100644 --- a/assets/core/scss/components/_modal.scss +++ b/assets/core/scss/components/_modal.scss @@ -87,7 +87,7 @@ } &-close { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-icon-size(x-small); @include tutor-button-variant(ghost); diff --git a/assets/core/scss/components/_nav.scss b/assets/core/scss/components/_nav.scss index c32003e081..6b664ab572 100644 --- a/assets/core/scss/components/_nav.scss +++ b/assets/core/scss/components/_nav.scss @@ -11,7 +11,7 @@ button.tutor-nav-item, .tutor-nav-item { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(small, medium, secondary); @include tutor-flex(row, center); @@ -75,7 +75,7 @@ padding: $tutor-spacing-2 0; &-item { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(small); @include tutor-flex(row, center); diff --git a/assets/core/scss/components/_pagination.scss b/assets/core/scss/components/_pagination.scss index 840e7aa12f..eac093058b 100644 --- a/assets/core/scss/components/_pagination.scss +++ b/assets/core/scss/components/_pagination.scss @@ -4,19 +4,19 @@ @use '../mixins' as *; .tutor-pagination { - @include tutor-pagination-base; + @include tutor-pagination-base(); } .tutor-pagination-info { - @include tutor-pagination-info; + @include tutor-pagination-info(); } .tutor-pagination-list { - @include tutor-pagination-list; + @include tutor-pagination-list(); } .tutor-pagination-item { - @include tutor-pagination-item; + @include tutor-pagination-item(); &-active { @include tutor-pagination-item-variant(active); @@ -29,5 +29,5 @@ } .tutor-pagination-ellipsis { - @include tutor-pagination-ellipsis; + @include tutor-pagination-ellipsis(); } \ No newline at end of file diff --git a/assets/core/scss/components/_popover.scss b/assets/core/scss/components/_popover.scss index 9209f8c8ed..360a935680 100644 --- a/assets/core/scss/components/_popover.scss +++ b/assets/core/scss/components/_popover.scss @@ -36,8 +36,8 @@ color: $tutor-icon-idle; cursor: pointer; - @include tutor-transition; - @include tutor-flex-center; + @include tutor-transition(); + @include tutor-flex-center(); &:hover, &:focus { @@ -76,10 +76,10 @@ .tutor-popover-menu-item { width: 100%; - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(row, center, flex-start); @include tutor-typography(small); - @include tutor-text-truncate; + @include tutor-text-truncate(); gap: $tutor-spacing-5; padding: $tutor-spacing-4 $tutor-spacing-5; diff --git a/assets/core/scss/components/_select.scss b/assets/core/scss/components/_select.scss index 0e25d2eb5e..b3819acd7a 100644 --- a/assets/core/scss/components/_select.scss +++ b/assets/core/scss/components/_select.scss @@ -26,11 +26,11 @@ cursor: pointer; text-align: start; - @include tutor-transition; + @include tutor-transition(); &:hover, &:focus { - @include tutor-focus-ring; + @include tutor-focus-ring(); border-color: $tutor-border-brand-tertiary; background-color: $tutor-surface-l1; @@ -122,7 +122,7 @@ } &-remove { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(row, center, center); padding: 0; @@ -146,7 +146,7 @@ } .tutor-select-clear { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant('ghost'); @include tutor-flex(row, center, center); @include margin-end($tutor-spacing-2); @@ -226,7 +226,7 @@ } .tutor-select-search-input { - @include tutor-input-base; + @include tutor-input-base(); padding-block: $tutor-spacing-3; padding-inline-start: $tutor-spacing-9; diff --git a/assets/core/scss/components/_star-rating.scss b/assets/core/scss/components/_star-rating.scss index 5b9f834ea4..fff3e5e00a 100644 --- a/assets/core/scss/components/_star-rating.scss +++ b/assets/core/scss/components/_star-rating.scss @@ -5,18 +5,18 @@ @include tutor-flex(row, center, space-between); button.tutor-star-rating-icon-btn { - @include tutor-button-reset; + @include tutor-button-reset(); min-height: unset; } &.is-emoji-view { - @include tutor-flex-column; + @include tutor-flex-column(); gap: $tutor-spacing-7; .tutor-star-rating-emoji-btn { - @include tutor-button-reset; + @include tutor-button-reset(); width: 74px; height: 74px; @@ -24,7 +24,7 @@ border: 1px solid $tutor-border-idle; border-radius: $tutor-radius-2xl; - @include tutor-flex-column; + @include tutor-flex-column(); align-items: center; justify-content: center; diff --git a/assets/core/scss/components/_tabs.scss b/assets/core/scss/components/_tabs.scss index ac0e018fa9..144599f77b 100644 --- a/assets/core/scss/components/_tabs.scss +++ b/assets/core/scss/components/_tabs.scss @@ -85,7 +85,7 @@ button.tutor-tabs-tab, } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); } } @@ -113,7 +113,7 @@ button.tutor-tabs-tab, @include tutor-flex(row, flex-start, flex-start); .tutor-tabs-nav { - @include tutor-flex-column; + @include tutor-flex-column(); align-items: stretch; min-width: 200px; diff --git a/assets/core/scss/components/_time-input.scss b/assets/core/scss/components/_time-input.scss index 76b0f7ba36..fd8f3d1595 100644 --- a/assets/core/scss/components/_time-input.scss +++ b/assets/core/scss/components/_time-input.scss @@ -25,11 +25,11 @@ border-radius: $tutor-radius-lg; box-shadow: $tutor-shadow-lg; - @include tutor-scrollbar; + @include tutor-scrollbar(); } &-option { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography('small', 'regular', 'subdued'); text-align: start; diff --git a/assets/core/scss/components/_toast.scss b/assets/core/scss/components/_toast.scss index cfbb072097..a97831b0d0 100644 --- a/assets/core/scss/components/_toast.scss +++ b/assets/core/scss/components/_toast.scss @@ -329,7 +329,7 @@ } button.tutor-toast-close { - @include tutor-button-base; + @include tutor-button-base(); border: 0; background: transparent; diff --git a/assets/core/scss/mixins/_avatars.scss b/assets/core/scss/mixins/_avatars.scss index c983fcb699..ac39caee67 100644 --- a/assets/core/scss/mixins/_avatars.scss +++ b/assets/core/scss/mixins/_avatars.scss @@ -6,7 +6,7 @@ @use 'layout' as *; @mixin tutor-avatar-base { - @include tutor-flex-center; + @include tutor-flex-center(); position: relative; border-radius: $tutor-radius-full; diff --git a/assets/core/scss/mixins/_badges.scss b/assets/core/scss/mixins/_badges.scss index 81797cd3cf..c9793fee8d 100644 --- a/assets/core/scss/mixins/_badges.scss +++ b/assets/core/scss/mixins/_badges.scss @@ -15,7 +15,7 @@ img, svg { - @include tutor-flex-center; + @include tutor-flex-center(); width: 12px; height: 12px; diff --git a/assets/core/scss/mixins/_buttons.scss b/assets/core/scss/mixins/_buttons.scss index cd959caf78..6fa1a0ef4c 100644 --- a/assets/core/scss/mixins/_buttons.scss +++ b/assets/core/scss/mixins/_buttons.scss @@ -39,7 +39,7 @@ } &:focus-visible:not(:disabled, .disabled) { - @include tutor-focus-ring; + @include tutor-focus-ring(); } svg:not([class]) { diff --git a/assets/core/scss/mixins/_inputs.scss b/assets/core/scss/mixins/_inputs.scss index 474e4b2ffb..6846fefc01 100644 --- a/assets/core/scss/mixins/_inputs.scss +++ b/assets/core/scss/mixins/_inputs.scss @@ -50,7 +50,7 @@ } &:focus { - @include tutor-focus-ring; + @include tutor-focus-ring(); background-color: $tutor-surface-l1; border-color: $tutor-border-brand-tertiary; @@ -83,7 +83,7 @@ } @mixin tutor-textarea($min-height: 92px) { - @include tutor-input-base; + @include tutor-input-base(); min-height: $min-height; resize: vertical; @@ -150,7 +150,7 @@ } &:focus { - @include tutor-focus-ring; + @include tutor-focus-ring(); &:not(:checked) { box-shadow: $tutor-ring-gray-shadow-sm; @@ -220,7 +220,7 @@ } &:focus { - @include tutor-focus-ring; + @include tutor-focus-ring(); &:not(:checked) { box-shadow: $tutor-ring-gray-shadow-sm; @@ -267,7 +267,7 @@ } &:focus { - @include tutor-focus-ring; + @include tutor-focus-ring(); border-color: $tutor-border-brand-tertiary; } diff --git a/assets/core/scss/mixins/_paginations.scss b/assets/core/scss/mixins/_paginations.scss index b96aa32fa0..10666e7036 100644 --- a/assets/core/scss/mixins/_paginations.scss +++ b/assets/core/scss/mixins/_paginations.scss @@ -44,7 +44,7 @@ } @mixin tutor-pagination-item { - @include tutor-flex-center; + @include tutor-flex-center(); padding: $tutor-spacing-3 $tutor-spacing-5; border-radius: $tutor-radius-md; @@ -95,7 +95,7 @@ } @mixin tutor-pagination-ellipsis { - @include tutor-flex-center; + @include tutor-flex-center(); min-width: 32px; min-height: 32px; diff --git a/assets/core/scss/themes/_dark.scss b/assets/core/scss/themes/_dark.scss index 6ee7ae7583..46c5acb99f 100644 --- a/assets/core/scss/themes/_dark.scss +++ b/assets/core/scss/themes/_dark.scss @@ -230,13 +230,13 @@ // Apply dark theme when explicitly set [data-tutor-theme='dark'] { - @include dark-theme-tokens; + @include dark-theme-tokens(); } // Apply dark theme when system preference is dark // This prevents flash of light theme before JS loads @media (prefers-color-scheme: dark) { [data-tutor-theme='system'] { - @include dark-theme-tokens; + @include dark-theme-tokens(); } } diff --git a/assets/core/scss/themes/_deuteranomaly.scss b/assets/core/scss/themes/_deuteranomaly.scss index 2aa8d15511..4ab53648b0 100644 --- a/assets/core/scss/themes/_deuteranomaly.scss +++ b/assets/core/scss/themes/_deuteranomaly.scss @@ -136,15 +136,15 @@ [data-tutor-theme='light'][data-tutor-vision='deuteranomaly'], [data-tutor-theme='system'][data-tutor-vision='deuteranomaly'] { - @include deuteranomaly-light-tokens; + @include deuteranomaly-light-tokens(); } [data-tutor-theme='dark'][data-tutor-vision='deuteranomaly'] { - @include deuteranomaly-dark-tokens; + @include deuteranomaly-dark-tokens(); } @media (prefers-color-scheme: dark) { [data-tutor-theme='system'][data-tutor-vision='deuteranomaly'] { - @include deuteranomaly-dark-tokens; + @include deuteranomaly-dark-tokens(); } } diff --git a/assets/core/scss/themes/_deuteranopia.scss b/assets/core/scss/themes/_deuteranopia.scss index 1b0a45a409..a0a708c791 100644 --- a/assets/core/scss/themes/_deuteranopia.scss +++ b/assets/core/scss/themes/_deuteranopia.scss @@ -130,15 +130,15 @@ [data-tutor-theme='light'][data-tutor-vision='deuteranopia'], [data-tutor-theme='system'][data-tutor-vision='deuteranopia'] { - @include deuteranopia-light-tokens; + @include deuteranopia-light-tokens(); } [data-tutor-theme='dark'][data-tutor-vision='deuteranopia'] { - @include deuteranopia-dark-tokens; + @include deuteranopia-dark-tokens(); } @media (prefers-color-scheme: dark) { [data-tutor-theme='system'][data-tutor-vision='deuteranopia'] { - @include deuteranopia-dark-tokens; + @include deuteranopia-dark-tokens(); } } diff --git a/assets/core/scss/themes/_high-contrast.scss b/assets/core/scss/themes/_high-contrast.scss index 0a9ff83b73..f101e9c742 100644 --- a/assets/core/scss/themes/_high-contrast.scss +++ b/assets/core/scss/themes/_high-contrast.scss @@ -75,15 +75,15 @@ [data-tutor-theme='light'][data-tutor-contrast='high'], [data-tutor-theme='system'][data-tutor-contrast='high'] { - @include high-contrast-light-tokens; + @include high-contrast-light-tokens(); } [data-tutor-theme='dark'][data-tutor-contrast='high'] { - @include high-contrast-dark-tokens; + @include high-contrast-dark-tokens(); } @media (prefers-color-scheme: dark) { [data-tutor-theme='system'][data-tutor-contrast='high'] { - @include high-contrast-dark-tokens; + @include high-contrast-dark-tokens(); } } diff --git a/assets/core/scss/themes/_protanopia.scss b/assets/core/scss/themes/_protanopia.scss index 2f310ce708..af2f155c70 100644 --- a/assets/core/scss/themes/_protanopia.scss +++ b/assets/core/scss/themes/_protanopia.scss @@ -108,15 +108,15 @@ [data-tutor-theme='light'][data-tutor-vision='protanopia'], [data-tutor-theme='system'][data-tutor-vision='protanopia'] { - @include protanopia-light-tokens; + @include protanopia-light-tokens(); } [data-tutor-theme='dark'][data-tutor-vision='protanopia'] { - @include protanopia-dark-tokens; + @include protanopia-dark-tokens(); } @media (prefers-color-scheme: dark) { [data-tutor-theme='system'][data-tutor-vision='protanopia'] { - @include protanopia-dark-tokens; + @include protanopia-dark-tokens(); } } diff --git a/assets/core/scss/utilities/_colors.scss b/assets/core/scss/utilities/_colors.scss index 2f028c55cb..758da08a55 100644 --- a/assets/core/scss/utilities/_colors.scss +++ b/assets/core/scss/utilities/_colors.scss @@ -189,7 +189,7 @@ $opacities: ( } .tutor-focus-ring:focus { - @include tutor-focus-ring; + @include tutor-focus-ring(); } .tutor-focus-outline-none:focus { diff --git a/assets/core/scss/utilities/_typography.scss b/assets/core/scss/utilities/_typography.scss index ac27e6824c..b424ed0963 100644 --- a/assets/core/scss/utilities/_typography.scss +++ b/assets/core/scss/utilities/_typography.scss @@ -123,7 +123,7 @@ $text-align-utils: ( // Text overflow .tutor-truncate { - @include tutor-text-truncate; + @include tutor-text-truncate(); } .tutor-text-ellipsis { diff --git a/assets/src/scss/frontend/components/_discussion-card.scss b/assets/src/scss/frontend/components/_discussion-card.scss index 78132c3094..79fb466ea8 100644 --- a/assets/src/scss/frontend/components/_discussion-card.scss +++ b/assets/src/scss/frontend/components/_discussion-card.scss @@ -137,7 +137,7 @@ } .tutor-discussion-card-meta-reply-button { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(tiny, medium, subdued); margin-inline-end: auto; diff --git a/assets/src/scss/frontend/components/_discussion-single.scss b/assets/src/scss/frontend/components/_discussion-single.scss index 40f2307891..27ac90beae 100644 --- a/assets/src/scss/frontend/components/_discussion-single.scss +++ b/assets/src/scss/frontend/components/_discussion-single.scss @@ -16,7 +16,7 @@ border-bottom: 1px solid $tutor-border-idle; .tutor-discussion-avatar-list { - @include tutor-flex; + @include tutor-flex(); .tutor-avatar { border: 1px solid $tutor-border-inverse; @@ -39,7 +39,7 @@ } .tutor-discussion-thumb-button { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(0); } } diff --git a/assets/src/scss/frontend/components/_event-badge.scss b/assets/src/scss/frontend/components/_event-badge.scss index 668af919fb..5cfdb7d23e 100644 --- a/assets/src/scss/frontend/components/_event-badge.scss +++ b/assets/src/scss/frontend/components/_event-badge.scss @@ -13,7 +13,7 @@ border-radius: $tutor-radius-full; &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); } &-text { diff --git a/assets/src/scss/frontend/components/_quiz-attempt-details.scss b/assets/src/scss/frontend/components/_quiz-attempt-details.scss index edd4de897a..c5148975f3 100644 --- a/assets/src/scss/frontend/components/_quiz-attempt-details.scss +++ b/assets/src/scss/frontend/components/_quiz-attempt-details.scss @@ -35,7 +35,7 @@ border-bottom: 1px solid $tutor-border-idle; &-inner { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); @include tutor-flex(row, center, space-between); min-height: var(--tutor-quiz-summary-header-height); @@ -82,7 +82,7 @@ .tutor-quiz-sidebar-questions { overflow-y: auto; - @include tutor-scrollbar; + @include tutor-scrollbar(); padding: 1px 1px $tutor-spacing-6; @@ -139,7 +139,7 @@ } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); background-color: $tutor-surface-l2; } @@ -206,7 +206,7 @@ } .tutor-quiz-questions { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); @include tutor-flex(column); padding-inline: 0; @@ -446,7 +446,7 @@ } &-review-action { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant(secondary); @include tutor-button-icon-size(x-small); @include tutor-transition((background-color, color, opacity, border-color)); diff --git a/assets/src/scss/frontend/components/_quiz-attempts.scss b/assets/src/scss/frontend/components/_quiz-attempts.scss index b2b08baf5d..089a1e0377 100644 --- a/assets/src/scss/frontend/components/_quiz-attempts.scss +++ b/assets/src/scss/frontend/components/_quiz-attempts.scss @@ -94,7 +94,7 @@ &[data-learning-area='true'] { .tutor-quiz-item-info { > div:first-of-type { - @include tutor-visually-hidden; + @include tutor-visually-hidden(); } .tutor-quiz-item-info-date a { @@ -159,7 +159,7 @@ } .tutor-quiz-attempts-expand-btn { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(row, center); gap: $tutor-spacing-2; @@ -221,7 +221,7 @@ .tutor-quiz-marks-correct, .tutor-quiz-marks-incorrect { - @include tutor-badge-base; + @include tutor-badge-base(); width: 100%; border-radius: $tutor-radius-full; diff --git a/assets/src/scss/frontend/components/_quiz-question.scss b/assets/src/scss/frontend/components/_quiz-question.scss index 06e9858b16..29b8bfe641 100644 --- a/assets/src/scss/frontend/components/_quiz-question.scss +++ b/assets/src/scss/frontend/components/_quiz-question.scss @@ -233,7 +233,7 @@ } &-option { - @include tutor-flex-center; + @include tutor-flex-center(); gap: $tutor-spacing-3; padding: $tutor-spacing-3 $tutor-spacing-4; diff --git a/assets/src/scss/frontend/components/_quiz-summary.scss b/assets/src/scss/frontend/components/_quiz-summary.scss index 9c96107ba6..09671a53fc 100644 --- a/assets/src/scss/frontend/components/_quiz-summary.scss +++ b/assets/src/scss/frontend/components/_quiz-summary.scss @@ -2,7 +2,7 @@ @use '@Core/scss/mixins' as *; .tutor-quiz-summary { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); margin: 0 auto; padding-block: $tutor-spacing-13; diff --git a/assets/src/scss/frontend/components/_upcoming-lesson-card.scss b/assets/src/scss/frontend/components/_upcoming-lesson-card.scss index 9b13ba46c9..0b6a8fcdb8 100644 --- a/assets/src/scss/frontend/components/_upcoming-lesson-card.scss +++ b/assets/src/scss/frontend/components/_upcoming-lesson-card.scss @@ -43,7 +43,7 @@ } &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); } &-live-tag { @@ -80,7 +80,7 @@ display: block; @include tutor-typography('small', 'medium', 'primary', 'body'); - @include tutor-text-truncate; + @include tutor-text-truncate(); margin: 0 0 $tutor-spacing-5; diff --git a/assets/src/scss/frontend/dashboard/_billing.scss b/assets/src/scss/frontend/dashboard/_billing.scss index fc58d101e4..6234287a89 100644 --- a/assets/src/scss/frontend/dashboard/_billing.scss +++ b/assets/src/scss/frontend/dashboard/_billing.scss @@ -3,7 +3,7 @@ .tutor-billing { &-body { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(lg); @include tutor-breakpoint-down(sm) { @@ -109,7 +109,7 @@ } .tutor-billing-card-payment-method { - @include tutor-flex; + @include tutor-flex(); } } @@ -124,7 +124,7 @@ &-title { @include tutor-flex(row, start, flex-start); @include tutor-typography('small', 'medium'); - @include tutor-text-truncate; + @include tutor-text-truncate(); min-width: 0; width: 100%; @@ -208,7 +208,7 @@ } &-content { - @include tutor-flex-center; + @include tutor-flex-center(); width: 100%; border: 1px solid $tutor-border-idle; diff --git a/assets/src/scss/frontend/dashboard/_profile.scss b/assets/src/scss/frontend/dashboard/_profile.scss index ebf6903849..342d1b2638 100644 --- a/assets/src/scss/frontend/dashboard/_profile.scss +++ b/assets/src/scss/frontend/dashboard/_profile.scss @@ -3,7 +3,7 @@ .tutor-user-profile { .tutor-profile-card { - @include tutor-card-base; + @include tutor-card-base(); border-radius: $tutor-radius-2xl; padding: $tutor-spacing-6; @@ -31,7 +31,7 @@ } .tutor-edit-profile-btn { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant(outline); @include tutor-button-size(x-small); @@ -222,7 +222,7 @@ } .tutor-statistic-card { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-flex(row, flex-start); gap: $tutor-spacing-5; diff --git a/assets/src/scss/frontend/dashboard/_progress-card.scss b/assets/src/scss/frontend/dashboard/_progress-card.scss index 53b96be8d4..0e7f1c9789 100644 --- a/assets/src/scss/frontend/dashboard/_progress-card.scss +++ b/assets/src/scss/frontend/dashboard/_progress-card.scss @@ -56,7 +56,7 @@ &-category { @include tutor-typography('tiny', 'regular', 'secondary'); - @include tutor-text-truncate; + @include tutor-text-truncate(); min-width: 0; max-width: 100%; @@ -138,7 +138,7 @@ } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); border-radius: $tutor-radius-2xl !important; z-index: $tutor-z-positive; diff --git a/assets/src/scss/frontend/dashboard/_stat-card.scss b/assets/src/scss/frontend/dashboard/_stat-card.scss index b0684dfe42..a4be7d9c3d 100644 --- a/assets/src/scss/frontend/dashboard/_stat-card.scss +++ b/assets/src/scss/frontend/dashboard/_stat-card.scss @@ -33,7 +33,7 @@ } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); } &-header { @@ -47,7 +47,7 @@ } &-icon { - @include tutor-flex; + @include tutor-flex(); } &-value { diff --git a/assets/src/scss/frontend/dashboard/_withdrawals.scss b/assets/src/scss/frontend/dashboard/_withdrawals.scss index abf37cf273..5085325e41 100644 --- a/assets/src/scss/frontend/dashboard/_withdrawals.scss +++ b/assets/src/scss/frontend/dashboard/_withdrawals.scss @@ -169,7 +169,7 @@ } .tutor-withdrawal-available-balance { - @include tutor-flex; + @include tutor-flex(); gap: $tutor-spacing-5; padding: $tutor-spacing-5 $tutor-spacing-6; @@ -178,7 +178,7 @@ border-radius: $tutor-radius-lg; &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); width: 44px; height: 44px; diff --git a/assets/src/scss/frontend/dashboard/layout/_account.scss b/assets/src/scss/frontend/dashboard/layout/_account.scss index 3f3514010f..99d185e050 100644 --- a/assets/src/scss/frontend/dashboard/layout/_account.scss +++ b/assets/src/scss/frontend/dashboard/layout/_account.scss @@ -47,7 +47,7 @@ body:has(#wpadminbar) .tutor-account-page-wrapper.tutor-has-site-shell .tutor-ac } .tutor-account-container { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); padding-inline: $tutor-spacing-6; } diff --git a/assets/src/scss/frontend/dashboard/layout/_header.scss b/assets/src/scss/frontend/dashboard/layout/_header.scss index 08db242280..29456f6002 100644 --- a/assets/src/scss/frontend/dashboard/layout/_header.scss +++ b/assets/src/scss/frontend/dashboard/layout/_header.scss @@ -33,7 +33,7 @@ } &-inner { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); @include tutor-flex(row, center, space-between); height: 100%; @@ -100,7 +100,7 @@ } &-user-avatar { - @include tutor-button-reset; + @include tutor-button-reset(); border: 1px solid $tutor-border-idle; border-radius: $tutor-radius-full; @@ -114,7 +114,7 @@ } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); } } @@ -191,7 +191,7 @@ height: 60px; .tutor-dashboard-header-user-avatar { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant(ghost); padding: 9px; diff --git a/assets/src/scss/frontend/dashboard/layout/_layout.scss b/assets/src/scss/frontend/dashboard/layout/_layout.scss index f53ca7ad42..7baefd82cf 100644 --- a/assets/src/scss/frontend/dashboard/layout/_layout.scss +++ b/assets/src/scss/frontend/dashboard/layout/_layout.scss @@ -17,7 +17,7 @@ } .tutor-dashboard-page { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); padding-inline: $tutor-spacing-6; padding-bottom: $tutor-spacing-7; diff --git a/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss b/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss index 5d8afc4b92..870dd67337 100644 --- a/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss +++ b/assets/src/scss/frontend/dashboard/layout/_nav-mobile.scss @@ -32,7 +32,7 @@ > a, > button { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(tiny, medium); @include tutor-flex(column, center); @@ -51,7 +51,7 @@ } .tutor-dashboard-nav-mobile-icon { - @include tutor-flex-center; + @include tutor-flex-center(); } } } diff --git a/assets/src/scss/frontend/dashboard/layout/_sidebar.scss b/assets/src/scss/frontend/dashboard/layout/_sidebar.scss index e0af87700b..495ee940a1 100644 --- a/assets/src/scss/frontend/dashboard/layout/_sidebar.scss +++ b/assets/src/scss/frontend/dashboard/layout/_sidebar.scss @@ -53,7 +53,7 @@ padding: $tutor-spacing-8 $tutor-spacing-6; ul { - @include tutor-flex-column; + @include tutor-flex-column(); gap: $tutor-spacing-2; list-style: none; diff --git a/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss b/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss index 0a5f26f196..4ac2eebc3a 100644 --- a/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss +++ b/assets/src/scss/frontend/dashboard/pages/_instructor-dashboard.scss @@ -12,8 +12,8 @@ } [data-grab] { - @include tutor-reset; - @include tutor-flex-center; + @include tutor-reset(); + @include tutor-flex-center(); cursor: grab; @@ -28,7 +28,7 @@ } &-chart { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(2xl); @include tutor-flex(column); @@ -51,7 +51,7 @@ gap: $tutor-spacing-2; &::before { - @include tutor-flex-center; + @include tutor-flex-center(); content: ''; height: 2px; @@ -121,7 +121,7 @@ } &-card { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(2xl); @include tutor-flex(column); @@ -148,13 +148,13 @@ } &-avatar { - @include tutor-flex-center; + @include tutor-flex-center(); flex-shrink: 0; } &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); @include tutor-typography('tiny', 'regular', 'subdued'); width: 16px; @@ -163,7 +163,7 @@ } &-course { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(lg); @include tutor-flex(row, center, space-between); @include tutor-transition(background-color); @@ -177,7 +177,7 @@ &-index { @include tutor-typography('p3', 'medium', 'secondary'); - @include tutor-flex-center; + @include tutor-flex-center(); width: 32px; height: 32px; @@ -188,7 +188,7 @@ } &-task { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(lg); @include tutor-flex(row, flex-start); @include tutor-transition(background-color); @@ -218,7 +218,7 @@ } &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); width: 32px; height: 32px; @@ -269,21 +269,21 @@ } &-review { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(lg); width: 100%; padding: $tutor-spacing-5; &-avatar { - @include tutor-flex-center; + @include tutor-flex-center(); flex-shrink: 0; align-self: flex-start; } &-action { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-size(x-small); @include tutor-button-variant(link); @include tutor-flex(row, center); diff --git a/assets/src/scss/frontend/dashboard/pages/_my-courses.scss b/assets/src/scss/frontend/dashboard/pages/_my-courses.scss index a64238e8e2..c9a49eef1d 100644 --- a/assets/src/scss/frontend/dashboard/pages/_my-courses.scss +++ b/assets/src/scss/frontend/dashboard/pages/_my-courses.scss @@ -31,8 +31,8 @@ .tutor-my-courses-card { @include tutor-flex(column); - @include tutor-card-base; - @include tutor-card-radius; + @include tutor-card-base(); + @include tutor-card-radius(); position: relative; @@ -62,7 +62,7 @@ } &-actions { - @include tutor-flex-center; + @include tutor-flex-center(); gap: $tutor-spacing-4; position: absolute; diff --git a/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss b/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss index ef2ef9d8e7..00ba8c9851 100644 --- a/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss +++ b/assets/src/scss/frontend/dashboard/pages/_student-dashboard.scss @@ -3,7 +3,7 @@ .tutor-dashboard-welcome-card { @include tutor-flex(row, center, space-between); - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(2xl); margin-bottom: $tutor-spacing-7; @@ -33,7 +33,7 @@ width: 248px; height: 248px; - @include tutor-flex-center; + @include tutor-flex-center(); @include tutor-breakpoint-down(sm) { width: 100%; @@ -43,7 +43,7 @@ .tutor-dashboard-quick-tips-card { @include tutor-flex(row, start, space-between); - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(2xl); padding: $tutor-spacing-8; diff --git a/assets/src/scss/frontend/dashboard/settings/_account.scss b/assets/src/scss/frontend/dashboard/settings/_account.scss index 7211c07d57..9b9a8ce239 100644 --- a/assets/src/scss/frontend/dashboard/settings/_account.scss +++ b/assets/src/scss/frontend/dashboard/settings/_account.scss @@ -27,7 +27,7 @@ } .tutor-account-cover-photo-action { - @include tutor-flex; + @include tutor-flex(); gap: $tutor-spacing-3; position: absolute; @@ -45,7 +45,7 @@ z-index: $tutor-z-positive; .tutor-account-avatar { - @include tutor-avatar-base; + @include tutor-avatar-base(); width: 104px; height: 104px; diff --git a/assets/src/scss/frontend/dashboard/settings/_preferences.scss b/assets/src/scss/frontend/dashboard/settings/_preferences.scss index 26723b723d..68335ee008 100644 --- a/assets/src/scss/frontend/dashboard/settings/_preferences.scss +++ b/assets/src/scss/frontend/dashboard/settings/_preferences.scss @@ -11,7 +11,7 @@ } &-setting-item { - @include tutor-flex-between; + @include tutor-flex-between(); gap: $tutor-spacing-10; @@ -25,7 +25,7 @@ gap: $tutor-spacing-4; .tutor-preferences-setting-icon { - @include tutor-flex-center; + @include tutor-flex-center(); color: $tutor-icon-idle; } @@ -39,7 +39,7 @@ } .tutor-preferences-setting-text { - @include tutor-flex-column; + @include tutor-flex-column(); gap: $tutor-spacing-1; @@ -78,7 +78,7 @@ } &-vision-preview { - @include tutor-flex-center; + @include tutor-flex-center(); background-color: $tutor-surface-l1-hover; border-radius: $tutor-radius-md; diff --git a/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss b/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss index 9385d623c9..cbac3136f0 100644 --- a/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss +++ b/assets/src/scss/frontend/dashboard/settings/_social-accounts.scss @@ -19,7 +19,7 @@ } &-field { - @include tutor-flex; + @include tutor-flex(); gap: $tutor-spacing-3; } diff --git a/assets/src/scss/frontend/kids/_dashboard.scss b/assets/src/scss/frontend/kids/_dashboard.scss index a0d12123e4..9fb308a30b 100644 --- a/assets/src/scss/frontend/kids/_dashboard.scss +++ b/assets/src/scss/frontend/kids/_dashboard.scss @@ -46,7 +46,7 @@ .tutor-dashboard-home-card, .tutor-dashboard-home-sort .tutor-popover-bottom, .tutor-subscription-payments-item:hover { - @include tutor-kids-shadow; + @include tutor-kids-shadow(); } .tutor-dashboard-welcome-card, @@ -56,7 +56,7 @@ } .tutor-billing-card:hover { - @include tutor-kids-shadow; + @include tutor-kids-shadow(); &:not(:last-of-type) { border-bottom: 1px solid transparent; diff --git a/assets/src/scss/frontend/learning-area/_lesson-comments.scss b/assets/src/scss/frontend/learning-area/_lesson-comments.scss index d2ca8751fc..0804386d06 100644 --- a/assets/src/scss/frontend/learning-area/_lesson-comments.scss +++ b/assets/src/scss/frontend/learning-area/_lesson-comments.scss @@ -33,7 +33,7 @@ } &-action-btn { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(row, center, center); gap: $tutor-spacing-2; @@ -63,7 +63,7 @@ } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); } } @@ -83,7 +83,7 @@ } &-replies-toggle { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography('tiny', 'medium', 'brand'); @include tutor-flex(row, center, flex-start); diff --git a/assets/src/scss/frontend/learning-area/_lesson-content.scss b/assets/src/scss/frontend/learning-area/_lesson-content.scss index 91580336a8..59e029ba78 100644 --- a/assets/src/scss/frontend/learning-area/_lesson-content.scss +++ b/assets/src/scss/frontend/learning-area/_lesson-content.scss @@ -10,9 +10,9 @@ button.tutor-mark-as-complete-button, a.tutor-mark-as-complete-button, .tutor-mark-as-complete-button { - @include tutor-button-base; + @include tutor-button-base(); @include tutor-button-variant(primary-soft); - @include tutor-button-size; + @include tutor-button-size(); gap: $tutor-spacing-4; min-width: 160px; @@ -107,7 +107,7 @@ } .tutor-lesson-image-wrapper { - @include tutor-flex-center; + @include tutor-flex-center(); aspect-ratio: 16 / 9; diff --git a/assets/src/scss/frontend/learning-area/_quiz.scss b/assets/src/scss/frontend/learning-area/_quiz.scss index ea39e30c68..32e58cca8b 100644 --- a/assets/src/scss/frontend/learning-area/_quiz.scss +++ b/assets/src/scss/frontend/learning-area/_quiz.scss @@ -195,7 +195,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-progress { @include tutor-flex(column); - @include tutor-frontend-layout; + @include tutor-frontend-layout(); padding-inline: 0; padding-block: $tutor-spacing-5; @@ -346,7 +346,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-timer-text { @include tutor-typography('h5', 'semibold'); - @include tutor-flex-center; + @include tutor-flex-center(); grid-area: 1 / 1; position: relative; @@ -403,7 +403,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} } &-timer-reel { - @include tutor-flex-column; + @include tutor-flex-column(); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); @@ -434,7 +434,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-questions { @include tutor-flex(column); - @include tutor-frontend-layout; + @include tutor-frontend-layout(); padding-inline: 0; width: 100%; @@ -478,7 +478,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} } &-question-meta { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); @include tutor-flex(row, center, space-between); width: 100%; @@ -547,7 +547,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &[data-pagination-style='shape'], &[data-pagination-style='radio'], &[data-pagination-style='number'] { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); width: calc(100dvw - #{$tutor-spacing-8}); justify-content: flex-start; @@ -1054,7 +1054,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} } [data-option-order] { - @include tutor-flex-center; + @include tutor-flex-center(); @include tutor-typography('small', 'semibold'); width: 40px; @@ -1080,8 +1080,8 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} } [data-grab-handle] { - @include tutor-button-reset; - @include tutor-flex-center; + @include tutor-button-reset(); + @include tutor-flex-center(); margin-inline: auto $tutor-spacing-4; pointer-events: none; @@ -1229,8 +1229,8 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} } [data-grab-handle] { - @include tutor-button-reset; - @include tutor-flex-center; + @include tutor-button-reset(); + @include tutor-flex-center(); margin-inline-start: auto; pointer-events: none; @@ -1426,7 +1426,7 @@ $tutor-quiz-draw-pin-chrome: '#{$tutor-spacing-5} + 2.5rem + #{$tutor-spacing-8} &-inner { @include tutor-flex(row, center, flex-start); - @include tutor-frontend-layout; + @include tutor-frontend-layout(); gap: $tutor-spacing-4; width: 100%; diff --git a/assets/src/scss/frontend/learning-area/layout/_footer.scss b/assets/src/scss/frontend/learning-area/layout/_footer.scss index 7c67e73eee..edf8776b2b 100644 --- a/assets/src/scss/frontend/learning-area/layout/_footer.scss +++ b/assets/src/scss/frontend/learning-area/layout/_footer.scss @@ -21,7 +21,7 @@ justify-content: space-between; .tutor-has-site-shell & { - @include tutor-card-base; + @include tutor-card-base(); margin-top: $tutor-spacing-6; border-radius: $tutor-radius-2xl; diff --git a/assets/src/scss/frontend/learning-area/layout/_header.scss b/assets/src/scss/frontend/learning-area/layout/_header.scss index c34730fe83..fa4ff30495 100644 --- a/assets/src/scss/frontend/learning-area/layout/_header.scss +++ b/assets/src/scss/frontend/learning-area/layout/_header.scss @@ -55,8 +55,8 @@ } &-back { - @include tutor-button-reset; - @include tutor-flex-center; + @include tutor-button-reset(); + @include tutor-flex-center(); flex-shrink: 0; height: 48px; @@ -74,7 +74,7 @@ &-title { @include tutor-typography(h5, semibold, primary, heading); - @include tutor-text-truncate; + @include tutor-text-truncate(); @include tutor-breakpoint-down(sm) { @include tutor-typography(medium, semibold); diff --git a/assets/src/scss/frontend/learning-area/layout/_layout.scss b/assets/src/scss/frontend/learning-area/layout/_layout.scss index 0e35cb55b4..1980829f29 100644 --- a/assets/src/scss/frontend/learning-area/layout/_layout.scss +++ b/assets/src/scss/frontend/learning-area/layout/_layout.scss @@ -114,7 +114,7 @@ $tutor-fixed-footer-offset: $tutor-spacing-6; } .tutor-learning-area-container { - @include tutor-frontend-layout; + @include tutor-frontend-layout(); padding-bottom: $tutor-spacing-6; diff --git a/assets/src/scss/frontend/learning-area/layout/_sidebar.scss b/assets/src/scss/frontend/learning-area/layout/_sidebar.scss index ff28ad928a..3fb1a4b717 100644 --- a/assets/src/scss/frontend/learning-area/layout/_sidebar.scss +++ b/assets/src/scss/frontend/learning-area/layout/_sidebar.scss @@ -142,7 +142,7 @@ &-title { @include tutor-typography(small, medium, secondary); - @include tutor-text-truncate; + @include tutor-text-truncate(); } &-actions { @@ -157,11 +157,11 @@ } &-summary { - @include tutor-flex-center; + @include tutor-flex-center(); } &-arrow { - @include tutor-flex-center; + @include tutor-flex-center(); color: $tutor-icon-secondary; @@ -215,7 +215,7 @@ } .tutor-learning-nav-item { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(small, medium, secondary); @include tutor-flex(row, flex-start); @@ -306,7 +306,7 @@ height: 12px; cursor: ns-resize; - @include tutor-flex-center; + @include tutor-flex-center(); z-index: $tutor-z-sidebar; @@ -338,7 +338,7 @@ bottom: 100%; button { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-flex(row, center, center); background-color: $tutor-surface-l1; @@ -378,7 +378,7 @@ } &:focus-visible { - @include tutor-focus-ring; + @include tutor-focus-ring(); &::before, &::after { @@ -416,7 +416,7 @@ } &-item { - @include tutor-button-reset; + @include tutor-button-reset(); @include tutor-typography(small); @include tutor-flex(row, center); diff --git a/assets/src/scss/frontend/learning-area/pages/_announcements.scss b/assets/src/scss/frontend/learning-area/pages/_announcements.scss index 4579a824f9..09ed103117 100644 --- a/assets/src/scss/frontend/learning-area/pages/_announcements.scss +++ b/assets/src/scss/frontend/learning-area/pages/_announcements.scss @@ -2,8 +2,8 @@ @use '@Core/scss/tokens' as *; .tutor-course-announcements { - @include tutor-card-base; - @include tutor-card-radius; + @include tutor-card-base(); + @include tutor-card-radius(); padding: 0; diff --git a/assets/src/scss/frontend/learning-area/pages/_course-info.scss b/assets/src/scss/frontend/learning-area/pages/_course-info.scss index 5da3cb3685..53469ad01f 100644 --- a/assets/src/scss/frontend/learning-area/pages/_course-info.scss +++ b/assets/src/scss/frontend/learning-area/pages/_course-info.scss @@ -25,7 +25,7 @@ padding: $tutor-spacing-4; .tutor-course-thumb { - @include tutor-flex; + @include tutor-flex(); max-width: 106px; } @@ -36,7 +36,7 @@ margin-top: $tutor-spacing-8; a { - @include tutor-transition; + @include tutor-transition(); &:hover { color: $tutor-text-brand; diff --git a/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss b/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss index 3cb6bb10d9..1255977256 100644 --- a/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss +++ b/assets/src/scss/frontend/learning-area/pages/_quiz-intro.scss @@ -2,7 +2,7 @@ @use '@Core/scss/mixins' as *; .tutor-quiz-intro { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-padding(medium); @include tutor-card-radius(2xl); @@ -19,7 +19,7 @@ @include tutor-flex(column, stretch, flex-start); @include tutor-breakpoint-down(sm) { - @include tutor-card-base; + @include tutor-card-base(); @include tutor-card-radius(2xl); padding: $tutor-spacing-5; @@ -27,7 +27,7 @@ } &-icon { - @include tutor-flex-center; + @include tutor-flex-center(); height: 200px; background-color: $tutor-surface-l3; @@ -296,7 +296,7 @@ display: none; @include tutor-breakpoint-down(sm) { - @include tutor-flex; + @include tutor-flex(); margin-inline-start: $tutor-spacing-4; } diff --git a/stylelint.config.mjs b/stylelint.config.mjs index 973e59d1d9..61c01dc4d6 100644 --- a/stylelint.config.mjs +++ b/stylelint.config.mjs @@ -40,6 +40,8 @@ export default { // Public and third-party class names (BEM, Plyr, vanilla-calendar) are // not ours to rename. 'selector-class-pattern': null, + // The codebase calls argumentless mixins with (), so keep that style. + 'scss/at-mixin-argumentless-call-parentheses': 'always', // Keep min-/max-width for browsers without range syntax. 'media-feature-range-notation': 'prefix', From 75cac3fb5c3cd19bf9b10f0c1b5728aaac858c6d Mon Sep 17 00:00:00 2001 From: b-l-i-n-d Date: Fri, 6 Nov 2026 15:25:47 +0600 Subject: [PATCH 4/6] refactor(stylelint): Remove unnecessary changes --- v2-library/src/scss/mixins/_grid.scss | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/v2-library/src/scss/mixins/_grid.scss b/v2-library/src/scss/mixins/_grid.scss index e3d05dac2a..d40ade1647 100644 --- a/v2-library/src/scss/mixins/_grid.scss +++ b/v2-library/src/scss/mixins/_grid.scss @@ -15,8 +15,10 @@ // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed margin-top: calc(-1 * var(--#{$variable-prefix}gutter-y)); // stylelint-disable-line function-disallowed-list - margin-inline-end: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list - margin-inline-start: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list + margin-inline-end: calc(-0.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list + margin-inline-start: calc( + -0.5 * var(--#{$variable-prefix}gutter-x) + ); // stylelint-disable-line function-disallowed-list } @mixin make-col-ready($gutter: $grid-gutter-width) { @@ -29,8 +31,10 @@ flex-shrink: 0; width: 100%; max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid - padding-inline-end: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list - padding-inline-start: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list + padding-inline-end: calc(var(--#{$variable-prefix}gutter-x) * 0.5); // stylelint-disable-line function-disallowed-list + padding-inline-start: calc( + var(--#{$variable-prefix}gutter-x) * 0.5 + ); // stylelint-disable-line function-disallowed-list margin-top: var(--#{$variable-prefix}gutter-y); } @@ -38,7 +42,6 @@ @if $size { flex: 0 0 auto; width: math.percentage(divide($size, $columns)); - } @else { flex: 1 1 0; max-width: 100%; @@ -71,7 +74,8 @@ // Framework grid generation // // Used only by Bootstrap to generate the correct number of grid classes given -// any value of `$grid-columns`.\n +// any value of `$grid-columns`. + @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { @each $breakpoint in map.keys($breakpoints) { $infix: breakpoint-infix($breakpoint, $breakpoints); @@ -107,7 +111,8 @@ // `$columns - 1` because offsetting by the width of an entire row isn't possible @for $i from 0 through ($columns - 1) { - @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0 + @if not($infix == '' and $i == 0) { + // Avoid emitting useless .offset-0 .tutor-offset#{$infix}-#{$i} { @include make-col-offset($i, $columns); } From 095c1b9f960fa406934c05c8fbc2bab34b67d25b Mon Sep 17 00:00:00 2001 From: b-l-i-n-d Date: Mon, 9 Nov 2026 23:42:11 +0600 Subject: [PATCH 5/6] fix(scss): replace deprecated if() function syntax with standard @if --- assets/core/scss/mixins/_inputs.scss | 31 +++++++--- assets/core/scss/mixins/_typography.scss | 76 ++++++++++++++---------- assets/core/scss/utilities/_borders.scss | 12 +++- 3 files changed, 77 insertions(+), 42 deletions(-) diff --git a/assets/core/scss/mixins/_inputs.scss b/assets/core/scss/mixins/_inputs.scss index 6846fefc01..51d4282b7e 100644 --- a/assets/core/scss/mixins/_inputs.scss +++ b/assets/core/scss/mixins/_inputs.scss @@ -90,8 +90,13 @@ } @mixin tutor-checkbox($size: sm, $intermediate: false) { - $checkbox-size: if($size == md, 20px, 16px); - $svg-size: if($size == md, 12px, 10px); + $checkbox-size: 16px; + $svg-size: 10px; + + @if $size == md { + $checkbox-size: 20px; + $svg-size: 12px; + } appearance: none; width: $checkbox-size; @@ -176,8 +181,13 @@ } @mixin tutor-radio($size: sm) { - $radio-size: if($size == md, 20px, 16px); - $inner-circle: if($size == md, 8px, 6px); + $radio-size: 16px; + $inner-circle: 6px; + + @if $size == md { + $radio-size: 20px; + $inner-circle: 8px; + } appearance: none; width: $radio-size; @@ -229,9 +239,16 @@ } @mixin tutor-switch($size: sm, $intermediate: false) { - $width: if($size == sm, 36px, 44px); - $height: if($size == sm, 20px, 24px); - $thumb: if($size == sm, 16px, 20px); + $width: 44px; + $height: 24px; + $thumb: 20px; + + @if $size == sm { + $width: 36px; + $height: 20px; + $thumb: 16px; + } + $gap: $tutor-spacing-1; appearance: none; diff --git a/assets/core/scss/mixins/_typography.scss b/assets/core/scss/mixins/_typography.scss index af1861b130..6054949f9c 100644 --- a/assets/core/scss/mixins/_typography.scss +++ b/assets/core/scss/mixins/_typography.scss @@ -2,45 +2,55 @@ @use '../tokens' as *; @mixin tutor-typography($size: 'medium', $typeface: 'regular', $color: 'primary', $context: 'body') { - $font-size: if( - map.has-key($tutor-font-sizes, $size), - map.get($tutor-font-sizes, $size), - map.get($tutor-font-sizes, 'medium') - ); - $line-height: if( - map.has-key($tutor-line-heights, $size), - map.get($tutor-line-heights, $size), - map.get($tutor-line-heights, 'medium') - ); - $font-weight: if( - map.has-key($tutor-font-weights, $typeface), - map.get($tutor-font-weights, $typeface), - map.get($tutor-font-weights, 'regular') - ); - $color: if( - map.has-key($tutor-text-colors, $color), - map.get($tutor-text-colors, $color), - map.get($tutor-text-colors, 'primary') - ); - - font-family: if($context == 'heading', $tutor-font-family-heading, $tutor-font-family-body); + $font-size: map.get($tutor-font-sizes, 'medium'); + + @if map.has-key($tutor-font-sizes, $size) { + $font-size: map.get($tutor-font-sizes, $size); + } + + $line-height: map.get($tutor-line-heights, 'medium'); + + @if map.has-key($tutor-line-heights, $size) { + $line-height: map.get($tutor-line-heights, $size); + } + + $font-weight: map.get($tutor-font-weights, 'regular'); + + @if map.has-key($tutor-font-weights, $typeface) { + $font-weight: map.get($tutor-font-weights, $typeface); + } + + $color-val: map.get($tutor-text-colors, 'primary'); + + @if map.has-key($tutor-text-colors, $color) { + $color-val: map.get($tutor-text-colors, $color); + } + + $family: $tutor-font-family-body; + + @if $context == 'heading' { + $family: $tutor-font-family-heading; + } + + font-family: $family; font-weight: $font-weight; font-size: $font-size; line-height: $line-height; - color: $color; + color: $color-val; } @mixin tutor-text($size: 'medium') { - $font-size: if( - map.has-key($tutor-font-sizes, $size), - map.get($tutor-font-sizes, $size), - map.get($tutor-font-sizes, 'medium') - ); - $line-height: if( - map.has-key($tutor-line-heights, $size), - map.get($tutor-line-heights, $size), - map.get($tutor-line-heights, 'medium') - ); + $font-size: map.get($tutor-font-sizes, 'medium'); + + @if map.has-key($tutor-font-sizes, $size) { + $font-size: map.get($tutor-font-sizes, $size); + } + + $line-height: map.get($tutor-line-heights, 'medium'); + + @if map.has-key($tutor-line-heights, $size) { + $line-height: map.get($tutor-line-heights, $size); + } font-size: $font-size; line-height: $line-height; diff --git a/assets/core/scss/utilities/_borders.scss b/assets/core/scss/utilities/_borders.scss index 93c24f4f6a..9758b01f58 100644 --- a/assets/core/scss/utilities/_borders.scss +++ b/assets/core/scss/utilities/_borders.scss @@ -112,7 +112,11 @@ $radius-directions: ( // ============================================================================= @each $key, $value in $tutor-radius { @each $abbr, $props in $radius-directions { - $prefix: if($abbr == '', '', $abbr + '-'); + $prefix: ''; + + @if $abbr != '' { + $prefix: $abbr + '-'; + } .tutor-rounded-#{$prefix}#{$key} { @each $prop in $props { @@ -188,7 +192,11 @@ $responsive-radius-dirs: ( @each $abbr, $props in $radius-directions { // We only generate for specific abbreviations to save space @if map.has-key($responsive-radius-dirs, $abbr) { - $prefix: if($abbr == '', '', $abbr + '-'); + $prefix: ''; + + @if $abbr != '' { + $prefix: $abbr + '-'; + } .tutor-#{$breakpoint}-rounded-#{$prefix}#{$key} { @each $prop in $props { From 8da89ab492cba9ec494be0a36b02a29809095145 Mon Sep 17 00:00:00 2001 From: b-l-i-n-d Date: Mon, 9 Nov 2026 23:53:43 +0600 Subject: [PATCH 6/6] refactor(scss): migrate legacy @import rules to @use and @forward for Dart Sass 3.0 --- .../scss/admin-dashboard/_tutor-admin.scss | 16 +++--- .../src/scss/admin-dashboard/_whats-new.scss | 6 +- assets/src/scss/admin-dashboard/index.scss | 26 ++++----- .../admin-dashboard/segments/withdraw.scss | 6 +- .../src/scss/admin-dashboard/v2/_general.scss | 49 +++++++++------- .../admin-dashboard/v2/admin-v2-markup.scss | 10 ++-- .../v2/components/_color-preset.scss | 4 +- .../v2/components/_custom-input-field.scss | 16 ++++-- .../v2/components/_form-elements.scss | 4 +- .../v2/components/_nav-tab.scss | 8 ++- .../v2/components/_tooltip.scss | 2 +- .../admin-dashboard/v2/components/index.scss | 12 ++-- .../v2/conditionals/conditionals.scss | 12 ++-- .../v2/custom-pages/index.scss | 2 +- assets/src/scss/front/_cart.scss | 16 +++--- assets/src/scss/front/_checkout.scss | 12 ++-- assets/src/scss/front/_dashboard.scss | 4 +- .../scss/front/_student_public_profile.scss | 12 ++-- .../scss/front/course-spotlight/_players.scss | 4 +- .../scss/front/course-spotlight/_sidebar.scss | 17 +++--- .../course-spotlight/course-assignment.scss | 21 ++++--- .../scss/front/course-spotlight/index.scss | 21 ++++--- .../src/scss/front/course-spotlight/quiz.scss | 25 +++++---- .../front/course-spotlight/spotlight.scss | 14 +++-- assets/src/scss/front/course/index.scss | 8 +-- assets/src/scss/front/index.scss | 52 ++++++++--------- assets/src/scss/modules/certificate-list.scss | 13 +++-- assets/src/scss/modules/quiz-attempts.scss | 4 +- .../datapicker/TutorDatepicker.scss | 2 +- .../src/scss/components/_accordion.scss | 13 +++-- v2-library/src/scss/components/_card.scss | 4 +- .../components/_course-details-elements.scss | 22 +++++--- .../src/scss/components/_course-listing.scss | 4 +- .../components/_download-certificate.scss | 18 +++--- .../src/scss/components/_dropdown-select.scss | 6 +- .../src/scss/components/_insapp-process.scss | 4 +- v2-library/src/scss/components/_modal.scss | 4 +- .../src/scss/components/_notification.scss | 25 +++++---- .../src/scss/components/_offcanvas.scss | 6 +- .../src/scss/components/_pagination.scss | 12 ++-- .../src/scss/components/_password-field.scss | 15 +++-- .../scss/components/_thumbnail-ulopader.scss | 20 ++++--- v2-library/src/scss/components/_tooltip.scss | 2 +- .../components/_wp-dashboard-elements.scss | 15 +++-- v2-library/src/scss/components/index.scss | 50 ++++++++--------- .../src/scss/core/_general-utility.scss | 8 ++- v2-library/src/scss/core/_utility.scss | 15 +++-- v2-library/src/scss/core/index.scss | 4 +- v2-library/src/scss/elements/_badge.scss | 8 +-- v2-library/src/scss/elements/_input.scss | 13 +++-- .../src/scss/elements/_select-with-icon.scss | 11 ++-- v2-library/src/scss/elements/_tag.scss | 4 +- v2-library/src/scss/elements/index.scss | 16 +++--- v2-library/src/scss/legacy/_dashboard.scss | 12 ++-- v2-library/src/scss/legacy/index.scss | 11 ++-- v2-library/src/scss/main.scss | 4 +- v2-library/src/scss/main_contents.scss | 10 ++-- v2-library/src/scss/mixins/_breakpoints.scss | 23 ++++---- v2-library/src/scss/mixins/_container.scss | 8 ++- v2-library/src/scss/mixins/_grid.scss | 56 +++++++++++-------- .../src/scss/mixins/_svg-icons-dynamic.scss | 5 +- v2-library/src/scss/mixins/_utilities.scss | 15 +++-- v2-library/src/scss/mixins/index.scss | 12 ++-- v2-library/src/scss/reusables.scss | 4 +- .../src/scss/structure/_containers.scss | 16 ++++-- v2-library/src/scss/structure/_functions.scss | 13 +++-- v2-library/src/scss/structure/_grid.scss | 26 +++++---- v2-library/src/scss/structure/_utilities.scss | 52 ++++++++--------- v2-library/src/scss/structure/_variables.scss | 10 ++-- v2-library/src/scss/structure/structure.scss | 26 ++++----- v2-library/src/scss/utility/_api.scss | 32 ++++++----- v2-library/src/scss/utility/_colors.scss | 50 ++++++++--------- v2-library/src/scss/utility/index.scss | 6 +- 73 files changed, 615 insertions(+), 473 deletions(-) diff --git a/assets/src/scss/admin-dashboard/_tutor-admin.scss b/assets/src/scss/admin-dashboard/_tutor-admin.scss index dad6e83ea2..2f1e61e7c6 100644 --- a/assets/src/scss/admin-dashboard/_tutor-admin.scss +++ b/assets/src/scss/admin-dashboard/_tutor-admin.scss @@ -1,3 +1,5 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + /** @package: Tutor LMS @author: Themeum @@ -10,7 +12,7 @@ margin-inline: 0 -20px; } - @include breakpoint-max(782) { + @include breakpoint.breakpoint-max(782) { margin-inline-start: -10px; .rtl & { @@ -311,7 +313,7 @@ body.tutor-backend-tutor_settings #wpbody-content { justify-self: end; } - @include breakpoint-max(782) { + @include breakpoint.breakpoint-max(782) { grid-template-columns: 1fr; gap: 10px; } @@ -422,7 +424,7 @@ body.tutor-backend-tutor_settings #wpbody-content { } } - @include breakpoint-max(782) { + @include breakpoint.breakpoint-max(782) { .tutor-image-upload-list { padding: 0 16px; } @@ -492,7 +494,7 @@ body.tutor-backend-tutor_settings #wpbody-content { justify-self: center; } - @include breakpoint-max(782) { + @include breakpoint.breakpoint-max(782) { .tutor-toggle-matrix-head, .tutor-toggle-matrix-row { grid-template-columns: minmax(140px, 1fr) 1fr 1fr; @@ -2300,7 +2302,7 @@ h2.tutor-page-heading { } } - @include breakpoint-max(1024) { + @include breakpoint.breakpoint-max(1024) { .tutor-offer-notice-wrapper { padding-inline: 24px 56px; } @@ -2319,7 +2321,7 @@ h2.tutor-page-heading { } } - @include breakpoint-max(782) { + @include breakpoint.breakpoint-max(782) { height: auto; min-height: 140px; margin-inline-start: 0; @@ -2358,7 +2360,7 @@ h2.tutor-page-heading { } } - @include breakpoint-max(480) { + @include breakpoint.breakpoint-max(480) { .tutor-offer-notice-dismiss { top: 12px; inset-inline-end: 12px; diff --git a/assets/src/scss/admin-dashboard/_whats-new.scss b/assets/src/scss/admin-dashboard/_whats-new.scss index 06c22cbbac..7c6389dd3c 100644 --- a/assets/src/scss/admin-dashboard/_whats-new.scss +++ b/assets/src/scss/admin-dashboard/_whats-new.scss @@ -1,3 +1,5 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + .tutor-whats-new-wrapper{ max-width: 1080px; @@ -143,13 +145,13 @@ } - @include breakpoint-max(tablet) { + @include breakpoint.breakpoint-max(tablet) { h1{ font-size: 34px; } } - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { h1{ font-size: 28px; } diff --git a/assets/src/scss/admin-dashboard/index.scss b/assets/src/scss/admin-dashboard/index.scss index 86ce69e346..d30d753133 100644 --- a/assets/src/scss/admin-dashboard/index.scss +++ b/assets/src/scss/admin-dashboard/index.scss @@ -1,13 +1,13 @@ -@import '../../../../v2-library/src/scss/reusables'; -@import './tutor-admin'; -@import './whats-new'; -@import './v2/admin-v2-markup'; -@import './segments/withdraw'; -@import './segments/registration-notice'; -@import '../modules/qna'; -@import '../modules/quiz-attempts'; -@import '../front/select_dd_search'; -@import '../modules/certificate-list'; -@import '../modules/quiz-icons'; -@import './segments//legal-consents.scss'; -@import './segments/consent-logs'; +@use '../../../../v2-library/src/scss/reusables'; +@use 'tutor-admin'; +@use 'whats-new'; +@use 'v2/admin-v2-markup'; +@use 'segments/withdraw'; +@use 'segments/registration-notice'; +@use '../modules/qna'; +@use '../modules/quiz-attempts'; +@use '../front/select_dd_search'; +@use '../modules/certificate-list'; +@use '../modules/quiz-icons'; +@use 'segments//legal-consents.scss'; +@use 'segments/consent-logs'; diff --git a/assets/src/scss/admin-dashboard/segments/withdraw.scss b/assets/src/scss/admin-dashboard/segments/withdraw.scss index d6c944d92d..d18f9d50fd 100644 --- a/assets/src/scss/admin-dashboard/segments/withdraw.scss +++ b/assets/src/scss/admin-dashboard/segments/withdraw.scss @@ -1,3 +1,5 @@ +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; + .tutor-admin-page-wrapper { .tutor-admin-page-content-wrapper.tutor-withdraw-wrapper { table { @@ -50,7 +52,7 @@ } td.tutor-withdraw-btns { - @include breakpoint-min(1200px) { + @include breakpoint.breakpoint-min(1200px) { width: 16%; button { @@ -73,7 +75,7 @@ } .tutor-modal-btns.tutor-btn-group { - @include breakpoint-max(600) { + @include breakpoint.breakpoint-max(600) { button:not(:last-child) { margin-bottom: 15px; } diff --git a/assets/src/scss/admin-dashboard/v2/_general.scss b/assets/src/scss/admin-dashboard/v2/_general.scss index 3e4659671d..28fa21606c 100644 --- a/assets/src/scss/admin-dashboard/v2/_general.scss +++ b/assets/src/scss/admin-dashboard/v2/_general.scss @@ -1,3 +1,10 @@ +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; +@use "../../../../../v2-library/src/scss/mixins/general-minxins"; +@use "../../../../../v2-library/src/scss/mixins/spinner"; +@use "../../../../../v2-library/src/scss/mixins/svg-icons-static"; +@use "../../../../../v2-library/src/scss/mixins/typo"; +@use "../../../../../v2-library/src/scss/utility/variables"; + @use 'sass:color'; // WordPress Notices .tutor-screen-backend-settings { @@ -21,7 +28,7 @@ padding: 0; } - @extend .text-body; + @extend .text-body !optional; color: var(--tutor-color-secondary); @@ -33,22 +40,22 @@ gap: 42px; grid-auto-flow: column; - @include breakpoint-min(1400) { + @include breakpoint.breakpoint-min(1400) { grid-template-columns: 245px 4fr 1fr; } - @include breakpoint-min(1600) { + @include breakpoint.breakpoint-min(1600) { grid-template-columns: 1fr 825px 1fr; } } .tutor-option-form { - @include breakpoint-max(1400) { + @include breakpoint.breakpoint-max(1400) { grid-template-columns: min-content auto; } } - @include breakpoint-max(1300) { + @include breakpoint.breakpoint-max(1300) { .tutor-option-header { grid-template-columns: 175px auto auto; grid-template-columns: auto 1fr auto; @@ -171,11 +178,11 @@ top: 32px; border-bottom: 1px solid #f0f0f1; - @include breakpoint-min(960) { + @include breakpoint.breakpoint-min(960) { inset-inline-start: 160px; } - @include breakpoint-max(782) { + @include breakpoint.breakpoint-max(782) { inset-inline-start: 0; top: 47px; } @@ -192,7 +199,7 @@ margin-bottom: 32px; h2 { - @extend .text-medium-h5; + @extend .text-medium-h5 !optional; color: var(--tutor-body-color); } @@ -217,7 +224,7 @@ // custom styles &.email-settings { - @include breakpoint-min(desktop-lg) { + @include breakpoint.breakpoint-min(desktop-lg) { .tutor-option-field-label { padding-inline-end: 53px; } @@ -274,9 +281,9 @@ // Tab -> #status &.item-variation-grid { - @include breakpoint-min(tablet) { + @include breakpoint.breakpoint-min(tablet) { .item-grid { - @include masonryGrid(2, 24px, 10px); + @include general-minxins.masonryGrid(2, 24px, 10px); } } @@ -312,7 +319,7 @@ } .drag-drop-zone { - @include getDashedBorder(2px, 18px, rgba(var(--tutor-color-primary-rgb), 0.3)); + @include general-minxins.getDashedBorder(2px, 18px, rgba(var(--tutor-color-primary-rgb), 0.3)); background-color: var(--tutor-color-white); border-radius: 6px; @@ -654,7 +661,7 @@ .tutor-option-field-label { label, .label { - @extend .text-medium-body; + @extend .text-medium-body !optional; color: var(--tutor-body-color); display: block; @@ -670,7 +677,7 @@ } .desc { - @extend .text-regular-small; + @extend .text-regular-small !optional; margin-top: 5px; } @@ -774,7 +781,7 @@ height: 24px; border-radius: 50%; - @include svg-delete-icon; + @include svg-icons-static.svg-delete-icon; background-color: var(--tutor-color-danger); background-repeat: no-repeat; @@ -784,7 +791,7 @@ inset-inline-end: -12px; &:hover { - background-color: color.adjust($color-danger, $lightness: -6%); + background-color: color.adjust(variables.$color-danger, $lightness: -6%); } } @@ -811,7 +818,7 @@ .logo-upload-wrap { color: #161616; - @include getTypography(400, 15px, 160%); + @include typo.getTypography(400, 15px, 160%); p { margin-bottom: 12px; @@ -861,7 +868,7 @@ } .layout-label { - @include getTypography(400, 15px, 160%); + @include typo.getTypography(400, 15px, 160%); color: var(--tutor-body-color); } @@ -908,7 +915,7 @@ gap: 25px; padding: 8px 0; - @include breakpoint-min(1400) { + @include breakpoint.breakpoint-min(1400) { grid-template-columns: repeat(3, 1fr); } @@ -1010,7 +1017,7 @@ } li { - @extend .text-medium-body; + @extend .text-medium-body !optional; } } } @@ -1073,7 +1080,7 @@ border-radius: 3px; z-index: 10; - @include spinner(#1973aa, #eee); + @include spinner.spinner(#1973aa, #eee); } .loading-spinner::before { diff --git a/assets/src/scss/admin-dashboard/v2/admin-v2-markup.scss b/assets/src/scss/admin-dashboard/v2/admin-v2-markup.scss index 267bde31d2..92f5d85083 100644 --- a/assets/src/scss/admin-dashboard/v2/admin-v2-markup.scss +++ b/assets/src/scss/admin-dashboard/v2/admin-v2-markup.scss @@ -1,16 +1,16 @@ // @import './reset'; // Components -@import './components/index'; +@use 'components/index'; // Main Style -@import './general'; +@use 'general'; // Pages -@import './custom-pages/index'; +@use 'custom-pages/index' as index2; // Conditional Style -@import './conditionals/conditionals'; +@use 'conditionals/conditionals'; // WP conflict override -@import './conflict-override/conflict-override'; +@use 'conflict-override/conflict-override'; diff --git a/assets/src/scss/admin-dashboard/v2/components/_color-preset.scss b/assets/src/scss/admin-dashboard/v2/components/_color-preset.scss index 18154d83f9..6aa0366abe 100644 --- a/assets/src/scss/admin-dashboard/v2/components/_color-preset.scss +++ b/assets/src/scss/admin-dashboard/v2/components/_color-preset.scss @@ -1,3 +1,5 @@ +@use "../../../../../../v2-library/src/scss/mixins/general-minxins"; + .item-wrapper.color-preset-picker { .tutor-option-field-row { border-bottom: none !important; @@ -100,7 +102,7 @@ input[type='radio'] { display: none; - @include appearNone; + @include general-minxins.appearNone; &:checked { + .preset-item { diff --git a/assets/src/scss/admin-dashboard/v2/components/_custom-input-field.scss b/assets/src/scss/admin-dashboard/v2/components/_custom-input-field.scss index de2dfce303..b1fca6f666 100644 --- a/assets/src/scss/admin-dashboard/v2/components/_custom-input-field.scss +++ b/assets/src/scss/admin-dashboard/v2/components/_custom-input-field.scss @@ -1,3 +1,7 @@ +@use "../../../../../../v2-library/src/scss/mixins/svg-icons-static"; +@use "../../../../../../v2-library/src/scss/mixins/typo"; +@use "../../../../../../v2-library/src/scss/utility/variables"; + // Type - Radio Thumbnail .radio-thumbnail { label { @@ -59,7 +63,7 @@ background-color: var(--tutor-color-primary); - @include svg-check-icon; + @include svg-icons-static.svg-check-icon; } } } @@ -70,7 +74,7 @@ label { text-align: center; - @include getTypography(400, 15px, 160%); + @include typo.getTypography(400, 15px, 160%); .title { margin-top: 6px; @@ -122,7 +126,7 @@ &::before { background-color: var(--tutor-color-primary); - @include svg-check-icon-2; + @include svg-icons-static.svg-check-icon-2; } } @@ -138,7 +142,7 @@ .items-per-row-label { text-align: center; - @include getTypography(400, 15px, 160%); + @include typo.getTypography(400, 15px, 160%); input[type="radio"] { &:checked + .icon-col { @@ -152,7 +156,7 @@ &::before { background-color: var(--tutor-color-primary); - @include svg-check-icon; + @include svg-icons-static.svg-check-icon; } } } @@ -174,7 +178,7 @@ width: 100%; height: 100%; text-indent: -9999px; - background: $color-gray-10; + background: variables.$color-gray-10; border: 1px solid var(--tutor-border-color); border-radius: 2px; transition: 0.2s ease-in-out; diff --git a/assets/src/scss/admin-dashboard/v2/components/_form-elements.scss b/assets/src/scss/admin-dashboard/v2/components/_form-elements.scss index b858afd58a..c0c134963b 100644 --- a/assets/src/scss/admin-dashboard/v2/components/_form-elements.scss +++ b/assets/src/scss/admin-dashboard/v2/components/_form-elements.scss @@ -1,3 +1,5 @@ +@use "../../../../../../v2-library/src/scss/mixins/typo"; + // @todo: can be removed all code .tutor-option-field-row, @@ -62,7 +64,7 @@ input.tutor-form-control, textarea.tutor-form-control, textarea.tutor-form-control:read-only { - @include getTypography(400, 16px, 162%); + @include typo.getTypography(400, 16px, 162%); border-color: #bababa; transition: all 200ms; diff --git a/assets/src/scss/admin-dashboard/v2/components/_nav-tab.scss b/assets/src/scss/admin-dashboard/v2/components/_nav-tab.scss index 44e5fb3f40..8190c6a765 100644 --- a/assets/src/scss/admin-dashboard/v2/components/_nav-tab.scss +++ b/assets/src/scss/admin-dashboard/v2/components/_nav-tab.scss @@ -1,3 +1,5 @@ +@use "../../../../../../v2-library/src/scss/mixins/breakpoint"; + // Navigation Tab .tutor-option-nav-page { &:not(.is-active) { @@ -40,16 +42,16 @@ .tutor-nav-link { padding: 8px 12px; - @include breakpoint-max(desktop) { + @include breakpoint.breakpoint-max(desktop) { padding: 8px 20px; } } - @include breakpoint-max(desktop) { + @include breakpoint.breakpoint-max(desktop) { margin-inline: 0; } - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { margin-inline-start: 20px; .rtl & { diff --git a/assets/src/scss/admin-dashboard/v2/components/_tooltip.scss b/assets/src/scss/admin-dashboard/v2/components/_tooltip.scss index 0de9a3bb87..4df75a1b88 100644 --- a/assets/src/scss/admin-dashboard/v2/components/_tooltip.scss +++ b/assets/src/scss/admin-dashboard/v2/components/_tooltip.scss @@ -42,7 +42,7 @@ $arrow: 5px; border: $arrow solid transparent; } - @extend .text-regular-small; + @extend .text-regular-small !optional; } &:hover .tooltip-txt { diff --git a/assets/src/scss/admin-dashboard/v2/components/index.scss b/assets/src/scss/admin-dashboard/v2/components/index.scss index 699d4f559f..944739b5a5 100644 --- a/assets/src/scss/admin-dashboard/v2/components/index.scss +++ b/assets/src/scss/admin-dashboard/v2/components/index.scss @@ -1,7 +1,7 @@ // Components -@import './nav-tab'; -@import './custom-input-field'; -@import './tooltip'; -@import './form-elements'; -@import './search-popup'; -@import './color-preset'; +@use 'nav-tab'; +@use 'custom-input-field'; +@use 'tooltip'; +@use 'form-elements'; +@use 'search-popup'; +@use 'color-preset'; diff --git a/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss b/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss index c098aec8cb..a1895313c0 100644 --- a/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss +++ b/assets/src/scss/admin-dashboard/v2/conditionals/conditionals.scss @@ -1,3 +1,7 @@ +@use "../../../../../../v2-library/src/scss/mixins/spinner"; +@use "../../../../../../v2-library/src/scss/mixins/svg-icons-static"; +@use "../../../../../../v2-library/src/scss/utility/variables"; + @use 'sass:color'; // Toggle Disable -> Monitization > Monitization fees .monetization-fees.is-disable { @@ -46,7 +50,7 @@ font-size: 2em; position: absolute; inset: 0; - background: $color-gray-10; + background: variables.$color-gray-10; display: flex; align-items: center; justify-content: center; @@ -62,12 +66,12 @@ content: ''; position: absolute; inset: 0; - background: $color-gray-10; + background: variables.$color-gray-10; display: flex; align-items: center; justify-content: center; - @include svg-image-uppoad; + @include svg-icons-static.svg-image-uppoad; background-repeat: no-repeat; background-position: center; @@ -81,7 +85,7 @@ border-radius: 3px; display: none; - @include spinner(#1a73aa, #e8e8e8); + @include spinner.spinner(#1a73aa, #e8e8e8); &.is-loading { display: block; diff --git a/assets/src/scss/admin-dashboard/v2/custom-pages/index.scss b/assets/src/scss/admin-dashboard/v2/custom-pages/index.scss index 4c413f4c84..758b740fb9 100644 --- a/assets/src/scss/admin-dashboard/v2/custom-pages/index.scss +++ b/assets/src/scss/admin-dashboard/v2/custom-pages/index.scss @@ -1,2 +1,2 @@ // Custom Pages -@import './course-tagcategory'; +@use 'course-tagcategory'; diff --git a/assets/src/scss/front/_cart.scss b/assets/src/scss/front/_cart.scss index 911be37716..6c19284a39 100644 --- a/assets/src/scss/front/_cart.scss +++ b/assets/src/scss/front/_cart.scss @@ -1,7 +1,9 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + .tutor-cart-page { padding: 80px 0; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { padding: 40px 0; } @@ -19,7 +21,7 @@ gap: 24px; padding: 32px; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: column; padding: 16px; } @@ -34,7 +36,7 @@ border-radius: 8px; overflow: hidden; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { width: 100%; height: auto; } @@ -109,7 +111,7 @@ justify-content: space-between; align-items: end; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: row; margin-inline-start: 0; align-items: start; @@ -121,7 +123,7 @@ align-items: end; color: var(--tutor-body-color); - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: row; gap: 8px; } @@ -146,7 +148,7 @@ padding: 32px; border-bottom: 1px solid var(--tutor-border-color); - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { padding: 16px; } } @@ -154,7 +156,7 @@ .tutor-cart-summery-bottom { padding: 32px; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { padding: 16px; } } diff --git a/assets/src/scss/front/_checkout.scss b/assets/src/scss/front/_checkout.scss index f4689b971a..e9d30a8d5c 100644 --- a/assets/src/scss/front/_checkout.scss +++ b/assets/src/scss/front/_checkout.scss @@ -1,3 +1,5 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + .tutor-checkout-page { padding: 40px 0; @@ -29,7 +31,7 @@ border-bottom: 1px solid var(--tutor-border-color); } - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { padding: 16px; } } @@ -338,7 +340,7 @@ border-end-end-radius: 6px; } - @include breakpoint-min(desktop) { + @include breakpoint.breakpoint-min(desktop) { .tutor-col-sm-6:nth-of-type(odd) .tutor-form-control { border-inline-end: none!important; } @@ -348,7 +350,7 @@ } } - @include breakpoint-minmax(576, 767) { + @include breakpoint.breakpoint-minmax(576, 767) { .tutor-col-sm-6:nth-of-type(odd) .tutor-form-control { border-inline-end: none!important; } @@ -358,13 +360,13 @@ } } - @include breakpoint-minmax(768, 991) { + @include breakpoint.breakpoint-minmax(768, 991) { .tutor-col-12:first-of-type .tutor-form-control { border-start-end-radius: 6px; } } - @include breakpoint-max(575) { + @include breakpoint.breakpoint-max(575) { .tutor-col-12:first-of-type .tutor-form-control { border-start-end-radius: 6px; } diff --git a/assets/src/scss/front/_dashboard.scss b/assets/src/scss/front/_dashboard.scss index 67c572153f..1b9e3be6b0 100644 --- a/assets/src/scss/front/_dashboard.scss +++ b/assets/src/scss/front/_dashboard.scss @@ -1,3 +1,5 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + /* *********************** */ /** @@ -248,7 +250,7 @@ table.tutor-dashboard-statement-table p.small-text { } } -@include breakpoint-max(tablet) { +@include breakpoint.breakpoint-max(tablet) { .tutor-header-right-side { margin-top: 20px; } diff --git a/assets/src/scss/front/_student_public_profile.scss b/assets/src/scss/front/_student_public_profile.scss index 84e4e7361d..5e53093f5e 100644 --- a/assets/src/scss/front/_student_public_profile.scss +++ b/assets/src/scss/front/_student_public_profile.scss @@ -1,3 +1,5 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + .tutor-user-public-profile { // rating style as per layout &.tutor-user-public-profile-pp-circle, @@ -146,7 +148,7 @@ align-items: center; gap: 30px; - @include breakpoint-max(992) { + @include breakpoint.breakpoint-max(992) { gap: 10px; } @@ -475,14 +477,14 @@ // FDash > Analytics > Student > Details .tutor-user-public-profile { - @include breakpoint-min(992) { + @include breakpoint.breakpoint-min(992) { .photo-area { margin-bottom: -90px; } } .student-details-table-wrapper { - @include breakpoint-max(992) { + @include breakpoint.breakpoint-max(992) { margin-top: 40px; } } @@ -491,7 +493,7 @@ .analytics-profile-authormeta { gap: 20px; - @include breakpoint-min(1200) { + @include breakpoint.breakpoint-min(1200) { display: flex; gap: 40px; @@ -512,7 +514,7 @@ } } - @include breakpoint-max(1200) { + @include breakpoint.breakpoint-max(1200) { > * { display: block; } diff --git a/assets/src/scss/front/course-spotlight/_players.scss b/assets/src/scss/front/course-spotlight/_players.scss index 7ff0a933c2..6f87163394 100644 --- a/assets/src/scss/front/course-spotlight/_players.scss +++ b/assets/src/scss/front/course-spotlight/_players.scss @@ -1,3 +1,5 @@ +@use "../../../../../v2-library/src/scss/mixins/spinner"; + .tutor-video-player { position: relative; @@ -34,7 +36,7 @@ border-radius: 3px; z-index: 10; - @include spinner(var(--tutor-color-primary), #eee); + @include spinner.spinner(var(--tutor-color-primary), #eee); } .loading-spinner::before { diff --git a/assets/src/scss/front/course-spotlight/_sidebar.scss b/assets/src/scss/front/course-spotlight/_sidebar.scss index bf46c9cdb5..956884d559 100644 --- a/assets/src/scss/front/course-spotlight/_sidebar.scss +++ b/assets/src/scss/front/course-spotlight/_sidebar.scss @@ -1,3 +1,6 @@ +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; +@use "../../../../../v2-library/src/scss/utility/variables"; + .tutor-course-single-sidebar { &-title { display: flex; @@ -5,16 +8,16 @@ padding: 8px 16px; height: 60px; background-color: #fff; - border-bottom: 1px solid $border-color-secondary; + border-bottom: 1px solid variables.$border-color-secondary; } &-wrapper { flex: 0 0 400px; width: 400px; - background-color: $color-gray-10; - border-inline-end: 1px solid $border-color-secondary; + background-color: variables.$color-gray-10; + border-inline-end: 1px solid variables.$border-color-secondary; - @include breakpoint-max(desktop-lg) { + @include breakpoint.breakpoint-max(desktop-lg) { flex: 0 0 100%; width: 100%; position: absolute; @@ -30,8 +33,8 @@ font-size: 16px; font-weight: 500; color: var(--tutor-body-color); - background-color: $color-gray-10; - border-bottom: 1px solid $border-color-secondary; + background-color: variables.$color-gray-10; + border-bottom: 1px solid variables.$border-color-secondary; padding: 12px 44px 12px 16px; border-radius: 0; user-select: none; @@ -117,7 +120,7 @@ &.is-active { a { - background-color: $color-gray-5; + background-color: variables.$color-gray-5; } } diff --git a/assets/src/scss/front/course-spotlight/course-assignment.scss b/assets/src/scss/front/course-spotlight/course-assignment.scss index 54b7473c41..3a8c18cb8e 100644 --- a/assets/src/scss/front/course-spotlight/course-assignment.scss +++ b/assets/src/scss/front/course-spotlight/course-assignment.scss @@ -1,10 +1,13 @@ +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; +@use "../../../../../v2-library/src/scss/utility/variables"; + #tutor-assignment-wrap { .tutor-assignment-attachments-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; - @include breakpoint-max(768) { + @include breakpoint.breakpoint-max(768) { grid-template-columns: 1fr; } } @@ -13,7 +16,7 @@ border-top: 1px solid var(--tutor-border-color); border-bottom: 1px solid var(--tutor-border-color); - @include breakpoint-minmax(576, 1192) { + @include breakpoint.breakpoint-minmax(576, 1192) { flex-direction: column; } @@ -24,7 +27,7 @@ } } - @include breakpoint-minmax(576, 1192) { + @include breakpoint.breakpoint-minmax(576, 1192) { .tutor-assignment-duration, .tutor-assignmetn-deadline, .tutor-assignment-marks, @@ -33,7 +36,7 @@ } } - @include breakpoint-max(575) { + @include breakpoint.breakpoint-max(575) { .tutor-assignment-duration, .tutor-assignmetn-deadline, .tutor-assignment-marks, @@ -45,7 +48,7 @@ } } - @include breakpoint-max(576) { + @include breakpoint.breakpoint-max(576) { flex-direction: column; } } // assignment-meta-info @@ -77,7 +80,7 @@ /* assignment details page */ .tutor-assignment-footer { .tutor-assignment-footer-btn { - @include breakpoint-max(768) { + @include breakpoint.breakpoint-max(768) { flex-direction: column; // align-items: flex-start; @@ -143,7 +146,7 @@ max-width: 730px; .tutor-assignment-attachment { - background-color: $color-gray-10; + background-color: variables.$color-gray-10; border-radius: 6px; .tutor-input-type-size { @@ -156,7 +159,7 @@ display: grid; grid-template-columns: 180px auto; - @include breakpoint-max(tablet) { + @include breakpoint.breakpoint-max(tablet) { grid-template-columns: 1fr; gap: 10px; } @@ -173,7 +176,7 @@ display: grid; grid-template-columns: repeat(2, 1fr); - @include breakpoint-max(600) { + @include breakpoint.breakpoint-max(600) { grid-template-columns: 1fr; } diff --git a/assets/src/scss/front/course-spotlight/index.scss b/assets/src/scss/front/course-spotlight/index.scss index 14054d8120..89cc91c02d 100644 --- a/assets/src/scss/front/course-spotlight/index.scss +++ b/assets/src/scss/front/course-spotlight/index.scss @@ -1,10 +1,13 @@ -@import './players'; +@use "sass:meta"; +@use 'players'; +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; +@use "../../../../../v2-library/src/scss/utility/variables"; .site-content { padding-bottom: 0 !important; } -@import './sidebar'; +@include meta.load-css('sidebar'); .tutor-course-single-content-wrapper { a { @@ -43,7 +46,7 @@ } &-open { - @include breakpoint-max(desktop-lg) { + @include breakpoint.breakpoint-max(desktop-lg) { .tutor-course-single-sidebar-wrapper { background-color: #fff; height: 100vh; @@ -73,7 +76,7 @@ position: relative; width: 100%; - @include breakpoint-min(desktop-lg){ + @include breakpoint.breakpoint-min(desktop-lg){ min-height: 100vh; } @@ -139,7 +142,7 @@ /* tutor-single-page-top-bar */ .tutor-mobile-footer-navigation { height: 90px; - border: 1px solid $color-gray-10; + border: 1px solid variables.$color-gray-10; box-shadow: 0 0 16px rgb(176 182 209 / 18.1%); background: var(--tutor-color-white); position: fixed; @@ -148,7 +151,7 @@ width: 100%; z-index: 1; - @include breakpoint-min(576) { + @include breakpoint.breakpoint-min(576) { display: none; } @@ -172,7 +175,7 @@ } } - @import './quiz'; + @include meta.load-css('quiz'); } /** @@ -184,5 +187,5 @@ } } -@import './spotlight'; -@import './course-assignment'; +@include meta.load-css('spotlight'); +@include meta.load-css('course-assignment'); diff --git a/assets/src/scss/front/course-spotlight/quiz.scss b/assets/src/scss/front/course-spotlight/quiz.scss index 292357ea1c..13d82282d5 100644 --- a/assets/src/scss/front/course-spotlight/quiz.scss +++ b/assets/src/scss/front/course-spotlight/quiz.scss @@ -1,3 +1,6 @@ +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; +@use "../../../../../v2-library/src/scss/utility/variables"; + #tutor-start-quiz { display: inline-block; } @@ -49,7 +52,7 @@ .tutor-quiz-wrapper { padding: 80px 24px; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { padding: 40px 16px; } @@ -59,7 +62,7 @@ border: 1px solid #c0c3cb; border-radius: 10px; - @include breakpoint-min(desktop-lg){ + @include breakpoint.breakpoint-min(desktop-lg){ padding: 65px 95px; } @@ -85,7 +88,7 @@ display: flex; justify-content: space-between; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: column; gap: 16px; } @@ -94,7 +97,7 @@ display: flex; gap: 35px; - @include breakpoint-max(tablet) { + @include breakpoint.breakpoint-max(tablet) { gap: 16px; } } @@ -197,7 +200,7 @@ padding: 9px; border-radius: 6px; - @include breakpoint-max(600) { + @include breakpoint.breakpoint-max(600) { flex-wrap: wrap; } @@ -209,18 +212,18 @@ .flash-action { button { - background: $color-warning; + background: variables.$color-warning; color: var(--tutor-color-white); border: unset; - @include breakpoint-max(600) { + @include breakpoint.breakpoint-max(600) { margin-top: 10px; } } } &.time-over { - border: 1px solid $color-danger; + border: 1px solid variables.$color-danger; } } } @@ -291,7 +294,7 @@ border-bottom: 2px dashed var(--tutor-color-secondary); margin: 0 0 10px; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { margin: 0 10px 5px 0; } } @@ -330,7 +333,7 @@ width: 270px; align-items: center; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { margin-top: 20px; } @@ -445,7 +448,7 @@ border-top: 1px solid var(--tutor-border-color); border-bottom: 1px solid var(--tutor-border-color); - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: column; gap: 16px; } diff --git a/assets/src/scss/front/course-spotlight/spotlight.scss b/assets/src/scss/front/course-spotlight/spotlight.scss index f9535bb4fb..1bc02a7759 100644 --- a/assets/src/scss/front/course-spotlight/spotlight.scss +++ b/assets/src/scss/front/course-spotlight/spotlight.scss @@ -1,3 +1,5 @@ +@use "../../../../../v2-library/src/scss/mixins/breakpoint"; + .tutor-course-spotlight-wrapper { .tutor-course-spotlight { &-tab { @@ -16,7 +18,7 @@ gap: 20px; word-break: break-all; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { grid-template-columns: repeat(1, 1fr); } @@ -53,7 +55,7 @@ border-radius: 6px; padding: 47px 33px; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: column; align-items: center; justify-content: center; @@ -227,7 +229,7 @@ .tutor-single-comment { .tutor-actual-comment { .tutor-comment-author { - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { display: flex; flex-direction: column; } @@ -248,7 +250,7 @@ box-shadow: 0 0 16px 0 rgb(176 182 209 / 18.1%); margin-top: 16px; - @include breakpoint-max(420) { + @include breakpoint.breakpoint-max(420) { .tutor-col-6 { flex: 0 0 auto; width: 100%; @@ -259,13 +261,13 @@ &-progress-right { text-align: center; - @include breakpoint-min(420) { + @include breakpoint.breakpoint-min(420) { .tutor-topbar-complete-btn { text-align: end; } } - @include breakpoint-max(420) { + @include breakpoint.breakpoint-max(420) { .tutor-topbar-complete-btn.tutor-ml-24 { margin-inline-start: 0 !important; } diff --git a/assets/src/scss/front/course/index.scss b/assets/src/scss/front/course/index.scss index d9aece5058..ececb8a45d 100644 --- a/assets/src/scss/front/course/index.scss +++ b/assets/src/scss/front/course/index.scss @@ -1,7 +1,7 @@ -@import './social-share'; -@import './archive'; -@import './filter'; -@import './single-course-details'; +@use 'social-share'; +@use 'archive'; +@use 'filter'; +@use 'single-course-details'; .tutor-course-author { img { diff --git a/assets/src/scss/front/index.scss b/assets/src/scss/front/index.scss index e06b0dea26..c845515d59 100644 --- a/assets/src/scss/front/index.scss +++ b/assets/src/scss/front/index.scss @@ -1,37 +1,37 @@ -@import "../../../../v2-library/src/scss/reusables"; -@import "theme"; -@import "single_course"; -@import "single_lesson"; -@import "_archive"; -@import "user_login"; -@import "./course/index"; -@import "./select_dd_search"; +@use "../../../../v2-library/src/scss/reusables"; +@use "theme"; +@use "single_course"; +@use "single_lesson"; +@use "_archive"; +@use "user_login"; +@use "course/index"; +@use "select_dd_search"; // dashboard -@import "dashboard"; -@import "_dashboard_assignment"; -@import "_dashboard_announcements"; // since 1.7.9 -@import "_dashboard_quiz_review"; -@import "_student_public_profile"; +@use "dashboard"; +@use "_dashboard_assignment"; +@use "_dashboard_announcements"; // since 1.7.9 +@use "_dashboard_quiz_review"; +@use "_student_public_profile"; // frontend-builder -@import "_frontend_withdrawal"; -@import "_tooltip"; +@use "_frontend_withdrawal"; +@use "_tooltip"; // Instructor list short code -@import "_instructor"; +@use "_instructor"; // Any kind of denied (permission, unauthorized, not found) -@import "_denied"; -@import "./course-spotlight/index"; -@import "../modules/qna"; -@import "../modules/quiz-attempts"; -@import "../modules/quiz-icons"; -@import '../modules/instructor-note'; -@import "./snackbar"; -@import "./cart"; -@import "./checkout"; -@import "./order"; +@use "_denied"; +@use "course-spotlight/index" as index2; +@use "../modules/qna"; +@use "../modules/quiz-attempts"; +@use "../modules/quiz-icons"; +@use '../modules/instructor-note'; +@use "snackbar"; +@use "cart"; +@use "checkout"; +@use "order"; // Utils class .tutor-display-none { diff --git a/assets/src/scss/modules/certificate-list.scss b/assets/src/scss/modules/certificate-list.scss index 3028e9642f..0268842ddd 100644 --- a/assets/src/scss/modules/certificate-list.scss +++ b/assets/src/scss/modules/certificate-list.scss @@ -1,3 +1,6 @@ +@use "../../../../v2-library/src/scss/mixins/svg-icons-static"; +@use "../../../../v2-library/src/scss/utility/variables"; + @use 'sass:color'; // Tab -> #certificate @@ -78,7 +81,7 @@ position: absolute; content: ''; - @include svg-eye-icon; + @include svg-icons-static.svg-eye-icon; background-position: center; background-repeat: no-repeat; @@ -138,7 +141,7 @@ .certificate-settings { .tutor-option-field-label .desc { - @extend .text-regular-small; + @extend .text-regular-small !optional; } .signature-upload-wrap { @@ -181,9 +184,9 @@ height: 24px; border-radius: 50%; - @include svg-delete-icon; + @include svg-icons-static.svg-delete-icon; - background-color: $color-danger; + background-color: variables.$color-danger; background-repeat: no-repeat; background-position: 50%; cursor: pointer; @@ -191,7 +194,7 @@ inset-inline-end: -12px; &:hover { - background-color: color.adjust($color-danger, $lightness: -6%); + background-color: color.adjust(variables.$color-danger, $lightness: -6%); } } diff --git a/assets/src/scss/modules/quiz-attempts.scss b/assets/src/scss/modules/quiz-attempts.scss index bfaef68f38..3c90b20e2d 100644 --- a/assets/src/scss/modules/quiz-attempts.scss +++ b/assets/src/scss/modules/quiz-attempts.scss @@ -1,3 +1,5 @@ +@use "../../../../v2-library/src/scss/mixins/breakpoint"; + .answer-image-matched-wrap { display: block; @@ -292,7 +294,7 @@ border: 0; } - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { .tutor-manual-review-wrapper { text-align: start; } diff --git a/v2-library/src/components/datapicker/TutorDatepicker.scss b/v2-library/src/components/datapicker/TutorDatepicker.scss index 3fa36ef286..183582be6c 100644 --- a/v2-library/src/components/datapicker/TutorDatepicker.scss +++ b/v2-library/src/components/datapicker/TutorDatepicker.scss @@ -1,4 +1,4 @@ -@import './datepicker-range-nav'; +@use 'datepicker-range-nav'; .tutor-react-datepicker { .react-datepicker-popper { diff --git a/v2-library/src/scss/components/_accordion.scss b/v2-library/src/scss/components/_accordion.scss index 186f0595cd..c3ba265870 100644 --- a/v2-library/src/scss/components/_accordion.scss +++ b/v2-library/src/scss/components/_accordion.scss @@ -1,13 +1,16 @@ +@use "../mixins/breakpoint"; +@use "../utility/variables"; + .tutor-accordion { &-item { background-color: #fff; - border: 1px solid $border-color-secondary; + border: 1px solid variables.$border-color-secondary; border-radius: 6px; &:not(:last-child) { margin-bottom: 10px; - @include breakpoint-min(desktop) { + @include breakpoint.breakpoint-min(desktop) { margin-bottom: 20px; } } @@ -23,7 +26,7 @@ padding-inline-end: 40px; margin: 0 !important; - background-color: $color-gray-2; + background-color: variables.$color-gray-2; color: var(--tutor-color-secondary); user-select: none; border-radius: 6px; @@ -52,7 +55,7 @@ &.is-active { color: var(--tutor-color-primary); - background-color: $color-gray-10; + background-color: variables.$color-gray-10; border-radius: 6px 6px 0 0; &::after { @@ -77,7 +80,7 @@ &-content { padding: 0 16px; - border-top: 1px solid $border-color-secondary; + border-top: 1px solid variables.$border-color-secondary; } } } diff --git a/v2-library/src/scss/components/_card.scss b/v2-library/src/scss/components/_card.scss index 5bb7578b95..e1e53a616f 100644 --- a/v2-library/src/scss/components/_card.scss +++ b/v2-library/src/scss/components/_card.scss @@ -1,3 +1,5 @@ +@use "../mixins/breakpoints"; + .tutor { &-card { background-color: #FFF; @@ -149,7 +151,7 @@ } // Horizontal - @include media-breakpoint-up(xl) { + @include breakpoints.media-breakpoint-up(xl) { &-horizontal { flex-direction: row; diff --git a/v2-library/src/scss/components/_course-details-elements.scss b/v2-library/src/scss/components/_course-details-elements.scss index 6365968566..9471c995d5 100644 --- a/v2-library/src/scss/components/_course-details-elements.scss +++ b/v2-library/src/scss/components/_course-details-elements.scss @@ -1,3 +1,7 @@ +@use "../mixins/breakpoint"; +@use "../mixins/general-minxins"; +@use "../utility/variables"; + // Course Details Page .tutor-course-details { // .tutor-course-details-header @@ -9,7 +13,7 @@ // .tutor-course-details-title &-title { - @include breakpoint-min(desktop) { + @include breakpoint.breakpoint-min(desktop) { max-width: 80%; } } @@ -27,7 +31,7 @@ .tutor-course-details-page { .tutor-course-details-tab { - @include breakpoint-min(800) { + @include breakpoint.breakpoint-min(800) { .tutor-is-sticky { position: sticky; top: 0; @@ -41,7 +45,7 @@ .admin-bar { .tutor-course-details-tab { - @include breakpoint-min(800) { + @include breakpoint.breakpoint-min(800) { .tutor-is-sticky { top: 32px; } @@ -71,7 +75,7 @@ } &-col-2 { - @include breakpoint-min(tablet) { + @include breakpoint.breakpoint-min(tablet) { ul { display: flex; flex-flow: row wrap; @@ -139,7 +143,7 @@ position: relative; &::before { - @include triangleRibbonStar; + @include general-minxins.triangleRibbonStar; } } } @@ -184,7 +188,7 @@ position: relative; &::before { - @include triangleRibbonStar; + @include general-minxins.triangleRibbonStar; opacity: 0; } @@ -243,13 +247,13 @@ // .tutor-course-details-page-main &-main { - @include breakpoint-min(desktop) { + @include breakpoint.breakpoint-min(desktop) { display: grid; gap: 32px; grid-template-columns: 8fr 4fr; } - @include breakpoint-min(desktop-lg) { + @include breakpoint.breakpoint-min(desktop-lg) { gap: 54px; } } @@ -275,7 +279,7 @@ } &:hover { - background-color: $color-gray-10; + background-color: variables.$color-gray-10; } &-title { diff --git a/v2-library/src/scss/components/_course-listing.scss b/v2-library/src/scss/components/_course-listing.scss index 4eb8e894bc..ca001bb74a 100644 --- a/v2-library/src/scss/components/_course-listing.scss +++ b/v2-library/src/scss/components/_course-listing.scss @@ -1,3 +1,5 @@ +@use "../mixins/general-minxins"; + // Course List .tutor-course { &-card { @@ -40,7 +42,7 @@ } &-name { - @include tutorLineClamp(3); + @include general-minxins.tutorLineClamp(3); &, a { diff --git a/v2-library/src/scss/components/_download-certificate.scss b/v2-library/src/scss/components/_download-certificate.scss index 9d0ff976fb..f4783da99f 100644 --- a/v2-library/src/scss/components/_download-certificate.scss +++ b/v2-library/src/scss/components/_download-certificate.scss @@ -1,3 +1,5 @@ +@use "../mixins/breakpoint"; + .tutor-download-certificate { max-width: 750px; display: grid; @@ -18,7 +20,7 @@ display: grid; grid-template-columns: repeat(4, 1fr); - @include breakpoint-max(650) { + @include breakpoint.breakpoint-max(650) { grid-template-columns: repeat(2, 1fr); .tutor-info-issued, @@ -41,7 +43,7 @@ } } - @include breakpoint-max(400) { + @include breakpoint.breakpoint-max(400) { grid-template-columns: repeat(1, 1fr); .tutor-info-expiration { @@ -56,39 +58,39 @@ top: 210px; } -@include breakpoint-min(992) { +@include breakpoint.breakpoint-min(992) { .tutor-download-certificate { padding-top: 100px; padding-bottom: 200px; } } -@include breakpoint-minmax(992, 1200) { +@include breakpoint.breakpoint-minmax(992, 1200) { .tutor-dc-button-group { top: 200px; } } -@include breakpoint-max(991) { +@include breakpoint.breakpoint-max(991) { .tutor-dc-button-group { inset-inline-end: 0; top: 125px; } } -@include breakpoint-minmax(768, 1200) { +@include breakpoint.breakpoint-minmax(768, 1200) { .tutor-certificate-demo { max-width: 570px; } } -@include breakpoint-minmax(577, 767) { +@include breakpoint.breakpoint-minmax(577, 767) { .tutor-certificate-demo { max-width: 420px; } } -@include breakpoint-max(576) { +@include breakpoint.breakpoint-max(576) { .tutor-certificate-demo { max-width: 82%; } diff --git a/v2-library/src/scss/components/_dropdown-select.scss b/v2-library/src/scss/components/_dropdown-select.scss index 4b8955286b..ac0b1eca41 100644 --- a/v2-library/src/scss/components/_dropdown-select.scss +++ b/v2-library/src/scss/components/_dropdown-select.scss @@ -1,3 +1,5 @@ +@use "../utility/variables"; + .tutor-dropdown-select { display: flex; position: relative; @@ -70,7 +72,7 @@ cursor: pointer; &:hover { - background: $color-gray-10; + background: variables.$color-gray-10; } &:last-child { @@ -86,7 +88,7 @@ cursor: pointer; > div:first-child { - @extend .text-medium-body; + @extend .text-medium-body !optional; color: var(--tutor-body-color); } diff --git a/v2-library/src/scss/components/_insapp-process.scss b/v2-library/src/scss/components/_insapp-process.scss index 460e405f75..ca6f623d7e 100644 --- a/v2-library/src/scss/components/_insapp-process.scss +++ b/v2-library/src/scss/components/_insapp-process.scss @@ -1,3 +1,5 @@ +@use "../mixins/breakpoint"; + .tutor-app-process-image { max-width: 920px; height: auto; @@ -13,7 +15,7 @@ max-width: 570px; } -@include breakpoint-max(767) { +@include breakpoint.breakpoint-max(767) { span.tutor-app-process-title { font-size: 28px; } diff --git a/v2-library/src/scss/components/_modal.scss b/v2-library/src/scss/components/_modal.scss index f893f0230a..129cc5834f 100644 --- a/v2-library/src/scss/components/_modal.scss +++ b/v2-library/src/scss/components/_modal.scss @@ -252,7 +252,7 @@ } .tutor-quiz-item { - @extend .tutor-bordered-box; + @extend .tutor-bordered-box !optional; background: var(--tutor-color-white); border-radius: 6px; @@ -298,7 +298,7 @@ } .tutor-radio-select { - @extend .tutor-bordered-box; + @extend .tutor-bordered-box !optional; display: flex; padding: 13px; diff --git a/v2-library/src/scss/components/_notification.scss b/v2-library/src/scss/components/_notification.scss index a073486058..7cfbe872bf 100644 --- a/v2-library/src/scss/components/_notification.scss +++ b/v2-library/src/scss/components/_notification.scss @@ -1,3 +1,6 @@ +@use "../mixins/breakpoint"; +@use "../utility/variables"; + // @todo: rework on the design .tutor-notification { border: 1px solid var(--tutor-border-color); @@ -79,10 +82,10 @@ // alert $alertVariations: ( - 'primary' rgb(var(--tutor-color-primary-rgb), 0.7) $color-secondary $color-white var(--tutor-color-primary) var(--tutor-color-primary) rgb(var(--tutor-color-primary-rgb), 0.15) rgb(var(--tutor-color-primary-rgb), 0.3), - 'success' rgb(var(--tutor-color-success-rgb), 0.7) $color-secondary $color-white var(--tutor-color-success) var(--tutor-color-success) rgb(var(--tutor-color-success-rgb), 0.15) rgb(var(--tutor-color-success-rgb), 0.3), - 'danger' rgb(var(--tutor-color-danger-rgb), 0.7) $color-secondary $color-white var(--tutor-color-danger) var(--tutor-color-danger) rgb(var(--tutor-color-danger-rgb), 0.15) rgb(var(--tutor-color-danger-rgb), 0.3), - 'warning' rgb(var(--tutor-color-warning-rgb), 0.7) $color-secondary $color-white var(--tutor-color-warning) var(--tutor-color-warning) rgb(var(--tutor-color-warning-rgb), 0.15) rgb(var(--tutor-color-warning-rgb), 0.3) + 'primary' rgb(var(--tutor-color-primary-rgb), 0.7) variables.$color-secondary variables.$color-white var(--tutor-color-primary) var(--tutor-color-primary) rgb(var(--tutor-color-primary-rgb), 0.15) rgb(var(--tutor-color-primary-rgb), 0.3), + 'success' rgb(var(--tutor-color-success-rgb), 0.7) variables.$color-secondary variables.$color-white var(--tutor-color-success) var(--tutor-color-success) rgb(var(--tutor-color-success-rgb), 0.15) rgb(var(--tutor-color-success-rgb), 0.3), + 'danger' rgb(var(--tutor-color-danger-rgb), 0.7) variables.$color-secondary variables.$color-white var(--tutor-color-danger) var(--tutor-color-danger) rgb(var(--tutor-color-danger-rgb), 0.15) rgb(var(--tutor-color-danger-rgb), 0.3), + 'warning' rgb(var(--tutor-color-warning-rgb), 0.7) variables.$color-secondary variables.$color-white var(--tutor-color-warning) var(--tutor-color-warning) rgb(var(--tutor-color-warning-rgb), 0.15) rgb(var(--tutor-color-warning-rgb), 0.3) ); // Tutor alert @@ -92,7 +95,7 @@ $alertVariations: ( margin-bottom: 16px; display: grid; - @include breakpoint-min(mobile) { + @include breakpoint.breakpoint-min(mobile) { grid-template-columns: 1fr auto; } @@ -120,12 +123,12 @@ $alertVariations: ( } .tutor-alert-text { - @extend .text-regular-caption; + @extend .text-regular-caption !optional; color: var(--tutor-color-secondary); display: flex; - @include breakpoint-min(tablet) { + @include breakpoint.breakpoint-min(tablet) { align-items: center; } } @@ -148,7 +151,7 @@ $alertVariations: ( .tutor-alert-close { cursor: pointer; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { display: none; } } @@ -170,10 +173,10 @@ $largeNotificationVariations: ( background: #fff; border: 1px solid var(--tutor-border-color); - @extend .tutor-radius-10; - @extend .tutor-p-24; + @extend .tutor-radius-10 !optional; + @extend .tutor-p-24 !optional; - @include breakpoint-min(desktop-lg) { + @include breakpoint.breakpoint-min(desktop-lg) { padding-inline-end: 90px; } diff --git a/v2-library/src/scss/components/_offcanvas.scss b/v2-library/src/scss/components/_offcanvas.scss index c7c3426cfd..9341425081 100644 --- a/v2-library/src/scss/components/_offcanvas.scss +++ b/v2-library/src/scss/components/_offcanvas.scss @@ -1,3 +1,5 @@ +@use "../elements/badge-label"; + .tutor-offcanvas { .tutor-offcanvas-backdrop { position: fixed; @@ -190,7 +192,7 @@ } // Notification Elements -$variations: ( +badge-label.$variations: ( 'primary' var(--tutor-color-primary) rgb(var(--tutor-color-primary-rgb), 0.15), 'success' var(--tutor-color-success) rgb(var(--tutor-color-success-rgb), 0.15), 'warning' var(--tutor-color-warning) rgb(var(--tutor-color-warning-rgb), 0.15), @@ -198,7 +200,7 @@ $variations: ( 'purple' #9b4ab4 #faebff, ); -@each $prefix, $color, $bgColor in $variations { +@each $prefix, $color, $bgColor in badge-label.$variations { .tutor-notification-element { &:not(.notification-read) { .element-icon { diff --git a/v2-library/src/scss/components/_pagination.scss b/v2-library/src/scss/components/_pagination.scss index 0f7ea5315e..bd1bee8b8f 100644 --- a/v2-library/src/scss/components/_pagination.scss +++ b/v2-library/src/scss/components/_pagination.scss @@ -1,3 +1,5 @@ +@use "../mixins/breakpoint"; + .tutor-pagination { display: flex; align-items: center; @@ -8,7 +10,7 @@ border-radius: 6px; padding: 7px 18px; - @include breakpoint-min(tablet) { + @include breakpoint.breakpoint-min(tablet) { flex-direction: row; } @@ -20,7 +22,7 @@ padding: 0; margin: 0; - @include breakpoint-max(tablet) { + @include breakpoint.breakpoint-max(tablet) { margin-top: 10px; gap: 10px; } @@ -31,7 +33,7 @@ } .page-numbers { - @extend .text-medium-caption; + @extend .text-medium-caption !optional; color: var(--tutor-body-color); display: flex; @@ -66,7 +68,7 @@ } } - @include breakpoint-min(desktop-lg) { + @include breakpoint.breakpoint-min(desktop-lg) { --margin: 32px; &.prev { @@ -92,7 +94,7 @@ } &.current { - @extend .text-bold-caption; + @extend .text-bold-caption !optional; color: var(--tutor-color-primary); diff --git a/v2-library/src/scss/components/_password-field.scss b/v2-library/src/scss/components/_password-field.scss index ea8943f0b0..33ba91f7a0 100644 --- a/v2-library/src/scss/components/_password-field.scss +++ b/v2-library/src/scss/components/_password-field.scss @@ -1,3 +1,6 @@ +@use "../mixins/svg-icons-static"; +@use "../utility/variables"; + .tutor-dashboard-content-inner { .field-label { color: var(--tutor-color-secondary); @@ -34,10 +37,10 @@ height: 30px; background-size: 30px; - @include svg-eye-open; + @include svg-icons-static.svg-eye-open; &.hide-btn { - @include svg-eye-close; + @include svg-icons-static.svg-eye-close; } } } @@ -74,11 +77,11 @@ } &.weak::before { - background-color: $color-danger; + background-color: variables.$color-danger; } &.medium::before { - background-color: $color-warning; + background-color: variables.$color-warning; } &.strong::before { @@ -98,11 +101,11 @@ } .text.weak { - color: $color-danger; + color: variables.$color-danger; } .text.medium { - color: $color-warning; + color: variables.$color-warning; } .text.strong { diff --git a/v2-library/src/scss/components/_thumbnail-ulopader.scss b/v2-library/src/scss/components/_thumbnail-ulopader.scss index dcaab80e87..0d46e82611 100644 --- a/v2-library/src/scss/components/_thumbnail-ulopader.scss +++ b/v2-library/src/scss/components/_thumbnail-ulopader.scss @@ -1,3 +1,7 @@ +@use "../mixins/general-minxins"; +@use "../mixins/svg-icons-static"; +@use "../utility/variables"; + @use 'sass:color'; .tutor-thumbnail-uploader { @@ -16,8 +20,8 @@ .thumbnail-preview { --width: 235px; - background: $color-gray-10; - border: 2px solid $color-gray-10; + background: variables.$color-gray-10; + border: 2px solid variables.$color-gray-10; border-radius: 3px; position: relative; width: var(--width); @@ -36,12 +40,12 @@ content: ''; position: absolute; inset: 0; - background: $color-gray-10; + background: variables.$color-gray-10; display: flex; align-items: center; justify-content: center; - @include svg-image-uppoad; + @include svg-icons-static.svg-image-uppoad; background-repeat: no-repeat; background-position: center; @@ -55,9 +59,9 @@ height: 24px; border-radius: 50%; - @include svg-delete-icon; + @include svg-icons-static.svg-delete-icon; - background-color: $color-danger; + background-color: variables.$color-danger; background-repeat: no-repeat; background-position: 50%; cursor: pointer; @@ -65,14 +69,14 @@ inset-inline-end: -12px; &:hover { - background-color: color.adjust($color-danger, $lightness: -6%); + background-color: color.adjust(variables.$color-danger, $lightness: -6%); } } } .thumbnail-input { input[type='file'] { - @include appearNone; + @include general-minxins.appearNone; display: none; } diff --git a/v2-library/src/scss/components/_tooltip.scss b/v2-library/src/scss/components/_tooltip.scss index 0ddc5efa88..e42313c916 100644 --- a/v2-library/src/scss/components/_tooltip.scss +++ b/v2-library/src/scss/components/_tooltip.scss @@ -47,7 +47,7 @@ $arrow: 5px; border: $arrow solid transparent; } - @extend .text-regular-small; + @extend .text-regular-small !optional; } &:hover .tooltip-txt { diff --git a/v2-library/src/scss/components/_wp-dashboard-elements.scss b/v2-library/src/scss/components/_wp-dashboard-elements.scss index 62b1018166..8c133137bd 100644 --- a/v2-library/src/scss/components/_wp-dashboard-elements.scss +++ b/v2-library/src/scss/components/_wp-dashboard-elements.scss @@ -1,12 +1,15 @@ +@use "../mixins/breakpoint"; +@use "../utility/variables"; + .tutor-wp-dashboard-filter { gap: 30px; - @include breakpoint-max(1300) { + @include breakpoint.breakpoint-max(1300) { flex-wrap: wrap; margin-top: 40px; } - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: row; display: block !important; @@ -37,7 +40,7 @@ gap: 24px; .tutor-form-label { - @extend .text-medium-caption; + @extend .text-medium-caption !optional; color: var(--tutor-color-secondary); } @@ -45,7 +48,7 @@ } .tutor-wp-dashboard-header { - border-bottom: 1px solid $border-color-secondary; + border-bottom: 1px solid variables.$border-color-secondary; margin-bottom: 24px; &-inner { @@ -69,7 +72,7 @@ align-items: start; gap: 24px; - @include breakpoint-max(mobile) { + @include breakpoint.breakpoint-max(mobile) { flex-direction: column; gap: 16px; } @@ -151,7 +154,7 @@ &-line { height: 24px; width: 1px; - background: $border-color-secondary; + background: variables.$border-color-secondary; border-radius: 4px; } diff --git a/v2-library/src/scss/components/index.scss b/v2-library/src/scss/components/index.scss index 72cf2b260d..540c455ddc 100644 --- a/v2-library/src/scss/components/index.scss +++ b/v2-library/src/scss/components/index.scss @@ -1,25 +1,25 @@ -@import './avatar'; -@import './table'; -@import './thumbnail-ulopader'; // to be moved -@import './offcanvas'; -@import './certificate-template'; // to be moved -@import './password-field'; -@import './card'; -@import './accordion'; -@import './modal'; -@import './meta'; -@import './wp-dashboard-elements'; // to be moved -@import './course-details-elements'; // to be moved -@import './course-listing'; // to be moved -@import './tooltip'; -@import './download-certificate'; // to be moved -@import './insapp-process'; // to be moved -@import '../../components/datapicker/TutorDatepicker'; -@import './pagination'; -@import './dropdown-select'; -@import './dropdown'; -@import './notification'; -@import './nav'; -@import './widget'; -@import './list'; -@import './progress'; \ No newline at end of file +@use 'avatar'; +@use 'table'; +@use 'thumbnail-ulopader'; // to be moved +@use 'offcanvas'; +@use 'certificate-template'; // to be moved +@use 'password-field'; +@use 'card'; +@use 'accordion'; +@use 'modal'; +@use 'meta'; +@use 'wp-dashboard-elements'; // to be moved +@use 'course-details-elements'; // to be moved +@use 'course-listing'; // to be moved +@use 'tooltip'; +@use 'download-certificate'; // to be moved +@use 'insapp-process'; // to be moved +@use '../../components/datapicker/TutorDatepicker'; +@use 'pagination'; +@use 'dropdown-select'; +@use 'dropdown'; +@use 'notification'; +@use 'nav'; +@use 'widget'; +@use 'list'; +@use 'progress'; \ No newline at end of file diff --git a/v2-library/src/scss/core/_general-utility.scss b/v2-library/src/scss/core/_general-utility.scss index 341d0e5dd0..42bb1c4ff9 100644 --- a/v2-library/src/scss/core/_general-utility.scss +++ b/v2-library/src/scss/core/_general-utility.scss @@ -1,3 +1,5 @@ +@use "../mixins/general-minxins"; + .clearfix::after { display: block; clear: both; @@ -106,15 +108,15 @@ } .tutor-line-clamp-1 { - @include tutorLineClamp(1); + @include general-minxins.tutorLineClamp(1); } .tutor-line-clamp-2 { - @include tutorLineClamp(2); + @include general-minxins.tutorLineClamp(2); } .tutor-line-clamp-3 { - @include tutorLineClamp(3); + @include general-minxins.tutorLineClamp(3); } // responsive image diff --git a/v2-library/src/scss/core/_utility.scss b/v2-library/src/scss/core/_utility.scss index 495335b9e6..d65c05d648 100644 --- a/v2-library/src/scss/core/_utility.scss +++ b/v2-library/src/scss/core/_utility.scss @@ -1,3 +1,6 @@ +@use "../mixins/breakpoints"; +@use "../utility/variables"; + // Cursor .tutor-cursor { &-pointer { @@ -222,23 +225,23 @@ } .tutor-divider { - border: 1px solid $border-color-secondary; + border: 1px solid variables.$border-color-secondary; } .tutor-divider-left { - border-inline-start: 1px solid $border-color-secondary; + border-inline-start: 1px solid variables.$border-color-secondary; } .tutor-divider-right { - border-inline-end: 1px solid $border-color-secondary; + border-inline-end: 1px solid variables.$border-color-secondary; } .tutor-divider-top { - border-top: 1px solid $border-color-secondary; + border-top: 1px solid variables.$border-color-secondary; } .tutor-divider-bottom { - border-bottom: 1px solid $border-color-secondary; + border-bottom: 1px solid variables.$border-color-secondary; } // radius @@ -349,7 +352,7 @@ $radius: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 40, 50; display: inline-block; } - @include media-breakpoint-down(lg) { + @include breakpoints.media-breakpoint-down(lg) { width: 44px; height: 44px; font-size: 20px; diff --git a/v2-library/src/scss/core/index.scss b/v2-library/src/scss/core/index.scss index 14f253c56f..d4f1c23a3e 100644 --- a/v2-library/src/scss/core/index.scss +++ b/v2-library/src/scss/core/index.scss @@ -1,2 +1,2 @@ -@import './general-utility'; -@import './utility'; +@use 'general-utility'; +@use 'utility'; diff --git a/v2-library/src/scss/elements/_badge.scss b/v2-library/src/scss/elements/_badge.scss index 4c6015d834..aaa52c671e 100644 --- a/v2-library/src/scss/elements/_badge.scss +++ b/v2-library/src/scss/elements/_badge.scss @@ -1,5 +1,5 @@ .tutor-badge { - @extend .d-inline-block; + @extend .d-inline-block !optional; padding: 0 8px; line-height: 21px; @@ -22,13 +22,13 @@ } .tutor-profile-badge { - @extend .d-flex; - @extend .align-items-center; + @extend .d-flex !optional; + @extend .align-items-center !optional; box-sizing: border-box; img { - @extend .d-block; + @extend .d-block !optional; height: auto; max-width: 50px; diff --git a/v2-library/src/scss/elements/_input.scss b/v2-library/src/scss/elements/_input.scss index 3a500ad6d8..0a715abaab 100644 --- a/v2-library/src/scss/elements/_input.scss +++ b/v2-library/src/scss/elements/_input.scss @@ -1,3 +1,6 @@ +@use "../core/utility"; +@use "../utility/variables"; + $radius: 6px; $height: 44px; $height-lg: 48px; @@ -17,7 +20,7 @@ $height-sm: 38px; display: block; width: 100%; outline: none; - border-radius: $radius; + border-radius: utility.$radius; background-color: var(--tutor-color-white); box-sizing: border-box; color: var(--tutor-color-black); // @todo: need to replace @@ -53,8 +56,8 @@ $height-sm: 38px; } &:disabled { - background: $color-gray-20; - border-color: $color-gray-20; + background: variables.$color-gray-20; + border-color: variables.$color-gray-20; cursor: not-allowed; &::placeholder { @@ -237,7 +240,7 @@ select.tutor-form-control, white-space: nowrap; background-color: var(--tutor-color-white); border: 1px solid var(--tutor-border-color); - border-radius: $radius; + border-radius: utility.$radius; } >:not(.tutor-form-wrap):not(:last-child), @@ -395,7 +398,7 @@ select.tutor-form-control, display: inline-block; width: 40px; height: 24px; - background-color: $color-light-gray; + background-color: variables.$color-light-gray; border-radius: 12px; vertical-align: top; cursor: pointer; diff --git a/v2-library/src/scss/elements/_select-with-icon.scss b/v2-library/src/scss/elements/_select-with-icon.scss index 2b43d5deea..cd223cc102 100644 --- a/v2-library/src/scss/elements/_select-with-icon.scss +++ b/v2-library/src/scss/elements/_select-with-icon.scss @@ -1,13 +1,16 @@ +@use "../utility/variables"; +@use "badge-label"; + $default-color: rgb(65 69 79 / 90%); -$variations: ( +badge-label.$variations: ( 'primary' var(--tutor-color-primary) rgb(var(--tutor-color-primary-rgb), 0.15) rgb(var(--tutor-color-primary-rgb), 0.3) '\e978', - 'default' $default-color $color-gray-10 var(--tutor-border-color) '\e9ab', + 'default' $default-color variables.$color-gray-10 var(--tutor-border-color) '\e9ab', 'success' var(--tutor-color-success) rgb(var(--tutor-color-success-rgb), 0.15) rgb(var(--tutor-color-success-rgb), 0.3) '\E982', 'danger' var(--tutor-color-danger) rgb(var(--tutor-color-danger-rgb), 0.15) rgb(var(--tutor-color-danger-rgb), 0.3) '\e9a3', 'warning' var(--tutor-color-warning) rgb(var(--tutor-color-warning-rgb), 0.15) rgb(var(--tutor-color-warning-rgb), 0.3) '\e966' ); -@each $suffix, $txtColor, $bgColor, $border, $icon in $variations { +@each $suffix, $txtColor, $bgColor, $border, $icon in badge-label.$variations { .tutor-form-select-with-icon { &.select-#{$suffix} { color: #{$txtColor}; @@ -40,7 +43,7 @@ $variations: ( justify-content: space-between; select { - @extend .text-medium-small; + @extend .text-medium-small !optional; display: block; width: 100%; diff --git a/v2-library/src/scss/elements/_tag.scss b/v2-library/src/scss/elements/_tag.scss index 77ea3cc418..dfeb7c7803 100644 --- a/v2-library/src/scss/elements/_tag.scss +++ b/v2-library/src/scss/elements/_tag.scss @@ -1,3 +1,5 @@ +@use "badge-label"; + $variations: ( 'default' var(--tutor-color-gray-10) var(--tutor-color-muted), 'primary' rgb(var(--tutor-color-primary-rgb), 0.15) var(--tutor-color-primary), @@ -16,7 +18,7 @@ $variations: ( border-radius: 4px; padding: 4px 8px; - @each $suffix, $bg, $color in $variations { + @each $suffix, $bg, $color in badge-label.$variations { &.tag-#{$suffix} { background: #{$bg}; color: #{$color}; diff --git a/v2-library/src/scss/elements/index.scss b/v2-library/src/scss/elements/index.scss index 2a97ccccd0..b55ef81eb4 100644 --- a/v2-library/src/scss/elements/index.scss +++ b/v2-library/src/scss/elements/index.scss @@ -1,8 +1,8 @@ -@import './buttons'; -@import './input'; -@import './badge'; -@import './tag-list'; -@import './star-ratings'; -@import './badge-label'; -@import './select-with-icon'; -@import './tag'; +@use 'buttons'; +@use 'input'; +@use 'badge'; +@use 'tag-list'; +@use 'star-ratings'; +@use 'badge-label'; +@use 'select-with-icon'; +@use 'tag'; diff --git a/v2-library/src/scss/legacy/_dashboard.scss b/v2-library/src/scss/legacy/_dashboard.scss index 67999b6a2e..60af719154 100644 --- a/v2-library/src/scss/legacy/_dashboard.scss +++ b/v2-library/src/scss/legacy/_dashboard.scss @@ -24,16 +24,16 @@ } .tutor-instructor-card { - @extend .tutor-border; - @extend .d-flex; - @extend .align-items-center; + @extend .tutor-border !optional; + @extend .d-flex !optional; + @extend .align-items-center !optional; padding: 12px 17px; border-radius: 4px; min-width: 320px; .tutor-icard-content { - @extend .tutor-pl-12; + @extend .tutor-pl-12 !optional; font-size: 13px; line-height: 18px; @@ -42,8 +42,8 @@ } .tutor-name { - @extend .d-flex; - @extend .align-items-center; + @extend .d-flex !optional; + @extend .align-items-center !optional; font-size: 18px; font-weight: 500; diff --git a/v2-library/src/scss/legacy/index.scss b/v2-library/src/scss/legacy/index.scss index 83eceb7c49..f89c96ae4b 100644 --- a/v2-library/src/scss/legacy/index.scss +++ b/v2-library/src/scss/legacy/index.scss @@ -1,13 +1,14 @@ /* This is a legacy directory pulled from inside the tutor as it is sort of old design library */ /* Common libraries. This file will be loaded in both of admin and frontend main scss file once */ -@import './dashboard'; -@import './switch'; -@import './toast'; -@import './slider-input'; +@use "sass:meta"; +@use 'dashboard'; +@use 'switch'; +@use 'toast'; +@use 'slider-input'; .tutor-backend, .tutor-screen-frontend-dashboard { - @import './ui-date-picker'; + @include meta.load-css('ui-date-picker'); } // @todo: to be removed diff --git a/v2-library/src/scss/main.scss b/v2-library/src/scss/main.scss index 50fa854e36..dd1ac0023e 100644 --- a/v2-library/src/scss/main.scss +++ b/v2-library/src/scss/main.scss @@ -1,2 +1,2 @@ -@import './structure/structure'; -@import './main_contents'; +@use 'structure/structure'; +@use 'main_contents'; diff --git a/v2-library/src/scss/main_contents.scss b/v2-library/src/scss/main_contents.scss index 1e1610dd5c..187b61f162 100644 --- a/v2-library/src/scss/main_contents.scss +++ b/v2-library/src/scss/main_contents.scss @@ -1,14 +1,14 @@ // Reusables loader, (variables and mixins) -@import './reusables'; +@use 'reusables'; // Core -@import './core/index'; +@use 'core/index'; // Legacy common styles -@import './legacy/index'; +@use 'legacy/index' as index2; // ui elements -@import './elements/index'; +@use 'elements/index' as index3; // ui components -@import './components/index'; +@use 'components/index' as index4; diff --git a/v2-library/src/scss/mixins/_breakpoints.scss b/v2-library/src/scss/mixins/_breakpoints.scss index e166f5cf55..a251f1f649 100644 --- a/v2-library/src/scss/mixins/_breakpoints.scss +++ b/v2-library/src/scss/mixins/_breakpoints.scss @@ -1,3 +1,6 @@ +@use "sass:list"; +@use "../structure/variables"; + @use 'sass:map'; // Breakpoint viewport sizes and media queries. @@ -16,21 +19,21 @@ // md // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl)) // md -@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) { - $n: index($breakpoint-names, $name); +@function breakpoint-next($name, $breakpoints: variables.$grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) { + $n: list.index($breakpoint-names, $name); @if not $n { @error "breakpoint `#{$name}` not found in `#{$breakpoints}`"; } - @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null); + @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null); } // Minimum breakpoint width. Null for the smallest (first) breakpoint. // // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) // 576px -@function breakpoint-min($name, $breakpoints: $grid-breakpoints) { +@function breakpoint-min($name, $breakpoints: variables.$grid-breakpoints) { $min: map.get($breakpoints, $name); @return if($min != 0, $min, null); @@ -45,7 +48,7 @@ // // >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) // 767.98px -@function breakpoint-max($name, $breakpoints: $grid-breakpoints) { +@function breakpoint-max($name, $breakpoints: variables.$grid-breakpoints) { $max: map.get($breakpoints, $name); @return if($max and $max > 0, $max - .02, null); @@ -58,13 +61,13 @@ // "" (Returns a blank string) // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) // "-sm" -@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) { +@function breakpoint-infix($name, $breakpoints: variables.$grid-breakpoints) { @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}"); } // Media of at least the minimum breakpoint width. No query for the smallest breakpoint. // Makes the @content apply to the given breakpoint and wider. -@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) { +@mixin media-breakpoint-up($name, $breakpoints: variables.$grid-breakpoints) { $min: breakpoint-min($name, $breakpoints); @if $min { @@ -78,7 +81,7 @@ // Media of at most the maximum breakpoint width. No query for the largest breakpoint. // Makes the @content apply to the given breakpoint and narrower. -@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) { +@mixin media-breakpoint-down($name, $breakpoints: variables.$grid-breakpoints) { $max: breakpoint-max($name, $breakpoints); @if $max { @@ -92,7 +95,7 @@ // Media that spans multiple breakpoint widths. // Makes the @content apply between the min and max breakpoints -@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) { +@mixin media-breakpoint-between($lower, $upper, $breakpoints: variables.$grid-breakpoints) { $min: breakpoint-min($lower, $breakpoints); $max: breakpoint-max($upper, $breakpoints); @@ -114,7 +117,7 @@ // Media between the breakpoint's minimum and maximum widths. // No minimum for the smallest breakpoint, and no maximum for the largest one. // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower. -@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) { +@mixin media-breakpoint-only($name, $breakpoints: variables.$grid-breakpoints) { $min: breakpoint-min($name, $breakpoints); $next: breakpoint-next($name, $breakpoints); $max: breakpoint-max($next); diff --git a/v2-library/src/scss/mixins/_container.scss b/v2-library/src/scss/mixins/_container.scss index dbd1d6b383..9c39526874 100644 --- a/v2-library/src/scss/mixins/_container.scss +++ b/v2-library/src/scss/mixins/_container.scss @@ -1,9 +1,11 @@ +@use "../structure/variables"; + // Container mixins -@mixin make-container($gutter: $container-padding-x) { +@mixin make-container($gutter: variables.$container-padding-x) { width: 100%; - padding-inline-end: var(--#{$variable-prefix}gutter-x, #{$gutter}); - padding-inline-start: var(--#{$variable-prefix}gutter-x, #{$gutter}); + padding-inline-end: var(--#{variables.$variable-prefix}gutter-x, #{$gutter}); + padding-inline-start: var(--#{variables.$variable-prefix}gutter-x, #{$gutter}); margin-inline-end: auto; margin-inline-start: auto; } diff --git a/v2-library/src/scss/mixins/_grid.scss b/v2-library/src/scss/mixins/_grid.scss index d40ade1647..a2619208bf 100644 --- a/v2-library/src/scss/mixins/_grid.scss +++ b/v2-library/src/scss/mixins/_grid.scss @@ -1,3 +1,9 @@ +@use "../structure/functions"; +@use "../structure/variables"; +@use "breakpoints"; + +$include-column-box-sizing: true !default; + @use 'sass:map'; @use 'sass:math'; @use 'sass:meta'; @@ -6,24 +12,26 @@ // // Generate semantic grid columns with these mixins. -@mixin make-row($gutter: $grid-gutter-width) { - --#{$variable-prefix}gutter-x: #{$gutter}; - --#{$variable-prefix}gutter-y: 0; +@mixin make-row($gutter: variables.$grid-gutter-width) { + --#{variables.$variable-prefix}gutter-x: #{$gutter}; + --#{variables.$variable-prefix}gutter-y: 0; display: flex; flex-wrap: wrap; // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed - margin-top: calc(-1 * var(--#{$variable-prefix}gutter-y)); // stylelint-disable-line function-disallowed-list - margin-inline-end: calc(-0.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list + margin-top: calc(-1 * var(--#{variables.$variable-prefix}gutter-y)); // stylelint-disable-line function-disallowed-list + margin-inline-end: calc(-0.5 * var(--#{variables.$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list margin-inline-start: calc( - -0.5 * var(--#{$variable-prefix}gutter-x) + -0.5 * var(--#{variables.$variable-prefix}gutter-x) ); // stylelint-disable-line function-disallowed-list } -@mixin make-col-ready($gutter: $grid-gutter-width) { +@mixin make-col-ready($gutter: variables.$grid-gutter-width) { // Add box sizing if only the grid is loaded - box-sizing: if(meta.variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null); + @if $include-column-box-sizing { + box-sizing: border-box; + } // Prevent columns from becoming too narrow when at smaller grid tiers by // always setting `width: 100%;`. This works because we set the width @@ -31,17 +39,17 @@ flex-shrink: 0; width: 100%; max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid - padding-inline-end: calc(var(--#{$variable-prefix}gutter-x) * 0.5); // stylelint-disable-line function-disallowed-list + padding-inline-end: calc(var(--#{variables.$variable-prefix}gutter-x) * 0.5); // stylelint-disable-line function-disallowed-list padding-inline-start: calc( - var(--#{$variable-prefix}gutter-x) * 0.5 + var(--#{variables.$variable-prefix}gutter-x) * 0.5 ); // stylelint-disable-line function-disallowed-list - margin-top: var(--#{$variable-prefix}gutter-y); + margin-top: var(--#{variables.$variable-prefix}gutter-y); } -@mixin make-col($size: false, $columns: $grid-columns) { +@mixin make-col($size: false, $columns: variables.$grid-columns) { @if $size { flex: 0 0 auto; - width: math.percentage(divide($size, $columns)); + width: math.percentage(functions.divide($size, $columns)); } @else { flex: 1 1 0; max-width: 100%; @@ -53,8 +61,8 @@ width: auto; } -@mixin make-col-offset($size, $columns: $grid-columns) { - $num: divide($size, $columns); +@mixin make-col-offset($size, $columns: variables.$grid-columns) { + $num: functions.divide($size, $columns); margin-inline-start: if($num == 0, 0, math.percentage($num)); } @@ -67,7 +75,7 @@ @mixin row-cols($count) { > * { flex: 0 0 auto; - width: divide(100%, $count); + width: functions.divide(100%, $count); } } @@ -76,11 +84,11 @@ // Used only by Bootstrap to generate the correct number of grid classes given // any value of `$grid-columns`. -@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { +@mixin make-grid-columns($columns: variables.$grid-columns, $gutter: variables.$grid-gutter-width, $breakpoints: variables.$grid-breakpoints) { @each $breakpoint in map.keys($breakpoints) { - $infix: breakpoint-infix($breakpoint, $breakpoints); + $infix: breakpoints.breakpoint-infix($breakpoint, $breakpoints); - @include media-breakpoint-up($breakpoint, $breakpoints) { + @include breakpoints.media-breakpoint-up($breakpoint, $breakpoints) { // Provide basic `.col-{bp}` classes for equal-width flexbox columns .tutor-col#{$infix} { flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4 @@ -90,8 +98,8 @@ @include make-col-auto(); } - @if $grid-row-columns > 0 { - @for $i from 1 through $grid-row-columns { + @if variables.$grid-row-columns > 0 { + @for $i from 1 through variables.$grid-row-columns { .tutor-row-cols#{$infix}-#{$i} { @include row-cols($i); } @@ -123,15 +131,15 @@ // Gutters // // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns. - @each $key, $value in $gutters { + @each $key, $value in variables.$gutters { .tutor-g#{$infix}-#{$key}, .tutor-gx#{$infix}-#{$key} { - --#{$variable-prefix}gutter-x: #{$value}; + --#{variables.$variable-prefix}gutter-x: #{$value}; } .tutor-g#{$infix}-#{$key}, .tutor-gy#{$infix}-#{$key} { - --#{$variable-prefix}gutter-y: #{$value}; + --#{variables.$variable-prefix}gutter-y: #{$value}; } } } diff --git a/v2-library/src/scss/mixins/_svg-icons-dynamic.scss b/v2-library/src/scss/mixins/_svg-icons-dynamic.scss index 1de28572f8..5d9bb6f47c 100644 --- a/v2-library/src/scss/mixins/_svg-icons-dynamic.scss +++ b/v2-library/src/scss/mixins/_svg-icons-dynamic.scss @@ -1,15 +1,16 @@ +@use "sass:string"; // * SVG Icon Generatior // * Accept hex color only // * Use as background-image: url(svgIconName(#hex-code)); @function svgIconName($color: #010101) { - $hexColor: '%23' + str-slice('#{$color}', 2, -1); + $hexColor: '%23' + string.slice('#{$color}', 2, -1); @return 'data:image/svg+xml;charset=UTF-8, '; } @function svgCircleInfo($color: var(--tutor-border-color)) { - $hexColor: '%23' + str-slice('#{$color}', 2, -1); + $hexColor: '%23' + string.slice('#{$color}', 2, -1); @return 'data:image/svg+xml;charset=UTF-8,'; } diff --git a/v2-library/src/scss/mixins/_utilities.scss b/v2-library/src/scss/mixins/_utilities.scss index e03e97df5f..bd3eb326b2 100644 --- a/v2-library/src/scss/mixins/_utilities.scss +++ b/v2-library/src/scss/mixins/_utilities.scss @@ -1,3 +1,6 @@ +@use "../structure/variables"; +@use "../structure/vendor/rfs"; + @use 'sass:list'; @use 'sass:map'; @use 'sass:meta'; @@ -39,12 +42,12 @@ @if map.get($utility, rfs) { // Inside the media query @if $is-rfs-media-query { - $val: rfs-value($value); + $val: rfs.rfs-value($value); // Do not render anything if fluid and non fluid values are the same - $value: if($val == rfs-fluid-value($value), null, $val); + $value: if($val == rfs.rfs-fluid-value($value), null, $val); } @else { - $value: rfs-fluid-value($value); + $value: rfs.rfs-fluid-value($value); } } @@ -59,12 +62,12 @@ @if $is-css-var { .#{$property-class + $infix + $property-class-modifier} { - --#{$variable-prefix}#{$property-class}: #{$value}; + --#{variables.$variable-prefix}#{$property-class}: #{$value}; } @each $pseudo in $state { .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} { - --#{$variable-prefix}#{$property-class}: #{$value}; + --#{variables.$variable-prefix}#{$property-class}: #{$value}; } } } @else { @@ -72,7 +75,7 @@ @each $property in $properties { @if $is-local-vars { @each $local-var, $value in $is-local-vars { - --#{$variable-prefix}#{$local-var}: #{$value}; + --#{variables.$variable-prefix}#{$local-var}: #{$value}; } } diff --git a/v2-library/src/scss/mixins/index.scss b/v2-library/src/scss/mixins/index.scss index 1e67ddff99..d7c45fac96 100644 --- a/v2-library/src/scss/mixins/index.scss +++ b/v2-library/src/scss/mixins/index.scss @@ -1,7 +1,7 @@ // Mixins -@import './typo'; -@import './svg-icons-dynamic'; -@import './svg-icons-static'; -@import './general-minxins'; -@import './spinner'; -@import './breakpoint'; \ No newline at end of file +@forward 'typo'; +@forward 'svg-icons-dynamic'; +@forward 'svg-icons-static'; +@forward 'general-minxins'; +@forward 'spinner'; +@forward 'breakpoint'; \ No newline at end of file diff --git a/v2-library/src/scss/reusables.scss b/v2-library/src/scss/reusables.scss index 7f048261ab..8fe6ab11af 100644 --- a/v2-library/src/scss/reusables.scss +++ b/v2-library/src/scss/reusables.scss @@ -1,2 +1,2 @@ -@import './mixins/index'; -@import './utility/index'; \ No newline at end of file +@forward 'mixins'; +@forward 'utility'; \ No newline at end of file diff --git a/v2-library/src/scss/structure/_containers.scss b/v2-library/src/scss/structure/_containers.scss index 070173891c..2e22e58ca5 100644 --- a/v2-library/src/scss/structure/_containers.scss +++ b/v2-library/src/scss/structure/_containers.scss @@ -1,22 +1,26 @@ +@use "../mixins/breakpoints"; +@use "../mixins/container"; +@use "variables"; + // Container widths // // Set the container width, and override it for fixed navbars in media queries. -@if $enable-grid-classes { +@if variables.$enable-grid-classes { // Single container class with breakpoint max-widths .tutor-container, // 100% wide container at all breakpoints .tutor-container-fluid { - @include make-container(); + @include container.make-container(); } // Responsive containers that are 100% wide until a breakpoint - @each $breakpoint, $container-max-width in $container-max-widths { + @each $breakpoint, $container-max-width in variables.$container-max-widths { .tutor-container-#{$breakpoint} { @extend .tutor-container-fluid; } - @include media-breakpoint-up($breakpoint, $grid-breakpoints) { + @include breakpoints.media-breakpoint-up($breakpoint, variables.$grid-breakpoints) { %responsive-container-#{$breakpoint} { max-width: $container-max-width; } @@ -24,9 +28,9 @@ // Extend each breakpoint which is smaller or equal to the current breakpoint $extend-breakpoint: true; - @each $name, $width in $grid-breakpoints { + @each $name, $width in variables.$grid-breakpoints { @if $extend-breakpoint { - .tutor-container#{breakpoint-infix($name, $grid-breakpoints)} { + .tutor-container#{breakpoints.breakpoint-infix($name, variables.$grid-breakpoints)} { @extend %responsive-container-#{$breakpoint}; } diff --git a/v2-library/src/scss/structure/_functions.scss b/v2-library/src/scss/structure/_functions.scss index 21922c8b0e..a1a7ddf48e 100644 --- a/v2-library/src/scss/structure/_functions.scss +++ b/v2-library/src/scss/structure/_functions.scss @@ -1,3 +1,6 @@ +$variable-prefix: tutor- !default; +@use "vendor/rfs"; + @use 'sass:color'; @use 'sass:list'; @use 'sass:map'; @@ -11,7 +14,7 @@ // Ascending // Used to evaluate Sass maps like our grid breakpoints. -@mixin _assert-ascending($map, $map-name) { +@mixin assert-ascending($map, $map-name) { $prev-key: null; $prev-num: null; @@ -31,7 +34,7 @@ // Starts at zero // Used to ensure the min-width of the lowest breakpoint starts at 0. -@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") { +@mixin assert-starts-at-zero($map, $map-name: "$grid-breakpoints") { @if list.length($map) > 0 { $values: map.values($map); $first-value: list.nth($values, 1); @@ -71,7 +74,7 @@ $_args: list.append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg))); } - $_map: map.merge($_map, ($key: call(get-function($func), $_args...))); + $_map: map.merge($_map, ($key: meta.call(meta.get-function($func), $_args...))); } @return $_map; @@ -194,7 +197,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 $l1: luminance($background); $l2: luminance(opaque($background, $foreground)); - @return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05)); + @return if($l1 > $l2, rfs.divide($l1 + .05, $l2 + .05), rfs.divide($l2 + .05, $l1 + .05)); } // Return WCAG2.0 relative luminance @@ -208,7 +211,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 ); @each $name, $value in $rgb { - $value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), list.nth($_luminance-list, $value + 1)); + $value: if(rfs.divide($value, 255) < .03928, rfs.divide(rfs.divide($value, 255), 12.92), list.nth($_luminance-list, $value + 1)); $rgb: map.merge($rgb, ($name: $value)); } diff --git a/v2-library/src/scss/structure/_grid.scss b/v2-library/src/scss/structure/_grid.scss index e8b7702d9f..cd148b9cdd 100644 --- a/v2-library/src/scss/structure/_grid.scss +++ b/v2-library/src/scss/structure/_grid.scss @@ -1,13 +1,17 @@ +@use "../mixins/breakpoints"; +@use "../mixins/grid"; +@use "variables"; + // Row // // Rows contain your columns. -@if $enable-grid-classes { +@if variables.$enable-grid-classes { .tutor-row { - @include make-row(); + @include grid.make-row(); > * { - @include make-col-ready(); + @include grid.make-col-ready(); } } } @@ -17,8 +21,8 @@ // // Common styles for small and large grid columns -@if $enable-grid-classes { - @include make-grid-columns(); +@if variables.$enable-grid-classes { + @include grid.make-grid-columns(); } @@ -34,31 +38,31 @@ } &-2 { - @include media-breakpoint-up(md) { + @include breakpoints.media-breakpoint-up(md) { grid-template-columns: repeat(2, 1fr); } } &-3 { - @include media-breakpoint-up(md) { + @include breakpoints.media-breakpoint-up(md) { grid-template-columns: repeat(2, 1fr); } - @include media-breakpoint-up(lg) { + @include breakpoints.media-breakpoint-up(lg) { grid-template-columns: repeat(3, 1fr); } } &-4 { - @include media-breakpoint-up(md) { + @include breakpoints.media-breakpoint-up(md) { grid-template-columns: repeat(2, 1fr); } - @include media-breakpoint-up(lg) { + @include breakpoints.media-breakpoint-up(lg) { grid-template-columns: repeat(3, 1fr); } - @include media-breakpoint-up(xl) { + @include breakpoints.media-breakpoint-up(xl) { grid-template-columns: repeat(4, 1fr); } } diff --git a/v2-library/src/scss/structure/_utilities.scss b/v2-library/src/scss/structure/_utilities.scss index 0f9d24b9bc..5050732265 100644 --- a/v2-library/src/scss/structure/_utilities.scss +++ b/v2-library/src/scss/structure/_utilities.scss @@ -1,3 +1,5 @@ +@use "variables"; + @use 'sass:map'; // stylelint-disable indentation @@ -59,12 +61,12 @@ $utilities: map.merge( "start": ( property: inset-inline-start, class: tutor-start, - values: $position-values + values: variables.$position-values ), "end": ( property: inset-inline-end, class: tutor-end, - values: $position-values + values: variables.$position-values ), "translate-middle": ( property: transform, @@ -173,7 +175,7 @@ $utilities: map.merge( responsive: true, property: gap, class: tutor-gap, - values: $gutters + values: variables.$gutters ), "justify-content": ( responsive: true, @@ -248,43 +250,43 @@ $utilities: map.merge( responsive: true, property: margin, class: tutor-m, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), "margin-x": ( responsive: true, property: margin-inline-start margin-inline-end, class: tutor-mx, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), "margin-y": ( responsive: true, property: margin-top margin-bottom, class: tutor-my, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), "margin-top": ( responsive: true, property: margin-top, class: tutor-mt, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), "margin-end": ( responsive: true, property: margin-inline-end, class: tutor-mr, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), "margin-bottom": ( responsive: true, property: margin-bottom, class: tutor-mb, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), "margin-start": ( responsive: true, property: margin-inline-start, class: tutor-ml, - values: map.merge($utility-spacers, (auto: auto)) + values: map.merge(variables.$utility-spacers, (auto: auto)) ), // Negative margin utilities @@ -292,43 +294,43 @@ $utilities: map.merge( responsive: true, property: margin, class: tutor-m, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), "negative-margin-x": ( responsive: true, property: margin-inline-start margin-inline-end, class: tutor-mx, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), "negative-margin-y": ( responsive: true, property: margin-top margin-bottom, class: tutor-my, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), "negative-margin-top": ( responsive: true, property: margin-top, class: tutor-mt, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), "negative-margin-end": ( responsive: true, property: margin-inline-end, class: tutor-mr, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), "negative-margin-bottom": ( responsive: true, property: margin-bottom, class: tutor-mb, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), "negative-margin-start": ( responsive: true, property: margin-inline-start, class: tutor-ml, - values: $negative-utility-spacers + values: variables.$negative-utility-spacers ), // Padding utilities @@ -336,43 +338,43 @@ $utilities: map.merge( responsive: true, property: padding, class: tutor-p, - values: $utility-spacers + values: variables.$utility-spacers ), "padding-x": ( responsive: true, property: padding-inline-start padding-inline-end, class: tutor-px, - values: $utility-spacers + values: variables.$utility-spacers ), "padding-y": ( responsive: true, property: padding-top padding-bottom, class: tutor-py, - values: $utility-spacers + values: variables.$utility-spacers ), "padding-top": ( responsive: true, property: padding-top, class: tutor-pt, - values: $utility-spacers + values: variables.$utility-spacers ), "padding-end": ( responsive: true, property: padding-inline-end, class: tutor-pr, - values: $utility-spacers + values: variables.$utility-spacers ), "padding-bottom": ( responsive: true, property: padding-bottom, class: tutor-pb, - values: $utility-spacers + values: variables.$utility-spacers ), "padding-start": ( responsive: true, property: padding-inline-start, class: tutor-pl, - values: $utility-spacers + values: variables.$utility-spacers ), // scss-docs-start utils-text @@ -380,7 +382,7 @@ $utilities: map.merge( rfs: true, property: font-size, class: tutor-fs, - values: $font-sizes + values: variables.$font-sizes ), "font-style": ( property: font-style, diff --git a/v2-library/src/scss/structure/_variables.scss b/v2-library/src/scss/structure/_variables.scss index 6fe6b79510..49cc5d88e3 100644 --- a/v2-library/src/scss/structure/_variables.scss +++ b/v2-library/src/scss/structure/_variables.scss @@ -1,3 +1,5 @@ +@use "functions"; + // Variables $enable-negative-margins: true !default; @@ -15,8 +17,8 @@ $grid-breakpoints: ( // scss-docs-end grid-breakpoints -@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); -@include _assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints"); +@include functions.assert-ascending($grid-breakpoints, "$grid-breakpoints"); +@include functions.assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints"); // Grid containers @@ -34,7 +36,7 @@ $container-max-widths: ( // scss-docs-end container-max-widths -@include _assert-ascending($container-max-widths, "$container-max-widths"); +@include functions.assert-ascending($container-max-widths, "$container-max-widths"); // Grid columns @@ -95,7 +97,7 @@ $utility-spacers: ( 76: $utility-spacer * 19, 80: $utility-spacer * 20, ) !default; -$negative-utility-spacers: negativify-map($utility-spacers); +$negative-utility-spacers: functions.negativify-map($utility-spacers); // scss-docs-start font-sizes $font-sizes: ( diff --git a/v2-library/src/scss/structure/structure.scss b/v2-library/src/scss/structure/structure.scss index e68f50d97a..c4605990f9 100644 --- a/v2-library/src/scss/structure/structure.scss +++ b/v2-library/src/scss/structure/structure.scss @@ -1,20 +1,20 @@ $include-column-box-sizing: true !default; -@import "functions"; -@import "variables"; -@import "../mixins/breakpoints"; -@import "../mixins/container"; -@import "../mixins/grid"; -@import "../mixins/utilities"; -@import "vendor/rfs"; -@import "containers"; -@import "grid"; -@import "utilities"; +@use "functions"; +@use "variables"; +@use "../mixins/breakpoints"; +@use "../mixins/container"; +@use "../mixins/grid"; +@use "../mixins/utilities" as utilities2; +@use "vendor/rfs"; +@use "containers"; +@use "grid" as grid2; +@use "utilities"; // Only use the utilities we need // stylelint-disable-next-line scss/dollar-variable-default -$utilities: map-get-multiple( - $utilities, +utilities.$utilities: functions.map-get-multiple( + utilities.$utilities, ( "display", "order", @@ -55,4 +55,4 @@ $utilities: map-get-multiple( ) ); -@import "../utility/api"; \ No newline at end of file +@use "../utility/api"; \ No newline at end of file diff --git a/v2-library/src/scss/utility/_api.scss b/v2-library/src/scss/utility/_api.scss index 058eb6ef25..9907bd9bf6 100644 --- a/v2-library/src/scss/utility/_api.scss +++ b/v2-library/src/scss/utility/_api.scss @@ -1,35 +1,41 @@ +@use "../mixins/breakpoints"; +@use "../mixins/utilities"; +@use "../structure/utilities" as utilities2; +@use "../structure/variables"; +@use "../structure/vendor/rfs"; + @use 'sass:map'; @use 'sass:meta'; // Loop over each breakpoint -@each $breakpoint in map.keys($grid-breakpoints) { +@each $breakpoint in map.keys(variables.$grid-breakpoints) { // Generate media query if needed - @include media-breakpoint-up($breakpoint) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + @include breakpoints.media-breakpoint-up($breakpoint) { + $infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints); // Loop over each utility property - @each $key, $utility in $utilities { + @each $key, $utility in utilities2.$utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Only proceed if responsive media queries are enabled or if it's the base media query @if meta.type-of($utility) == "map" and (map.get($utility, responsive) or $infix == "") { - @include generate-utility($utility, $infix); + @include utilities.generate-utility($utility, $infix); } } } } // RFS rescaling -@media (min-width: $rfs-mq-value) { - @each $breakpoint in map.keys($grid-breakpoints) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); +@media (min-width: rfs.$rfs-mq-value) { + @each $breakpoint in map.keys(variables.$grid-breakpoints) { + $infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints); - @if map.get($grid-breakpoints, $breakpoint) < $rfs-breakpoint { + @if map.get(variables.$grid-breakpoints, $breakpoint) < rfs.$rfs-breakpoint { // Loop over each utility property - @each $key, $utility in $utilities { + @each $key, $utility in utilities2.$utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Only proceed if responsive media queries are enabled or if it's the base media query @if meta.type-of($utility) == "map" and map.get($utility, rfs) and (map.get($utility, responsive) or $infix == "") { - @include generate-utility($utility, $infix, true); + @include utilities.generate-utility($utility, $infix, true); } } } @@ -39,11 +45,11 @@ // Print utilities @media print { - @each $key, $utility in $utilities { + @each $key, $utility in utilities2.$utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Then check if the utility needs print styles @if meta.type-of($utility) == "map" and map.get($utility, print) == true { - @include generate-utility($utility, "-print"); + @include utilities.generate-utility($utility, "-print"); } } } diff --git a/v2-library/src/scss/utility/_colors.scss b/v2-library/src/scss/utility/_colors.scss index 78b70300c7..d09caaf401 100644 --- a/v2-library/src/scss/utility/_colors.scss +++ b/v2-library/src/scss/utility/_colors.scss @@ -1,4 +1,4 @@ -@import './variables'; +@use 'variables'; :root { // --tutor-disabled-bg: #{$disabled-bg}; @@ -8,40 +8,40 @@ --tutor-text-size: 16px; // // Common Colors - --tutor-color-white: #{$color-white}; - --tutor-color-success: #{$color-success}; - --tutor-color-success-rgb: #{$color-success-rgb}; - --tutor-color-warning: #{$color-warning}; - --tutor-color-warning-rgb: #{$color-warning-rgb}; - --tutor-color-danger: #{$color-danger}; - --tutor-color-danger-rgb: #{$color-danger-rgb}; + --tutor-color-white: #{variables.$color-white}; + --tutor-color-success: #{variables.$color-success}; + --tutor-color-success-rgb: #{variables.$color-success-rgb}; + --tutor-color-warning: #{variables.$color-warning}; + --tutor-color-warning-rgb: #{variables.$color-warning-rgb}; + --tutor-color-danger: #{variables.$color-danger}; + --tutor-color-danger-rgb: #{variables.$color-danger-rgb}; // extra colors need to be replaces later - --tutor-color-secondary: #{$color-secondary}; - --tutor-color-subdued: #{$color-subdued}; - --tutor-color-hints: #{$color-hints}; - --tutor-color-muted: #{$color-muted}; + --tutor-color-secondary: #{variables.$color-secondary}; + --tutor-color-subdued: #{variables.$color-subdued}; + --tutor-color-hints: #{variables.$color-hints}; + --tutor-color-muted: #{variables.$color-muted}; // gray colors - --tutor-color-gray: #{$color-gray-20}; - --tutor-color-gray-10: #{$color-gray-10}; + --tutor-color-gray: #{variables.$color-gray-20}; + --tutor-color-gray-10: #{variables.$color-gray-10}; } // Color Utility class $colorUtils: ( // colors 'black' var(--tutor-body-color), - 'white' $color-white, - 'primary' $color-primary, - 'success' $color-success, - 'warning' $color-warning, - 'danger' $color-danger, - 'secondary' $color-secondary, - 'muted' $color-muted, - 'subdued' $color-subdued, - 'hints' $color-hints, - 'gray-20' $color-gray-20, - 'gray-10' $color-gray-10, + 'white' variables.$color-white, + 'primary' variables.$color-primary, + 'success' variables.$color-success, + 'warning' variables.$color-warning, + 'danger' variables.$color-danger, + 'secondary' variables.$color-secondary, + 'muted' variables.$color-muted, + 'subdued' variables.$color-subdued, + 'hints' variables.$color-hints, + 'gray-20' variables.$color-gray-20, + 'gray-10' variables.$color-gray-10, ); @each $classSuffix, $value in $colorUtils { diff --git a/v2-library/src/scss/utility/index.scss b/v2-library/src/scss/utility/index.scss index b6b334b9a3..f81c655ed2 100644 --- a/v2-library/src/scss/utility/index.scss +++ b/v2-library/src/scss/utility/index.scss @@ -1,4 +1,4 @@ // style ulities -@import './variables'; -@import './colors'; -@import './typography'; +@forward 'variables'; +@forward 'colors'; +@forward 'typography';