-
-
Notifications
You must be signed in to change notification settings - Fork 2k
style(www): remove margin on code-example #4889
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
Conversation
✅ Deploy Preview for ngrx-site-v19 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for ngrx-io canceled.Built without sensitive environment variables
|
On line 30 .body {
padding: 0 0px;
} There is a missing |
Also, |
@@ -15,7 +15,6 @@ import { Component, Input } from '@angular/core'; | |||
display: flex; | |||
flex-direction: column; | |||
border: 1px solid rgba(255, 255, 255, 0.12); | |||
margin: 14px 0 24px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coding margin makes the component inflexible. Maybe, it is better to add an input for margin styling. If you add just margin-top: 8px
to the component, you'll likely have a situation where a double margin is created somewhere. You could place a class on the app-code-example component and use that to handle margins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that this isn't related to the css.
Some code blocks are fine, while other are not.
The reason is the formatting in the docs.
If the code example component goes over multiple lines, the content is not added as the body, but as a separate tag under the component.
<ngrx-code-example header="src/app/app.module.ts">
not fine:
<ngrx-code-example
header="src/app/app.module.ts">
Closing this PR and issue, I will go over the examples to fix it.
Thanks for looking into this @jdegand
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?
Header margin issue.
Closes #4876
What is the new behavior?
I think it looks better without any margin between the code example and header. Header already has enough padding.
Does this PR introduce a breaking change?
Other information