Skip to content

Commit 6b1d92d

Browse files
committed
Tweak "On this page" styles
1 parent 20d3843 commit 6b1d92d

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

addon/components/docs-viewer/x-main/component.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import layout from './template';
1111

1212
const projectHref = config['ember-cli-addon-docs'].projectHref;
1313

14-
const tagToSize = { H2: 'sm', H3: 'xs' };
15-
const tagToIndent = { H2: '0', H3: '2' };
16-
const tagToMarginTop = { H2: '2', H3: '0' };
17-
const tagToMarginBottom = { H2: '1', H3: '0' };
14+
const tagToSize = { H2: 'xs', H3: 'xs' };
15+
const tagToIndent = { H2: '0', H3: '4' };
16+
const tagToMarginTop = { H2: '2', H3: '2' };
17+
const tagToMarginBottom = { H2: '0', H3: '0' };
1818

1919
export default Component.extend({
2020
layout,
@@ -24,7 +24,7 @@ export default Component.extend({
2424
pageIndex: service(),
2525

2626
tagName: 'main',
27-
classNames: ['lg:w-4/5', 'xl:w-3/5', 'max-w-md', 'lg:max-w-none', 'mx-auto', 'lg:mx-0', 'mt-6'],
27+
classNames: ['lg:w-4/5', 'xl:w-3/5', 'max-w-md', 'lg:max-w-none', 'mx-auto', 'lg:mx-0', 'mt-6', 'flex-no-shrink'],
2828

2929
didInsertElement() {
3030
this._super(...arguments);

addon/components/docs-viewer/x-page-index/template.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<nav class="hidden lg:block lg:w-1/5 pl-4" data-test-page-index>
22
<div class="sticky pin-t pt-4 -mt-4 max-h-screen overflow-y-scroll">
3-
<ul class="list-reset">
3+
<ul class="list-reset border-l border-grey-lighter pl-6 leading-normal">
44
{{#if pageIndex.length}}
5-
<li class="mt-8 text-grey font-bold tracking-wide uppercase text-xs">
5+
<li class="mt-20 text-grey font-bold tracking-wide uppercase text-xs">
66
On This Page
77
</li>
88
{{/if}}
@@ -19,7 +19,7 @@
1919
>
2020
<a
2121
href="#{{item.id}}"
22-
class="text-grey-dark no-underline hover:underline text-{{item.size}}"
22+
class="text-grey-dark font-semibold no-underline hover:underline text-{{item.size}}"
2323
>
2424
{{item.text}}
2525
</a>

addon/tailwind/components/docs-md.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
.docs-h2,
1414
.docs-md__h2 a,
1515
.docs-h2 a {
16-
@apply mt-8 mb-4 text-grey-darkest leading-tight no-underline;
16+
@apply pt-8 mb-4 text-grey-darkest leading-tight no-underline;
1717
}
1818

1919
.docs-md__h3,
2020
.docs-h3,
2121
.docs-md__h3 a,
2222
.docs-h3 a {
23-
@apply mb-2 text-grey-darkest leading-tight no-underline;
23+
@apply pt-4 mb-2 text-grey-darkest leading-tight no-underline;
2424
}
2525

2626
.docs-md p {

addon/tailwind/config/margin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ export default {
2525
'8': '2rem',
2626
'12': '3rem',
2727
'16': '4rem',
28+
'20': '5rem',
2829
};

0 commit comments

Comments
 (0)