Skip to content

Commit

Permalink
chore: wrap all --at-apply with quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackman99 committed Jul 19, 2024
1 parent 310758e commit 8e0ee88
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-flies-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltepress/theme-default": patch
---

chore: wrap all --at-apply with quotes
4 changes: 2 additions & 2 deletions packages/theme-default/src/components/ActionButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
--at-apply: 'svp-gradient-bg text-white dark:text-warm-gray-8';
}
.external-icon {
--at-apply: text-6 ml-2 flex items-center;
--at-apply: 'text-6 ml-2 flex items-center';
}
.label {
--at-apply: flex-grow text-center;
--at-apply: 'flex-grow text-center';
}
</style>
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/AjaxBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</script>

<div class="ajax-bar" style={`--ajax-bar-width: ${barWidth}%;`}>
<div class="progress" />
<div class="progress"></div>
</div>

<style>
Expand Down
3 changes: 1 addition & 2 deletions packages/theme-default/src/components/Backdrop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { createEventDispatcher } from 'svelte'
export let show = false
export let top = 0
export let zIndex = 900
const dispatcher = createEventDispatcher()
Expand All @@ -18,7 +17,7 @@
role="none"
style:top
style:z-index={zIndex}
/>
></div>

<style>
.backdrop {
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/CopyCode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
--at-apply: 'opacity-0 events-none absolute top-[6px] right-[12px] cursor-pointer z-200 w-[28px] h-[28px] text-4 rounded-lg border-solid border-2 border-gray-3 hover:border-svp-primary hover:text-svp-primary flex items-center justify-center transition-all transition-300';
}
:global(.svp-code-block:hover .svp-code-bock--copy-code) {
--at-apply: opacity-100 events-all;
--at-apply: 'opacity-100 events-all';
}
</style>
4 changes: 2 additions & 2 deletions packages/theme-default/src/components/EditPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
--at-apply: 'flex items-center text-svp-primary hover:text-svp-hover cursor-pointer';
}
.edit-icon {
--at-apply: text-5 flex items-center;
--at-apply: 'text-5 flex items-center';
}
.edit-text {
--at-apply: ml-1;
--at-apply: 'ml-1';
}
</style>
14 changes: 7 additions & 7 deletions packages/theme-default/src/components/Expansion.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,24 @@
--at-apply: 'mb-8 shadow-sm b-1 b-solid b-gray-2 dark:b-warmgray-8 rounded-lg';
}
:global(.svp-live-code--demo) {
--at-apply: p-4;
--at-apply: 'p-4';
}
:global(.c-expansion--body .svp-code-block) {
--at-apply: mb-none;
--at-apply: 'mb-none';
}
.c-expansion--header {
--at-apply: rounded-b flex justify-between px-4 py-2 items-center;
--at-apply: 'rounded-b flex justify-between px-4 py-2 items-center';
}
.c-expansion--icon {
--at-apply: mr-2 text-6 flex items-center;
--at-apply: 'mr-2 text-6 flex items-center';
}
.c-expansion--arrow {
--at-apply: text-6 flex items-center;
--at-apply: 'text-6 flex items-center';
}
.c-expansion--header-left {
--at-apply: flex items-center;
--at-apply: 'flex items-center';
}
.c-expansion--title {
--at-apply: text-3.5;
--at-apply: 'text-3.5';
}
</style>
12 changes: 6 additions & 6 deletions packages/theme-default/src/components/GlobalLayout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -199,30 +199,30 @@
}
:global(.svp-code-block--with-line-numbers .svp-code-block--diff-add),
:global(.svp-code-block--with-line-numbers .svp-code-block--diff-sub) {
--at-apply: pl-8;
--at-apply: 'pl-8';
}
:global(.svp-code-block--diff-add) {
--at-apply: text-green-4;
--at-apply: 'text-green-4';
}
:global(.svp-code-block--diff-sub) {
--at-apply: text-rose-4;
--at-apply: 'text-rose-4';
}
:global(.svp-code-block--diff-add),
:global(.svp-code-block--diff-sub) {
--at-apply: absolute left-[4px] top-0 bottom-0 leading-[1.5em];
--at-apply: 'absolute left-[4px] top-0 bottom-0 leading-[1.5em]';
font-family: var(--svp-code-font);
}
:global(.svp-code-block--hl) {
--at-apply: 'bg-black dark:bg-white bg-opacity-10 dark:bg-opacity-10';
}
:global(.svp-code-block:hover .svp-code-block--focus) {
--at-apply: opacity-0;
--at-apply: 'opacity-0';
}
:global(blockquote) {
--at-apply: 'border-l-[4px] border-l-solid border-gray-4 m-none bg-gray-2 indent-[1em] text-gray-4 py-[4px] my-4 dark:border-l-gray-5 dark:bg-gray-8';
}
:global(blockquote p) {
--at-apply: m-none;
--at-apply: 'm-none';
}
:global(table) {
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/Home.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
--at-apply: 'col-start-1 sm:col-span-7 col-span-12 row-start-2 sm:row-start-1 text-center sm:text-left';
}
.gradient-title {
--at-apply: svp-gradient-text;
--at-apply: 'svp-gradient-text';
}
.tagline {
--at-apply: 'text-slate-5 dark:text-slate-4 text-6 mt-4 font-500 leading-9 font-normal';
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/IconifyIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
$$restProps
</script>

<div class="icon--{collection} icon--{collection}--{name}" />
<div class="icon--{collection} icon--{collection}--{name}"></div>
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/Link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<style>
.highlight {
--at-apply: text-svp-primary;
--at-apply: 'text-svp-primary';
}
.link {
--at-apply: 'inline-flex hover:text-svp-hover cursor-pointer items-center transition-200 transition-color';
Expand Down
4 changes: 2 additions & 2 deletions packages/theme-default/src/components/Logo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

<style>
.logo {
--at-apply: h-[32px];
--at-apply: 'h-[32px]';
}
.title {
--at-apply: font-600 ml-2;
--at-apply: 'font-600 ml-2';
}
</style>
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/MobileSubNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class="i-ic-round-menu-open text-6"
on:click={openSidebar}
on:keypress={openSidebar}
/>
></div>
<div role="button" tabindex="0" on:click={openToc} on:keypress={openToc}>
{themeOptions?.i18n?.onThisPage || DEFAULT_ON_THIS_PAGE}
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/theme-default/src/components/NavItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
}
.nav-item--icon:hover {
--at-apply: opacity-80;
--at-apply: 'opacity-80';
}
:global(:not(.dropdown) > .nav-item:not(.nav-item--icon):hover) {
--at-apply: svp-gradient-text;
--at-apply: 'svp-gradient-text';
}
.dropdown {
--at-apply: 'transition-transform transition-opacity transition-300 opacity-0 pointer-events-none absolute top-0 right-0 bg-white dark:bg-[#232323] whitespace-nowrap z-3 rounded shadow-sm p-2';
Expand All @@ -104,7 +104,7 @@
background-image: none;
}
.nav-item:hover .dropdown {
--at-apply: opacity-100 pointer-events-initial;
--at-apply: 'opacity-100 pointer-events-initial';
transform: translateY(54px);
}
.arrow {
Expand Down
6 changes: 3 additions & 3 deletions packages/theme-default/src/components/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
--at-apply: 'sm:w-[80vw] h-full flex items-stretch justify-between mx-auto';
}
.left {
--at-apply: flex items-center;
--at-apply: 'flex items-center';
}
.doc-search {
--at-apply: 'flex-grow flex items-center relative transition-500 transition-left';
}
.doc-search.is-home {
--at-apply: left-2;
--at-apply: 'left-2';
}
.doc-search.move {
--at-apply: 'sm:left-[15.5vw]';
Expand All @@ -106,7 +106,7 @@
--at-apply: 'items-stretch flex';
}
.nav-links {
--at-apply: flex items-stretch flex-grow justify-end;
--at-apply: 'flex items-stretch flex-grow justify-end';
}
.navbar-pc :global(.nav-item:not(.nav-item--icon)),
Expand Down
16 changes: 8 additions & 8 deletions packages/theme-default/src/components/PageSwitcher.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,27 @@
--at-apply: 'border-solid border-1 border-light-7 dark:border-gray-7 rounded-lg flex-grow cursor-pointer hover:border-svp-primary transition-300 transition-colors';
}
.hint {
--at-apply: text-gray-4 text-3;
--at-apply: 'text-gray-4 text-3';
}
.title {
--at-apply: flex items-center text-svp-primary mt-3;
--at-apply: 'flex items-center text-svp-primary mt-3';
}
.right .title {
--at-apply: justify-end;
--at-apply: 'justify-end';
}
.title-label {
--at-apply: ml-2;
--at-apply: 'ml-2';
}
.right .title-label {
--at-apply: mr-2 ml-none;
--at-apply: 'mr-2 ml-none';
}
.right {
--at-apply: text-right;
--at-apply: 'text-right';
}
.switch-icon {
--at-apply: text-5;
--at-apply: 'text-5';
}
.trigger {
--at-apply: px-4 py-2 block;
--at-apply: 'px-4 py-2 block';
}
</style>
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
})
</script>

