Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fix RDMD titles' font size issue. (#699)
Browse files Browse the repository at this point in the history
* chore(markdown): use lodash kebabcase single package

* style(markdown/headings): fix font size css

* sync lockfiles
  • Loading branch information
rafegoldberg authored May 11, 2020
1 parent 42236b6 commit de7e8c1
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/markdown/components/Heading/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
right: 100%;
top: unset !important;
margin-right: -.8rem;
padding: .8em .2em .8em 0 !important;
padding: .8rem .2rem .8rem 0 !important;
font-size: .8rem !important;
text-decoration: none;
color: inherit;
Expand Down
38 changes: 37 additions & 1 deletion packages/markdown/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"copy-to-clipboard": "^3.3.1",
"hast-util-sanitize": "^1.2.0",
"hast-util-to-string": "^1.0.3",
"lodash": "^4.17.15",
"lodash.kebabcase": "^4.1.1",
"prop-types": "^15.7.2",
"react": "^16.4.2",
"rehype-raw": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/processor/plugin/section-anchor-id.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const flatMap = require('unist-util-flatmap');
const kebabCase = require('lodash/kebabCase');
const kebabCase = require('lodash.kebabcase');

const matchTag = /^h[1-6]$/g;

Expand Down
30 changes: 15 additions & 15 deletions packages/markdown/styles/gfm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@
cursor: pointer
}

h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.25;
color: var(--markdown-title);
font-family: var(--markdown-title-font);
font-size: var(--markdown-title-size);
font-weight: var(--markdown-title-weight, 600);
margin-top: var(--markdown-title-marginTop, 1em);
margin-bottom: var(--markdown-title-marginBottom, 1rem);
}

h1,
h2 {
font-size: 1.5em;
Expand Down Expand Up @@ -169,21 +184,6 @@
color: var(--markdown-title, #6a737d);
}

h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.25;
color: var(--markdown-title);
font-family: var(--markdown-title-font);
font-size: var(--markdown-title-size);
font-weight: var(--markdown-title-weight, 600);
margin-top: var(--markdown-title-marginTop, 1em);
margin-bottom: var(--markdown-title-marginBottom, 1rem);
}

p,
.p {
margin-bottom: 10px;
Expand Down

0 comments on commit de7e8c1

Please sign in to comment.