Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #730 - Content Sectioning - header #789

Merged
merged 6 commits into from Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions live-examples/html-examples/content-sectioning/css/header.css
@@ -0,0 +1,29 @@
header.page-header {
background: no-repeat left/cover url(/media/examples/puppy-header-logo.jpg);
display: flex;
height: 120px;
min-width: 120px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this line at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do. Without it, the text escapes the header box at very narrow widths.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What very narrow width? At about 180px, it looks the same with or without this line, and I don't think it is expected to work at narrower widths than this (at this point you are getting 1-2 words per line, so it isn't very usable anyway).

align-items: center;
color: #fff;
text-shadow: #000 0 0 0.2em;
}

header.page-header > h1 {
font: bold calc(1em + 2 * (100vw - 120px) / 100) 'Dancing Script', cursive, fantasy;
margin: 2%;
}

main {
font: 1rem 'Fira Sans', sans-serif;
}

@font-face {
font-family: 'Dancing Script';
src: url(/media/examples/DancingScript-Regular.ttf);
}

@font-face {
font-family: 'Fira Sans';
src: local('FiraSans-Regular'),
url(/media/fonts/FiraSans-Regular.woff2);
}
11 changes: 11 additions & 0 deletions live-examples/html-examples/content-sectioning/header.html
@@ -0,0 +1,11 @@
<header class="page-header">
<h1>Cute Puppies Express!</h1>
</header>

<main>
<p>I love Beagles <strong>so</strong> much! Like really, a lot.
They're adorable and their ears are so, so snuggly soft!</p>
<p>Photo licensed by Wikimedia Commons under the
<a href="https://creativecommons.org/licenses/by-sa/3.0/deed.en">
CC-ShareAlike 3.0 Unported license</a></p>
</main>
8 changes: 8 additions & 0 deletions live-examples/html-examples/content-sectioning/meta.json
Expand Up @@ -23,6 +23,14 @@
"fileName": "aside.html",
"title": "HTML Demo: &lt;aside&gt;",
"type": "tabbed"
},
"header": {
"baseTmpl": "tmpl/live-tabbed-tmpl.html",
"exampleCode": "live-examples/html-examples/content-sectioning/header.html",
"cssExampleSrc": "live-examples/html-examples/content-sectioning/css/header.css",
"fileName": "header.html",
"title": "HTML Demo: <header>",
"type": "tabbed"
}
}
}
Binary file added media/examples/DancingScript-Regular.ttf
Binary file not shown.
Binary file added media/examples/puppy-header-logo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.