aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2020-06-05 10:02:49 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2020-06-05 10:03:07 +0200
commit166af89353cacb7198d23a52b3bda77be6715133 (patch)
tree93f7f7e8e5f78c01c42a84ca2e5ae54d0e2475d0
parentac79c7cd8bd937b1a9e70332b54d73df98814194 (diff)
downloadfosdem-2021-minimalism-presentation-166af89353cacb7198d23a52b3bda77be6715133.tar
fosdem-2021-minimalism-presentation-166af89353cacb7198d23a52b3bda77be6715133.tar.gz
all themes now have contrasting text colors based on slide bg
-rw-r--r--css/theme/source/beige.scss2
-rw-r--r--css/theme/source/black.scss7
-rw-r--r--css/theme/source/blood.scss9
-rw-r--r--css/theme/source/league.scss2
-rw-r--r--css/theme/source/moon.scss3
-rw-r--r--css/theme/source/night.scss3
-rw-r--r--css/theme/source/serif.scss3
-rw-r--r--css/theme/source/simple.scss7
-rw-r--r--css/theme/source/sky.scss3
-rw-r--r--css/theme/source/white.scss7
-rw-r--r--css/theme/template/mixins.scss16
-rw-r--r--dist/theme/beige.css3
-rw-r--r--dist/theme/blood.css6
-rw-r--r--dist/theme/league.css3
-rw-r--r--dist/theme/moon.css3
-rw-r--r--dist/theme/night.css3
-rw-r--r--dist/theme/serif.css3
-rw-r--r--dist/theme/sky.css3
18 files changed, 70 insertions, 16 deletions
diff --git a/css/theme/source/beige.scss b/css/theme/source/beige.scss
index acdd37d..d82c510 100644
--- a/css/theme/source/beige.scss
+++ b/css/theme/source/beige.scss
@@ -32,6 +32,8 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
@include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
}
+// Change text colors against dark slide backgrounds
+@include dark-bg-text-color(#fff);
// Theme template ------------------------------
diff --git a/css/theme/source/black.scss b/css/theme/source/black.scss
index 45d2678..ba72335 100644
--- a/css/theme/source/black.scss
+++ b/css/theme/source/black.scss
@@ -37,11 +37,8 @@ $heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;
-section.has-light-background {
- &, h1, h2, h3, h4, h5, h6 {
- color: #222;
- }
-}
+// Change text colors against light slide backgrounds
+@include light-bg-text-color(#222);
// Theme template ------------------------------
diff --git a/css/theme/source/blood.scss b/css/theme/source/blood.scss
index 4533fc0..b5a8679 100644
--- a/css/theme/source/blood.scss
+++ b/css/theme/source/blood.scss
@@ -46,6 +46,9 @@ $linkColorHover: lighten( $linkColor, 20% );
$selectionBackgroundColor: $blood;
$selectionColor: #fff;
+// Change text colors against dark slide backgrounds
+@include light-bg-text-color(#222);
+
// Theme template ------------------------------
@import "../template/theme";
@@ -58,6 +61,12 @@ $selectionColor: #fff;
text-shadow: 1px 1px $coal;
}
+section.has-light-background {
+ p, h1, h2, h3, h4 {
+ text-shadow: none;
+ }
+}
+
.reveal h1,
.reveal h2,
.reveal h3,
diff --git a/css/theme/source/league.scss b/css/theme/source/league.scss
index 95bacd4..6b9697e 100644
--- a/css/theme/source/league.scss
+++ b/css/theme/source/league.scss
@@ -27,6 +27,8 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
@include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
}
+// Change text colors against light slide backgrounds
+@include light-bg-text-color(#222);
// Theme template ------------------------------
diff --git a/css/theme/source/moon.scss b/css/theme/source/moon.scss
index db1897c..b398f4f 100644
--- a/css/theme/source/moon.scss
+++ b/css/theme/source/moon.scss
@@ -50,7 +50,8 @@ $linkColor: $blue;
$linkColorHover: lighten( $linkColor, 20% );
$selectionBackgroundColor: $magenta;
-
+// Change text colors against light slide backgrounds
+@include light-bg-text-color(#222);
// Theme template ------------------------------
@import "../template/theme";
diff --git a/css/theme/source/night.scss b/css/theme/source/night.scss
index d49a282..98a2062 100644
--- a/css/theme/source/night.scss
+++ b/css/theme/source/night.scss
@@ -28,6 +28,9 @@ $headingLetterSpacing: -0.03em;
$headingTextTransform: none;
$selectionBackgroundColor: #e7ad52;
+// Change text colors against light slide backgrounds
+@include light-bg-text-color(#222);
+
// Theme template ------------------------------
@import "../template/theme";
diff --git a/css/theme/source/serif.scss b/css/theme/source/serif.scss
index ec3fcb3..1c8d778 100644
--- a/css/theme/source/serif.scss
+++ b/css/theme/source/serif.scss
@@ -29,6 +29,9 @@ $selectionBackgroundColor: #26351C;
line-height: 1.3em;
}
+// Change text colors against dark slide backgrounds
+@include dark-bg-text-color(#fff);
+
// Theme template ------------------------------
@import "../template/theme";
diff --git a/css/theme/source/simple.scss b/css/theme/source/simple.scss
index 394c9cd..faf245f 100644
--- a/css/theme/source/simple.scss
+++ b/css/theme/source/simple.scss
@@ -31,11 +31,8 @@ $linkColor: #00008B;
$linkColorHover: lighten( $linkColor, 20% );
$selectionBackgroundColor: rgba(0, 0, 0, 0.99);
-section.has-dark-background {
- &, h1, h2, h3, h4, h5, h6 {
- color: #fff;
- }
-}
+// Change text colors against dark slide backgrounds
+@include dark-bg-text-color(#fff);
// Theme template ------------------------------
diff --git a/css/theme/source/sky.scss b/css/theme/source/sky.scss
index 3fee67c..c83b9c0 100644
--- a/css/theme/source/sky.scss
+++ b/css/theme/source/sky.scss
@@ -39,6 +39,9 @@ $selectionBackgroundColor: #134674;
@include radial-gradient( #add9e4, #f7fbfc );
}
+// Change text colors against dark slide backgrounds
+@include dark-bg-text-color(#fff);
+
// Theme template ------------------------------
diff --git a/css/theme/source/white.scss b/css/theme/source/white.scss
index 7b817fe..20e8f7e 100644
--- a/css/theme/source/white.scss
+++ b/css/theme/source/white.scss
@@ -37,11 +37,8 @@ $heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;
-section.has-dark-background {
- &, h1, h2, h3, h4, h5, h6 {
- color: #fff;
- }
-}
+// Change text colors against dark slide backgrounds
+@include dark-bg-text-color(#fff);
// Theme template ------------------------------
diff --git a/css/theme/template/mixins.scss b/css/theme/template/mixins.scss
index e0c5606..17a3db5 100644
--- a/css/theme/template/mixins.scss
+++ b/css/theme/template/mixins.scss
@@ -26,4 +26,20 @@
background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
background: radial-gradient( center, $type cover, $inner 0%, $outer 100% );
+}
+
+@mixin light-bg-text-color( $color ) {
+ section.has-light-background {
+ &, h1, h2, h3, h4, h5, h6 {
+ color: $color;
+ }
+ }
+}
+
+@mixin dark-bg-text-color( $color ) {
+ section.has-dark-background {
+ &, h1, h2, h3, h4, h5, h6 {
+ color: $color;
+ }
+ }
} \ No newline at end of file
diff --git a/dist/theme/beige.css b/dist/theme/beige.css
index d3182ff..e728ef4 100644
--- a/dist/theme/beige.css
+++ b/dist/theme/beige.css
@@ -5,6 +5,9 @@
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
+section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
+ color: #fff; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/
diff --git a/dist/theme/blood.css b/dist/theme/blood.css
index 06f6f0e..0a9f5d4 100644
--- a/dist/theme/blood.css
+++ b/dist/theme/blood.css
@@ -10,6 +10,9 @@
*
*/
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic);
+section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
+ color: #222; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/
@@ -291,6 +294,9 @@
font-weight: 300;
text-shadow: 1px 1px #222; }
+section.has-light-background p, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4 {
+ text-shadow: none; }
+
.reveal h1,
.reveal h2,
.reveal h3,
diff --git a/dist/theme/league.css b/dist/theme/league.css
index 1d770eb..d2821e2 100644
--- a/dist/theme/league.css
+++ b/dist/theme/league.css
@@ -7,6 +7,9 @@
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
+section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
+ color: #222; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/
diff --git a/dist/theme/moon.css b/dist/theme/moon.css
index 137ab87..d799c99 100644
--- a/dist/theme/moon.css
+++ b/dist/theme/moon.css
@@ -11,6 +11,9 @@ html * {
color-profile: sRGB;
rendering-intent: auto; }
+section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
+ color: #222; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/
diff --git a/dist/theme/night.css b/dist/theme/night.css
index d61498d..3f011dd 100644
--- a/dist/theme/night.css
+++ b/dist/theme/night.css
@@ -5,6 +5,9 @@
*/
@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
+section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
+ color: #222; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/
diff --git a/dist/theme/serif.css b/dist/theme/serif.css
index 983a73c..e293916 100644
--- a/dist/theme/serif.css
+++ b/dist/theme/serif.css
@@ -7,6 +7,9 @@
.reveal a {
line-height: 1.3em; }
+section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
+ color: #fff; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/
diff --git a/dist/theme/sky.css b/dist/theme/sky.css
index 204bdf5..77ab8d5 100644
--- a/dist/theme/sky.css
+++ b/dist/theme/sky.css
@@ -8,6 +8,9 @@
.reveal a {
line-height: 1.3em; }
+section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
+ color: #fff; }
+
/*********************************************
* GLOBAL STYLES
*********************************************/