From cdccc4cdd019fcac1c612db601050c739d0bd178 Mon Sep 17 00:00:00 2001 From: Felix Wieland Date: Mon, 3 Jul 2023 21:08:03 +0200 Subject: [PATCH] updated hotreload --- example/tailwind/assets/index.min.css | 1826 +------------------------ example/tailwind/home.go | 7 +- example/tailwind/main.go | 2 + go.mod | 6 +- go.sum | 6 + hotreload.go | 4 +- 6 files changed, 21 insertions(+), 1830 deletions(-) diff --git a/example/tailwind/assets/index.min.css b/example/tailwind/assets/index.min.css index 37d5533..bc8faba 100644 --- a/example/tailwind/assets/index.min.css +++ b/example/tailwind/assets/index.min.css @@ -522,1828 +522,12 @@ video { --tw-backdrop-sepia: ; } -.container { - width: 100%; -} - -@media (min-width: 640px) { - .container { - max-width: 640px; - } -} - -@media (min-width: 768px) { - .container { - max-width: 768px; - } -} - -@media (min-width: 1024px) { - .container { - max-width: 1024px; - } -} - -@media (min-width: 1280px) { - .container { - max-width: 1280px; - } -} - -@media (min-width: 1536px) { - .container { - max-width: 1536px; - } -} - -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.not-sr-only { - position: static; - width: auto; - height: auto; - padding: 0; - margin: 0; - overflow: visible; - clip: auto; - white-space: normal; -} - -.pointer-events-none { - pointer-events: none; -} - -.pointer-events-auto { - pointer-events: auto; -} - -.visible { - visibility: visible; -} - -.invisible { - visibility: hidden; -} - -.collapse { - visibility: collapse; -} - -.static { - position: static; -} - -.fixed { - position: fixed; -} - -.absolute { - position: absolute; -} - -.relative { - position: relative; -} - -.sticky { - position: sticky; -} - -.-inset-1 { - inset: -0.25rem; -} - -.end-1 { - inset-inline-end: 0.25rem; -} - -.isolate { - isolation: isolate; -} - -.isolation-auto { - isolation: auto; -} - -.float-right { - float: right; -} - -.float-left { - float: left; -} - -.float-none { - float: none; -} - -.clear-left { - clear: left; -} - -.clear-right { - clear: right; -} - -.clear-both { - clear: both; -} - -.clear-none { - clear: none; -} - -.mt-2 { - margin-top: 0.5rem; -} - -.box-border { - box-sizing: border-box; -} - -.box-content { - box-sizing: content-box; -} - -.line-clamp-none { - overflow: visible; - display: block; - -webkit-box-orient: horizontal; - -webkit-line-clamp: none; -} - -.block { - display: block; -} - -.inline-block { - display: inline-block; -} - -.inline { - display: inline; -} - -.flex { - display: flex; -} - -.inline-flex { - display: inline-flex; -} - -.table { - display: table; -} - -.inline-table { - display: inline-table; -} - -.table-caption { - display: table-caption; -} - -.table-cell { - display: table-cell; -} - -.table-column { - display: table-column; -} - -.table-column-group { - display: table-column-group; -} - -.table-footer-group { - display: table-footer-group; -} - -.table-header-group { - display: table-header-group; -} - -.table-row-group { - display: table-row-group; -} - -.table-row { - display: table-row; -} - -.flow-root { - display: flow-root; -} - -.grid { - display: grid; -} - -.inline-grid { - display: inline-grid; -} - -.contents { - display: contents; -} - -.list-item { - display: list-item; -} - -.hidden { - display: none; -} - -.flex-shrink { - flex-shrink: 1; -} - -.shrink { - flex-shrink: 1; -} - -.flex-grow { - flex-grow: 1; -} - -.grow { - flex-grow: 1; -} - -.table-auto { - table-layout: auto; -} - -.table-fixed { - table-layout: fixed; -} - -.caption-top { - caption-side: top; -} - -.caption-bottom { - caption-side: bottom; -} - -.border-collapse { - border-collapse: collapse; -} - -.border-separate { - border-collapse: separate; -} - -.\!transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; -} - -.transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.transform-cpu { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.transform-gpu { - transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.transform-none { - transform: none; -} - -.touch-auto { - touch-action: auto; -} - -.touch-none { - touch-action: none; -} - -.touch-pan-x { - --tw-pan-x: pan-x; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-pan-left { - --tw-pan-x: pan-left; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-pan-right { - --tw-pan-x: pan-right; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-pan-y { - --tw-pan-y: pan-y; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-pan-up { - --tw-pan-y: pan-up; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-pan-down { - --tw-pan-y: pan-down; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-pinch-zoom { - --tw-pinch-zoom: pinch-zoom; - touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); -} - -.touch-manipulation { - touch-action: manipulation; -} - -.select-none { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} - -.select-text { - -webkit-user-select: text; - -moz-user-select: text; - user-select: text; -} - -.select-all { - -webkit-user-select: all; - -moz-user-select: all; - user-select: all; -} - -.select-auto { - -webkit-user-select: auto; - -moz-user-select: auto; - user-select: auto; -} - -.resize-none { - resize: none; -} - -.resize-y { - resize: vertical; -} - -.resize-x { - resize: horizontal; -} - -.resize { - resize: both; -} - -.snap-none { - scroll-snap-type: none; -} - -.snap-x { - scroll-snap-type: x var(--tw-scroll-snap-strictness); -} - -.snap-y { - scroll-snap-type: y var(--tw-scroll-snap-strictness); -} - -.snap-both { - scroll-snap-type: both var(--tw-scroll-snap-strictness); -} - -.snap-mandatory { - --tw-scroll-snap-strictness: mandatory; -} - -.snap-proximity { - --tw-scroll-snap-strictness: proximity; -} - -.snap-start { - scroll-snap-align: start; -} - -.snap-end { - scroll-snap-align: end; -} - -.snap-center { - scroll-snap-align: center; -} - -.snap-align-none { - scroll-snap-align: none; -} - -.snap-normal { - scroll-snap-stop: normal; -} - -.snap-always { - scroll-snap-stop: always; -} - -.list-inside { - list-style-position: inside; -} - -.list-outside { - list-style-position: outside; -} - -.appearance-none { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.break-before-auto { - -moz-column-break-before: auto; - break-before: auto; -} - -.break-before-avoid { - -moz-column-break-before: avoid; - break-before: avoid; -} - -.break-before-all { - -moz-column-break-before: all; - break-before: all; -} - -.break-before-avoid-page { - -moz-column-break-before: avoid; - break-before: avoid-page; -} - -.break-before-page { - -moz-column-break-before: page; - break-before: page; -} - -.break-before-left { - -moz-column-break-before: left; - break-before: left; -} - -.break-before-right { - -moz-column-break-before: right; - break-before: right; -} - -.break-before-column { - -moz-column-break-before: column; - break-before: column; -} - -.break-inside-auto { - -moz-column-break-inside: auto; - break-inside: auto; -} - -.break-inside-avoid { - -moz-column-break-inside: avoid; - break-inside: avoid; -} - -.break-inside-avoid-page { - break-inside: avoid-page; -} - -.break-inside-avoid-column { - -moz-column-break-inside: avoid; - break-inside: avoid-column; -} - -.break-after-auto { - -moz-column-break-after: auto; - break-after: auto; -} - -.break-after-avoid { - -moz-column-break-after: avoid; - break-after: avoid; -} - -.break-after-all { - -moz-column-break-after: all; - break-after: all; -} - -.break-after-avoid-page { - -moz-column-break-after: avoid; - break-after: avoid-page; -} - -.break-after-page { - -moz-column-break-after: page; - break-after: page; -} - -.break-after-left { - -moz-column-break-after: left; - break-after: left; -} - -.break-after-right { - -moz-column-break-after: right; - break-after: right; -} - -.break-after-column { - -moz-column-break-after: column; - break-after: column; -} - -.grid-flow-row { - grid-auto-flow: row; -} - -.grid-flow-col { - grid-auto-flow: column; -} - -.grid-flow-dense { - grid-auto-flow: dense; -} - -.grid-flow-row-dense { - grid-auto-flow: row dense; -} - -.grid-flow-col-dense { - grid-auto-flow: column dense; -} - -.flex-row { - flex-direction: row; -} - -.flex-row-reverse { - flex-direction: row-reverse; -} - -.flex-col { - flex-direction: column; -} - -.flex-col-reverse { - flex-direction: column-reverse; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.flex-wrap-reverse { - flex-wrap: wrap-reverse; -} - -.flex-nowrap { - flex-wrap: nowrap; -} - -.place-content-center { - place-content: center; -} - -.place-content-start { - place-content: start; -} - -.place-content-end { - place-content: end; -} - -.place-content-between { - place-content: space-between; -} - -.place-content-around { - place-content: space-around; -} - -.place-content-evenly { - place-content: space-evenly; -} - -.place-content-baseline { - place-content: baseline; -} - -.place-content-stretch { - place-content: stretch; -} - -.place-items-start { - place-items: start; -} - -.place-items-end { - place-items: end; -} - -.place-items-center { - place-items: center; -} - -.place-items-baseline { - place-items: baseline; -} - -.place-items-stretch { - place-items: stretch; -} - -.content-normal { - align-content: normal; -} - -.content-center { - align-content: center; -} - -.content-start { - align-content: flex-start; -} - -.content-end { - align-content: flex-end; -} - -.content-between { - align-content: space-between; -} - -.content-around { - align-content: space-around; -} - -.content-evenly { - align-content: space-evenly; -} - -.content-baseline { - align-content: baseline; -} - -.content-stretch { - align-content: stretch; -} - -.items-start { - align-items: flex-start; -} - -.items-end { - align-items: flex-end; -} - -.items-center { - align-items: center; -} - -.items-baseline { - align-items: baseline; -} - -.items-stretch { - align-items: stretch; -} - -.justify-normal { - justify-content: normal; -} - -.justify-start { - justify-content: flex-start; -} - -.justify-end { - justify-content: flex-end; -} - -.justify-center { - justify-content: center; -} - -.justify-between { - justify-content: space-between; -} - -.justify-around { - justify-content: space-around; -} - -.justify-evenly { - justify-content: space-evenly; -} - -.justify-stretch { - justify-content: stretch; -} - -.justify-items-start { - justify-items: start; -} - -.justify-items-end { - justify-items: end; -} - -.justify-items-center { - justify-items: center; -} - -.justify-items-stretch { - justify-items: stretch; -} - -.space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); -} - -.space-y-reverse > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 1; -} - -.space-x-reverse > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 1; -} - -.divide-x > :not([hidden]) ~ :not([hidden]) { - --tw-divide-x-reverse: 0; - border-right-width: calc(1px * var(--tw-divide-x-reverse)); - border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); -} - -.divide-y > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 0; - border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); - border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); -} - -.divide-y-reverse > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 1; -} - -.divide-x-reverse > :not([hidden]) ~ :not([hidden]) { - --tw-divide-x-reverse: 1; -} - -.divide-solid > :not([hidden]) ~ :not([hidden]) { - border-style: solid; -} - -.divide-dashed > :not([hidden]) ~ :not([hidden]) { - border-style: dashed; -} - -.divide-dotted > :not([hidden]) ~ :not([hidden]) { - border-style: dotted; -} - -.divide-double > :not([hidden]) ~ :not([hidden]) { - border-style: double; -} - -.divide-none > :not([hidden]) ~ :not([hidden]) { - border-style: none; -} - -.place-self-auto { - place-self: auto; -} - -.place-self-start { - place-self: start; -} - -.place-self-end { - place-self: end; -} - -.place-self-center { - place-self: center; -} - -.place-self-stretch { - place-self: stretch; -} - -.self-auto { - align-self: auto; -} - -.self-start { - align-self: flex-start; -} - -.self-end { - align-self: flex-end; -} - -.self-center { - align-self: center; -} - -.self-stretch { - align-self: stretch; -} - -.self-baseline { - align-self: baseline; -} - -.justify-self-auto { - justify-self: auto; -} - -.justify-self-start { - justify-self: start; -} - -.justify-self-end { - justify-self: end; -} - -.justify-self-center { - justify-self: center; -} - -.justify-self-stretch { - justify-self: stretch; -} - -.overflow-auto { - overflow: auto; -} - -.overflow-hidden { - overflow: hidden; -} - -.overflow-clip { - overflow: clip; -} - -.overflow-visible { - overflow: visible; -} - -.overflow-scroll { - overflow: scroll; -} - -.overflow-x-auto { - overflow-x: auto; -} - -.overflow-y-auto { - overflow-y: auto; -} - -.overflow-x-hidden { - overflow-x: hidden; -} - -.overflow-y-hidden { - overflow-y: hidden; -} - -.overflow-x-clip { - overflow-x: clip; -} - -.overflow-y-clip { - overflow-y: clip; -} - -.overflow-x-visible { - overflow-x: visible; -} - -.overflow-y-visible { - overflow-y: visible; -} - -.overflow-x-scroll { - overflow-x: scroll; -} - -.overflow-y-scroll { - overflow-y: scroll; -} - -.overscroll-auto { - overscroll-behavior: auto; -} - -.overscroll-contain { - overscroll-behavior: contain; -} - -.overscroll-none { - overscroll-behavior: none; -} - -.overscroll-y-auto { - overscroll-behavior-y: auto; -} - -.overscroll-y-contain { - overscroll-behavior-y: contain; -} - -.overscroll-y-none { - overscroll-behavior-y: none; -} - -.overscroll-x-auto { - overscroll-behavior-x: auto; -} - -.overscroll-x-contain { - overscroll-behavior-x: contain; -} - -.overscroll-x-none { - overscroll-behavior-x: none; -} - -.scroll-auto { - scroll-behavior: auto; -} - -.scroll-smooth { - scroll-behavior: smooth; -} - -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.overflow-ellipsis { - text-overflow: ellipsis; -} - -.text-ellipsis { - text-overflow: ellipsis; -} - -.text-clip { - text-overflow: clip; -} - -.hyphens-none { - -webkit-hyphens: none; - hyphens: none; -} - -.hyphens-manual { - -webkit-hyphens: manual; - hyphens: manual; -} - -.hyphens-auto { - -webkit-hyphens: auto; - hyphens: auto; -} - -.whitespace-normal { - white-space: normal; -} - -.whitespace-nowrap { - white-space: nowrap; -} - -.whitespace-pre { - white-space: pre; -} - -.whitespace-pre-line { - white-space: pre-line; -} - -.whitespace-pre-wrap { - white-space: pre-wrap; -} - -.whitespace-break-spaces { - white-space: break-spaces; -} - -.break-normal { - overflow-wrap: normal; - word-break: normal; -} - -.break-words { - overflow-wrap: break-word; -} - -.break-all { - word-break: break-all; -} - -.break-keep { - word-break: keep-all; -} - -.rounded { - border-radius: 0.25rem; -} - -.rounded-b { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; -} - -.rounded-e { - border-start-end-radius: 0.25rem; - border-end-end-radius: 0.25rem; -} - -.rounded-l { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; -} - -.rounded-r { - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; -} - -.rounded-s { - border-start-start-radius: 0.25rem; - border-end-start-radius: 0.25rem; -} - -.rounded-t { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; -} - -.rounded-bl { - border-bottom-left-radius: 0.25rem; -} - -.rounded-br { - border-bottom-right-radius: 0.25rem; -} - -.rounded-ee { - border-end-end-radius: 0.25rem; -} - -.rounded-es { - border-end-start-radius: 0.25rem; -} - -.rounded-se { - border-start-end-radius: 0.25rem; -} - -.rounded-ss { - border-start-start-radius: 0.25rem; -} - -.rounded-tl { - border-top-left-radius: 0.25rem; -} - -.rounded-tr { - border-top-right-radius: 0.25rem; -} - -.border { - border-width: 1px; -} - -.border-x { - border-left-width: 1px; - border-right-width: 1px; -} - -.border-y { - border-top-width: 1px; - border-bottom-width: 1px; -} - -.border-b { - border-bottom-width: 1px; -} - -.border-e { - border-inline-end-width: 1px; -} - -.border-l { - border-left-width: 1px; -} - -.border-r { - border-right-width: 1px; -} - -.border-s { - border-inline-start-width: 1px; -} - -.border-t { - border-top-width: 1px; -} - -.border-solid { - border-style: solid; -} - -.border-dashed { - border-style: dashed; -} - -.border-dotted { - border-style: dotted; -} - -.border-double { - border-style: double; -} - -.border-hidden { - border-style: hidden; -} - -.border-none { - border-style: none; -} - -.bg-\[rgb\(255\2c 0\2c 0\)\] { - --tw-bg-opacity: 1; - background-color: rgb(255 0 0 / var(--tw-bg-opacity)); -} - -.bg-black { - --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); -} - -.decoration-slice { - -webkit-box-decoration-break: slice; - box-decoration-break: slice; -} - -.decoration-clone { - -webkit-box-decoration-break: clone; - box-decoration-break: clone; -} - -.box-decoration-slice { - -webkit-box-decoration-break: slice; - box-decoration-break: slice; -} - -.box-decoration-clone { - -webkit-box-decoration-break: clone; - box-decoration-break: clone; -} - -.bg-fixed { - background-attachment: fixed; -} - -.bg-local { - background-attachment: local; -} - -.bg-scroll { - background-attachment: scroll; -} - -.bg-clip-border { - background-clip: border-box; -} - -.bg-clip-padding { - background-clip: padding-box; -} - -.bg-clip-content { - background-clip: content-box; -} - -.bg-clip-text { - -webkit-background-clip: text; - background-clip: text; -} - -.bg-repeat { - background-repeat: repeat; -} - -.bg-no-repeat { - background-repeat: no-repeat; -} - -.bg-repeat-x { - background-repeat: repeat-x; -} - -.bg-repeat-y { - background-repeat: repeat-y; -} - -.bg-repeat-round { - background-repeat: round; -} - -.bg-repeat-space { - background-repeat: space; -} - -.bg-origin-border { - background-origin: border-box; -} - -.bg-origin-padding { - background-origin: padding-box; -} - -.bg-origin-content { - background-origin: content-box; -} - -.object-contain { - -o-object-fit: contain; - object-fit: contain; -} - -.object-cover { - -o-object-fit: cover; - object-fit: cover; -} - -.object-fill { - -o-object-fit: fill; - object-fit: fill; -} - -.object-none { - -o-object-fit: none; - object-fit: none; -} - -.object-scale-down { - -o-object-fit: scale-down; - object-fit: scale-down; -} - -.text-left { - text-align: left; -} - -.text-center { - text-align: center; -} - -.text-right { - text-align: right; -} - -.text-justify { - text-align: justify; -} - -.text-start { - text-align: start; -} - -.text-end { - text-align: end; -} - -.align-baseline { - vertical-align: baseline; -} - -.align-top { - vertical-align: top; -} - -.align-middle { - vertical-align: middle; -} - -.align-bottom { - vertical-align: bottom; -} - -.align-text-top { - vertical-align: text-top; -} - -.align-text-bottom { - vertical-align: text-bottom; -} - -.align-sub { - vertical-align: sub; -} - -.align-super { - vertical-align: super; -} - -.font-bold { - font-weight: 700; -} - -.uppercase { - text-transform: uppercase; -} - -.lowercase { - text-transform: lowercase; -} - -.capitalize { - text-transform: capitalize; -} - -.normal-case { - text-transform: none; -} - -.italic { - font-style: italic; -} - -.not-italic { - font-style: normal; -} - -.normal-nums { - font-variant-numeric: normal; -} - -.ordinal { - --tw-ordinal: ordinal; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.slashed-zero { - --tw-slashed-zero: slashed-zero; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.lining-nums { - --tw-numeric-figure: lining-nums; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.oldstyle-nums { - --tw-numeric-figure: oldstyle-nums; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.proportional-nums { - --tw-numeric-spacing: proportional-nums; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.tabular-nums { - --tw-numeric-spacing: tabular-nums; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.diagonal-fractions { - --tw-numeric-fraction: diagonal-fractions; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.stacked-fractions { - --tw-numeric-fraction: stacked-fractions; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.text-\[\#336699\]\/\[\.35\] { - color: rgb(51 102 153 / .35); +.bg-black { + --tw-bg-opacity: 1; + background-color: rgb(0 0 0 / var(--tw-bg-opacity)); } -.text-blue-500 { +.text-white { --tw-text-opacity: 1; - color: rgb(59 130 246 / var(--tw-text-opacity)); -} - -.underline { - text-decoration-line: underline; -} - -.overline { - text-decoration-line: overline; -} - -.line-through { - text-decoration-line: line-through; -} - -.no-underline { - text-decoration-line: none; -} - -.decoration-solid { - text-decoration-style: solid; -} - -.decoration-double { - text-decoration-style: double; -} - -.decoration-dotted { - text-decoration-style: dotted; -} - -.decoration-dashed { - text-decoration-style: dashed; -} - -.decoration-wavy { - text-decoration-style: wavy; -} - -.antialiased { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.subpixel-antialiased { - -webkit-font-smoothing: auto; - -moz-osx-font-smoothing: auto; -} - -.bg-blend-normal { - background-blend-mode: normal; -} - -.bg-blend-multiply { - background-blend-mode: multiply; -} - -.bg-blend-screen { - background-blend-mode: screen; -} - -.bg-blend-overlay { - background-blend-mode: overlay; -} - -.bg-blend-darken { - background-blend-mode: darken; -} - -.bg-blend-lighten { - background-blend-mode: lighten; -} - -.bg-blend-color-dodge { - background-blend-mode: color-dodge; -} - -.bg-blend-color-burn { - background-blend-mode: color-burn; -} - -.bg-blend-hard-light { - background-blend-mode: hard-light; -} - -.bg-blend-soft-light { - background-blend-mode: soft-light; -} - -.bg-blend-difference { - background-blend-mode: difference; -} - -.bg-blend-exclusion { - background-blend-mode: exclusion; -} - -.bg-blend-hue { - background-blend-mode: hue; -} - -.bg-blend-saturation { - background-blend-mode: saturation; -} - -.bg-blend-color { - background-blend-mode: color; -} - -.bg-blend-luminosity { - background-blend-mode: luminosity; -} - -.mix-blend-normal { - mix-blend-mode: normal; -} - -.mix-blend-multiply { - mix-blend-mode: multiply; -} - -.mix-blend-screen { - mix-blend-mode: screen; -} - -.mix-blend-overlay { - mix-blend-mode: overlay; -} - -.mix-blend-darken { - mix-blend-mode: darken; -} - -.mix-blend-lighten { - mix-blend-mode: lighten; -} - -.mix-blend-color-dodge { - mix-blend-mode: color-dodge; -} - -.mix-blend-color-burn { - mix-blend-mode: color-burn; -} - -.mix-blend-hard-light { - mix-blend-mode: hard-light; -} - -.mix-blend-soft-light { - mix-blend-mode: soft-light; -} - -.mix-blend-difference { - mix-blend-mode: difference; -} - -.mix-blend-exclusion { - mix-blend-mode: exclusion; -} - -.mix-blend-hue { - mix-blend-mode: hue; -} - -.mix-blend-saturation { - mix-blend-mode: saturation; -} - -.mix-blend-color { - mix-blend-mode: color; -} - -.mix-blend-luminosity { - mix-blend-mode: luminosity; -} - -.mix-blend-plus-lighter { - mix-blend-mode: plus-lighter; -} - -.\!shadow { - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important; - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important; - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important; -} - -.shadow { - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.outline-none { - outline: 2px solid transparent; - outline-offset: 2px; -} - -.outline { - outline-style: solid; -} - -.outline-dashed { - outline-style: dashed; -} - -.outline-dotted { - outline-style: dotted; -} - -.outline-double { - outline-style: double; -} - -.ring { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -.ring-inset { - --tw-ring-inset: inset; -} - -.blur { - --tw-blur: blur(8px); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.drop-shadow { - --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06)); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.grayscale { - --tw-grayscale: grayscale(100%); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.invert { - --tw-invert: invert(100%); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.sepia { - --tw-sepia: sepia(100%); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.\!filter { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important; -} - -.filter { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.filter-none { - filter: none; -} - -.backdrop-blur { - --tw-backdrop-blur: blur(8px); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); -} - -.backdrop-grayscale { - --tw-backdrop-grayscale: grayscale(100%); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); -} - -.backdrop-invert { - --tw-backdrop-invert: invert(100%); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); -} - -.backdrop-sepia { - --tw-backdrop-sepia: sepia(100%); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); -} - -.backdrop-filter { - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); -} - -.backdrop-filter-none { - -webkit-backdrop-filter: none; - backdrop-filter: none; -} - -.transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.ease-in { - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); -} - -.ease-in-out { - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -} - -.ease-out { - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); -} - -.content-\[\'this-is-also-valid\]-weirdly-enough\'\] { - --tw-content: 'this-is-also-valid]-weirdly-enough'; - content: var(--tw-content); -} - -@media (min-width: 640px) { - .sm\:container { - width: 100%; - } - - @media (min-width: 640px) { - .sm\:container { - max-width: 640px; - } - } - - @media (min-width: 768px) { - .sm\:container { - max-width: 768px; - } - } - - @media (min-width: 1024px) { - .sm\:container { - max-width: 1024px; - } - } - - @media (min-width: 1280px) { - .sm\:container { - max-width: 1280px; - } - } - - @media (min-width: 1536px) { - .sm\:container { - max-width: 1536px; - } - } -} - -.hover\:font-bold:hover { - font-weight: 700; -} - -.before\:hover\:text-center:hover::before { - content: var(--tw-content); - text-align: center; -} - -.hover\:before\:text-center:hover::before { - content: var(--tw-content); - text-align: center; -} - -.focus\:hover\:text-center:hover:focus { - text-align: center; -} - -.hover\:focus\:text-center:focus:hover { - text-align: center; -} - -@media (min-width: 640px) { - .sm\:underline { - text-decoration-line: underline; - } -} - -@media (prefers-color-scheme: dark) { - @media (min-width: 1024px) { - .dark\:lg\:hover\:\[paint-order\:markers\]:hover { - paint-order: markers; - } - } + color: rgb(255 255 255 / var(--tw-text-opacity)); } \ No newline at end of file diff --git a/example/tailwind/home.go b/example/tailwind/home.go index af7045f..3745a88 100644 --- a/example/tailwind/home.go +++ b/example/tailwind/home.go @@ -15,11 +15,8 @@ var homeView = magic.View(` - - + + Test! `) diff --git a/example/tailwind/main.go b/example/tailwind/main.go index 9551eb2..fe2cd36 100644 --- a/example/tailwind/main.go +++ b/example/tailwind/main.go @@ -8,10 +8,12 @@ import ( ) func main() { + magic.HotReload() mux := http.NewServeMux() mux.Handle("/", magic.ComponentHTTPHandler(home, magic.WithCompressed(true))) mux.Handle("/assets/index.min.css", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Add("Cache-Control", "no-cache") http.ServeFile(w, r, "assets/index.min.css") })) diff --git a/go.mod b/go.mod index 1670cdc..f98a32a 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,9 @@ go 1.20 require ( github.com/Instantan/template v0.0.0-20230425082119-3dc7bea5b7b6 - github.com/Instantan/watcher v0.0.0-20230607190015-46491d4d39fc + github.com/Instantan/watcher v0.0.0-20230703184439-ff392fdcc0c3 github.com/gobwas/ws v1.2.1 - github.com/klauspost/compress v1.16.5 + github.com/klauspost/compress v1.16.7 ) require ( @@ -19,5 +19,5 @@ require ( github.com/tdewolff/test v1.0.9 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/sys v0.8.0 // indirect + golang.org/x/sys v0.9.0 // indirect ) diff --git a/go.sum b/go.sum index 2caac5c..d23dba5 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/Instantan/template v0.0.0-20230425082119-3dc7bea5b7b6 h1:bY56EOpJWRw1 github.com/Instantan/template v0.0.0-20230425082119-3dc7bea5b7b6/go.mod h1:EfVMmm+rt26UXwDwOhGuL2UEjq5bylLIo1vGXJl/Z4k= github.com/Instantan/watcher v0.0.0-20230607190015-46491d4d39fc h1:BO7C4Qb3CDAczmxA5xd4QS53WO1K8sdPTrpliWYtoQQ= github.com/Instantan/watcher v0.0.0-20230607190015-46491d4d39fc/go.mod h1:R/DU6k9fVj+pYMhwI7ahmiygPg8L0aHN4MStcXzEFhI= +github.com/Instantan/watcher v0.0.0-20230703184439-ff392fdcc0c3 h1:/tEvdtqG0yLWpiEMJdaO8zHd2vzm3zJuq6ruuIYMqgU= +github.com/Instantan/watcher v0.0.0-20230703184439-ff392fdcc0c3/go.mod h1:R/DU6k9fVj+pYMhwI7ahmiygPg8L0aHN4MStcXzEFhI= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= @@ -10,6 +12,8 @@ github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk= github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/panjf2000/ants v1.3.0 h1:8pQ+8leaLc9lys2viEEr8md0U4RN6uOSUCE9bOYjQ9M= github.com/panjf2000/ants v1.3.0/go.mod h1:AaACblRPzq35m1g3enqYcxspbbiOJJYaxU2wMpm1cXY= github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= @@ -30,3 +34,5 @@ golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/hotreload.go b/hotreload.go index 7a52498..be521f3 100644 --- a/hotreload.go +++ b/hotreload.go @@ -1,6 +1,8 @@ package magic -import "github.com/Instantan/watcher" +import ( + "github.com/Instantan/watcher" +) // Call this function as the first function in your code. // It recompiles your program after a change in a go file and starts it after stopping the previous application.