chore: use css in favor of scss

This commit is contained in:
Henrique Ramos 2025-02-01 18:26:00 -03:00
parent 236b2cad7c
commit 9955f9ed7b
3 changed files with 350 additions and 36 deletions

313
src/theme/index.css Normal file
View File

@ -0,0 +1,313 @@
@import "./variables";
@import url("https://fonts.googleapis.com/css2?family=Anaheim:wght@400..800&family=Overpass+Mono:wght@300..700&display=swap");
body {
background: var(--background);
}
section.has-dark-background, h1, h2, h3, h4, h5, h6 {
color: var(--main-color);
}
.reveal-viewport {
background: var(--background);
background-color: var(--background-color);
}
.reveal {
font-family: var(--main-font);
font-size: var(--main-font-size);
font-weight: normal;
color: var(--main-color);
}
.reveal ::selection {
color: var(--selection-color);
background: var(--selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--selection-color);
background: var(--selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal :is(h1, h2, h3, h4, h5, h6) {
margin: var(--heading-margin);
color: var(--heading-color);
font-family: var(--heading-font);
font-weight: var(--heading-font-weight);
line-height: var(--heading-line-height);
letter-spacing: var(--heading-letter-spacing);
text-transform: var(--heading-text-transform);
text-shadow: var(--heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: var(--heading1-size);
}
.reveal h2 {
font-size: var(--heading2-size);
}
.reveal h3 {
font-size: var(--heading3-size);
}
.reveal h4 {
font-size: var(--heading4-size);
}
.reveal h1 {
text-shadow: var(--heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: var(--block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal :is(h1, h2, h3, h4, h5, h6):last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal :is(img, video, iframe) {
max-width: 95%;
max-height: 95%;
}
.reveal :is(strong, b) {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal :is(ol, dl, ul) {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal :is(ul ul, ul ol, ol ol, ol ul) {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: var(--block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote :is(p:first-child, p:last-child) {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
.reveal table th {
font-weight: bold;
}
.reveal table :is(th, td) {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
.reveal table :is(th[align='center'], td[align='center']) {
text-align: center;
}
.reveal table :is(th[align='right'], td[align='right']) {
text-align: right;
}
.reveal table tbody tr:last-child :is(th, td) {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
}
.reveal img {
margin: var(--block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: var(--link-color);
text-decoration: none;
transition: color 0.15s ease;
}
.reveal a:hover {
color: var(--link-colohover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: var(--link-colodark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .frame {
border: 4px solid var(--main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .frame {
transition: all 0.15s linear;
}
.reveal a:hover .frame {
border-color: var(--link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--background-color);
}
}

37
src/theme/variables.css Normal file
View File

@ -0,0 +1,37 @@
:root {
--background: #000;
--background-color: #bbb;
--main-font: "Anaheim", sans-serif;
--main-font-size: 40px;
--main-color: #eee;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: "Overpass Mono", monospace;
--heading-color: #fff;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: none;
--heading-text-shadow: #aaa;
--heading-font-weight: 800;
--heading1-text-shadow: #aaa;
--heading1-size: 3.77em;
--heading2-size: 3.5rem;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #aaaaff;
--link-color-dark: color.scale(#aaaaff, $lightness: -15%);
--link-color-hover: color.scale(#aaaaff, $lightness: 20%);
--selection-background-color: #888;
--selection-color: #fff;
--overlay-element-bg-color: 0, 0, 0;
--overlay-element-fg-color: 240, 240, 240;
}

View File

@ -1,36 +0,0 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "reveal.js/css/theme/template/mixins";
@import "reveal.js/css/theme/template/settings";
// ---------------------------------------------
// Include theme-specific fonts
@import url("https://fonts.googleapis.com/css2?family=Anaheim:wght@400..800&family=Overpass+Mono:wght@300..700&display=swap");
$mainColor: #fff;
$headingColor: $mainColor;
$headingTextShadow: #aaa;
$backgroundColor: #000;
$linkColor: #aaaaff;
$linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: #888;
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
$headingFont: "Overpass Mono", monospace;
$heading2Size: 3.5rem;
$headingFontWeight: 800;
$headingTextTransform: none;
$mainFont: "Anaheim", sans-serif;
// Background generator
@mixin bodyBackground() {
background: $backgroundColor;
}
// Change text colors against dark slide backgrounds
@include dark-bg-text-color($backgroundColor);
// Theme template ------------------------------
@import "reveal.js/css/theme/template/theme";
// ---------------------------------------------