Skip to content

Commit

Permalink
feat!: Dropping Sass support from builtin html block, replacing with …
Browse files Browse the repository at this point in the history
…vanilla CSS
  • Loading branch information
farhan committed Sep 21, 2024
1 parent a509763 commit a09ed7f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions xmodule/assets/editor/_edit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
@include linear-gradient(top, #d4dee8, #c9d5e2);

position: relative;
padding: ($baseline/4);
padding: calc((var(--baseline)/4));
border-bottom-color: #a5aaaf;

button {
display: inline-block;

@include float(left);

padding: 3px ($baseline/2) 5px;
padding: 3px calc((var(--baseline)/2)) 5px;
margin-left: 7px;
border: 0;
border-radius: 2px;
Expand All @@ -53,7 +53,7 @@

li {
@include float(left);
@include margin-right($baseline/4);
@include margin-right(calc((var(--baseline)/4)));

&:last-child {
@include margin-right(0);
Expand All @@ -67,16 +67,16 @@
border: 1px solid #a5aaaf;
border-radius: 3px 3px 0 0;

@include linear-gradient(top, $transparent 87%, rgba(0, 0, 0, .06));
@include linear-gradient(top, var(--transparent) 87%, rgba(0, 0, 0, .06));

background-color: #e5ecf3;
font-size: 13px;
color: #3c3c3c;
box-shadow: 1px -1px 1px rgba(0, 0, 0, .05);

&.current {
background: $white;
border-bottom-color: $white;
background: var(--white);
border-bottom-color: var(--white);
}
}
}
Expand Down
44 changes: 22 additions & 22 deletions xmodule/assets/html/_display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@
}

h1 {
color: $body-color;
font: normal 2em/1.4em $font-family-sans-serif;
color: var(--body-color);
font: normal 2em/1.4em var(--font-family-sans-serif);
letter-spacing: 1px;

@include margin(0, 0, 1.416em, 0);
}

h2 {
color: #646464;
font: normal 1.2em/1.2em $font-family-sans-serif;
font: normal 1.2em/1.2em var(--font-family-sans-serif);
letter-spacing: 1px;
margin-bottom: ($baseline*0.75);
margin-bottom: calc((var(--baseline)*0.75));
-webkit-font-smoothing: antialiased;
}

h3,
h4,
h5,
h6 {
@include margin(0, 0, ($baseline/2), 0);
@include margin(0, 0, calc((var(--baseline)/2)), 0);

font-weight: 600;
}
Expand All @@ -54,7 +54,7 @@ p {
margin-bottom: 1.416em;
font-size: 1em;
line-height: 1.6em !important;
color: $body-color;
color: var(--body-color);
}

em,
Expand All @@ -78,11 +78,11 @@ b {
p + p,
ul + p,
ol + p {
margin-top: $baseline;
margin-top: var(--baseline);
}

blockquote {
margin: 1em ($baseline*2);
margin: 1em calc((var(--baseline)*2));
}

ol,
Expand All @@ -91,7 +91,7 @@ ul {
@include bi-app-compact(padding, 0, 0, 0, 1em);

margin: 1em 0;
color: $body-color;
color: var(--body-color);

li {
margin-bottom: 0.708em;
Expand All @@ -112,7 +112,7 @@ a {
&:hover,
&:active,
&:focus {
color: $blue;
color: var(--blue);
}
}

Expand All @@ -122,31 +122,31 @@ img {

pre {
margin: 1em 0;
color: $body-color;
color: var(--body-color);
font-family: monospace, serif;
font-size: 1em;
white-space: pre-wrap;
word-wrap: break-word;
}

code {
color: $body-color;
color: var(--body-color);
font-family: monospace, serif;
background: none;
padding: 0;
}

table {
width: 100%;
margin: $baseline 0;
margin: var(--baseline) 0;
border-collapse: collapse;
font-size: 16px;

td,
th {
margin: $baseline 0;
padding: ($baseline/2);
border: 1px solid $gray-l3;
margin: var(--baseline) 0;
padding: calc((var(--baseline)/2));
border: 1px solid var(--gray-l3);
font-size: 14px;

&.cont-justified-left {
Expand Down Expand Up @@ -179,12 +179,12 @@ th {

position: absolute;
display: block;
padding: ($baseline/4) 7px;
padding: calc((var(--baseline)/4)) 7px;
border-radius: 5px;
opacity: 0.9;
background: $white;
color: $black;
border: 2px solid $black;
background: var(--white);
color: var(--black);
border: 2px solid var(--black);

.label {
font-weight: bold;
Expand Down Expand Up @@ -269,11 +269,11 @@ th {
position: relative;

&.action-zoom-in {
margin-right: ($baseline/4);
margin-right: calc((var(--baseline)/4));
}

&.action-zoom-out {
margin-left: ($baseline/4);
margin-left: calc((var(--baseline)/4));
}

&.is-disabled {
Expand Down

0 comments on commit a09ed7f

Please sign in to comment.