Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

[docs-prose.css] make .prose pre rules more specific - #113

Merged
katydecorah merged 6 commits into
masterfrom
css-height
Feb 15, 2019
Merged

katydecorah merged 6 commits into
masterfrom
css-height

Conversation

@katydecorah

Copy link
Copy Markdown
Contributor

When markdown parses code blocks, it adds classes with the language to the pre element, for example: class="language-html".

This PR updates the .prose pre classes in docs-prose.css to only apply the classes if the pre element has a language- class.

This will keep example pages on our various docs sites from getting max-height on code blocks, where it's not preferred.

This PR also copies over docs-prose.css to the test-cases-app so we can see it in use!

How to test: to PageLayout I added a test case to simulate code output.

@colleenmcginnis colleenmcginnis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Genius! I ran the test site locally and inspected various code blocks throughout docs sites to verify that the ones we don't want to apply max-height to do not use the language- pattern. 🎉

Katy DeCorah added 2 commits February 14, 2019 19:13
* master:
  Add `mb24` to `OverviewHeader` (#112)
@katydecorah
katydecorah merged commit 0d28391 into master Feb 15, 2019
@katydecorah
katydecorah deleted the css-height branch February 15, 2019 00:17
katydecorah pushed a commit that referenced this pull request Apr 17, 2019
* master: (22 commits)
  fixes bug in firefox where arrow was not vertically centered (#122)
  add swiftype attribute to ignore content blocks (#119)
  0.9.0
  Prepare 0.9.0
  Add BetaFlag component and options to add it to other components (#123)
  Prepare 0.8.1
  [patch] Use babel.config.js and updates build-package.js to output directories (#118)
  Prepare 0.8.0
  create versionSort function (#117)
  Prepare 0.7.0
  Add optional prop for tags for first level items in NavigationAccordion (#115)
  Prepare 0.6.0
  [docs-prose.css] make `.prose pre` rules more specific (#113)
  Add `mb24` to `OverviewHeader` (#112)
  [SectionedNavigation] filter the description if it's available (#111)
  Prepare 0.5.0
  Add warning and error themes to `Note` (#102)
  Add CSS to set max-height and style scrollbars for prose code examples (#103)
  [Card/CardContainer] Add new styles for fullwidth cards (#104)
  Add prism.css to create shared syntax styles used commonly across sites (#108)
  ...
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