Skip to content

Commit

Permalink
Revert breaking sass math
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
qwtel committed Sep 4, 2024
1 parent 9f3dcf3 commit 36897f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions _includes/styles/page-style.scss
Original file line number Diff line number Diff line change
@@ -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 }};
Expand Down
4 changes: 1 addition & 3 deletions _includes/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

@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' %}
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 1 addition & 3 deletions _sass/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

@use "sass:math";

@mixin light-mode() {
--body-color: #{$body-color};
--body-bg: #{$body-bg};
Expand All @@ -39,7 +37,7 @@
display: block;
content: "";
width: 100%;
padding-top: math.div($height, $width) * 100%;
padding-top: ($height / $width) * 100%;
}

> * {
Expand Down
4 changes: 2 additions & 2 deletions _sass/hydejack/_break-layout.pre.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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});
}
}
Expand Down

0 comments on commit 36897f2

Please sign in to comment.