-
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
feat(compatibility): remove conflicts with material1 css styling #2790
Conversation
LGTM if this is identical to previous PR |
Should be identical, good sign that tests pass. Dev site looks good to me as well. |
LGTM |
4be2f8c
to
2cedb65
Compare
1951aab
to
46cef8d
Compare
46cef8d
to
911e057
Compare
44a28a2
to
dec9a5e
Compare
@andrewseguin as far as I can see, this needs to be reflected in the material.angular.io site? Specifically https://material.angular.io/guide/theming |
It sure does, thanks for the callout. Will be fixed in #3013 |
Um.. how about components and directives, those are staying |
The md- prefix is staying for components and directives, unless you turn on compatibility mode which forces you to use mat- for component and directive selectors. This is to allow projects to upgrade from AngularJS Material (1.x) to Angular Material (this version) without having their directives and styling collide. In general, the rule going forward is that styling will be prefixed by mat- and selectors will be prefixed by md-. |
Could you use semantic version on npm package for this update? Although the library still giving support to the directives with the previous prefix (md-), the scss declarations, mixins and variables doesn't have backward compatibility. It crashes the code of whom is reusing the mixins and variables for customize the styles of Material Design. In this case, the most appropriate should improve the MAJOR on semver, that is better than just change from 2.0.0-beta.1 to 2.0.0-beta.2. |
This is inconsistent. You should rename all components to |
Update @covalent/core to beta.2 and refactor accordingly. See: - https://github.com/Teradata/covalent/blob/develop/docs/UPGRADE.md#upgrade-from-100-beta1-to-100-beta2 - https://github.com/Teradata/covalent/blob/develop/docs/CHANGELOG.md#100-beta2-hotel-california-2017-02-23 - https://github.com/angular/material2/blob/master/CHANGELOG.md#200-beta2-flannel-papaya-2017-02-15 - angular/components#2790 Close #15
it worked for my styles thanks. |
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. |
This change establishes that styling of material components should be done using a 'mat' prefix rather than 'md'. This is necessary for apps that want to upgrade from AngularJS Material to Angular Material and host both versions at the same time on their page. Without this change, there would be styling conflicts between the two libraries.
BREAKING CHANGE: All styling now uses the 'mat' prefix rather than 'md'. This includes changes to variables such as md-core, md-elevation, md-light-theme, and so on. This was necessary to allow apps to host both AngularJS Material and Angular Material on the same page without styling conflicts.
The following sass variables have been renamed. See below the table for a list of regular expressions that you can run to automatically modify your code and rename these variables in your styling files.
These regular expressions can be used from within your project directory to automatically search for all your files ending in *.scss or *.css and rename the variables listed in the table above. Note that this should only be run while in a directory that contains only your own source code. To double check what files will be changed, just run
find . -type f -name "*.scss" -o -name "*.css"
to see what will match.Note that all component styling has been changed from an
.md-
prefix to.mat-
. The following is a script that will search through all your styling files (scss, css) and replace all instances of.md-
with.mat-
.find . -type f -name "*.scss" -o -name "*.css"| xargs sed -i 's/\.md-/\.mat-/g'