Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

wip styles for homepage, API banner, toggle menu and text styles #35

Merged
merged 2 commits into from
Dec 21, 2016

Conversation

amitafr
Copy link
Contributor

@amitafr amitafr commented Dec 21, 2016

@jelbourn WIP

Need guidance on styles where !important is used (overwriting inherit md component styles like width on toggle navigation)

color: md-color($foreground, secondary-text);

.docs-component-viewer-tabbed-content {
h1, h4 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you can add classes to these instead of targeting tag names? My concern with applying it to tag names is that these styles will affect things inside the code examples


td {
font-weight: 400;
padding: 0 32px !important;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nothing seems to change if i remove the !important here

margin-bottom: 30px;
}

.md-tab-label {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make this a sub-ruleset of .md-tab-header, and make .md-tab-header a sub-ruleset of .docs-component-viewer-tabbed-content. This will increase the specificity enough that you can remove the !importants.

background: rgba(md-color($foreground, secondary-text), .03);
}

h3, h2, h5, p, ol, li{
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you target classes rather than tag names, here and elsewhere. my concern with targeting tag names is that the styles may affect the code examples (if these are elements generated by djnei, jeremy can add classes for you)

}

md-sidenav-layout {
background-color: white !important;
Copy link
Collaborator

Choose a reason for hiding this comment

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

it looks like you can just remove the !important and it doesn't affect anything. but don't target all md-sidenav-layouts, move it inside the .docs-component-viewer-tabbed-content ruleset or add a class and target that

@@ -1,3 +1,9 @@
@import '../../../main';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Main.scss imports quite a lot from material and adding an import of main here will duplicate what it brings in which is quite substantial. I believe you can safely remove this line anyways since you are not using any of the variables or mixins it declares

@amitafr amitafr force-pushed the API-styles branch 3 times, most recently from a4c3d08 to a2bc75f Compare December 21, 2016 23:20
@jelbourn jelbourn merged commit 45dcaf5 into angular:master Dec 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants