angular.js/docs/content/guide/dev_guide.templates.css-styling.ngdoc

35 lines
1.2 KiB
Text
Raw Normal View History

2011-06-06 15:50:35 +00:00
@ngdoc overview
@name Developer Guide: Templates: Working With CSS in Angular
@description
2011-09-08 20:56:29 +00:00
Angular sets these CSS classes. It is up to your application to provide useful styling.
2011-06-06 15:50:35 +00:00
2011-09-08 20:56:29 +00:00
# CSS classes used by angular
2011-06-06 15:50:35 +00:00
2011-09-08 20:56:29 +00:00
* `ng-invalid`, `ng-valid`
- **Usage:** angular applies this class to an input widget element if that element's input does
notpass validation. (see {@link api/angular.widget.input input} widget).
2011-06-06 15:50:35 +00:00
2011-09-08 20:56:29 +00:00
* `ng-pristine`, `ng-dirty`
- **Usage:** angular {@link api/angular.widget.input input} widget applies `ng-pristine` class
to a new input widget element which did not have user interaction. Once the user interacts with
the input widget the class is changed to `ng-dirty`.
2011-06-06 15:50:35 +00:00
2011-09-08 20:56:29 +00:00
# Marking CSS classes
2011-06-06 15:50:35 +00:00
2011-09-08 20:56:29 +00:00
* `ng-widget`, `ng-directive`
- **Usage:** angular sets these class on elements where {@link api/angular.widget widget} or
{@link api/angular.directive directive} has bound to.
2011-06-06 15:50:35 +00:00
2011-09-08 20:56:29 +00:00
* Old browser support
- Pre v9, IE browsers could not select `ng:include` elements in CSS, because of the `:`
character. For this reason angular also sets `ng-include` class on any element which has `:`
character in the name by replacing `:` with `-`.
2011-06-06 15:50:35 +00:00
## Related Topics
* {@link dev_guide.templates Angular Templates}
2011-09-08 20:56:29 +00:00
* {@link dev_guide.forms Angular Forms}