<div id="docsearch" />
<div id="docsearch"></div>
6 changes: 3 additions & 3 deletions packages/theme-default/src/components/SidebarGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@
--at-apply: 'font-bold text-slate-8 dark:text-slate-2 flex items-center justify-between';
}
.links {
--at-apply: leading-8 overflow-hidden;
--at-apply: 'leading-8 overflow-hidden';
}
.collapse-control {
--at-apply: 'transition transition-200 transition-bg transition-transform cursor-pointer text-5 hover:bg-gray-2 active:bg-gray-3 dark:hover:bg-gray-8 dark:active:bg-gray-7 w-[28px] h-[28px] flex items-center justify-center rounded';
}
.arrow {
--at-apply: flex items-center transition-300 transition-transform;
--at-apply: 'flex items-center transition-300 transition-transform';
}
.collapsed {
--at-apply: rotate--90;
--at-apply: 'rotate--90';
}
.active-icon {
--at-apply: 'text-svp-primary ml-4 flex items-center text-5';
Expand Down
3 changes: 0 additions & 3 deletions packages/theme-default/src/components/TabPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
{/if}

<style>
.tab-panel {
--at-apply: '';
}
:global(.tab-panel .svp-code-block-wrapper) {
--at-apply: 'm-none';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/Tabs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
duration: 200,
easing: cubicInOut,
}}
/>
></div>
{/each}
</div>
<div class:padding={bodyPadding}>
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/Toc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
{an.title}
</a>
{/each}
<div class="active-bar" />
<div class="active-bar"></div>
</div>
</div>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/components/pwa/Prompt.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
--at-apply: 'mb-3';
}
.actions {
--at-apply: flex justify-end mt-8;
--at-apply: 'flex justify-end mt-8';
}
</style>

0 comments on commit 8e0ee88

Please sign in to comment.