From 35355364442953d2a6947c5efe63b571a2ad7db2 Mon Sep 17 00:00:00 2001 From: Sven Kraus Date: Wed, 29 Jul 2020 13:31:29 +0200 Subject: [PATCH 1/2] use native CSS vars from exposer --- css/theme/template/exposer.scss | 1 + css/theme/template/theme.scss | 72 +++++++++++++++++---------------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/css/theme/template/exposer.scss b/css/theme/template/exposer.scss index 77a9ad1..1401a59 100644 --- a/css/theme/template/exposer.scss +++ b/css/theme/template/exposer.scss @@ -21,6 +21,7 @@ --heading4-size: #{$heading4Size}; --code-font: #{$codeFont}; --link-color: #{$linkColor}; + --link-color-dark: #{darken($linkColor , 15% )}; --link-color-hover: #{$linkColorHover}; --selection-background-color: #{$selectionBackgroundColor}; --selection-color: #{$selectionColor}; diff --git a/css/theme/template/theme.scss b/css/theme/template/theme.scss index c3e6474..4cc9595 100644 --- a/css/theme/template/theme.scss +++ b/css/theme/template/theme.scss @@ -8,25 +8,25 @@ .reveal-viewport { @include bodyBackground(); - background-color: $backgroundColor; + background-color: var(--background-color); } .reveal { - font-family: $mainFont; - font-size: $mainFontSize; + font-family: var(--main-font); + font-size: var(--main-font-size); font-weight: normal; - color: $mainColor; + color: var(--main-color); } .reveal ::selection { - color: $selectionColor; - background: $selectionBackgroundColor; + color: var(--selection-color); + background: var(--selection-background-color); text-shadow: none; } .reveal ::-moz-selection { - color: $selectionColor; - background: $selectionBackgroundColor; + color: var(--selection-color); + background: var(--selection-background-color); text-shadow: none; } @@ -46,27 +46,27 @@ .reveal h4, .reveal h5, .reveal h6 { - margin: $headingMargin; - color: $headingColor; + margin: var(--heading-margin); + color: var(--heading-color); - font-family: $headingFont; - font-weight: $headingFontWeight; - line-height: $headingLineHeight; - letter-spacing: $headingLetterSpacing; + 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: $headingTextTransform; - text-shadow: $headingTextShadow; + text-transform: var(--heading-text-transform); + text-shadow: var(--heading-text-shadow); word-wrap: break-word; } -.reveal h1 {font-size: $heading1Size; } -.reveal h2 {font-size: $heading2Size; } -.reveal h3 {font-size: $heading3Size; } -.reveal h4 {font-size: $heading4Size; } +.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: $heading1TextShadow; + text-shadow: var(--heading1-text-shadow); } @@ -75,7 +75,7 @@ *********************************************/ .reveal p { - margin: $blockMargin 0; + margin: var(--block-margin) 0; line-height: 1.3; } @@ -140,7 +140,7 @@ display: block; position: relative; width: 70%; - margin: $blockMargin auto; + margin: var(--block-margin) auto; padding: 5px; font-style: italic; @@ -160,11 +160,11 @@ display: block; position: relative; width: 90%; - margin: $blockMargin auto; + margin: var(--block-margin) auto; text-align: left; font-size: 0.55em; - font-family: $codeFont; + font-family: var(--code-font); line-height: 1.2em; word-wrap: break-word; @@ -173,7 +173,7 @@ } .reveal code { - font-family: $codeFont; + font-family: var(--code-font); text-transform: none; } @@ -238,7 +238,7 @@ } .reveal img { - margin: $blockMargin 0; + margin: var(--block-margin) 0; } @@ -247,19 +247,21 @@ *********************************************/ .reveal a { - color: $linkColor; + color: var(--link-color); text-decoration: none; transition: color .15s ease; } .reveal a:hover { - color: $linkColorHover; + color: var(--link-color-hover); text-shadow: none; border: none; } .reveal .roll span:after { color: #fff; - background: darken( $linkColor, 15% ); + // background: darken( var(--link-color), 15% ); + background: var(--link-color-dark); + } @@ -268,7 +270,7 @@ *********************************************/ .reveal .r-frame { - border: 4px solid $mainColor; + border: 4px solid var(--main-color); box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } @@ -277,7 +279,7 @@ } .reveal a:hover .r-frame { - border-color: $linkColor; + border-color: var(--link-color); box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } @@ -287,7 +289,7 @@ *********************************************/ .reveal .controls { - color: $linkColor; + color: var(--link-color); } @@ -297,7 +299,7 @@ .reveal .progress { background: rgba(0,0,0,0.2); - color: $linkColor; + color: var(--link-color); } /********************************************* @@ -305,6 +307,6 @@ *********************************************/ @media print { .backgrounds { - background-color: $backgroundColor; + background-color: var(--background-color); } } From 9aa6a029c3fe446a907d4c9843519edc1bb39f04 Mon Sep 17 00:00:00 2001 From: Sven Kraus Date: Wed, 29 Jul 2020 15:43:21 +0200 Subject: [PATCH 2/2] add newly built version to --- dist/reveal.esm.js | 2 +- dist/reveal.js | 2 +- dist/theme/beige.css | 71 ++++++++++++++++--------------- dist/theme/black.css | 71 ++++++++++++++++--------------- dist/theme/blood.css | 71 ++++++++++++++++--------------- dist/theme/league.css | 71 ++++++++++++++++--------------- dist/theme/moon.css | 71 ++++++++++++++++--------------- dist/theme/night.css | 71 ++++++++++++++++--------------- dist/theme/serif.css | 71 ++++++++++++++++--------------- dist/theme/simple.css | 71 ++++++++++++++++--------------- dist/theme/sky.css | 71 ++++++++++++++++--------------- dist/theme/solarized.css | 71 ++++++++++++++++--------------- dist/theme/white.css | 71 ++++++++++++++++--------------- plugin/highlight/highlight.esm.js | 4 +- plugin/highlight/highlight.js | 4 +- plugin/markdown/markdown.esm.js | 2 +- plugin/markdown/markdown.js | 2 +- plugin/math/math.js | 2 +- plugin/notes/notes.esm.js | 2 +- plugin/notes/notes.js | 2 +- plugin/search/search.js | 2 +- plugin/zoom/zoom.js | 4 +- 22 files changed, 410 insertions(+), 399 deletions(-) diff --git a/dist/reveal.esm.js b/dist/reveal.esm.js index 810a6c8..c3ff2dd 100644 --- a/dist/reveal.esm.js +++ b/dist/reveal.esm.js @@ -5,5 +5,5 @@ * * Copyright (C) 2020 Hakim El Hattab, https://hakim.se */ -var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var i,n=function(e){return e&&e.Math==Math&&e},a=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),s={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},r=function(e){try{return!!e()}catch(e){return!0}},o={}.toString,l=function(e){return o.call(e).slice(8,-1)},d="".split,c=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==l(e)?d.call(e,""):Object(e)}:Object,u=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return c(u(e))},g=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},p=a.document,f=v(p)&&v(p.createElement),m=function(e){return f?p.createElement(e):{}},b=!g&&!r((function(){return 7!=Object.defineProperty(m("div"),"a",{get:function(){return 7}}).a})),y=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},w=function(e,t){if(!v(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!v(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!v(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!v(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},R=Object.defineProperty,E={f:g?R:function(e,t,i){if(y(e),t=w(t,!0),y(i),b)try{return R(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},A=g?function(e,t,i){return E.f(e,t,S(1,i))}:function(e,t,i){return e[t]=i,e},k=function(e,t){try{A(a,e,t)}catch(i){a[e]=t}return t},L=a["__core-js_shared__"]||k("__core-js_shared__",{}),x=t((function(e){(e.exports=function(e,t){return L[e]||(L[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),C={}.hasOwnProperty,P=function(e,t){return C.call(e,t)},N=0,M=Math.random(),I=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++N+M).toString(36)},T=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())})),D=T&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,O=x("wks"),H=a.Symbol,B=D?H:H&&H.withoutSetter||I,U=function(e){return P(O,e)||(T&&P(H,e)?O[e]=H[e]:O[e]=B("Symbol."+e)),O[e]},j=Math.ceil,z=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?z:j)(e)},F=Math.min,_=function(e){return e>0?F(q(e),9007199254740991):0},W=Math.max,V=Math.min,K=function(e){return function(t,i,n){var a,s=h(t),r=_(s.length),o=function(e,t){var i=q(e);return i<0?W(i+t,0):V(i,t)}(n,r);if(e&&i!=i){for(;r>o;)if((a=s[o++])!=a)return!0}else for(;r>o;o++)if((e||o in s)&&s[o]===i)return e||o||0;return!e&&-1}},X={includes:K(!0),indexOf:K(!1)},$={},Y=X.indexOf,G=function(e,t){var i,n=h(e),a=0,s=[];for(i in n)!P($,i)&&P(n,i)&&s.push(i);for(;t.length>a;)P(n,i=t[a++])&&(~Y(s,i)||s.push(i));return s},J=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Q=Object.keys||function(e){return G(e,J)},Z=g?Object.defineProperties:function(e,t){y(e);for(var i,n=Q(t),a=n.length,s=0;a>s;)E.f(e,i=n[s++],t[i]);return e},ee=a,te=function(e){return"function"==typeof e?e:void 0},ie=function(e,t){return arguments.length<2?te(ee[e])||te(a[e]):ee[e]&&ee[e][t]||a[e]&&a[e][t]},ne=ie("document","documentElement"),ae=x("keys"),se=function(e){return ae[e]||(ae[e]=I(e))},re=se("IE_PROTO"),oe=function(){},le=function(e){return"