-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
153 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
web: env RUBY_DEBUG_OPEN=true bin/rails server | ||
admin_tailwind: bin/rails solidus_admin:tailwindcss:watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/* | ||
* = require solidus_admin/tailwind.css | ||
*/ |
35 changes: 0 additions & 35 deletions
35
admin/app/assets/stylesheets/solidus_admin/application.tailwind.css.erb
This file was deleted.
Oops, something went wrong.
134 changes: 134 additions & 0 deletions
134
admin/app/views/layouts/solidus_admin/_tailwindcss_cdn.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<script src="https://cdn.tailwindcss.com/3.3.3?plugins=typography,aspect-ratio"></script> | ||
|
||
<style type="text/tailwindcss"> | ||
@layer base { | ||
|
||
.body-tiny { | ||
@apply font-sans font-normal text-xs; | ||
} | ||
|
||
.body-tiny-bold { | ||
@apply font-sans font-semibold text-xs; | ||
} | ||
|
||
.body-small { | ||
@apply font-sans font-normal text-sm; | ||
} | ||
|
||
.body-small-bold { | ||
@apply font-sans font-semibold text-sm; | ||
} | ||
|
||
.body-text { | ||
@apply font-sans font-normal text-base; | ||
} | ||
|
||
.body-text-bold { | ||
@apply font-sans font-semibold text-base; | ||
} | ||
|
||
.body-title { | ||
@apply font-sans font-semibold text-xl; | ||
} | ||
} | ||
</style> | ||
|
||
<script type="module"> | ||
import forms from '@tailwindcss/forms' | ||
import containerQueries from '@tailwindcss/forms' | ||
const {defaultTheme} = tailwind | ||
tailwind.config = { | ||
theme: { | ||
extend: { | ||
aria: { | ||
'current': 'current="true"', | ||
}, | ||
fontFamily: { | ||
sans: ['Inter var', ...defaultTheme.fontFamily.sans], | ||
}, | ||
colors: { | ||
transparent: "transparent", | ||
current: "currentColor", | ||
|
||
// Primary palette | ||
'solidus-red': "#ef3023", | ||
black: "#222222", | ||
graphite: "#c7ccc7", | ||
'graphite-light': "#d8dad8", | ||
sand: "#f5f3f0", | ||
white: "#ffffff", | ||
|
||
// Secondary palette | ||
yellow: "#fdc071", | ||
orange: "#f68050", | ||
blue: "#2554b1", | ||
moss: "#2d3925", | ||
forest: "#096756", | ||
midnight: "#163449", | ||
pink: "#f6d7e2", | ||
plum: "#3a0e31", | ||
sky: "#cbdff1", | ||
seafoam: "#c1e0de", | ||
dune: "#e6bf9b", | ||
'full-black': "#000000", | ||
|
||
// Extra colors (not part of the original palette) | ||
'papaya-whip': "#f9e3d9", | ||
|
||
// UI Red | ||
red: { | ||
100: "#f8d6d3", | ||
200: "#f1ada7", | ||
300: "#ea8980", | ||
400: "#e36054", | ||
500: "#dc3728", | ||
600: "#b12c20", | ||
700: "#862219", | ||
800: "#561610", | ||
900: "#2b0b08", | ||
}, | ||
|
||
// Grayscale | ||
gray: { | ||
15: "#fafafa", | ||
25: "#f5f5f5", | ||
50: "#f0f0f0", | ||
100: "#dedede", | ||
200: "#cfcfcf", | ||
300: "#bababa", | ||
400: "#a3a3a3", | ||
500: "#737373", | ||
600: "#616161", | ||
700: "#4a4a4a", | ||
800: "#333333", | ||
}, | ||
}, | ||
borderRadius: { | ||
sm: '4px', | ||
}, | ||
backgroundImage: { | ||
'arrow-right-up-line': "url('solidus_admin/arrow_right_up_line.svg')", | ||
'arrow-down-s-fill-gray-700': "url('solidus_admin/arrow_down_s_fill_gray_700.svg')", | ||
'arrow-down-s-fill-red-400': "url('solidus_admin/arrow_down_s_fill_red_400.svg')", | ||
}, | ||
boxShadow: { | ||
sm: '0px 1px 2px 0px rgba(0, 0, 0, 0.04)', | ||
base: '0px 4px 8px 0px rgba(0, 0, 0, 0.08), 0px 2px 4px -1px rgba(0, 0, 0, 0.04)' | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
({ addVariant }) => { | ||
addVariant("hidden", "&([hidden])") | ||
addVariant("visible", "&:not([hidden])") | ||
addVariant("search-cancel", "&::-webkit-search-cancel-button") | ||
}, | ||
forms({ strategy: "class" }), | ||
containerQueries(), | ||
], | ||
} | ||
|
||
document.addEventListener("turbo:render", () => { | ||
document.body.className += " " // This is a hack to trigger TW's JIT compiler | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.