-
Notifications
You must be signed in to change notification settings - Fork 400
Add header + fix spec #322
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,23 +8,36 @@ $secondary-text-color: #6a6a6a; | |
overflow: hidden; | ||
|
||
.theme-image { | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
.install-button { | ||
margin: 0 20px 0 30px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will need an RTL override as well but I can't think of a way of doing this in flex. I'm not crazy about the padding on this block, nothing is consistent.
|
||
} | ||
|
||
.content { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: row; | ||
line-height: 1.5; | ||
padding: 20px; | ||
|
||
.logo { | ||
height: 64px; | ||
width: 64px; | ||
align-items: center; | ||
align-self: stretch; | ||
background: #fcfcfc; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This background isn't covering the full height of the block. I think the parent needs to .content {
align-items: stretch;
// Maybe even `.content > *` instead.
.install-button,
.logo {
display: flex;
align-items: center;
}
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah good catch - the terrible contrast makes this background almost invisible to me. Using |
||
display: flex; | ||
padding: 0 15px; | ||
|
||
img { | ||
display: block; | ||
height: 64px; | ||
width: 64px; | ||
} | ||
} | ||
|
||
.copy { | ||
padding: 0 20px; | ||
padding: 30px 20px; | ||
flex-grow: 1; | ||
|
||
.heading { | ||
|
@@ -46,16 +59,14 @@ $secondary-text-color: #6a6a6a; | |
margin: 0.5em 0; | ||
} | ||
|
||
// Remove the left-padding if the copy block | ||
// is the first-child of its parent (e.g. a theme) | ||
&:first-child { | ||
padding-left: 0; | ||
} | ||
|
||
// Remove the bottom margin of the last element. | ||
& :last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} | ||
|
||
&.theme .content .copy { | ||
padding: 20px; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@import "~normalize.css"; | ||
@import "~core/css/inc/lib"; | ||
|
||
$page-background: #d4d4d4; | ||
$page-background: #f5f5f5; | ||
|
||
html, | ||
body { | ||
|
@@ -10,6 +10,7 @@ body { | |
"Segoe UI", "Roboto", "Oxygen", | ||
"Ubuntu", "Cantarell", "Fira Sans", | ||
"Droid Sans", "Helvetica Neue", sans-serif; | ||
font-size: 14px; | ||
} | ||
|
||
* { | ||
|
@@ -21,7 +22,57 @@ img { | |
} | ||
|
||
.disco-pane { | ||
padding: 50px; | ||
box-sizing: content-box; | ||
padding: 50px 20px; | ||
margin: 0 auto; | ||
max-width: 680px; | ||
} | ||
|
||
header { | ||
display: flex; | ||
border-bottom: 2px solid #ddd; | ||
flex-direction: row; | ||
margin-bottom: 40px; | ||
padding-bottom: 40px; | ||
|
||
.content { | ||
flex-grow: 1; | ||
} | ||
|
||
h1 { | ||
display: block; | ||
letter-spacing: 0.11ex; | ||
line-height: 1.5; | ||
font-size: 22px; | ||
font-weight: 400; | ||
margin: 0 0 20px; | ||
} | ||
|
||
p:last-child { | ||
display: block; | ||
margin-bottom: 0; | ||
} | ||
|
||
.play-video { | ||
background: #ccc; | ||
border-radius: 5px; | ||
display: block; | ||
flex-grow: 0; | ||
margin-left: 50px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to need an alternate rule for RTL. If you express this in flex it will work though. The spec defines a bunch of specific values for these sizes so I think it would be nice to set those in variables and then let flex lay it out correctly. $blockWidth: 680px;
header {
$videoWidth: 215px;
$videoHeight: 120px;
$spaceBetween: 50px;
display: flex;
justify-content: space-between;
width: $blockWidth;
.content {
width: $blockWidth - $videoWidth - $spaceBetween;
}
.play-video {
display: block;
height: $videoHeight;
width: $videoWidth;
}
} |
||
min-height: 120px; | ||
min-width: 215px; | ||
|
||
&:hover { | ||
color: #fff; | ||
background: #666; | ||
} | ||
|
||
p { | ||
align-items: center; | ||
display: flex; | ||
height: 100%; | ||
justify-content: center; | ||
margin-top: 0; | ||
} | ||
} | ||
} |
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.
These new lines seem slightly concerning of translating. changing the indent could result in the string changing but maybe that isn't worth worrying about until we pick an extraction library.
Uh oh!
There was an error while loading. Please reload this page.
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 was thinking of stripping the leading indentation but then I'm not sure if extraction will see that. I think it best to cross that bridge when we do the extraction.