diff --git a/public/product.css b/public/product.css new file mode 100644 index 0000000..66eb8e6 --- /dev/null +++ b/public/product.css @@ -0,0 +1,41 @@ +/* Smaller version (ie. sidebar in this demo) */ +@container (max-width: 200px) { + .product-container { + border: 1px solid #c2ceb0; + padding: 0.5rem; + border-radius: 10px; + display: flex; + align-items: center; + } + + .product-container h3 { + letter-spacing: 0; + width: 90px; + overflow: hidden; + text-overflow: ellipsis; + white-space: pre; + margin: 0; + } + + .product-container span { + margin: 0; + } + + .product-container p, + .product-container button { + display: none; + } +} + +/* wider sizes (i.e in hero) */ +@container (min-width: 350px) { + .product-container { + padding: 0.5rem 0 0; + display: flex; + } + .product button { + margin-left: 1rem; + } +} + + diff --git a/src/Lib/Product.svelte b/src/Lib/Product.svelte index e5d684b..e851b50 100644 --- a/src/Lib/Product.svelte +++ b/src/Lib/Product.svelte @@ -1,3 +1,8 @@ + + + + +
@@ -72,48 +77,4 @@ button { width: 350px; background: white; } - -/* Smaller version (ie. sidebar in this demo) */ -/* -@container (max-width: 200px) { - .product-container { - border: 1px solid #c2ceb0; - padding: 0.5rem; - border-radius: 10px; - display: flex; - align-items: center; - } - - .product-container h3 { - letter-spacing: 0; - width: 90px; - overflow: hidden; - text-overflow: ellipsis; - white-space: pre; - margin: 0; - } - - .product-container span { - margin: 0; - } - - .product-container p, - .product-container button { - display: none; - } -} -*/ - -/* wider sizes (i.e in hero) */ -/* -@container (min-width: 350px) { - .product-container { - padding: 0.5rem 0 0; - display: flex; - } - .product button { - margin-left: 1rem; - } -} -*/