Comments (1)
@omararturo please refer to Angular 2 Component Styles documentation.
I don't think it's an issue with angular2-compilers
, because Angular 2 encapsulates each Component's styles by it self, without any chance to override other Component's styles.
It means that every Component has it's own style - and it can effect only the elements that it creates (NOT the Components it uses) - which means that every Angular 2 Component that uses Angular2-Material Component's, can decide only the parent element style (for example md-tab-group
which is the parent).
More in depth, Angular 2 changes every CSS stylesheet and append unique identifiers for each style created, and then add the same unique identifier to the matching elements.
Which means that each Component will have it's own identifier, and your md-tab-group
will get the styles from the stylesheet of your Component, but it's child elements (such as md-tab
) can get it's styles only from the md-tab-group
stylesheet.
There are workaround, such as adding the stylesheet outside the Component's context (in the global styles) and then risk overriding other Component's styles.
But you can also use the Angular 2 special selectors, such as /deep/
to override the style of you child Components, and then effect the entire Component's tree, instead of only the first level.
Usage example:
md-tab-group /deep/ div.md-tab-label {
min-width: 25% !important;
max-width: 25% !important;
}
You can read more in the documentation page I mentioned.
Good luck!
from angular2-meteor.
Related Issues (20)
- Upgrading to latest Angular 2.0.0, getting Unhandled Promise rejection - ZoneAwarePromise overwritten HOT 2
- I didn't ask for coffee HOT 1
- ._ensureIndex(..) is no longer working, is there a new API for this? HOT 3
- route component not loading HOT 4
- Is there a way to support typescript without using angular 2? HOT 1
- Is this repo abandoned? HOT 1
- angular2-compilers 0.6.3 style compiler deployment to Heroku HOT 8
- How to use assets in html template?
- 0.6.5 compilers error Cordova iOS HOT 11
- Error regarding login-button scss not found. HOT 1
- Error: (SystemJS) Template parse errors:(…) ==> Angular 2 HOT 1
- Not able to add barbatus:ng2-meteor-accounts
- meteorhacks:aggregate does not have work with angular2-compilers
- Relax/update package requirements
- Relax/update package requirements
- Sidebar and navbar are not rendering if the page is not refreshed angular2
- Can't install angular2-compiler in Windows 10 HOT 4
- r
- Windows 10, Meteor 1.6, angular-2 compilers node-sass error 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 angular2-meteor.