-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Text color not visible in md-raised-button within md-toolbar #4614
Comments
@tinayuangao I looked at this issue and this is because of the The |
I experienced the same issue, I'll just workaround it, but a fix would be highly appreciated. |
Bump, any idea except for custom css? |
you can use md-colors |
Right now, the font-color for buttons with a background color (raised, fab, mini-fab) with the default `color` palette is not set properly. This is because the `currentColor` CSS property overwrites the font color from the theme for those buttons. To fix the issue, the `currentColor` can be only used on buttons without a background color (normal and icon-buttons). While being at it, using `inherited` as value is more readable and results in the same behavior. Fixes angular#4614
Right now, the font-color for buttons with a background color (raised, fab, mini-fab) with the default `color` palette is not set properly. This is because the `currentColor` CSS property overwrites the font color from the theme for those buttons. To fix the issue, the `currentColor` can be only used on buttons without a background color (normal and icon-buttons). While being at it, using `inherited` as value is more readable and results in the same behavior. Fixes angular#4614
Right now, the font-color for buttons with a background color (raised, fab, mini-fab) with the default `color` palette is not set properly. This is because the `currentColor` CSS property overwrites the font color from the theme for those buttons. To fix the issue, the `currentColor` can be only used on buttons without a background color (normal and icon-buttons). While being at it, using `inherited` as value is more readable and results in the same behavior. Fixes angular#4614.
* Currently for flat buttons and icon buttons, the font color is not set by the theme. This can cause the text to be invisible on those buttons in a dark theme. From now on, those buttons will also receive a font color by the theme. * Flat buttons and icon buttons inside of a `<mat-toolbar>` will inherit the font color from the toolbar row. This ensures that those buttons are looking as expected in themed toolbars (e.g. primary, accent, warn) Fixes angular#4614. Fixes angular#9231. Fixes angular#9634
* Currently for normal buttons, stroked buttons and icon buttons, the font color is not set by the theme. This can cause the text to be invisible on those buttons in a dark theme. From now on, those buttons will also receive a font color by the theme. * Normal buttons, stroked buttons and icon buttons inside of a `<mat-toolbar>` will inherit the font color from the toolbar row. This ensures that those buttons are looking as expected in themed toolbars (e.g. primary, accent, warn) * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it Fixes angular#4614. Fixes angular#9231. Fixes angular#9634
* Currently for normal buttons, stroked buttons and icon buttons, the font color is not set by the theme. This can cause the text to be invisible on those buttons in a dark theme. From now on, those buttons will also receive a font color by the theme. * Normal buttons, stroked buttons and icon buttons inside of a `<mat-toolbar>` will inherit the font color from the toolbar row. This ensures that those buttons are looking as expected in themed toolbars (e.g. primary, accent, warn) * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it Fixes angular#4614. Fixes angular#9231. Fixes angular#9634
* Currently for normal buttons, stroked buttons and icon buttons, the font color is not set by the theme. This can cause the text to be invisible on those buttons in a dark theme. From now on, those buttons will also receive a font color by the theme. * Normal buttons, stroked buttons and icon buttons inside of a `<mat-toolbar>` will inherit the font color from the toolbar row. This ensures that those buttons are looking as expected in themed toolbars (e.g. primary, accent, warn) * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it Fixes angular#4614. Fixes angular#9231. Fixes angular#9634
* Currently buttons with a background color (e.g. flat buttons, raised buttons, fabs) receive a font color by the theme. This font color is accidentally being overwritten by the normal button CSS that sets the `color` for every button to `inherit`. This can cause the text to be invisible in a dark theme. From now on, those buttons will no longer inherit the font color accidentally. * Normal buttons, stroked buttons and icon buttons will still inherit the font color, because it's wrong to assume that those buttons are always placed inside of containers with the default background color. Otherwise those buttons would be invisible in some containers with a different background color (e.g. in a themed toolbar). * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it. Fixes angular#4614. Fixes angular#9231. Fixes angular#9634
* Currently buttons with a background color (e.g. flat buttons, raised buttons, fabs) receive a font color by the theme. This font color is accidentally being overwritten by the normal button CSS that sets the `color` for every button to `inherit`. This can cause the text to be invisible in a dark theme. From now on, those buttons will no longer inherit the font color accidentally. * Normal buttons, stroked buttons and icon buttons will still inherit the font color, because it's wrong to assume that those buttons are always placed inside of containers with the default background color. Otherwise those buttons would be invisible in some containers with a different background color (e.g. in a themed toolbar). * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it. Fixes angular#4614. Fixes angular#9231. Fixes angular#9634
* Currently buttons with a background color (e.g. flat buttons, raised buttons, fabs) receive a font color by the theme. This font color is accidentally being overwritten by the normal button CSS that sets the `color` for every button to `inherit`. This can cause the text to be invisible in a dark theme. From now on, those buttons will no longer inherit the font color accidentally. * Normal buttons, stroked buttons and icon buttons will still inherit the font color, because it's wrong to assume that those buttons are always placed inside of containers with the default background color. Otherwise those buttons would be invisible in some containers with a different background color (e.g. in a themed toolbar). * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it. Fixes #4614. Fixes #9231. Fixes #9634
* Currently buttons with a background color (e.g. flat buttons, raised buttons, fabs) receive a font color by the theme. This font color is accidentally being overwritten by the normal button CSS that sets the `color` for every button to `inherit`. This can cause the text to be invisible in a dark theme. From now on, those buttons will no longer inherit the font color accidentally. * Normal buttons, stroked buttons and icon buttons will still inherit the font color, because it's wrong to assume that those buttons are always placed inside of containers with the default background color. Otherwise those buttons would be invisible in some containers with a different background color (e.g. in a themed toolbar). * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it. Fixes #4614. Fixes #9231. Fixes #9634
* Currently buttons with a background color (e.g. flat buttons, raised buttons, fabs) receive a font color by the theme. This font color is accidentally being overwritten by the normal button CSS that sets the `color` for every button to `inherit`. This can cause the text to be invisible in a dark theme. From now on, those buttons will no longer inherit the font color accidentally. * Normal buttons, stroked buttons and icon buttons will still inherit the font color, because it's wrong to assume that those buttons are always placed inside of containers with the default background color. Otherwise those buttons would be invisible in some containers with a different background color (e.g. in a themed toolbar). * Removes the SSR check for `hasHostAttributes`. This method is essential for the color of the buttons, and needs to run inside of SSR. (now possible with Domino anyway) * Cleans up the button theme while being at it. Fixes #4614. Fixes #9231. Fixes #9634
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
The .mat-toolbar.mat-primary style (for example) sets the text color to white. When adding an md-raised-button (no color) to the toolbar, the button text is invisible.
What is the expected behavior?
Visible text in the raised buttons.
What is the current behavior?
Invisible text in the raised buttons.
What are the steps to reproduce?
Create a md-toolbar with primary color background (default). Then, add a md-raised-button without [color] into it with containing some text. The text will not show up.
Plunker example
What is the use-case or motivation for changing an existing behavior?
The raised buttons should work even if embedded within a toolbar. They do not work unless a specific color (warn, primary, accent) is set.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 2, Angular Material 2 beta 5, Typescript (N/A), Browser (N/A)
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: