Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass migration #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions content/_assets/styles/epub.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// =============================================================================
// Epub.scss
@import "colors";
@import "variables";
@use "colors";
@use "variables";

html body {
margin: 0;
Expand Down Expand Up @@ -121,7 +121,7 @@ h1, h2, h3, h4, h5, h6, dt, hr {
}

p {
@if $quire-page-paragraph-style == indent {
@if variables.$quire-page-paragraph-style == indent {
text-indent: 1em;
} @else {
text-indent: 0;
Expand Down Expand Up @@ -156,8 +156,8 @@ a {
text-decoration: underline;
/* Note: KF8 will force this value unless you use "el.class a" */
font-weight: bold;
color: $accent-color;
-webkit-text-fill-color: $accent-color;
color: variables.$accent-color;
-webkit-text-fill-color: variables.$accent-color;
/* iBooks override (iOS 9 + El Capitan in night mode) */
/* inherit = text color */
}
Expand Down Expand Up @@ -244,7 +244,7 @@ figure {
break-inside: avoid;
margin: 1.5em 0;
img {
background-color: $gray;
background-color: colors.$gray;
}
}

Expand Down Expand Up @@ -320,7 +320,7 @@ hr {
margin-bottom: 1.4375em;
height: 0;
border: none;
border-top: 0.125em solid $accent-color;
border-top: 0.125em solid variables.$accent-color;
/* currentColor = color of text (getting around night mode) */
opacity: 0.5;
/* Opacity -> grayscale. If opacity is declared for too many elements in a XHTML file, performance of legacy RMSDK takes a hit */
Expand Down Expand Up @@ -353,7 +353,7 @@ tbody, thead, tfoot, tr {

th {
empty-cells: show;
border-bottom: 0.125em solid $accent-color;
border-bottom: 0.125em solid variables.$accent-color;
/* Current color = color of text (inverted in night mode) */
padding: 0.6875em 2% 0.6875em 0;
text-align: left;
Expand All @@ -362,7 +362,7 @@ th {

td {
empty-cells: show;
border-bottom: 0.0625em solid $accent-color;
border-bottom: 0.0625em solid variables.$accent-color;
/* Current color = color of text (inverted in night mode) */
padding: 0.75em 2% 0.6875em 0;
text-align: left;
Expand Down Expand Up @@ -420,17 +420,17 @@ section.level1 {
padding: 0 .25em;
width: fit-content;
display: table;
@if $theme == classic {
@if variables.$theme == classic {
background-color: gray;
color: white;
} @else {
border-top: 2px solid $accent-color;
border-bottom: 2px solid $accent-color;
border-top: 2px solid variables.$accent-color;
border-bottom: 2px solid variables.$accent-color;
}
}

// chapter headings
@if $theme == classic {
@if variables.$theme == classic {
h1, h2, h3, h4, h5, h6 {
font-family: Times, serif;
font-weight: 700;
Expand Down Expand Up @@ -487,7 +487,7 @@ section:not(#contents) {
a {
font-weight: 400;
text-decoration: none;
border-bottom: 1px dotted $accent-color;
border-bottom: 1px dotted variables.$accent-color;
&.footnote-return,
.footnote-ref &,
&.footnote-backref,
Expand All @@ -501,11 +501,11 @@ a {
figure {
page-break-inside: avoid;
margin: 1em 0;
@if $theme == classic {
@if variables.$theme == classic {

} @else {
border-top: 1px solid $accent-color;
border-bottom: 1px solid $accent-color;
border-top: 1px solid variables.$accent-color;
border-bottom: 1px solid variables.$accent-color;
padding-top: .5em;
padding-bottom: .5em;
}
Expand Down
94 changes: 47 additions & 47 deletions content/_assets/styles/print.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use "sass:math";
@import "colors";
@import "variables";
@use "colors";
@use "variables";

// =============================================================================
// Print.scss
Expand All @@ -12,38 +12,38 @@

// Variables (others in the variables.scss file)
// -----------------------------------------------------------------------------
$print-base-text-column-width: ($print-width - $print-inner-margin - $print-outer-margin) * .7;
$print-base-text-column-width: (variables.$print-width - variables.$print-inner-margin - variables.$print-outer-margin) * .7;

@if $print-width <= 7 {
$print-base-text-column-width: $print-width - $print-inner-margin - $print-outer-margin;
@if variables.$print-width <= 7 {
$print-base-text-column-width: variables.$print-width - variables.$print-inner-margin - variables.$print-outer-margin;
}

$print-footer-font: $quire-headings-font;
$print-footer-font: variables.$quire-headings-font;
$print-footer-font-size: 8pt;

$print-trim: $print-bleed * 2;
$print-trim: variables.$print-bleed * 2;


@media print {

// Paged Media CSS Setup for PrinceXML
// -----------------------------------------------------------------------------
@page {
size: $print-width $print-height;
prince-bleed: $print-bleed;
bleed: $print-bleed;
size: variables.$print-width variables.$print-height;
prince-bleed: variables.$print-bleed;
bleed: variables.$print-bleed;
prince-trim: $print-trim;
marks: crop;
margin-top: $print-top-margin;
margin-bottom: $print-bottom-margin;
margin-top: variables.$print-top-margin;
margin-bottom: variables.$print-bottom-margin;
font-family: $print-footer-font;
font-size: $print-footer-font-size;
color: $print-text-color;
color: variables.$print-text-color;
}

@page:left {
margin-left: $print-outer-margin;
margin-right: $print-inner-margin;
margin-left: variables.$print-outer-margin;
margin-right: variables.$print-inner-margin;

@bottom-right {
content: string(sectiontitle);
Expand All @@ -64,8 +64,8 @@ $print-trim: $print-bleed * 2;
}

@page:right {
margin-left: $print-inner-margin;
margin-right: $print-outer-margin;
margin-left: variables.$print-inner-margin;
margin-right: variables.$print-outer-margin;

@bottom-left {
content: string(pagetitle);
Expand Down Expand Up @@ -97,34 +97,34 @@ $print-trim: $print-bleed * 2;
}

@page frontmatter-splash:left {
background-color: $print-splash-color;
background-color: variables.$print-splash-color;
@bottom-left {
content: counter(page, lower-roman);
}
}

@page frontmatter-splash:right {
background-color: $print-splash-color;
background-color: variables.$print-splash-color;
@bottom-right {
text-align: right;
content: counter(page, lower-roman);
}
}

@page objects {
background-color: $print-splash-color;
background-color: variables.$print-splash-color;
}

@page splash {
background-color: $print-splash-color;
background-color: variables.$print-splash-color;
}

@page splash-image {
margin-top: 0;
margin-bottom: -$print-bleed;
margin-bottom: -(variables.$print-bleed);
margin-left: 0;
margin-right: 0;
background-color: $print-splash-color;
background-color: variables.$print-splash-color;
@bottom-right {
content: none;
}
Expand All @@ -135,7 +135,7 @@ $print-trim: $print-bleed * 2;
}

@page entry-image {
background-color: $print-entry-image-color;
background-color: variables.$print-entry-image-color;
@bottom-right {
content: none;
}
Expand All @@ -147,7 +147,7 @@ $print-trim: $print-bleed * 2;

@page cover {
margin-top: 0;
margin-bottom: -$print-bleed;
margin-bottom: -(variables.$print-bleed);
margin-left: 0;
margin-right: 0;
@bottom-right {
Expand All @@ -170,7 +170,7 @@ $print-trim: $print-bleed * 2;
}

@page pdf-cover-page {
background-color: $print-splash-color;
background-color: variables.$print-splash-color;
@bottom-right {
content: none;
}
Expand Down Expand Up @@ -304,7 +304,7 @@ $print-trim: $print-bleed * 2;

}
&--full-height {
$print-splash-height: $print-height - $print-top-margin - $print-bottom-margin;
$print-splash-height: variables.$print-height - variables.$print-top-margin - variables.$print-bottom-margin;
height: $print-splash-height;
page: splash-image;
}
Expand Down Expand Up @@ -350,7 +350,7 @@ $print-trim: $print-bleed * 2;
}
}

@if $print-width > 7 {
@if variables.$print-width > 7 {
.quire-essay &,
.quire-entry & {
column-count: 2;
Expand Down Expand Up @@ -399,7 +399,7 @@ $print-trim: $print-bleed * 2;

.quire-page__header.hero-image .hero-body {
margin: 2.5in .5in 0;
@if $print-width <= 7 {
@if variables.$print-width <= 7 {
width: $print-base-text-column-width;
margin: 2.5in auto 0;
}
Expand All @@ -410,19 +410,19 @@ $print-trim: $print-bleed * 2;
$menu-grid-gap: .1875in;
$menu-grid-item-margin: math.div($menu-grid-gap, 2);

$menu-grid-item-width: math.div($print-width - $print-outer-margin - $print-inner-margin - 3 * $menu-grid-gap, 3);
$menu-grid-item-width: math.div(variables.$print-width - variables.$print-outer-margin - variables.$print-inner-margin - 3 * $menu-grid-gap, 3);

@if $print-width <= 7 {
$menu-grid-item-width: math.div($print-width - $print-outer-margin - $print-inner-margin - (2 * $menu-grid-gap), 2);
@if variables.$print-width <= 7 {
$menu-grid-item-width: math.div(variables.$print-width - variables.$print-outer-margin - variables.$print-inner-margin - (2 * $menu-grid-gap), 2);
}

.quire-contents-list.grid .menu-list ol {
.page-item {
width: $menu-grid-item-width;
height: 2.5in;
margin-bottom: $menu-grid-gap;
@if $theme == modern {
background-color: $print-splash-color;
@if variables.$theme == modern {
background-color: variables.$print-splash-color;
padding: 1em;
}
position: relative;
Expand All @@ -439,7 +439,7 @@ $print-trim: $print-bleed * 2;
.card-content {
padding: $menu-grid-gap 0;
font-size: 1.25rem;
font-family: $quire-primary-font;
font-family: variables.$quire-primary-font;
}
img {
max-height: 1.25in;
Expand All @@ -449,15 +449,15 @@ $print-trim: $print-bleed * 2;
}
.section-item {
width: 100%;
border-bottom: 1px solid $print-text-color;
border-bottom: 1px solid variables.$print-text-color;
margin-bottom: .25in;
}
}

// Entry image pages
// -----------------------------------------------------------------------------
$print-entry-image-height: $print-height - $print-top-margin - $print-bottom-margin;
$print-entry-image-width: $print-width - $print-inner-margin - $print-outer-margin;
$print-entry-image-height: variables.$print-height - variables.$print-top-margin - variables.$print-bottom-margin;
$print-entry-image-width: variables.$print-width - variables.$print-inner-margin - variables.$print-outer-margin;

.quire-entry__image-wrap .q-figure {
align-items: center;
Expand All @@ -468,7 +468,7 @@ $print-trim: $print-bleed * 2;
justify-content: center;
margin: 0;
padding: 0;
@if $print-entry-image-display == first {
@if variables.$print-entry-image-display == first {
display: none;
&:first-child {
display: flex;
Expand All @@ -491,17 +491,17 @@ $print-trim: $print-bleed * 2;
}
}
.q-figure__caption {
color: $print-entry-caption-color;
color: variables.$print-entry-caption-color;
font-size: .75rem;
margin-top: .5rem;
max-width: $print-base-text-column-width;
&-embed-link a {
color: $print-entry-caption-color;
color: variables.$print-entry-caption-color;
display: block;
margin-bottom: .5rem;
}
.q-figure__modal-link {
color: $print-entry-caption-color;
color: variables.$print-entry-caption-color;
}
}
}
Expand Down Expand Up @@ -594,7 +594,7 @@ $print-trim: $print-bleed * 2;
justify-content: space-around;
align-items: flex-end;
text-align: right;
font-family: $quire-headings-font;
font-family: variables.$quire-headings-font;

* {
max-width: 5.5in;
Expand All @@ -603,7 +603,7 @@ $print-trim: $print-bleed * 2;
.title {
font-size: 4em;
font-weight: 700;
color: $accent-color;
color: variables.$accent-color;
line-height: 1.1;
margin-bottom: .3em;
}
Expand All @@ -625,14 +625,14 @@ $print-trim: $print-bleed * 2;
flex-direction: column;
justify-content: center;
align-items: flex-end;
font-family: $quire-headings-font;
font-family: variables.$quire-headings-font;
font-size: 1.5em;
color: $accent-color;
color: variables.$accent-color;
text-align: right;
}

.copyright-page {
color: $print-text-color;
color: variables.$print-text-color;
column-count: 2;
column-fill: auto;
column-gap: .1875in;
Expand Down
Loading