This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(subheader): add non-sticky subheader component
- Loading branch information
1 parent
2b308d8
commit 8aade08
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
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
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,47 @@ | ||
@import "../../core/style/variables"; | ||
@import "../../core/style/mixins"; | ||
@import "../../core/style/default-theme"; | ||
|
||
$subheader-line-height: 1em !default; | ||
$subheader-font-size: rem(1.4) !default; | ||
$subheader-padding: ($baseline-grid * 2) !default; | ||
$subheader-font-weight: 500 !default; | ||
$subheader-margin: 0 0 0 0 !default; | ||
$subheader-sticky-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.16) !default; | ||
|
||
.md-subheader { | ||
display: block; | ||
font-size: $subheader-font-size; | ||
font-weight: $subheader-font-weight; | ||
line-height: $subheader-line-height; | ||
margin: $subheader-margin; | ||
position: relative; | ||
|
||
.md-subheader-inner { | ||
display: block; | ||
padding: $subheader-padding; | ||
} | ||
|
||
.md-subheader-content { | ||
display: block; | ||
z-index: 1; | ||
position: relative; | ||
} | ||
} | ||
|
||
// Theme | ||
|
||
.md-subheader { | ||
color: md-color($md-foreground, secondary-text, 0.23); //'{{ foreground-2-0.23 }}'; | ||
background-color: md-color($md-background,A100); //'{{background-color}}'; | ||
|
||
&.md-primary { | ||
color: md-color($md-primary); //'{{primary-color}}' | ||
} | ||
&.md-accent { | ||
color: md-color($md-accent); //'{{accent-color}}' | ||
} | ||
&.md-warn { | ||
color: md-color($md-warn); //'{{warn-color}}' | ||
} | ||
} |
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,16 @@ | ||
import {Component, View} from "angular2/core"; | ||
|
||
@Component({ | ||
selector: 'md-subheader', | ||
host: { | ||
'class': 'md-subheader' | ||
} | ||
}) | ||
@View({ | ||
template:` | ||
<div class="md-subheader-inner"> | ||
<span class="md-subheader-content"><ng-content></ng-content></span> | ||
</div>` | ||
}) | ||
export class MdSubheader { | ||
} |
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,6 @@ | ||
import {componentSanityCheck} from "../../util"; | ||
|
||
export function main() { | ||
componentSanityCheck('Subheader', 'md-subheader', '<md-subheader></md-subheader>'); | ||
} | ||
|