Skip to content

docs(theming): add initial guide for theming. #1246

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

Merged
merged 3 commits into from
Sep 15, 2016

Conversation

jelbourn
Copy link
Member

R: @kara

For merging after #1239

@jelbourn jelbourn added pr: needs review docs This issue is related to documentation labels Sep 15, 2016
@googlebot googlebot added cla: yes PR author has agreed to Google's Contributor License Agreement labels Sep 15, 2016
a theme consists of:
* A primary palette: colors most widely used across all screens and components.
* An accent palette: colors used for the floating action button and interactive elements.
* A "warn" palette: colors used to convey error state.
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious - why is this the only one with quotes?

Copy link
Member Author

@jelbourn jelbourn Sep 15, 2016

Choose a reason for hiding this comment

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

"Primary palette" and "accent palette" both sounded natural, while "warn palette" seemed weird. Removed.

add a new entry to the `"styles"` list in `angular-cli.json` pointing to the theme
file (e.g., `unicorn-app-theme.scss`).

If you're not using the Angular CLI, you can use any existing sass tooling to build the file (such
Copy link
Contributor

Choose a reason for hiding this comment

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

sass -> Sass (for consistency)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

```

### Future work
* When the "all" package is release, there will be a mixin that captures all of the component's
Copy link
Contributor

Choose a reason for hiding this comment

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

release -> released

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

<link href="node_modules/@angular2-material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
```

You can also concatenate the file with the rest of your application's css.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be handy to have a list of the existing pre-built themes here as bullet points.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add that once we have a full complement of prebuilts (only three right now)

@jelbourn jelbourn merged commit 379a57f into angular:master Sep 15, 2016
@jimitndiaye
Copy link
Contributor

Just gotta say, looking at this PR - this is awesome! Really like the use of mixins for encapsulating the theming logic. Will be poaching those ideas for other projects, @jelbourn .
Theming was my stumbling block for integrating material2 so anxiously waiting for this to be released in the next alpha. Well done!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement docs This issue is related to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants