From 36897f2dfde740de8e8934ec029fdfaee1a94a5c Mon Sep 17 00:00:00 2001 From: Florian Klampfer Date: Wed, 4 Sep 2024 15:40:55 +0700 Subject: [PATCH] Revert breaking sass math # Conflicts: # _includes/styles/page-style.scss # _sass/pro/_projects.scss # _sass/pro/_resume.scss # _sass/pro/bootstrap-mod/_functions.scss # _sass/pro/bootstrap-mod/_variables.scss # _sass/pro/bootstrap-mod/mixins/_grid-framework.scss # _sass/pro/bootstrap-mod/mixins/_grid.scss --- _includes/styles/page-style.scss | 6 ++---- _includes/styles/variables.scss | 4 +--- _sass/_mixins.scss | 4 +--- _sass/hydejack/_break-layout.pre.scss | 4 ++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/_includes/styles/page-style.scss b/_includes/styles/page-style.scss index bbd39838f9f..34cea535dba 100644 --- a/_includes/styles/page-style.scss +++ b/_includes/styles/page-style.scss @@ -1,7 +1,5 @@ -@use "sass:math"; - -{% assign color = include.color %} -{% assign theme_color = include.theme_color %} +// {% assign color = include.color %} +// {% assign theme_color = include.theme_color %} html { --accent-color: {{ color }}; diff --git a/_includes/styles/variables.scss b/_includes/styles/variables.scss index ea2a0e17018..c4e19410bac 100644 --- a/_includes/styles/variables.scss +++ b/_includes/styles/variables.scss @@ -13,8 +13,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -@use "sass:math"; - // {% assign vars = site.data.variables %} // {% assign ui_font = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif' %} // {% assign ui_font_code = 'ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace' %} @@ -56,7 +54,7 @@ $content-margin-3: 3rem; $content-margin-5: 4rem; // TODO: doc -$half-content: math.div($content-width-5, 2) + $content-margin-5; +$half-content: ($content-width-5 / 2) + $content-margin-5; // The sidebar width starts adjusting dynamically when the content is at the center of the window. // This is the case when the window size has a `min-width` of content area + twice the sidebar (left, right): diff --git a/_sass/_mixins.scss b/_sass/_mixins.scss index c308fbfbe18..0fa22ff5003 100644 --- a/_sass/_mixins.scss +++ b/_sass/_mixins.scss @@ -13,8 +13,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -@use "sass:math"; - @mixin light-mode() { --body-color: #{$body-color}; --body-bg: #{$body-bg}; @@ -39,7 +37,7 @@ display: block; content: ""; width: 100%; - padding-top: math.div($height, $width) * 100%; + padding-top: ($height / $width) * 100%; } > * { diff --git a/_sass/hydejack/_break-layout.pre.scss b/_sass/hydejack/_break-layout.pre.scss index 9f7bc4a140e..dd4f2b7bcc1 100644 --- a/_sass/hydejack/_break-layout.pre.scss +++ b/_sass/hydejack/_break-layout.pre.scss @@ -45,7 +45,7 @@ pre, table:not(.highlight), .katex-display, .break-layout, mjx-container[jax="CH } @media screen and (min-width: $break-point-dynamic) { - $x: math.div($content-width-5, 2) - ($content-padding * 2) + 21rem; + $x: ($content-width-5 / 2) - ($content-padding * 2) + 21rem; width: calc(100% + 50vw - #{$x} + 2px); } } @@ -63,7 +63,7 @@ body.no-break-layout { body.no-toc:not(.no-break-layout) { pre, table:not(.highlight), .katex-display, .break-layout, mjx-container[jax="CHTML"][display="true"] { @media screen and (min-width: $break-point-dynamic) { - $x: math.div($content-width-5, 2) - ($content-padding * 2); + $x: ($content-width-5 / 2) - ($content-padding * 2); width: calc(100% + 50vw - #{$x}); } }