Skip to content

Commit 90ee2d5

Browse files
authored
Merge pull request #212 from jrowlingson/tailwind-prefix
Use ad- tailwind prefix
2 parents 2ee3daa + e12fbdc commit 90ee2d5

File tree

35 files changed

+137
-136
lines changed

35 files changed

+137
-136
lines changed

addon/components/api/x-import-path/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
44
export default Component.extend({
55
tagName: '',
66
layout: hbs`
7-
<div class="import-path mb-6 font-mono" data-test-import-path>
7+
<div class="import-path ad-mb-6 ad-font-mono" data-test-import-path>
88
<span class="hljs-keyword">import</span>
99
1010
{{#if (eq item.exportType "default")}}

addon/components/api/x-meta-panel/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
44
export default Component.extend({
55
tagName: '',
66
layout: hbs`
7-
<div class="px-6 pt-3 mt-4 border border-grey-light rounded text-sm">
7+
<div class="ad-px-6 ad-pt-3 ad-mt-4 ad-border ad-border-grey-light ad-rounded ad-text-sm">
88
{{yield (hash
99
header=(component 'api/x-meta-panel/header')
1010
)}}

addon/components/api/x-meta-panel/header/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
44
export default Component.extend({
55
tagName: '',
66
layout: hbs`
7-
<h4 class="mb-2 text-grey font-bold tracking-wide uppercase text-xs">
7+
<h4 class="ad-mb-2 ad-text-grey ad-font-bold ad-tracking-wide ad-uppercase ad-text-xs">
88
{{yield}}
99
</h4>
1010
`,

addon/components/api/x-section/template.hbs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
id={{item.name}}
44
data-text="{{item.name}}"
55
data-test-item-header
6-
class="docs-h3 font-mono font-normal"
6+
class="docs-h3 ad-font-mono ad-font-normal"
77
>
88
{{#if (eq item.exportType 'default')}}
9-
<span class="border border-grey-light align-text-top leading-loose text-xs pl-2 mr-2 py-1 rounded">
9+
<span class="ad-border ad-border-grey-light ad-align-text-top ad-leading-loose ad-text-xs ad-pl-2 ad-mr-2 ad-py-1 ad-rounded">
1010
Default
1111
</span>
1212
{{/if}}
@@ -45,13 +45,13 @@
4545
Params
4646
{{/panel.header}}
4747

48-
<table class="mb-6" data-test-item-params>
48+
<table class="ad-mb-6" data-test-item-params>
4949
<tbody>
5050
{{#each item.params as |param|}}
5151
<tr data-test-item-param>
52-
<td><span class="font-mono font-bold border-r border-grey-light pr-2">{{param.name}}</span></td>
53-
<td><span class="font-mono border-r border-grey-light px-2">{{param.type}}</span></td>
54-
<td class="pl-2">{{param.description}}</td>
52+
<td><span class="ad-font-mono ad-font-bold ad-border-r ad-border-grey-light ad-pr-2">{{param.name}}</span></td>
53+
<td><span class="ad-font-mono ad-border-r ad-border-grey-light ad-px-2">{{param.type}}</span></td>
54+
<td class="ad-pl-2">{{param.description}}</td>
5555
</tr>
5656
{{/each}}
5757
</tbody>

addon/components/api/x-toggles/template.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<ul class="list-reset mb-6">
1+
<ul class="ad-list-reset ad-mb-6">
22
{{#each-in toggles as |key toggle|}}
33
{{#if (not-eq toggle undefined)}}
4-
<li class="inline ml-4">
4+
<li class="ad-inline ad-ml-4">
55
<label data-test-toggle>
66
<input type="checkbox"
77
checked={{toggle}}
88
onclick={{action onToggle key}}
9-
class='mr-1'
9+
class='ad-mr-1'
1010
>
1111

1212
{{capitalize key}}

addon/components/docs-demo/template.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<div class="rounded border my-8">
1+
<div class="ad-rounded ad-border ad-my-8">
22

33
{{yield (hash
44
example=(component 'docs-demo/x-example')
55
snippet=(component 'docs-demo/x-snippet' did-init=(action 'registerSnippet') activeSnippet=activeSnippet)
66
)}}
77

88
{{#if snippets}}
9-
<nav class="docs-demo__snippets-nav py-2 px-4 font-medium bg-grey-lighter tracking-tight">
9+
<nav class="docs-demo__snippets-nav ad-py-2 ad-px-4 ad-font-medium ad-bg-grey-lighter ad-tracking-tight">
1010
{{#each snippets as |snippet|}}
1111
<button {{action 'selectSnippet' snippet}}
1212
class='
13-
mr-4 text-sm no-underline outline-none
14-
hover:text-grey-darkest
15-
{{if snippet.isActive 'text-grey-darkest' 'text-grey-dark'}}
13+
ad-mr-4 ad-text-sm ad-no-underline outline-none
14+
hover:ad-text-grey-darkest
15+
{{if snippet.isActive 'ad-text-grey-darkest' 'ad-text-grey-dark'}}
1616
'
1717
>
1818
{{snippet.label}}

addon/components/docs-demo/x-example/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import layout from './template';
44
export default Component.extend({
55
layout,
66

7-
classNames: 'p-4',
7+
classNames: 'ad-p-4',
88

99
init() {
1010
this._super(...arguments);

addon/components/docs-header/link/template.hbs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<a href={{href}}
44
class='
5-
px-4 py-3 transition uppercase text-xs font-semibold
6-
text-grey-darkest no-underline opacity-50 hover:opacity-100
7-
{{if push 'ml-auto'}}
5+
ad-px-4 ad-py-3 ad-transition ad-uppercase ad-text-xs ad-font-semibold
6+
ad-text-grey-darkest ad-no-underline ad-opacity-50 hover:ad-opacity-100
7+
{{if push 'ad-ml-auto'}}
88
'
99
data-test-id={{data-test-id}}>
1010
{{yield}}
@@ -15,8 +15,8 @@
1515
<a {{action on-click}}
1616
href='#'
1717
class='
18-
px-4 py-3 transition uppercase text-xs font-semibold
19-
text-grey-darkest no-underline opacity-50 hover:opacity-100
18+
ad-px-4 ad-py-3 ad-transition ad-uppercase ad-text-xs ad-font-semibold
19+
ad-text-grey-darkest ad-no-underline ad-opacity-50 hover:ad-opacity-100
2020
{{if push 'ml-auto'}}
2121
'
2222
data-test-id={{data-test-id}}>
@@ -27,9 +27,9 @@
2727

2828
{{#link-to route
2929
class=(concat
30-
'px-4 py-3 transition uppercase text-xs font-semibold
31-
text-grey-darkest no-underline '
32-
(if (and (not isActive) (not (eq route 'index'))) 'opacity-50 hover:opacity-100')
30+
'ad-px-4 ad-py-3 ad-transition ad-uppercase ad-text-xs ad-font-semibold
31+
ad-text-grey-darkest ad-no-underline '
32+
(if (and (not isActive) (not (eq route 'index'))) 'ad-opacity-50 hover:ad-opacity-100')
3333
)
3434
data-test-id=data-test-id
3535
}}

addon/components/docs-header/search-box/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { on } from '@ember/object/evented';
55

66
export default Component.extend(EKMixin, {
77
layout,
8-
classNames: 'ml-auto',
8+
classNames: 'ad-ml-auto',
99

1010
query: null,
1111

addon/components/docs-header/search-box/template.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<div class='relative text-grey-darkest' data-search-box>
2-
{{svg-jar 'search' width=12 height=12 class='absolute pin-t h-full ml-1'}}
1+
<div class='ad-relative ad-text-grey-darkest' data-search-box>
2+
{{svg-jar 'search' width=12 height=12 class='ad-absolute ad-pin-t ad-h-full ad-ml-1'}}
33

44
{{!--
55
This is a dumb input - so why not use the {{input}} helper? Because apparently
@@ -11,7 +11,7 @@
1111
value={{query}}
1212
type="text"
1313
placeholder='Search'
14-
class='w-24 text-xs p-2 pl-6 rounded focus:bg-grey-lighter outline-none'
14+
class='ad-w-24 ad-text-xs ad-p-2 ad-pl-6 ad-rounded focus:ad-bg-grey-lighter outline-none'
1515
data-search-box-input
1616
data-test-search-box-input>
1717
</div>

addon/components/docs-header/template.hbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<header class='border-b shadow-sm'>
2-
<div class='flex items-center max-w-3xl mx-auto'>
1+
<header class='ad-border-b ad-shadow-sm'>
2+
<div class='ad-flex ad-items-center ad-max-w-3xl ad-mx-auto'>
33
{{#docs-header/link 'index'}}
4-
<div class="text-center text-xs">
4+
<div class="ad-text-center ad-text-xs">
55
{{#if logo}}
6-
<div class='h-4 pb-1'>
6+
<div class='ad-h-4 ad-pb-1'>
77
{{docs-logo logo=logo}}
88
</div>
99
{{/if}}
10-
<span class='font-medium normal-case block -mt-2px'>{{name}}</span>
10+
<span class='ad-font-medium ad-normal-case ad-block ad--mt-2px'>{{name}}</span>
1111
</div>
1212
{{/docs-header/link}}
1313

14-
<div class='flex-1 flex items-center overflow-auto overflow-momentum mask-image md:no-mask-image'>
14+
<div class='ad-flex-1 ad-flex ad-items-center ad-overflow-auto ad-overflow-momentum ad-mask-image md:ad-no-mask-image'>
1515
{{#docs-header/link 'docs'}}
1616
Documentation
1717
{{/docs-header/link}}
@@ -23,7 +23,7 @@
2323
{{docs-header/search-box query=query on-input=(action (mut query))}}
2424

2525
{{#docs-header/link on-click=(action (toggle 'isShowingVersionSelector' this)) data-test-id='current-version'}}
26-
<span data-version-selector class='flex items-center'>
26+
<span data-version-selector class='ad-flex ad-items-center'>
2727

2828
{{#if (or (eq currentVersion.key latestVersionName))}}
2929
{{#if currentVersion.tag}}
@@ -41,14 +41,14 @@
4141

4242
{{#if projectHref}}
4343
{{#docs-header/link href=projectHref}}
44-
<span class='flex'>
44+
<span class='ad-flex'>
4545
{{svg-jar 'github' width=24 height=24}}
4646
</span>
4747
{{/docs-header/link}}
4848
{{/if}}
4949

5050
{{!-- Something to take up space on mobile, so the scrolling nav isn't hugging the edge --}}
51-
<div class='h-px px-3 md:hidden'></div>
51+
<div class='ad-h-px ad-px-3 md:ad-hidden'></div>
5252
</div>
5353
</div>
5454
</header>

addon/components/docs-header/version-selector/template.hbs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,28 @@
44
clickOutsideToClose=true
55
onClose=(action on-close)
66
targetAttachment='bottom right'}}
7-
<ul class="list-reset mt-2 bg-white shadow-md text-sm rounded z-10">
7+
<ul class="ad-list-reset ad-mt-2 ad-bg-white ad-shadow-md ad-text-sm ad-rounded ad-z-10">
88
{{#each sortedVersions as |version|}}
99
<li data-test-id='version'>
10-
<a {{action 'changeVersion' version}} href='#' class='text-black no-underline flex items-center px-4 py-3 hover:bg-grey-lighter'>
10+
<a {{action 'changeVersion' version}} href='#' class='ad-text-black ad-no-underline ad-flex ad-items-center
11+
ad-px-4 ad-py-3 hover:ad-bg-grey-lighter'>
1112
<span class='w-6 flex'>
1213
{{#if (eq version.key currentVersion.key)}}
1314
{{svg-jar 'check' height=16 width=16}}
1415
{{/if}}
1516
</span>
16-
<span class='font-medium'>
17+
<span class='ad-font-medium'>
1718
{{version.name}}
1819
</span>
1920

20-
<span class="ml-auto pl-8 flex items-center opacity-50">
21+
<span class="ad-ml-auto ad-pl-8 ad-flex ad-items-center ad-opacity-50">
2122
{{#if (or (eq version.key latestVersionName) (eq version.key primaryBranch))}}
2223
{{svg-jar (if version.tag 'git-tag' 'git-sha') height=16 width=16}}
2324
{{else}}
2425
{{svg-jar 'git-sha' height=16 width=16}}
2526
{{/if}}
2627

27-
<span class='text-xs font-mono pl-1'>
28+
<span class='ad-text-xs ad-font-mono ad-pl-1'>
2829
{{#if (or (eq version.key latestVersionName) (eq version.key primaryBranch))}}
2930
{{#if version.tag}}
3031
{{version.tag}}

addon/components/docs-hero/template.hbs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<div class="
2-
text-center py-8 md:py-16
3-
{{if (eq style 'light') 'text-grey-darkest'}}
4-
{{if (eq style 'dark') 'bg-black text-white'}}
2+
ad-text-center ad-py-8 md:ad-py-16
3+
{{if (eq style 'light') 'ad-text-grey-darkest'}}
4+
{{if (eq style 'dark') 'ad-bg-black ad-text-white'}}
55
">
6-
<h1 class='text-5xl md:text-jumbo leading-none'>
6+
<h1 class='ad-text-5xl md:ad-text-jumbo ad-leading-none'>
77
{{#if logo}}
8-
<div class='md:-mb-1 -mt-4 md:-mt-8'>
9-
<span class='inline-block h-6 opacity-50'>
8+
<div class='md:ad--mb-1 ad--mt-4 md:ad--mt-8'>
9+
<span class='ad-inline-block ad-h-6 ad-opacity-50'>
1010
{{docs-logo logo=logo}}
1111
</span>
1212
</div>
1313
{{/if}}
1414

15-
<span class='font-thin'>{{slimHeading}}</span>{{strongHeading}}
15+
<span class='ad-font-thin'>{{slimHeading}}</span>{{strongHeading}}
1616
</h1>
1717

18-
<p class='opacity-75 text-xl mt-4 w-3/4 mx-auto leading-tight'>
18+
<p class='ad-opacity-75 ad-text-xl ad-mt-4 ad-w-3/4 ad-mx-auto ad-leading-tight'>
1919
{{byline}}
2020
</p>
2121

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{svg-jar logo class="h-full w-auto max-w-full fill-current"}}
1+
{{svg-jar logo class="ad-h-full ad-w-auto ad-max-w-full ad-fill-current"}}

addon/components/docs-snippet/template.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{{#if title}}
2-
<div class='bg-grey-lighter text-sm text-grey-darkest
3-
font-medium py-2 px-4'>
2+
<div class='ad-bg-grey-lighter ad-text-sm ad-text-grey-darkest
3+
ad-font-medium ad-py-2 ad-px-4'>
44
{{title}}
55
</div>
66
{{/if}}
77

8-
<div class='text-sm p-4 bg-grey-lightest relative' data-test-id={{name}}>
8+
<div class='ad-text-sm ad-p-4 ad-bg-grey-lightest ad-relative' data-test-id={{name}}>
99
{{#if showCopy}}
1010
{{#copy-button
1111
clipboardText=snippetText
1212
title='copy to clipboard'
1313
class='
14-
absolute pin-t pin-r bg-transparent hover:bg-transparent
15-
border-none opacity-50 hover:opacity-100 p-3
14+
ad-absolute ad-pin-t ad-pin-r ad-bg-transparent hover:ad-bg-transparent
15+
ad-border-none ad-opacity-50 hover:ad-opacity-100 ad-p-3
1616
'
1717
}}
1818
Copy

addon/components/docs-viewer/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="docs-container lg:flex w-full mt-4">
1+
<div class="docs-container lg:ad-flex ad-w-full ad-mt-4">
22
{{yield (hash
33
nav=(component 'docs-viewer/x-nav')
44
main=(component 'docs-viewer/x-main' onReindex=(action (mut pageIndex)))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default Component.extend({
2323
docsRoutes: service(),
2424

2525
tagName: 'main',
26-
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'],
26+
classNames: ['lg:ad-w-4/5', 'xl:ad-w-3/5', 'ad-max-w-md', 'lg:ad-max-w-none', 'ad-mx-auto', 'lg:ad-mx-0', 'ad-mt-6', 'ad-flex-no-shrink'],
2727

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

addon/components/docs-viewer/x-main/template.hbs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
<div class="lg:px-4" data-page-index-target>
1+
<div class="lg:ad-px-4" data-page-index-target>
22
{{yield}}
33

4-
<div class="mt-16 mb-8">
4+
<div class="ad-mt-16 ad-mb-8">
55
<a href={{editCurrentPageUrl}}
6-
class='transition text-grey-darkest opacity-50 text-sm
7-
hover:opacity-75 no-underline border-b border-grey hover:border-grey-darkest'>
6+
class='ad-transition ad-text-grey-darkest ad-opacity-50 ad-text-sm
7+
hover:ad-opacity-75 ad-no-underline ad-border-b ad-border-grey hover:ad-border-grey-darkest'>
88
Edit this page
99
</a>
1010
</div>
1111

1212
</div>
1313

14-
<div class="lg:px-4">
15-
<div class="mt-16 pb-16 border-t border-grey-lighter pt-4 flex">
16-
<div class="w-1/2">
14+
<div class="lg:ad-px-4">
15+
<div class="ad-mt-16 ad-pb-16 ad-border-t ad-border-grey-lighter ad-pt-4 ad-flex">
16+
<div class="ad-w-1/2">
1717
{{#if docsRoutes.previous}}
18-
<div class='text-sm text-grey-dark'>
18+
<div class='ad-text-sm ad-text-grey-dark'>
1919
Previous
2020
</div>
2121
{{#link-to params=docsRoutes.previous.route
22-
class='text-grey-darkest text-2xl font-light no-underline
23-
border-b border-grey hover:border-grey-darkest transition'}}
22+
class='ad-text-grey-darkest ad-text-2xl ad-font-light ad-no-underline
23+
ad-border-b ad-border-grey hover:ad-border-grey-darkest ad-transition'}}
2424
{{docsRoutes.previous.label}}
2525
{{/link-to}}
2626
{{/if}}
2727
</div>
2828

29-
<div class="w-1/2 text-right" data-test-next-link>
29+
<div class="ad-w-1/2 ad-text-right" data-test-next-link>
3030
{{#if docsRoutes.next}}
31-
<div class='text-sm text-grey-dark'>
31+
<div class='ad-text-sm ad-text-grey-dark'>
3232
Next
3333
</div>
3434
{{#link-to params=docsRoutes.next.route
35-
class='text-grey-darkest text-2xl font-light no-underline
36-
border-b border-grey hover:border-grey-darkest transition'}}
35+
class='ad-text-grey-darkest ad-text-2xl ad-font-light ad-no-underline
36+
ad-border-b ad-border-grey hover:ad-border-grey-darkest ad-transition'}}
3737
{{docsRoutes.next.label}}
3838
{{/link-to}}
3939
{{/if}}

0 commit comments

Comments
 (0)