Kaynağa Gözat

is-light-background -> has-light-background, doesn't apply to background itself

Hakim El Hattab 10 yıl önce
ebeveyn
işleme
2479883d3c
2 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 1 2
      js/reveal.js
  2. 2 1
      test/examples/slide-backgrounds.html

+ 1 - 2
js/reveal.js

@@ -720,8 +720,7 @@
 		// signals if it is light
 		var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor;
 		if( computedBackgroundColor && colorBrightness( computedBackgroundColor ) > 128 ) {
-			slide.classList.add( 'is-background-light' );
-			element.classList.add( 'is-background-light' );
+			slide.classList.add( 'has-light-background' );
 		}
 
 		return element;

+ 2 - 1
test/examples/slide-backgrounds.html

@@ -15,7 +15,8 @@
 			.slides section h2 {
 				color: #fff;
 			}
-			.slides .is-background-light h2 {
+			.slides section.has-light-background,
+			.slides section.has-light-background h2 {
 				color: #222;
 			}
 		</style>