fix(docs-infra): fix alert child margin issue#45761
fix(docs-infra): fix alert child margin issue#45761dario-piotrowicz wants to merge 1 commit intoangular:masterfrom
Conversation
replace the generic `*` selector used in the alert styling with `p` (which is what gets generated from the markdown) as the styling adds margins which are not always wanted
|
@gkalpak if you could have a look it would be awesome, I think the change is correct, but it can effect a bunch of places obviously, so yeah I would love to know what you think 🙂 |
|
You can preview 2463bd2 at https://pr45761-2463bd2.ngbuilds.io/. |
Thanks 😄 Yes, I did check with @josmar-crwdstffng before opening the PR, not messing with the md but trying to fix the thing via css seemed the cleanest option 🙂 Alternatively I guess we could update the template generation logic so that alerts inside tables do get the child |
|
I doesn't have to do with tables specifically. It's more that our tooling requires (but has no way to enforce) that there is always an empty line when switching from HTML to Markdown in the templates. Anyway, this is a good enough solution for now, so let's roll with it 👍 |
|
This PR was merged into the repository by commit f282ca4. |
replace the generic `*` selector used in the alert styling with `p` (which is what gets generated from the markdown) as the styling adds margins which are not always wanted PR Close #45761
|
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. |
replace the generic
*selector used in the alert styling withp(which is what gets generated from the markdown) as the styling addsmargins which are not always wanted
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
Extra margins are added to direct children of
.alerts this is ok for auto generated alerts which have apas their only child, but not in other cases:(see the alter here: https://angular.io/guide/view-encapsulation)

(https://angular.io/guide/lifecycle-hooks)
What is the new behavior?
Make the selector more specific so that it targets only direct child
pelements (which I would imagine are generally the only ones which should actually get that margin)(PS: the alter still looks a bit off with the link wrapping onto a second line, but I it does look better 😅)
Does this PR introduce a breaking change?
Other information