diff --git a/demo/demos.css b/demo/demos.css index ad2d461..3ab8aa2 100644 --- a/demo/demos.css +++ b/demo/demos.css @@ -1,9 +1,12 @@ responsive-video-background { margin-top: 1rem; - --overlay-background: hsla(0, 0, 0, 0.3); + padding: 1rem; + color: white; + text-shadow: .1em .1em .5em black; } -.demo > div { +.grid { + display: block; padding: 1rem; display: grid; @@ -13,31 +16,35 @@ responsive-video-background { } -.demo h1 { +.grid h1 { grid-column: 1 / span 3; grid-row: 2 / span 1; align-self: center; justify-self: center; - font-family: system, sans-serif; - color: white; - text-shadow: 1px 1px 5px black; } +.demo1 { + width: 100%; + --overlay-color: hsla(0, 0%, 0%, 0.3); +} .demo1 > div { height: 20rem; } .demo2 { width: clamp(20rem, 50rem - 30vw, 100%); + --overlay-color: hsla(180, 50%, 50%, 0.5); +} +.demo2 > div { height: 20rem; margin-left: auto; margin-right: auto; - --overlay-background: hsla(180, 50%, 50%, 0.3); } .demo3 { - --overlay-background: hsla(60, 70%, 80%, 0.7); + --overlay-color: hsla(60, 70%, 80%, 0.7); + width: 100%; } .demo3 > div { height: 150px; @@ -47,6 +54,10 @@ responsive-video-background { text-shadow: 3px 3px 10px hsla(60, 70%, 30%, 0.8); } +.demo4 { + width: 100%; + --overlay-color: hsla(180, 70%, 80%, 0.5); +} .demo4 > div { height: 600px; } @@ -60,6 +71,10 @@ responsive-video-background { text-shadow: 0 0 5px white; } +.demo5 { + width: 100%; + --overlay-color: hsla(240, 70%, 80%, 0.5); +} .demo5 > div { aspect-ratio: 4/1; } \ No newline at end of file diff --git a/demo/page.css b/demo/page.css index 791420b..7b6e679 100644 --- a/demo/page.css +++ b/demo/page.css @@ -15,16 +15,20 @@ body { font-family: 'Roboto', sans-serif; line-height: 1.5; color: #333; - background-color: #fff; + background-color: #eee; + padding: 1rem; } .page { max-width: 90rem; margin: 0 auto; + padding: 1rem; + border-radius: .5rem; + background-color: #fff; } .github { - float: right; + text-align: center; font-size: 1.1em; } .github a { @@ -36,9 +40,13 @@ body { background-color: #f5f5f5; color: #333; border: 1px solid currentColor; - border-radius: .25em; + border-radius: 5px; } .github svg { vertical-align: middle; fill: currentColor; } + +dt { + font-weight: bold; +} \ No newline at end of file diff --git a/index.html b/index.html index 863c061..2d34729 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,8 @@
<responsive-video-background>
Web ComponentA Web Component that helps using a video as the background of a content block.
+The video usage can be restricted to large viewports, with an image fallback on thinner ones.
View on github
@@ -19,25 +21,29 @@ <responsive-video-background>
Web Component
A Web Component helping using a video as the background of a content block.
-The video can be limited to large viewports, with an image fallback on thinner ones.
+A paragraph of text
+A second paragraph of text
Components configuration is done with attributes:
@@ -59,7 +65,7 @@ Syntax
</responsive-video-background>
-Look here!