Skip to content
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

Add line-height rule for error page h2 #2761

Merged
merged 1 commit into from
Aug 12, 2017
Merged

Add line-height rule for error page h2 #2761

merged 1 commit into from
Aug 12, 2017

Conversation

sethmcleod
Copy link
Contributor

@sethmcleod sethmcleod commented Aug 11, 2017

This is a very small update to the default error page styles. In my use case, I have a main css file that adds some default line-height to heading tags. Unfortunately this messes up the vertical centering of the error page message, so it ends up looking like this:

image

This PR adds a line-height: inherit rule to the h2 tag so it gets the line-height of it's parent and stays unaffected by global default styles.

@timneutkens
Copy link
Member

Question is, do we really want/need to do this? 🤔 You could just write global styles to fix this right 🤔

@sethmcleod
Copy link
Contributor Author

Sure, I could fix this for myself with a global override rule, but since there are no classes on the error page elements it would have to be pretty specific: #__next style ~ div[style] > h2[style]

The inline styles added to these error page elements override any default styles set for them in a stylesheet, like the container div and h1 elements. The idea behind this PR was to make sure that coverage extended to the h2 element as well, which assumes a line-height inherited from parent in order to be vertically centered.

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, Gotcha 🙌🏻

@timneutkens timneutkens merged commit 7a5a6bc into vercel:master Aug 12, 2017
timneutkens pushed a commit to timneutkens/next.js that referenced this pull request Aug 19, 2017
timneutkens added a commit that referenced this pull request Aug 27, 2017
* Add examples/with-redux-code-splitting. (#2721)

* #1757 Relay Modern Example (#2696)

* Add ReasonML example (#2640)

* Add ReasonML example

* Add a gitignore specifically for the reasonml example

* Allow custom className for <Main /> (#2802)

* 3.0.2

* Remove beta information from the README.

* 3.0.3

* Remove unnecessary lookup in example with emotion (#2731)

* Document SCSS/Less (#2742)

* Document SCSS/Less

* Add missing word

* Add docs for examples dir

* Add extra example

* uppercase J

* Add with pkg example (#2751)

* Add custom server micro example (#2750)

* Ease running multiple examples at the same time with process.env.PORT (#2753)

* Add line-height rule for error page h2 (#2761)

* Add support for fetching multiple translation files (#2743)

* Add support for fetching multiple translation files

* Cleanup

* Clear missed interval (#2611)

* clear missed interval

* remove trailing whitespace

* Relay Modern Example (#1757) (#2773)

* Simplification of Relay Modern Example (#1757) (#2776)

* Use deterministic names for dynamic import (#2788)

* Always use the same name for the same dynamic import.

* Add unit tests for the modulePath generation.

* Allow tests to run correctly on Windows.

* Make the chunk name a bit pretty.

* Fix tests to run on Windows.

* 3.0.4

* Revert "Make the chunk name a bit pretty." (#2792)

This reverts commit 0c9e8cf.

* 3.0.5

* Use _ as the divider for dynamic import name splitter. (#2793)

Using - gives us some weird webpack errors.

* 3.0.6

* next/dynamic Error Message Tweaks (#2798)

* Fixed issue (#2804)

#2800

* docs(material-ui): move the source code to Material-UI repository (#2808)
@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants