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

feat(browser-color): enable browser header coloring #9192

Merged
merged 1 commit into from
Aug 23, 2016

Conversation

EladBezalel
Copy link
Member

  • provides an easy way to set and change the browser color according the material design spec colors and the defined themes

fixes #8062

@EladBezalel EladBezalel added the needs: review This PR is waiting on review from the team label Jul 30, 2016
* @param {Object} options Options object for the browser color
* @returns {Function} remove function of the browser color
*/
var enableBrowserColor = function (options){
Copy link
Member

@devversion devversion Jul 31, 2016

Choose a reason for hiding this comment

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

Nit: Missing space here at brace

@devversion
Copy link
Member

@ThomasBurleson That looks very good. LGTM.

@ErinCoughlan
Copy link
Contributor

@EladBezalel tests?

@EladBezalel
Copy link
Member Author

@ErinCoughlan done

@ThomasBurleson ThomasBurleson added this to the 1.1.1 milestone Aug 1, 2016
*
* @description
*
* A provider and a service that simplifies meta tags access
Copy link
Contributor

Choose a reason for hiding this comment

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

Might make a note that certain <meta> tags (such as charset, http-equiv="Content-Type", and I think name="viewport") cannot be added dynamically because the browser will have already decided how to render (and probably rendered) the page by the time they get added.

I could not find a complete list of the ones that were editable, but this caught me the other day so it's probably not very obvious to most devs :-)

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

@topherfangio
Copy link
Contributor

Left a few comments for consideration, but looks pretty great to me!

@@ -242,6 +270,53 @@ function ThemingProvider($mdColorPalette) {

// Default theme defined in core.js

/**
*
Copy link
Member Author

Choose a reason for hiding this comment

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

Forgot documentation

@EladBezalel EladBezalel force-pushed the feat/browser-color branch 3 times, most recently from 8583337 to 7c236da Compare August 1, 2016 20:40
expect($$mdMeta.getMeta(name)).toBe(content);
});
});
});
Copy link
Contributor

@ErinCoughlan ErinCoughlan Aug 2, 2016

Choose a reason for hiding this comment

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

missing new line

@clshortfuse
Copy link
Contributor

How do you feel about a directive based around a class or attribute, that when added to an element, takes it's background color or md-primary,md-warn,md-accent reference and applies that color to the browser color.

For example <md-toolbar class="browser-color" md-colors="{background: ctrl.currentNavColor}"> </mdtoolbar>

This is what I use to achieve a similar toolbar affect in Angular Material as done in https://inbox.google.com/

@topherfangio
Copy link
Contributor

@clshortfuse I think providing the service is enough. Developers should be able to figure out what color/hue the toolbar will use and match that relatively easily.

@topherfangio
Copy link
Contributor

@ThomasBurleson LGTM 👍

@EladBezalel EladBezalel added pr: merge ready This PR is ready for a caretaker to review and removed needs: review This PR is waiting on review from the team labels Aug 14, 2016
- provides an easy way to set and change the browser color according the material design spec colors and the defined themes

fixes #8062
@jelbourn jelbourn merged commit 57f2afd into master Aug 23, 2016
@EladBezalel EladBezalel deleted the feat/browser-color branch August 25, 2016 22:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

meta "theme-color" relative to toolbar theme
7 participants