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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7d7910a
Issue #730 - Content Sectioning - header
e3bab45
Address review concerns
bd7c65d
Changed tabs to spaces in header.css. Not sure how
760b1e0
Use a flexbox layout and calc() with vw units to set
4180749
Replaced a stray tab with two spaces, and switched to
82ae5a8
Forgot to un-escape `<header>` in the meta.json file.
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
live-examples/html-examples/content-sectioning/css/header.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
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
11
live-examples/html-examples/content-sectioning/header.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).