Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(component-styles): add chapter about styling components #1047

Closed
wants to merge 3 commits into from

Conversation

teropa
Copy link
Contributor

@teropa teropa commented Apr 5, 2016

No description provided.

@zoechi
Copy link

zoechi commented Apr 5, 2016

Great!

From what I have seen >>> is also supported (same as /deep/). Should it be mentioned?
There is also '::shadowwhich is also not mentioned (to just pierce one "shadow" boundary in contrary to all with/deep/`).

@teropa
Copy link
Contributor Author

teropa commented Apr 5, 2016

@zoechi Thanks!

From what I have seen >>> is also supported (same as /deep/). Should it be mentioned?

That's a good question. I decided at this point not to mention it since it does the exact same thing as /deep/, but isn't supported by Chrome so it won't work with ViewEncapsulation.Native.

There is also '::shadowwhich is also not mentioned (to just pierce one "shadow" boundary in contrary to all with/deep/`).

Judging by angular/angular#6511 and angular/angular#7562 and the source code, I don't think the ::shadow selector actually works in emulated view encapsulation. It's just replaced with whitespace, which doesn't have the advertised effect. We should definitely mention it if it becomes supported.

@zoechi
Copy link

zoechi commented Apr 5, 2016

Judging by angular/angular#6511 and angular/angular#7562 and the source code, I don't think the ::shadow selector actually works in emulated view encapsulation.

Seems you're right https://github.com/angular/angular/blob/cb38d72ff4231c098c69fb3fa6dd3cbc634f0cbe/modules/angular2/src/compiler/shadow_css.ts#L317

That's a good question. I decided at this point not to mention it since it does the exact same thing as /deep/, but isn't supported by Chrome so it won't work with ViewEncapsulation.Native.

/deep/ is also deprecated in Chrome and planned to be removed since quite some time (and generates a warning in the console - or was this removed again, I haven't seen the warning since a while). These selectors (/deep/, >>>, ::shadow) are currently mostly Angular2-only and I would mention that they shouldn't be used with ViewEncapsulation.Native.

@wardbell wardbell force-pushed the devguide-component-styles branch from e07e2f8 to 887324a Compare April 6, 2016 06:39
@wardbell wardbell force-pushed the devguide-component-styles branch from 887324a to 5f91c73 Compare April 6, 2016 10:44
@wardbell
Copy link
Contributor

wardbell commented Apr 6, 2016

I updated a few things and polished here and there. I clarified the moduleId in particular.

FWIW, the problem wasn't with plunker but the fact that we were serving an old version of SystemJS that didn't support __moduleName. I'm told by the Angular team that that will be fixed soon (how soon I don't know). Leaving your shim in the code as that might be handy elsewhere some day.

I know you use the word "attribute" when referring to the keys in the component metadata object. That's technically correct. Nonetheless, I switched to the more colloquial (albeit inaccurate) word "property". I feared some readers would be confused by "attribute",

I did not try to resolve the matter of whether to remove /deep/ from the doc. I'm leaving that to you.

I'd like to merge this tomorrow a.m. so that it makes the beta.14 publication. Please let make any necessary corrections and tell me when I can let it go.

Please note that I force-pushed so you may have to re-pull the branch.

@teropa
Copy link
Contributor Author

teropa commented Apr 6, 2016

@zoechi Thanks for the clarification. I have added a mention of this, as well as a passing mention of >>>.

@wardbell Thanks! Sorry to notice I made a superstitious assumption about Plunker somehow being the problem. I pushed some minor changes based on @zoechi's input and fixed a couple of typos. This is now ready to go from my perspective.

@wardbell wardbell closed this in 6f945b7 Apr 6, 2016
@wardbell wardbell deleted the devguide-component-styles branch April 6, 2016 17:05
thelgevold pushed a commit to IdeaBlade/angular.io that referenced this pull request Apr 9, 2016
closes angular#972

chore(toh): change inputs array for input decorator/hero now a class

docs(dart): update to b12

Also update dart_to_js_script_rewriter dependency to ^1.0.1,
and change most angular2.dart imports to be core.dart instead.

The pipes example broke without the angular2.dart import, so I let it be.

The server-communication sample has never worked for me,
so I changed it but might have broken it further.

closes angular#1007

docs: update to style-guide links
closes angular#995
Fixed links to John Papa style guide to new repo location.

docs(cb-ts-to-js): add cookbook about applying TypeScript examples to ES5
closes angular#893

docs(dart): change imports from bootstrap.dart to platform/browser.dart

closes angular#1013

samples(dart): add info file for dart-doc-syncer to template-syntax

closes angular#1018

samples(dart): add link to documentation chapter

closes angular#1019

docs(toh-1): remove public access modifiers
closes angular#1009
Remove public access modifier on AppComponent properties to be
consistent throughout code tutorial

docs(dependency-injection): tweak Dart wording

closes angular#1017

docs(dart): tweak homepage banner

closes angular#1016

docs(quickstart): fixed "hurray" typo.
closes angular#1021

docs: update to beta.13

docs(dart/quickstart): merge 2 examples into 1

closes angular#1031

docs(dart): update to beta.13.1

closes angular#1032

Add additional tags to the angular.io dgeni package for the new api doc style proposal.

Closes angular#1030

chore: remove angulardart.org link from footer

closes angular#1034

fix(api-builder): add missing git package dependency

This was causing the api-builder tests to fail

chore(typo): quide -> guide in cheatsheets

closes angular#1039

docs:Create Tour of Heroes chapter on http

some text changes

wired up web api

text

adding saving

wired up CRUD

remove unused files

fixed toggle

whitespace

text

text

text updates

text

text

tweaks

added tests

test

fixed button click

images

fixed test

tweaks

docs(toh): add missing nav path to diagram per angular#1041

chore: fix typo in ts-to-js intro
closes angular#1025

chore(bio): add Deborah's bio
closes angular#1024

docs(bio): fixes Jules' bio links
closes angular#1027

fix(e2e): fix race condition

docs(toh-4): reword the getHeroesSlowly instructions
closes angular#1011
rewording to: "replace `_heroService.getHeroes` with `_heroService.getHeroesSlowly`"

docs: add DI cookbook

chore: replace VSCode-specific settings.json with broadly recommended .editorconfig
closes angular#1022

docs(template-syntax): fixed "a id" typo in basics section.
closes angular#1048

chore: add "homepage" property to package.json
closes angular#1038

docs(testing): update testing to use toh-5
closes angular#1003

docs(unit-testing): fix the path to node_modules & steps for adding a new spec
closes angular#1043

package(harp): update harp version to fix async errors

docs(component-styles): add chapter about styling components
closes angular#1047

docs(lifecycle-hooks): Fixed missing ":marked" typo
closes angular#1051

docs(todo app): replace remaining tasks reduce func with filter.length
closes angular#1050

docs(component-styles): mark `__moduleName` experimental; use alert instead of callout.
closes angular#1054

docs(pipes): Fixed "If follows..." typo
closes angular#1053
Fixed typo in **pipes** section of guide.

chore: update to beta.14
AlmeroSteyn pushed a commit to IdeaBlade/angular.io that referenced this pull request Apr 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants