Comments (6)
We changed define-theme
to always derive the secondary palette from the secondary palette. This is because the M3 spec itself seems to assume that the secondary color is basically a more muted version of primary (but same general hue). If we just allow people to combine an arbitrary primary and secondary hue, I think it would result in some of the components not looking great.
The current state of things is that:
- The M2 concept of "primary" roughly maps to M3's "primary" or sometimes "secondary"
- The M2 concept of "accent" roughly maps to M3's "tertiary"
- The M2 concept of "warn" roughly maps to M3's "error"
And in fact we have a back-compat mixin that can be included to actually apply those mapping to the .mat-{primary/accent/warn}
classes. (Though in general I would suggest people use the new @include mat.xxx-color($theme, $color-variant: primary/secondary/tertiary/error)
API in M3 as it doesn't generate as much boilerplate CSS as the predefined classes
from components.
cc @mmalerba
from components.
I can second that - not that I am too familar with the experimental code, but also happens on define-colors:
Edit - I cannot test any other functionalities using a non-demo app because even the built-in themes will not work when using material-experimental for the same reason.
from components.
@SeraphCoding for just testing purposes I made it work with workaround. I have manually replaced commit version in package-lock.json.
In node_modules/@angular/material-experimental > resolved you can change the value to git+ssh://[email protected]/angular/material-experimental-builds.git#bed96e28e7a35fc5a9357b738497dfd51907f76d .
This is older build that was used in provided demo.
from components.
@SeraphCoding for just testing purposes I made it work with workaround. I have manually replaced commit version in package-lock.json.
In node_modules/@angular/material-experimental > resolved you can change the value to git+ssh://[email protected]/angular/material-experimental-builds.git#bed96e28e7a35fc5a9357b738497dfd51907f76d .
This is older build that was used in provided demo.
Yeah it's resolved in the latest commit. I just grabbed the latest build to avoid the issue.
from components.
@mmalerba Is the new api intended so that we apply the css globally for each of the colors we need per component?
Just want some direction on that area to plan accordingly to migrate our project.
For example if we need mat-icon in accent and error colors, the way forward is to create a selector per each of the colors in the global css? Also is the color options in the material components not recommended for future use?
@use '@angular/material' as mat;
@use '@angular/material-experimental' as matx;
$theme: matx.define-theme();
.primary-icon {
@include mat.icon-color($theme, $color-variant: primary);
}
.error-icon {
@include mat.icon-color($theme, $color-variant: error);
}
from components.
Related Issues (20)
- bug(expansion panel): toggle does not have a border-color set explicitly. HOT 6
- feat(material/slider): Support for multi word thumb label text HOT 1
- bug(button): Icon Button Focusing Inconsistent HOT 2
- bug(snackbar): Snackbar appears twice when loading on app start
- m3 Issue with Dialog Width Property HOT 1
- m3 Issue with Form Labels Disappearing when Setting Density to less than -2 HOT 1
- feat(cdk/drag-drop): X and Y as percentage values instead of px HOT 2
- bug(google-maps/advanced-marker-elements): setting mapId doesn't work HOT 2
- bug(google-maps/advanced-marker-elements): advanced markers get stuck even when removed HOT 1
- bug(COMPONENT): programmatically focused link gets focused, but the style doesn't apply HOT 1
- docs-bug(theming): Change components theming guide to encourage css custom properties HOT 3
- bug(DateAdapter): Date comparison is only checking partial info HOT 1
- bug(CdkDrag, CdkDragHandle): CdkDragHandle doesn't work when CdkDrag is set to host element
- bug(COMPONENT): When using mat-icon inside the button, it always come before the text HOT 1
- bug(Datepicker): Accessibility issue with Microsoft Narrator HOT 1
- bug(experimental): missing box-shadow css rule on elevated containers with material 3 theme
- bug(youtube-player): Ready event is never emitted HOT 8
- bug(CdkStepper): form less linear CdkStepper.next() doesn't switch to next step HOT 1
- bug(theme): promlem with css var calculation HOT 3
- bug(matAutocomplete): Unable to set width with respect to parent component HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from components.