Skip to content

Commit 042fbde

Browse files
committed
data-background-content-opacity -> data-background-opacity
1 parent 4ba0d73 commit 042fbde

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ By default, background images are resized to cover the full page. Available opti
630630
| data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. |
631631
| data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. |
632632
| data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. |
633-
| data-background-content-opacity | 1 | Opacity of the background image on a 0-1 scale. 0 is transparent and 1 is fully opaque. |
633+
| data-background-opacity | 1 | Opacity of the background image on a 0-1 scale. 0 is transparent and 1 is fully opaque. |
634634
```html
635635
<section data-background-image="http://example.com/image.png">
636636
<h2>Image</h2>
@@ -649,7 +649,7 @@ Automatically plays a full size video behind the slide.
649649
| data-background-video-loop | false | Flags if the video should play repeatedly. |
650650
| data-background-video-muted | false | Flags if the audio should be muted. |
651651
| data-background-size | cover | Use `cover` for full screen and some cropping or `contain` for letterboxing. |
652-
| data-background-content-opacity | 1 | Opacity of the background video on a 0-1 scale. 0 is transparent and 1 is fully opaque. |
652+
| data-background-opacity | 1 | Opacity of the background video on a 0-1 scale. 0 is transparent and 1 is fully opaque. |
653653

654654
```html
655655
<section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-video-loop data-background-video-muted>

js/reveal.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@
934934
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
935935
backgroundPosition: slide.getAttribute( 'data-background-position' ),
936936
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
937-
backgroundContentOpacity: slide.getAttribute( 'data-background-content-opacity' )
937+
backgroundOpacity: slide.getAttribute( 'data-background-opacity' )
938938
};
939939

940940
// Main slide background element
@@ -968,7 +968,7 @@
968968
data.backgroundRepeat +
969969
data.backgroundPosition +
970970
data.backgroundTransition +
971-
data.backgroundContentOpacity );
971+
data.backgroundOpacity );
972972
}
973973

974974
// Additional and optional background properties
@@ -980,7 +980,7 @@
980980
if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;
981981
if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat;
982982
if( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition;
983-
if( data.backgroundContentOpacity ) contentElement.style.opacity = data.backgroundContentOpacity;
983+
if( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity;
984984

985985
element.appendChild( contentElement );
986986
container.appendChild( element );

0 commit comments

Comments
 (0)