repo
string
pull_number
int64
instance_id
string
issue_numbers
sequence
base_commit
string
patch
string
test_patch
string
problem_statement
string
hints_text
string
created_at
timestamp[ns, tz=UTC]
version
float64
eclipse-vertx/vert.x
1,907
eclipse-vertx__vert.x-1907
[ "1905" ]
c9bf0831c28d763ecf8717a588c56a6a3eebce07
diff --git a/src/main/java/io/vertx/core/eventbus/SendContext.java b/src/main/java/io/vertx/core/eventbus/SendContext.java --- a/src/main/java/io/vertx/core/eventbus/SendContext.java +++ b/src/main/java/io/vertx/core/eventbus/SendContext.java @@ -22,8 +22,12 @@ public interface SendContext<T> { void next(); /** - * * @return true if the message is being sent (point to point) or False if the message is being published */ boolean send(); + + /** + * @return the value sent or published (before being processed by the codec) + */ + Object sentBody(); } diff --git a/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java b/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java --- a/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java +++ b/src/main/java/io/vertx/core/eventbus/impl/EventBusImpl.java @@ -16,8 +16,22 @@ package io.vertx.core.eventbus.impl; -import io.vertx.core.*; -import io.vertx.core.eventbus.*; +import io.vertx.core.AsyncResult; +import io.vertx.core.Closeable; +import io.vertx.core.Context; +import io.vertx.core.Future; +import io.vertx.core.Handler; +import io.vertx.core.MultiMap; +import io.vertx.core.Vertx; +import io.vertx.core.eventbus.DeliveryOptions; +import io.vertx.core.eventbus.EventBus; +import io.vertx.core.eventbus.Message; +import io.vertx.core.eventbus.MessageCodec; +import io.vertx.core.eventbus.MessageConsumer; +import io.vertx.core.eventbus.MessageProducer; +import io.vertx.core.eventbus.ReplyException; +import io.vertx.core.eventbus.ReplyFailure; +import io.vertx.core.eventbus.SendContext; import io.vertx.core.impl.VertxInternal; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; @@ -455,6 +469,11 @@ public void next() { public boolean send() { return message.isSend(); } + + @Override + public Object sentBody() { + return message.sentBody; + } } protected class ReplySendContextImpl<T> extends SendContextImpl<T> {
diff --git a/src/test/java/io/vertx/test/core/EventBusTestBase.java b/src/test/java/io/vertx/test/core/EventBusTestBase.java --- a/src/test/java/io/vertx/test/core/EventBusTestBase.java +++ b/src/test/java/io/vertx/test/core/EventBusTestBase.java @@ -542,6 +542,28 @@ public void start(Future<Void> startFuture) throws Exception { awaitLatch(closeLatch); } + @Test + public void testMessageBodyInterceptor() throws Exception { + String content = TestUtils.randomUnicodeString(13); + startNodes(2); + waitFor(2); + CountDownLatch latch = new CountDownLatch(1); + vertices[0].eventBus().registerCodec(new StringLengthCodec()).<Integer>consumer("whatever", msg -> { + assertEquals(content.length(), (int) msg.body()); + complete(); + }).completionHandler(ar -> latch.countDown()); + awaitLatch(latch); + StringLengthCodec codec = new StringLengthCodec(); + vertices[1].eventBus().registerCodec(codec).addInterceptor(sc -> { + if ("whatever".equals(sc.message().address())) { + assertEquals(content, sc.sentBody()); + complete(); + } + sc.next(); + }).send("whatever", content, new DeliveryOptions().setCodecName(codec.name())); + await(); + } + protected <T> void testSend(T val) { testSend(val, null); } @@ -770,4 +792,31 @@ public byte systemCodecID() { } } + public static class StringLengthCodec implements MessageCodec<String, Integer> { + + @Override + public void encodeToWire(Buffer buffer, String s) { + buffer.appendInt(s.length()); + } + + @Override + public Integer decodeFromWire(int pos, Buffer buffer) { + return buffer.getInt(pos); + } + + @Override + public Integer transform(String s) { + return s.length(); + } + + @Override + public String name() { + return getClass().getName(); + } + + @Override + public byte systemCodecID() { + return -1; + } + } }
EventBus interceptor does not get message body when clustered From [David Klotz](https://groups.google.com/d/msg/vertx/7otR0fsI6_8/E4ZdC0usCQAJ) on the forum ``` Hi, I'm currently a bit confused by the differing behavior of event bus interceptors in a non-clustered and a clustered vert.x environment (currently on 3.2.1, can test again in 3.4.x if something in that area has changed since then). When run in a non-clustered environment, the interceptor has access to both the message body and the message headers, but when run in a clustered environment, the message body is always null. Is this behavior by design or a bug? Cheers, David ```
Reply from @tsegismont ``` Can you put together a small reproducer on GitHub ? Thanks ``` Reply from David Klotz ``` It's actually quite simple to reproduce, just run this with clustered = false or true (depends just on vertx and vertx-hazelcast) and observe the different output (just tried it with 3.4.1, still reproducible): https://gist.github.com/dklotz/083b49e23266cda392c92c8ee5e0377a Cheers, David ```
2017-03-27T15:51:25Z
3.4
eclipse-vertx/vert.x
1,799
eclipse-vertx__vert.x-1799
[ "1765" ]
fb5ef766d36f692ed6bac4172ee5742dce1f97d8
diff --git a/src/main/java/io/vertx/core/eventbus/impl/clustered/ClusteredEventBus.java b/src/main/java/io/vertx/core/eventbus/impl/clustered/ClusteredEventBus.java --- a/src/main/java/io/vertx/core/eventbus/impl/clustered/ClusteredEventBus.java +++ b/src/main/java/io/vertx/core/eventbus/impl/clustered/ClusteredEventBus.java @@ -332,7 +332,7 @@ private <T> void sendToSubs(ChoosableIterable<ServerID> subs, SendContextImpl<T> if (sendContext.message.isSend()) { // Choose one ServerID sid = subs.choose(); - if (!sid.equals(serverID)) { //We don't send to this node + if (sid != null && !sid.equals(serverID)) { //We don't send to this node metrics.messageSent(address, false, false, true); sendRemote(sid, sendContext.message); } else {
diff --git a/src/test/java/io/vertx/test/core/EventBusTestBase.java b/src/test/java/io/vertx/test/core/EventBusTestBase.java --- a/src/test/java/io/vertx/test/core/EventBusTestBase.java +++ b/src/test/java/io/vertx/test/core/EventBusTestBase.java @@ -19,9 +19,13 @@ import io.netty.util.CharsetUtil; import io.vertx.core.AbstractVerticle; import io.vertx.core.DeploymentOptions; +import io.vertx.core.Handler; +import io.vertx.core.Vertx; import io.vertx.core.buffer.Buffer; import io.vertx.core.eventbus.DeliveryOptions; +import io.vertx.core.eventbus.Message; import io.vertx.core.eventbus.MessageCodec; +import io.vertx.core.eventbus.MessageConsumer; import io.vertx.core.eventbus.ReplyException; import io.vertx.core.eventbus.ReplyFailure; import io.vertx.core.json.JsonArray; @@ -29,8 +33,11 @@ import org.junit.Test; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; +import static org.hamcrest.CoreMatchers.*; + /** * @author <a href="http://tfox.org">Tim Fox</a> */ @@ -413,6 +420,82 @@ public void testSendFromExecuteBlocking() throws Exception { await(); } + @Test + public void testSendWhileUnsubscribing() throws Exception { + startNodes(2); + Vertx vertx0 = vertices[0]; + CountDownLatch registrationLatch = new CountDownLatch(1); + MessageConsumer<String> consumer = vertx0.eventBus().consumer("whatever"); + consumer.handler(new Handler<Message<String>>() { + int received = 0; + + @Override + public void handle(Message<String> msg) { + if (++received == 1) { + consumer.unregister(); + } + } + }).completionHandler(ar -> { + if (ar.succeeded()) { + registrationLatch.countDown(); + } else { + fail(ar.cause()); + } + }); + awaitLatch(registrationLatch); + AtomicBoolean send = new AtomicBoolean(true); + vertx0.exceptionHandler(throwable -> { + send.set(false); + fail(throwable); + }); + while (send.get()) { + vertx0.eventBus().send("whatever", "marseille", ar -> { + if (send.get() && ar.failed()) { + Throwable cause = ar.cause(); + assertThat(cause, instanceOf(ReplyException.class)); + ReplyException replyException = (ReplyException) cause; + assertEquals(ReplyFailure.NO_HANDLERS, replyException.failureType()); + send.set(false); + } + }); + } + } + + @Test + public void testPublishWhileUnsubscribing() throws Exception { + startNodes(2); + Vertx vertx0 = vertices[0]; + CountDownLatch registrationLatch = new CountDownLatch(1); + AtomicBoolean send = new AtomicBoolean(true); + MessageConsumer<String> consumer = vertx0.eventBus().consumer("whatever"); + consumer.handler(new Handler<Message<String>>() { + int received = 0; + + @Override + public void handle(Message<String> msg) { + if (++received == 1) { + consumer.unregister(ar -> { + vertx0.setTimer(10, l -> send.set(false)); + }); + } + } + }).completionHandler(ar -> { + if (ar.succeeded()) { + registrationLatch.countDown(); + } else { + fail(ar.cause()); + } + }); + awaitLatch(registrationLatch); + vertx0.exceptionHandler(throwable -> { + send.set(false); + fail(throwable); + }); + while (send.get()) { + vertx0.eventBus().publish("whatever", "marseille"); + } + } + protected <T> void testSend(T val) { testSend(val, null); }
NullPointer in sendToSubs Cloned from vert-x3/vertx-hazelcast#52
@inno-steffg _commented on 7 Dec 2016_ We're using vertx 3.3.3 in a productive environment clustered with hazelcast. We are observing the following NullPointerException from time to time: ``` 2016-12-07 09:57:08,063 ERROR [vert.x-eventloop-thread-4] [] io.vertx.core.impl.ContextImpl - Unhandled exception java.lang.NullPointerException at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.sendToSubs(ClusteredEventBus.java:279) at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.lambda$sendOrPub$133(ClusteredEventBus.java:182) at io.vertx.spi.cluster.hazelcast.impl.HazelcastAsyncMultiMap.lambda$get$30(HazelcastAsyncMultiMap.java:116) at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158) at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100) at io.vertx.core.impl.ContextImpl.lambda$null$16(ContextImpl.java:305) at io.vertx.core.impl.ContextImpl.lambda$wrapTask$18(ContextImpl.java:335) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at java.lang.Thread.run(Thread.java:745) ``` I guess, this happens when we're unregistering an eventbus consumer at the same time the sendToSubs is trying to submit a message to it. @vietj _commented on 7 Dec 2016_ it seems to be a race condition, what is your version ? @inno-steffg _commented on 8 Dec 2016_ Vertx 3.2.1 and vertx 3.3.3 show this problem. The stack trace above is from Vertx 3.2.1 Version 3.3.3 throws NullPointer at the same place (but another line no): ``` 2016-12-08 01:46:18,435 ERROR [vert.x-eventloop-thread-2] io.vertx.core.impl.ContextImpl - Unhandled exception java.lang.NullPointerException at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.sendToSubs(ClusteredEventBus.java:315) at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.lambda$sendOrPub$4(ClusteredEventBus.java:218) at io.vertx.spi.cluster.hazelcast.impl.HazelcastAsyncMultiMap.lambda$get$3(HazelcastAsyncMultiMap.java:116) at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158) at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100) at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:271) at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:316) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:440) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873) at java.lang.Thread.run(Thread.java:745) ``` @tsegismont _commented on 9 Dec 2016_ Could you put together a small reproducer?
2017-02-06T14:11:16Z
3.4
eclipse-vertx/vert.x
1,770
eclipse-vertx__vert.x-1770
[ "1769" ]
3db06e922eaedc18ff7027ed5a8a2d00adbf557f
diff --git a/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java b/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java --- a/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java +++ b/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java @@ -148,9 +148,10 @@ private synchronized AsyncFile doWrite(Buffer buffer, long position, Handler<Asy Handler<AsyncResult<Void>> wrapped = ar -> { if (ar.succeeded()) { checkContext(); - checkDrained(); if (writesOutstanding == 0 && closedDeferred != null) { closedDeferred.run(); + } else { + checkDrained(); } if (handler != null) { handler.handle(ar);
diff --git a/src/test/java/io/vertx/test/core/FileSystemTest.java b/src/test/java/io/vertx/test/core/FileSystemTest.java --- a/src/test/java/io/vertx/test/core/FileSystemTest.java +++ b/src/test/java/io/vertx/test/core/FileSystemTest.java @@ -54,6 +54,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static io.vertx.test.core.TestUtils.*; @@ -1547,6 +1548,24 @@ public void testAsyncFileCloseHandlerIsAsync() throws Exception { await(); } + @Test + public void testDrainNotCalledAfterClose() throws Exception { + String fileName = "some-file.dat"; + vertx.fileSystem().open(testDir + pathSep + fileName, new OpenOptions(), onSuccess(file -> { + Buffer buf = TestUtils.randomBuffer(1024 * 1024); + file.write(buf); + AtomicBoolean drainAfterClose = new AtomicBoolean(); + file.drainHandler(v -> { + drainAfterClose.set(true); + }); + file.close(ar -> { + assertFalse(drainAfterClose.get()); + testComplete(); + }); + })); + await(); + } + private Handler<AsyncResult<Void>> createHandler(boolean shouldPass, Handler<Void> afterOK) { return ar -> { if (ar.failed()) {
AsyncFile drain handler should not be called after the file is closed
2017-01-19T17:50:38Z
3.3
eclipse-vertx/vert.x
1,615
eclipse-vertx__vert.x-1615
[ "1613" ]
29c59aff1be0d8fd26b7d9bfd5619027fa5fc898
diff --git a/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java b/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java --- a/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java +++ b/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java @@ -236,7 +236,7 @@ public KeyStore loadStore(VertxInternal vertx) throws Exception { Iterable<Buffer> iterable = certValues::iterator; for (Buffer certValue : iterable) { for (Certificate cert : loadCerts(certValue)) { - keyStore.setCertificateEntry("cert-" + count, cert); + keyStore.setCertificateEntry("cert-" + count++, cert); } } return keyStore;
diff --git a/src/test/java/io/vertx/test/core/ClusteredEventBusWithSSLTest.java b/src/test/java/io/vertx/test/core/ClusteredEventBusWithSSLTest.java --- a/src/test/java/io/vertx/test/core/ClusteredEventBusWithSSLTest.java +++ b/src/test/java/io/vertx/test/core/ClusteredEventBusWithSSLTest.java @@ -19,6 +19,8 @@ import io.vertx.core.VertxOptions; import io.vertx.core.eventbus.EventBusOptions; import io.vertx.core.http.ClientAuth; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -38,7 +40,7 @@ public class ClusteredEventBusWithSSLTest extends ClusteredEventBusTestBase { private final EventBusOptions options; - public ClusteredEventBusWithSSLTest(TLSCert cert, TLSCert trust, + public ClusteredEventBusWithSSLTest(Cert<?> cert, Trust<?> trust, boolean requireClientAuth, boolean clientTrustAll, boolean useCrl, @@ -53,8 +55,8 @@ public ClusteredEventBusWithSSLTest(TLSCert cert, TLSCert trust, options.addCrlPath("tls/root-ca/crl.pem"); } - setOptions(options, trust.getClientTrustOptions()); - setOptions(options, cert.getServerKeyCertOptions()); + setOptions(options, trust.get()); + setOptions(options, cert.get()); if (enabledCipherSuites != null) { enabledCipherSuites.forEach(options::addEnabledCipherSuite); @@ -72,13 +74,13 @@ public static Iterable<Object[]> data() { //KeyCert, Trust, requireClientAuth, clientTrustAll, useCrl, enabledCipherSuites return Arrays.asList(new Object[][]{ - {TLSCert.JKS, TLSCert.NONE, false, true, false, Collections.emptyList()}, // trusts all server certs - {TLSCert.JKS, TLSCert.JKS, false, false, true, Collections.emptyList()}, - {TLSCert.PKCS12, TLSCert.JKS, false, false, false, Collections.emptyList()}, - {TLSCert.PEM, TLSCert.JKS, false, false, false, Collections.emptyList()}, - {TLSCert.PKCS12_ROOT_CA, TLSCert.JKS_ROOT_CA, false, false, false, Collections.emptyList()}, - {TLSCert.PEM_ROOT_CA, TLSCert.PKCS12_ROOT_CA, false, false, false, Collections.emptyList()}, - {TLSCert.JKS, TLSCert.PEM_ROOT_CA, false, true, false, Arrays.asList(Http1xTest.ENABLED_CIPHER_SUITES)}, + {Cert.SERVER_JKS, Trust.NONE, false, true, false, Collections.emptyList()}, // trusts all server certs + {Cert.SERVER_JKS, Trust.SERVER_JKS, false, false, true, Collections.emptyList()}, + {Cert.SERVER_PKCS12, Trust.SERVER_JKS, false, false, false, Collections.emptyList()}, + {Cert.SERVER_PEM, Trust.SERVER_JKS, false, false, false, Collections.emptyList()}, + {Cert.SERVER_PKCS12_ROOT_CA, Trust.SERVER_JKS_ROOT_CA, false, false, false, Collections.emptyList()}, + {Cert.SERVER_PEM_ROOT_CA, Trust.SERVER_PKCS12_ROOT_CA, false, false, false, Collections.emptyList()}, + {Cert.SERVER_JKS, Trust.SERVER_PEM_ROOT_CA, false, true, false, Arrays.asList(Http1xTest.ENABLED_CIPHER_SUITES)}, }); } diff --git a/src/test/java/io/vertx/test/core/Http1xTLSTest.java b/src/test/java/io/vertx/test/core/Http1xTLSTest.java --- a/src/test/java/io/vertx/test/core/Http1xTLSTest.java +++ b/src/test/java/io/vertx/test/core/Http1xTLSTest.java @@ -20,6 +20,8 @@ import io.vertx.core.http.HttpClientOptions; import io.vertx.core.http.HttpServer; import io.vertx.core.http.HttpServerOptions; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.Test; /** @@ -43,6 +45,6 @@ HttpClient createHttpClient(HttpClientOptions options) { @Test // Client and server uses ALPN public void testAlpn() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).serverUsesAlpn().clientUsesAlpn().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).serverUsesAlpn().clientUsesAlpn().pass(); } } diff --git a/src/test/java/io/vertx/test/core/Http2ClientTest.java b/src/test/java/io/vertx/test/core/Http2ClientTest.java --- a/src/test/java/io/vertx/test/core/Http2ClientTest.java +++ b/src/test/java/io/vertx/test/core/Http2ClientTest.java @@ -65,6 +65,8 @@ import io.vertx.core.net.NetSocket; import io.vertx.core.net.SocketAddress; import io.vertx.core.net.impl.SSLHelper; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.Test; import java.io.ByteArrayOutputStream; @@ -108,7 +110,7 @@ public void setUp() throws Exception { super.setUp(); clientOptions = new HttpClientOptions(). setUseAlpn(true). - setTrustStoreOptions((JksOptions) TLSCert.JKS.getClientTrustOptions()). + setTrustStoreOptions(Trust.SERVER_JKS.get()). setProtocolVersion(HttpVersion.HTTP_2); client = vertx.createHttpClient(clientOptions); } @@ -1068,7 +1070,7 @@ private ServerBootstrap createH2Server(BiFunction<Http2ConnectionDecoder, Http2C bootstrap.childHandler(new ChannelInitializer<Channel>() { @Override protected void initChannel(Channel ch) throws Exception { - SSLHelper sslHelper = new SSLHelper(serverOptions, TLSCert.JKS.getServerKeyCertOptions(), null); + SSLHelper sslHelper = new SSLHelper(serverOptions, Cert.SERVER_JKS.get(), null); SslHandler sslHandler = sslHelper.setApplicationProtocols(Arrays.asList(HttpVersion.HTTP_2, HttpVersion.HTTP_1_1)).createSslHandler((VertxInternal) vertx, DEFAULT_HTTPS_HOST, DEFAULT_HTTPS_PORT); ch.pipeline().addLast(sslHandler); ch.pipeline().addLast(new ApplicationProtocolNegotiationHandler("whatever") { diff --git a/src/test/java/io/vertx/test/core/Http2ServerTest.java b/src/test/java/io/vertx/test/core/Http2ServerTest.java --- a/src/test/java/io/vertx/test/core/Http2ServerTest.java +++ b/src/test/java/io/vertx/test/core/Http2ServerTest.java @@ -70,6 +70,7 @@ import io.vertx.core.net.impl.SSLHelper; import io.vertx.core.streams.ReadStream; import io.vertx.core.streams.WriteStream; +import io.vertx.test.core.tls.Trust; import org.junit.Test; import java.io.ByteArrayInputStream; @@ -214,7 +215,7 @@ protected ChannelInitializer channelInitializer(int port, String host, Consumer< return new ChannelInitializer<Channel>() { @Override protected void initChannel(Channel ch) throws Exception { - SSLHelper sslHelper = new SSLHelper(new HttpClientOptions().setUseAlpn(true), null, TLSCert.JKS.getClientTrustOptions()); + SSLHelper sslHelper = new SSLHelper(new HttpClientOptions().setUseAlpn(true), null, Trust.SERVER_JKS.get()); SslHandler sslHandler = sslHelper.setApplicationProtocols(Arrays.asList(HttpVersion.HTTP_2, HttpVersion.HTTP_1_1)).createSslHandler((VertxInternal) vertx, host, port); ch.pipeline().addLast(sslHandler); ch.pipeline().addLast(new ApplicationProtocolNegotiationHandler("whatever") { diff --git a/src/test/java/io/vertx/test/core/Http2TLSTest.java b/src/test/java/io/vertx/test/core/Http2TLSTest.java --- a/src/test/java/io/vertx/test/core/Http2TLSTest.java +++ b/src/test/java/io/vertx/test/core/Http2TLSTest.java @@ -21,6 +21,10 @@ import io.vertx.core.http.HttpServer; import io.vertx.core.http.HttpServerOptions; import io.vertx.core.http.HttpVersion; +import io.vertx.core.net.KeyCertOptions; +import io.vertx.core.net.TrustOptions; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; /** * @author <a href="mailto:[email protected]">Julien Viet</a> @@ -38,7 +42,7 @@ HttpClient createHttpClient(HttpClientOptions options) { } @Override - protected TLSTest testTLS(TLSCert clientCert, TLSCert clientTrust, TLSCert serverCert, TLSCert serverTrust) throws Exception { + protected TLSTest testTLS(Cert<?> clientCert, Trust<?> clientTrust, Cert<?> serverCert, Trust<?> serverTrust) throws Exception { return super.testTLS(clientCert, clientTrust, serverCert, serverTrust).version(HttpVersion.HTTP_2); } } diff --git a/src/test/java/io/vertx/test/core/Http2Test.java b/src/test/java/io/vertx/test/core/Http2Test.java --- a/src/test/java/io/vertx/test/core/Http2Test.java +++ b/src/test/java/io/vertx/test/core/Http2Test.java @@ -25,6 +25,7 @@ import io.vertx.core.http.StreamResetException; import io.vertx.core.net.OpenSSLEngineOptions; import io.vertx.core.net.PemKeyCertOptions; +import io.vertx.test.core.tls.Cert; import org.junit.Test; import java.util.concurrent.CompletableFuture; @@ -130,7 +131,7 @@ public void testServerOpenSSL() throws Exception { .setUseAlpn(true) .setSsl(true) .addEnabledCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA") // Non Diffie-helman -> debuggable in wireshark - .setPemKeyCertOptions((PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions()).setSslEngineOptions(new OpenSSLEngineOptions()); + .setPemKeyCertOptions(Cert.SERVER_PEM.get()).setSslEngineOptions(new OpenSSLEngineOptions()); server.close(); client.close(); client = vertx.createHttpClient(createBaseClientOptions()); diff --git a/src/test/java/io/vertx/test/core/Http2TestBase.java b/src/test/java/io/vertx/test/core/Http2TestBase.java --- a/src/test/java/io/vertx/test/core/Http2TestBase.java +++ b/src/test/java/io/vertx/test/core/Http2TestBase.java @@ -22,6 +22,8 @@ import io.vertx.core.http.HttpServerOptions; import io.vertx.core.http.HttpVersion; import io.vertx.core.net.JksOptions; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; /** * @author <a href="mailto:[email protected]">Julien Viet</a> @@ -35,13 +37,13 @@ static HttpServerOptions createHttp2ServerOptions(int port, String host) { .setUseAlpn(true) .setSsl(true) .addEnabledCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA") // Non Diffie-helman -> debuggable in wireshark - .setKeyStoreOptions((JksOptions) TLSCert.JKS.getServerKeyCertOptions()); + .setKeyStoreOptions(Cert.SERVER_JKS.get()); }; static HttpClientOptions createHttp2ClientOptions() { return new HttpClientOptions(). setUseAlpn(true). - setTrustStoreOptions((JksOptions) TLSCert.JKS.getClientTrustOptions()). + setTrustStoreOptions(Trust.SERVER_JKS.get()). setProtocolVersion(HttpVersion.HTTP_2); } diff --git a/src/test/java/io/vertx/test/core/HttpTLSTest.java b/src/test/java/io/vertx/test/core/HttpTLSTest.java --- a/src/test/java/io/vertx/test/core/HttpTLSTest.java +++ b/src/test/java/io/vertx/test/core/HttpTLSTest.java @@ -19,6 +19,8 @@ import io.vertx.core.VertxException; import io.vertx.core.http.*; import io.vertx.core.net.*; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -51,229 +53,241 @@ protected void tearDown() throws Exception { @Test // Client trusts all server certs public void testTLSClientTrustAll() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().pass(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().pass(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCertPKCS12() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PKCS12, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_PKCS12, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCertPEM() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PEM, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_PEM, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertJKSRootCAWithJKSRootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS_ROOT_CA, TLSCert.JKS_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS_ROOT_CA, Cert.SERVER_JKS_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertJKSRootCAWithPKCS12RootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PKCS12_ROOT_CA, TLSCert.JKS_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PKCS12_ROOT_CA, Cert.SERVER_JKS_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertJKSRootRootCAWithPEMRootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.JKS_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_JKS_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertPKCS12RootCAWithJKSRootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS_ROOT_CA, TLSCert.PKCS12_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS_ROOT_CA, Cert.SERVER_PKCS12_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertPKCS12RootCAWithPKCS12RootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PKCS12_ROOT_CA, TLSCert.PKCS12_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PKCS12_ROOT_CA, Cert.SERVER_PKCS12_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertPKCS12RootCAWithPEMRootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PKCS12_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PKCS12_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertPEMRootCAWithJKSRootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS_ROOT_CA, TLSCert.PEM_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS_ROOT_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertPEMRootCAWithPKCS12RootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PKCS12_ROOT_CA, TLSCert.PEM_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PKCS12_ROOT_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts via a root CA (not trust all) public void testTLSClientTrustServerCertPEMRootCAWithPEMRootCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PEM_ROOT_CA, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE).pass(); + } + + // These two tests should be grouped in same method - todo later + @Test + // Server specifies cert that the client trusts via a root CA that is in a multi pem store (not trust all) + public void testTLSClientTrustServerCertMultiPemWithPEMRootCA() throws Exception { + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA_AND_OTHER_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE).pass(); + } + @Test + // Server specifies cert that the client trusts via a other CA that is in a multi pem store (not trust all) + public void testTLSClientTrustServerCertMultiPemWithPEMOtherCA() throws Exception { + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA_AND_OTHER_CA, Cert.SERVER_PEM_OTHER_CA, Trust.NONE).pass(); } @Test // Server specifies cert chain that the client trusts via a CA (not trust all) public void testTLSClientTrustServerCertPEMRootCAWithPEMCAChain() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PEM_CA_CHAIN, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PEM_CA_CHAIN, Trust.NONE).pass(); } @Test // Server specifies intermediate cert that the client doesn't trust because it is missing the intermediate CA signed by the root CA public void testTLSClientUntrustedServerCertPEMRootCAWithPEMCA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PEM_CA, TLSCert.NONE).fail(); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PEM_INT_CA, Trust.NONE).fail(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustPKCS12ServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PKCS12, TLSCert.JKS, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PKCS12, Cert.SERVER_JKS, Trust.NONE).pass(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustPEMServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM, TLSCert.JKS, TLSCert.NONE).pass(); + testTLS(Cert.NONE, Trust.SERVER_PEM, Cert.SERVER_JKS, Trust.NONE).pass(); } @Test // Server specifies cert that the client doesn't trust public void testTLSClientUntrustedServer() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).fail(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).fail(); } @Test // Server specifies cert that the client doesn't trust public void testTLSClientUntrustedServerPEM() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.PEM, TLSCert.NONE).fail(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_PEM, Trust.NONE).fail(); } @Test // Client specifies cert even though it's not required public void testTLSClientCertNotRequired() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).pass(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).pass(); } @Test // Client specifies cert even though it's not required public void testTLSClientCertNotRequiredPEM() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.PEM, TLSCert.JKS).pass(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_PEM, Trust.CLIENT_JKS).pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertRequired() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).requiresClientAuth().pass(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).requiresClientAuth().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertRequiredPKCS12() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.PKCS12).requiresClientAuth().pass(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PKCS12).requiresClientAuth().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertRequiredPEM() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.PEM).requiresClientAuth().pass(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PEM).requiresClientAuth().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertPKCS12Required() throws Exception { - testTLS(TLSCert.PKCS12, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).requiresClientAuth().pass(); + testTLS(Cert.CLIENT_PKCS12, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).requiresClientAuth().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertPEMRequired() throws Exception { - testTLS(TLSCert.PEM, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).requiresClientAuth().pass(); + testTLS(Cert.CLIENT_PEM, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).requiresClientAuth().pass(); } @Test // Client specifies cert by CA and it is required public void testTLSClientCertPEM_CARequired() throws Exception { - testTLS(TLSCert.PEM_ROOT_CA, TLSCert.JKS, TLSCert.JKS, TLSCert.PEM_ROOT_CA).requiresClientAuth().pass(); + testTLS(Cert.CLIENT_PEM_ROOT_CA, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PEM_ROOT_CA).requiresClientAuth().pass(); } @Test // Client doesn't specify cert but it's required public void testTLSClientCertRequiredNoClientCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).requiresClientAuth().fail(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).requiresClientAuth().fail(); } @Test // Client specifies cert but it's not trusted public void testTLSClientCertClientNotTrusted() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).requiresClientAuth().fail(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).requiresClientAuth().fail(); } @Test // Server specifies cert that the client does not trust via a revoked certificate of the CA public void testTLSClientRevokedServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PEM_ROOT_CA, TLSCert.NONE).clientUsesCrl().fail(); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE).clientUsesCrl().fail(); } @Test // Client specifies cert that the server does not trust via a revoked certificate of the CA public void testTLSRevokedClientCertServer() throws Exception { - testTLS(TLSCert.PEM_ROOT_CA, TLSCert.JKS, TLSCert.JKS, TLSCert.PEM_ROOT_CA).requiresClientAuth().clientUsesCrl().fail(); + testTLS(Cert.CLIENT_PEM_ROOT_CA, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PEM_ROOT_CA).requiresClientAuth().clientUsesCrl().fail(); } @Test // Specify some matching cipher suites public void testTLSMatchingCipherSuites() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().serverEnabledCipherSuites(ENABLED_CIPHER_SUITES).pass(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().serverEnabledCipherSuites(ENABLED_CIPHER_SUITES).pass(); } @Test // Specify some non matching cipher suites public void testTLSNonMatchingCipherSuites() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().serverEnabledCipherSuites(new String[]{"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"}).clientEnabledCipherSuites(new String[]{"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"}).fail(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().serverEnabledCipherSuites(new String[]{"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"}).clientEnabledCipherSuites(new String[]{"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"}).fail(); } @Test // Specify some matching TLS protocols public void testTLSMatchingProtocolVersions() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().serverEnabledSecureTransportProtocol(new String[]{"SSLv2Hello", "TLSv1", "TLSv1.1", "TLSv1.2"}).pass(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().serverEnabledSecureTransportProtocol(new String[]{"SSLv2Hello", "TLSv1", "TLSv1.1", "TLSv1.2"}).pass(); } @Test // Specify some matching TLS protocols public void testTLSInvalidProtocolVersion() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().serverEnabledSecureTransportProtocol(new String[]{"HelloWorld"}).fail(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().serverEnabledSecureTransportProtocol(new String[]{"HelloWorld"}).fail(); } @Test // Specify some non matching TLS protocols public void testTLSNonMatchingProtocolVersions() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().serverEnabledSecureTransportProtocol(new String[]{"TLSv1.2"}).clientEnabledSecureTransportProtocol(new String[]{"SSLv2Hello"}).fail(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().serverEnabledSecureTransportProtocol(new String[]{"TLSv1.2"}).clientEnabledSecureTransportProtocol(new String[]{"SSLv2Hello"}).fail(); } @Test // Test host verification with a CN matching localhost public void testTLSVerifyMatchingHost() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE).clientTrustAll().clientVerifyHost().pass(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll().clientVerifyHost().pass(); } @Test // Test host verification with a CN NOT matching localhost public void testTLSVerifyNonMatchingHost() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.MIM, TLSCert.NONE).clientTrustAll().clientVerifyHost().fail(); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_MIM, Trust.NONE).clientTrustAll().clientVerifyHost().fail(); } // OpenSSL tests @@ -281,64 +295,64 @@ public void testTLSVerifyNonMatchingHost() throws Exception { @Test // Server uses OpenSSL with JKS public void testTLSClientTrustServerCertJKSOpenSSL() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).serverOpenSSL().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).serverOpenSSL().pass(); } @Test // Server uses OpenSSL with PKCS12 public void testTLSClientTrustServerCertPKCS12OpenSSL() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PKCS12, TLSCert.NONE).serverOpenSSL().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_PKCS12, Trust.NONE).serverOpenSSL().pass(); } @Test // Server uses OpenSSL with PEM public void testTLSClientTrustServerCertPEMOpenSSL() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PEM, TLSCert.NONE).serverOpenSSL().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_PEM, Trust.NONE).serverOpenSSL().pass(); } @Test // Client trusts OpenSSL with PEM public void testTLSClientTrustServerCertWithJKSOpenSSL() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).clientOpenSSL().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).clientOpenSSL().pass(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCertWithPKCS12OpenSSL() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PKCS12, TLSCert.JKS, TLSCert.NONE).clientOpenSSL().pass(); + testTLS(Cert.NONE, Trust.SERVER_PKCS12, Cert.SERVER_JKS, Trust.NONE).clientOpenSSL().pass(); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCertWithPEMOpenSSL() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM, TLSCert.JKS, TLSCert.NONE).clientOpenSSL().pass(); + testTLS(Cert.NONE, Trust.SERVER_PEM, Cert.SERVER_JKS, Trust.NONE).clientOpenSSL().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertRequiredOpenSSL() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).clientOpenSSL().requiresClientAuth().pass(); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).clientOpenSSL().requiresClientAuth().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertPKCS12RequiredOpenSSL() throws Exception { - testTLS(TLSCert.PKCS12, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).clientOpenSSL().requiresClientAuth().pass(); + testTLS(Cert.CLIENT_PKCS12, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).clientOpenSSL().requiresClientAuth().pass(); } @Test // Client specifies cert and it is required public void testTLSClientCertPEMRequiredOpenSSL() throws Exception { - testTLS(TLSCert.PEM, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).clientOpenSSL().requiresClientAuth().pass(); + testTLS(Cert.CLIENT_PEM, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS).clientOpenSSL().requiresClientAuth().pass(); } class TLSTest { HttpVersion version; - TLSCert clientCert; - TLSCert clientTrust; - TLSCert serverCert; - TLSCert serverTrust; + KeyCertOptions clientCert; + TrustOptions clientTrust; + KeyCertOptions serverCert; + TrustOptions serverTrust; boolean clientTrustAll; boolean clientUsesCrl; boolean clientUsesAlpn; @@ -358,12 +372,12 @@ class TLSTest { private String connectHostname; - public TLSTest(TLSCert clientCert, TLSCert clientTrust, TLSCert serverCert, TLSCert serverTrust) { + public TLSTest(Cert<?> clientCert, Trust<?> clientTrust, Cert<?> serverCert, Trust<?> serverTrust) { this.version = HttpVersion.HTTP_1_1; - this.clientCert = clientCert; - this.clientTrust = clientTrust; - this.serverCert = serverCert; - this.serverTrust = serverTrust; + this.clientCert = clientCert.get(); + this.clientTrust = clientTrust.get(); + this.serverCert = serverCert.get(); + this.serverTrust = serverTrust.get(); } TLSTest version(HttpVersion version) { @@ -487,8 +501,8 @@ void run(boolean shouldPass) { options.setUseAlpn(true); } options.setVerifyHost(clientVerifyHost); - setOptions(options, clientTrust.getClientTrustOptions()); - setOptions(options, clientCert.getClientKeyCertOptions()); + setOptions(options, clientTrust); + setOptions(options, clientCert); for (String suite: clientEnabledCipherSuites) { options.addEnabledCipherSuite(suite); } @@ -511,8 +525,8 @@ void run(boolean shouldPass) { client = createHttpClient(options); HttpServerOptions serverOptions = new HttpServerOptions(); serverOptions.setSsl(true); - setOptions(serverOptions, serverTrust.getServerTrustOptions()); - setOptions(serverOptions, serverCert.getServerKeyCertOptions()); + setOptions(serverOptions, serverTrust); + setOptions(serverOptions, serverCert); if (requiresClientAuth) { serverOptions.setClientAuth(ClientAuth.REQUIRED); } @@ -573,61 +587,61 @@ void run(boolean shouldPass) { abstract HttpClient createHttpClient(HttpClientOptions options); - protected TLSTest testTLS(TLSCert clientCert, TLSCert clientTrust, - TLSCert serverCert, TLSCert serverTrust) throws Exception { + protected TLSTest testTLS(Cert<?> clientCert, Trust<?> clientTrust, + Cert<?> serverCert, Trust<?> serverTrust) throws Exception { return new TLSTest(clientCert, clientTrust, serverCert, serverTrust); } @Test public void testJKSInvalidPath() { - testInvalidKeyStore(((JksOptions) TLSCert.JKS.getServerKeyCertOptions()).setPath("/invalid.jks"), "java.nio.file.NoSuchFileException: ", "invalid.jks"); + testInvalidKeyStore(Cert.SERVER_JKS.get().setPath("/invalid.jks"), "java.nio.file.NoSuchFileException: ", "invalid.jks"); } @Test public void testJKSMissingPassword() { - testInvalidKeyStore(((JksOptions) TLSCert.JKS.getServerKeyCertOptions()).setPassword(null), "Password must not be null", null); + testInvalidKeyStore(Cert.SERVER_JKS.get().setPassword(null), "Password must not be null", null); } @Test public void testJKSInvalidPassword() { - testInvalidKeyStore(((JksOptions) TLSCert.JKS.getServerKeyCertOptions()).setPassword("wrongpassword"), "Keystore was tampered with, or password was incorrect", null); + testInvalidKeyStore(Cert.SERVER_JKS.get().setPassword("wrongpassword"), "Keystore was tampered with, or password was incorrect", null); } @Test public void testPKCS12InvalidPath() { - testInvalidKeyStore(((PfxOptions) TLSCert.PKCS12.getServerKeyCertOptions()).setPath("/invalid.p12"), "java.nio.file.NoSuchFileException: ", "invalid.p12"); + testInvalidKeyStore(Cert.SERVER_PKCS12.get().setPath("/invalid.p12"), "java.nio.file.NoSuchFileException: ", "invalid.p12"); } @Test public void testPKCS12MissingPassword() { - testInvalidKeyStore(((PfxOptions) TLSCert.PKCS12.getServerKeyCertOptions()).setPassword(null), "Get Key failed: null", null); + testInvalidKeyStore(Cert.SERVER_PKCS12.get().setPassword(null), "Get Key failed: null", null); } @Test public void testPKCS12InvalidPassword() { - testInvalidKeyStore(((PfxOptions) TLSCert.PKCS12.getServerKeyCertOptions()).setPassword("wrongpassword"), Arrays.asList( + testInvalidKeyStore(Cert.SERVER_PKCS12.get().setPassword("wrongpassword"), Arrays.asList( "failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded", "keystore password was incorrect"), null); } @Test public void testKeyCertMissingKeyPath() { - testInvalidKeyStore(((PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions()).setKeyPath(null), "Missing private key", null); + testInvalidKeyStore(Cert.SERVER_PEM.get().setKeyPath(null), "Missing private key", null); } @Test public void testKeyCertInvalidKeyPath() { - testInvalidKeyStore(((PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions()).setKeyPath("/invalid.pem"), "java.nio.file.NoSuchFileException: ", "invalid.pem"); + testInvalidKeyStore(Cert.SERVER_PEM.get().setKeyPath("/invalid.pem"), "java.nio.file.NoSuchFileException: ", "invalid.pem"); } @Test public void testKeyCertMissingCertPath() { - testInvalidKeyStore(((PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions()).setCertPath(null), "Missing X.509 certificate", null); + testInvalidKeyStore(Cert.SERVER_PEM.get().setCertPath(null), "Missing X.509 certificate", null); } @Test public void testKeyCertInvalidCertPath() { - testInvalidKeyStore(((PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions()).setCertPath("/invalid.pem"), "java.nio.file.NoSuchFileException: ", "invalid.pem"); + testInvalidKeyStore(Cert.SERVER_PEM.get().setCertPath("/invalid.pem"), "java.nio.file.NoSuchFileException: ", "invalid.pem"); } @Test @@ -648,7 +662,7 @@ public void testKeyCertInvalidPem() throws IOException { Path file = testFolder.newFile("vertx" + UUID.randomUUID().toString() + ".pem").toPath(); Files.write(file, Collections.singleton(contents[i])); String expectedMessage = messages[i]; - testInvalidKeyStore(((PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions()).setKeyPath(file.toString()), expectedMessage, null); + testInvalidKeyStore(Cert.SERVER_PEM.get().setKeyPath(file.toString()), expectedMessage, null); } } @@ -737,7 +751,7 @@ private void testStore(HttpServerOptions serverOptions, List<String> expectedPos @Test public void testCrlInvalidPath() throws Exception { HttpClientOptions clientOptions = new HttpClientOptions(); - setOptions(clientOptions, TLSCert.PEM_ROOT_CA.getClientTrustOptions()); + setOptions(clientOptions, Trust.SERVER_PEM_ROOT_CA.get()); clientOptions.setSsl(true); clientOptions.addCrlPath("/invalid.pem"); HttpClient client = vertx.createHttpClient(clientOptions); @@ -755,7 +769,7 @@ public void testCrlInvalidPath() throws Exception { // Access https server via connect proxy public void testHttpsProxy() throws Exception { startProxy(null, ProxyType.HTTP); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy().pass(); assertNotNull("connection didn't access the proxy", proxy.getLastUri()); assertEquals("hostname resolved but it shouldn't be", "localhost:4043", proxy.getLastUri()); assertEquals("Host header doesn't contain target host", "localhost:4043", proxy.getLastRequestHeaders().get("Host")); @@ -765,14 +779,14 @@ public void testHttpsProxy() throws Exception { // Check that proxy auth fails if it is missing public void testHttpsProxyAuthFail() throws Exception { startProxy("username", ProxyType.HTTP); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy().useProxyAuth().fail(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy().useProxyAuth().fail(); } @Test // Access https server via connect proxy with proxy auth required public void testHttpsProxyAuth() throws Exception { startProxy("username", ProxyType.HTTP); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy().useProxyAuth().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy().useProxyAuth().pass(); assertNotNull("connection didn't access the proxy", proxy.getLastUri()); assertEquals("hostname resolved but it shouldn't be", "localhost:4043", proxy.getLastUri()); assertEquals("Host header doesn't contain target host", "localhost:4043", proxy.getLastRequestHeaders().get("Host")); @@ -785,7 +799,7 @@ public void testHttpsProxyAuth() throws Exception { public void testHttpsProxyUnknownHost() throws Exception { startProxy(null, ProxyType.HTTP); proxy.setForceUri("localhost:4043"); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy() + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy() .connectHostname("doesnt-resolve.host-name").clientTrustAll().clientVerifyHost(false).pass(); assertNotNull("connection didn't access the proxy", proxy.getLastUri()); assertEquals("hostname resolved but it shouldn't be", "doesnt-resolve.host-name:4043", proxy.getLastUri()); @@ -796,7 +810,7 @@ public void testHttpsProxyUnknownHost() throws Exception { // Access https server via socks5 proxy public void testHttpsSocks() throws Exception { startProxy(null, ProxyType.SOCKS5); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy().useSocksProxy().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy().useSocksProxy().pass(); assertNotNull("connection didn't access the proxy", proxy.getLastUri()); assertEquals("hostname resolved but it shouldn't be", "localhost:4043", proxy.getLastUri()); } @@ -805,7 +819,7 @@ public void testHttpsSocks() throws Exception { // Access https server via socks5 proxy with authentication public void testHttpsSocksAuth() throws Exception { startProxy("username", ProxyType.SOCKS5); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy().useSocksProxy().useProxyAuth().pass(); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy().useSocksProxy().useProxyAuth().pass(); assertNotNull("connection didn't access the proxy", proxy.getLastUri()); assertEquals("hostname resolved but it shouldn't be", "localhost:4043", proxy.getLastUri()); } @@ -817,7 +831,7 @@ public void testHttpsSocksAuth() throws Exception { public void testSocksProxyUnknownHost() throws Exception { startProxy(null, ProxyType.SOCKS5); proxy.setForceUri("localhost:4043"); - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).useProxy().useSocksProxy() + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE).useProxy().useSocksProxy() .connectHostname("doesnt-resolve.host-name").clientTrustAll().clientVerifyHost(false).pass(); assertNotNull("connection didn't access the proxy", proxy.getLastUri()); assertEquals("hostname resolved but it shouldn't be", "doesnt-resolve.host-name:4043", proxy.getLastUri()); diff --git a/src/test/java/io/vertx/test/core/KeyStoreTest.java b/src/test/java/io/vertx/test/core/KeyStoreTest.java --- a/src/test/java/io/vertx/test/core/KeyStoreTest.java +++ b/src/test/java/io/vertx/test/core/KeyStoreTest.java @@ -26,6 +26,8 @@ import io.vertx.core.net.PfxOptions; import io.vertx.core.net.TrustOptions; import io.vertx.core.net.impl.KeyStoreHelper; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.Test; import javax.net.ssl.KeyManager; @@ -281,12 +283,12 @@ public void testCopyTrustOptions() throws Exception { @Test public void testJKSPath() throws Exception { - testKeyStore(TLSCert.JKS.getServerKeyCertOptions()); + testKeyStore(Cert.SERVER_JKS.get()); } @Test public void testJKSValue() throws Exception { - JksOptions options = (JksOptions) TLSCert.JKS.getServerKeyCertOptions(); + JksOptions options = Cert.SERVER_JKS.get(); Buffer store = vertx.fileSystem().readFileBlocking(options.getPath()); options.setPath(null).setValue(store); testKeyStore(options); @@ -294,12 +296,12 @@ public void testJKSValue() throws Exception { @Test public void testPKCS12Path() throws Exception { - testKeyStore(TLSCert.PKCS12.getServerKeyCertOptions()); + testKeyStore(Cert.SERVER_PKCS12.get()); } @Test public void testPKCS12Value() throws Exception { - PfxOptions options = (PfxOptions) TLSCert.PKCS12.getServerKeyCertOptions(); + PfxOptions options = Cert.SERVER_PKCS12.get(); Buffer store = vertx.fileSystem().readFileBlocking(options.getPath()); options.setPath(null).setValue(store); testKeyStore(options); @@ -307,12 +309,12 @@ public void testPKCS12Value() throws Exception { @Test public void testKeyCertPath() throws Exception { - testKeyStore(TLSCert.PEM.getServerKeyCertOptions()); + testKeyStore(Cert.SERVER_PEM.get()); } @Test public void testKeyCertValue() throws Exception { - PemKeyCertOptions options = (PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions(); + PemKeyCertOptions options = Cert.SERVER_PEM.get(); Buffer key = vertx.fileSystem().readFileBlocking(options.getKeyPath()); options.setKeyValue(null).setKeyValue(key); Buffer cert = vertx.fileSystem().readFileBlocking(options.getCertPath()); @@ -322,12 +324,12 @@ public void testKeyCertValue() throws Exception { @Test public void testCaPath() throws Exception { - testTrustStore(TLSCert.PEM.getServerTrustOptions()); + testTrustStore(Trust.SERVER_PEM.get()); } @Test public void testCaPathValue() throws Exception { - PemTrustOptions options = (PemTrustOptions) TLSCert.PEM.getServerTrustOptions(); + PemTrustOptions options = Trust.SERVER_PEM.get(); options.getCertPaths(). stream(). map(vertx.fileSystem()::readFileBlocking). @@ -338,13 +340,13 @@ public void testCaPathValue() throws Exception { @Test public void testKeyOptionsEquality() { - JksOptions jksOptions = (JksOptions) TLSCert.JKS.getServerKeyCertOptions(); + JksOptions jksOptions = Cert.SERVER_JKS.get(); JksOptions jksOptionsCopy = new JksOptions(jksOptions); - PfxOptions pfxOptions = (PfxOptions) TLSCert.PKCS12.getServerKeyCertOptions(); + PfxOptions pfxOptions = Cert.SERVER_PKCS12.get(); PfxOptions pfxOptionsCopy = new PfxOptions(pfxOptions); - PemKeyCertOptions pemKeyCertOptions = (PemKeyCertOptions) TLSCert.PEM.getServerKeyCertOptions(); + PemKeyCertOptions pemKeyCertOptions = Cert.SERVER_PEM.get(); PemKeyCertOptions pemKeyCertOptionsCopy = new PemKeyCertOptions(pemKeyCertOptions); assertEquals(jksOptions, jksOptionsCopy); diff --git a/src/test/java/io/vertx/test/core/NetTest.java b/src/test/java/io/vertx/test/core/NetTest.java --- a/src/test/java/io/vertx/test/core/NetTest.java +++ b/src/test/java/io/vertx/test/core/NetTest.java @@ -29,6 +29,8 @@ import io.vertx.core.logging.LoggerFactory; import io.vertx.core.net.*; import io.vertx.core.net.impl.SocketAddressImpl; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import io.vertx.test.netty.TestLoggerFactory; import org.junit.Assume; import org.junit.Rule; @@ -2358,14 +2360,14 @@ public void testConnectSSLWithSocks5Proxy() { .setPort(1234) .setHost("localhost") .setSsl(true) - .setKeyCertOptions(TLSCert.JKS_ROOT_CA.getServerKeyCertOptions()); + .setKeyCertOptions(Cert.SERVER_JKS_ROOT_CA.get()); NetServer server = vertx.createNetServer(options); NetClientOptions clientOptions = new NetClientOptions() .setHostnameVerificationAlgorithm("HTTPS") .setSsl(true) .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setHost("127.0.0.1").setPort(11080)) - .setTrustOptions(TLSCert.JKS_ROOT_CA.getClientTrustOptions()); + .setTrustOptions(Trust.SERVER_JKS_ROOT_CA.get()); NetClient client = vertx.createNetClient(clientOptions); server.connectHandler(sock -> { @@ -2394,13 +2396,13 @@ public void testUpgradeSSLWithSocks5Proxy() { .setPort(1234) .setHost("localhost") .setSsl(true) - .setKeyCertOptions(TLSCert.JKS_ROOT_CA.getServerKeyCertOptions()); + .setKeyCertOptions(Cert.SERVER_JKS_ROOT_CA.get()); NetServer server = vertx.createNetServer(options); NetClientOptions clientOptions = new NetClientOptions() .setHostnameVerificationAlgorithm("HTTPS") .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setHost("127.0.0.1").setPort(11080)) - .setTrustOptions(TLSCert.JKS_ROOT_CA.getClientTrustOptions()); + .setTrustOptions(Trust.SERVER_JKS_ROOT_CA.get()); NetClient client = vertx.createNetClient(clientOptions); server.connectHandler(sock -> { @@ -2548,12 +2550,12 @@ public void testWithSocks4LocalResolver() { public void testTLSHostnameCertCheckCorrect() { server.close(); server = vertx.createNetServer(new NetServerOptions().setSsl(true).setPort(4043) - .setKeyCertOptions(TLSCert.JKS_ROOT_CA.getServerKeyCertOptions())); + .setKeyCertOptions(Cert.SERVER_JKS_ROOT_CA.get())); server.connectHandler(netSocket -> netSocket.close()).listen(ar -> { NetClientOptions options = new NetClientOptions() .setHostnameVerificationAlgorithm("HTTPS") - .setTrustOptions(TLSCert.JKS_ROOT_CA.getClientTrustOptions()); + .setTrustOptions(Trust.SERVER_JKS_ROOT_CA.get()); NetClient client = vertx.createNetClient(options); @@ -2579,12 +2581,12 @@ public void testTLSHostnameCertCheckCorrect() { public void testTLSHostnameCertCheckIncorrect() { server.close(); server = vertx.createNetServer(new NetServerOptions().setSsl(true).setPort(4043) - .setKeyCertOptions(TLSCert.JKS_ROOT_CA.getServerKeyCertOptions())); + .setKeyCertOptions(Cert.SERVER_JKS_ROOT_CA.get())); server.connectHandler(netSocket -> netSocket.close()).listen(ar -> { NetClientOptions options = new NetClientOptions() .setHostnameVerificationAlgorithm("HTTPS") - .setTrustOptions(TLSCert.JKS_ROOT_CA.getClientTrustOptions()); + .setTrustOptions(Trust.SERVER_JKS_ROOT_CA.get()); NetClient client = vertx.createNetClient(options); diff --git a/src/test/java/io/vertx/test/core/SSLHelperTest.java b/src/test/java/io/vertx/test/core/SSLHelperTest.java --- a/src/test/java/io/vertx/test/core/SSLHelperTest.java +++ b/src/test/java/io/vertx/test/core/SSLHelperTest.java @@ -25,13 +25,13 @@ import io.vertx.core.http.HttpServerOptionsConverter; import io.vertx.core.impl.VertxInternal; import io.vertx.core.json.JsonObject; -import io.vertx.core.net.NetServerOptions; import io.vertx.core.net.NetServerOptionsConverter; import io.vertx.core.net.NetworkOptionsConverter; import io.vertx.core.net.OpenSSLEngineOptions; -import io.vertx.core.net.TCPSSLOptions; import io.vertx.core.net.TCPSSLOptionsConverter; import io.vertx.core.net.impl.SSLHelper; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.Test; import javax.net.ssl.SSLContext; @@ -55,8 +55,8 @@ public void testUseJdkCiphersWhenNotSpecified() throws Exception { SSLEngine engine = context.createSSLEngine(); String[] expected = engine.getEnabledCipherSuites(); SSLHelper helper = new SSLHelper(new HttpClientOptions(), - TLSCert.JKS.getClientKeyCertOptions(), - TLSCert.JKS.getClientTrustOptions()); + Cert.CLIENT_JKS.get(), + Trust.SERVER_JKS.get()); SslContext ctx = helper.getContext((VertxInternal) vertx); assertEquals(new HashSet<>(Arrays.asList(expected)), new HashSet<>(ctx.cipherSuites())); } @@ -66,8 +66,8 @@ public void testUseOpenSSLCiphersWhenNotSpecified() throws Exception { Set<String> expected = OpenSsl.availableCipherSuites(); SSLHelper helper = new SSLHelper( new HttpClientOptions().setOpenSslEngineOptions(new OpenSSLEngineOptions()), - TLSCert.PEM.getClientKeyCertOptions(), - TLSCert.PEM.getClientTrustOptions()); + Cert.CLIENT_PEM.get(), + Trust.SERVER_PEM.get()); SslContext ctx = helper.getContext((VertxInternal) vertx); assertEquals(expected, new HashSet<>(ctx.cipherSuites())); } @@ -90,8 +90,8 @@ private void testOpenSslServerSessionContext(boolean testDefault){ } SSLHelper defaultHelper = new SSLHelper(httpServerOptions, - TLSCert.PEM.getServerKeyCertOptions(), - TLSCert.PEM.getServerTrustOptions()); + Cert.SERVER_PEM.get(), + Trust.SERVER_PEM.get()); SslContext ctx = defaultHelper.getContext((VertxInternal) vertx); assertTrue(ctx instanceof OpenSslServerContext); @@ -121,7 +121,7 @@ public void testPreserveEnabledCipherSuitesOrder() throws Exception { NetServerOptionsConverter.toJson(options, json); HttpServerOptionsConverter.toJson(options, json); assertEquals(new ArrayList<>(new HttpServerOptions(json).getEnabledCipherSuites()), Arrays.asList(engine.getEnabledCipherSuites())); - SSLHelper helper = new SSLHelper(options, TLSCert.JKS.getServerKeyCertOptions(), null); + SSLHelper helper = new SSLHelper(options, Cert.SERVER_JKS.get(), null); assertEquals(Arrays.asList(helper.createSslHandler((VertxInternal) vertx).engine().getEnabledCipherSuites()), Arrays.asList(engine.getEnabledCipherSuites())); } @@ -140,7 +140,7 @@ public void testPreserveEnabledSecureTransportProtocolOrder() throws Exception { NetServerOptionsConverter.toJson(options, json); HttpServerOptionsConverter.toJson(options, json); assertEquals(new ArrayList<>(new HttpServerOptions(json).getEnabledSecureTransportProtocols()), Arrays.asList(protocols)); - SSLHelper helper = new SSLHelper(options, TLSCert.JKS.getServerKeyCertOptions(), null); + SSLHelper helper = new SSLHelper(options, Cert.SERVER_JKS.get(), null); List<String> engineProtocols = Arrays.asList(helper.createSslHandler((VertxInternal) vertx).engine().getEnabledProtocols()); List<String> expectedProtocols = new ArrayList<>(Arrays.asList(protocols)); expectedProtocols.retainAll(engineProtocols); diff --git a/src/test/java/io/vertx/test/core/TLSCert.java b/src/test/java/io/vertx/test/core/TLSCert.java deleted file mode 100644 --- a/src/test/java/io/vertx/test/core/TLSCert.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 2011-2014 The original author or authors - * ------------------------------------------------------ - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * and Apache License v2.0 which accompanies this distribution. - * - * The Eclipse Public License is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * The Apache License v2.0 is available at - * http://www.opensource.org/licenses/apache2.0.php - * - * You may elect to redistribute this code under either of these licenses. - */ -package io.vertx.test.core; - -import io.netty.handler.codec.UnsupportedMessageTypeException; -import io.vertx.core.net.JksOptions; -import io.vertx.core.net.KeyCertOptions; -import io.vertx.core.net.PemKeyCertOptions; -import io.vertx.core.net.PemTrustOptions; -import io.vertx.core.net.PfxOptions; -import io.vertx.core.net.TrustOptions; - -/** - * @author <a href="mailto:[email protected]">Julien Viet</a> - */ -public enum TLSCert { - - NONE() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return null; - } - @Override - public TrustOptions getServerTrustOptions() { - return null; - } - @Override - public TrustOptions getClientTrustOptions() { - return null; - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - return null; - } - }, - - // Self signed - JKS() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new JksOptions().setPath("tls/server-keystore.jks").setPassword("wibble"); - } - @Override - public TrustOptions getServerTrustOptions() { - return new JksOptions().setPath("tls/server-truststore.jks").setPassword("wibble"); - } - @Override - public TrustOptions getClientTrustOptions() { - return new JksOptions().setPath("tls/client-truststore.jks").setPassword("wibble"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - return new JksOptions().setPath("tls/client-keystore.jks").setPassword("wibble"); - } - }, - - // Self signed - PKCS12() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new PfxOptions().setPath("tls/server-keystore.p12").setPassword("wibble"); - } - @Override - public TrustOptions getServerTrustOptions() { - return new PfxOptions().setPath("tls/server-truststore.p12").setPassword("wibble"); - } - @Override - public TrustOptions getClientTrustOptions() { - return new PfxOptions().setPath("tls/client-truststore.p12").setPassword("wibble"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - return new PfxOptions().setPath("tls/client-keystore.p12").setPassword("wibble"); - } - }, - - // Self signed - PEM() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert.pem"); - } - @Override - public TrustOptions getServerTrustOptions() { - return new PemTrustOptions().addCertPath("tls/client-cert.pem"); - } - @Override - public TrustOptions getClientTrustOptions() { - return new PemTrustOptions().addCertPath("tls/server-cert.pem"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - return new PemKeyCertOptions().setKeyPath("tls/client-key.pem").setCertPath("tls/client-cert.pem"); - } - }, - - // Signed by root CA - JKS_ROOT_CA() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new JksOptions().setPath("tls/server-keystore-root-ca.jks").setPassword("wibble"); - } - @Override - public TrustOptions getServerTrustOptions() { - throw new UnsupportedOperationException(); - } - @Override - public TrustOptions getClientTrustOptions() { - return new JksOptions().setPath("tls/client-truststore-root-ca.jks").setPassword("wibble"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - throw new UnsupportedOperationException(); - } - }, - - // Signed by root CA - PKCS12_ROOT_CA() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new PfxOptions().setPath("tls/server-keystore-root-ca.p12").setPassword("wibble"); - } - @Override - public TrustOptions getServerTrustOptions() { - throw new UnsupportedOperationException(); - } - @Override - public TrustOptions getClientTrustOptions() { - return new PfxOptions().setPath("tls/client-truststore-root-ca.p12").setPassword("wibble"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - throw new UnsupportedOperationException(); - } - }, - - // Signed by root CA - PEM_ROOT_CA() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-root-ca.pem"); - } - @Override - public TrustOptions getServerTrustOptions() { - return new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem"); - } - @Override - public TrustOptions getClientTrustOptions() { - return new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - return new PemKeyCertOptions().setKeyPath("tls/client-key.pem").setCertPath("tls/client-cert-root-ca.pem"); - } - }, - - // Signed by an intermediate CA - PEM_CA() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-int-ca.pem"); - } - @Override - public TrustOptions getServerTrustOptions() { - return new PemTrustOptions().addCertPath("tls/int-ca/ca-cert.pem"); - } - @Override - public TrustOptions getClientTrustOptions() { - return new PemTrustOptions().addCertPath("tls/int-ca/ca-cert.pem"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - throw new UnsupportedMessageTypeException(); - } - }, - - // Signed by an intermediate CA using a chain - PEM_CA_CHAIN() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-ca-chain.pem"); - } - @Override - public TrustOptions getServerTrustOptions() { - return new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem"); - } - @Override - public TrustOptions getClientTrustOptions() { - return new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem"); - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - throw new UnsupportedMessageTypeException(); - } - }, - - // Man-in-middle attack : the server cert CN does not match the resolved URI host - MIM() { - @Override - public KeyCertOptions getServerKeyCertOptions() { - return new JksOptions().setPath("tls/mim-server-keystore.jks").setPassword("wibble"); - } - @Override - public TrustOptions getServerTrustOptions() { - return null; - } - @Override - public TrustOptions getClientTrustOptions() { - return null; - } - @Override - public KeyCertOptions getClientKeyCertOptions() { - return null; - } - }; - - - public abstract KeyCertOptions getServerKeyCertOptions(); - public abstract KeyCertOptions getClientKeyCertOptions(); - public abstract TrustOptions getServerTrustOptions(); - public abstract TrustOptions getClientTrustOptions(); - -} diff --git a/src/test/java/io/vertx/test/core/WebsocketTest.java b/src/test/java/io/vertx/test/core/WebsocketTest.java --- a/src/test/java/io/vertx/test/core/WebsocketTest.java +++ b/src/test/java/io/vertx/test/core/WebsocketTest.java @@ -28,8 +28,12 @@ import io.vertx.core.buffer.Buffer; import io.vertx.core.http.*; import io.vertx.core.impl.ConcurrentHashSet; +import io.vertx.core.net.KeyCertOptions; import io.vertx.core.net.NetSocket; +import io.vertx.core.net.TrustOptions; import io.vertx.core.streams.ReadStream; +import io.vertx.test.core.tls.Cert; +import io.vertx.test.core.tls.Trust; import org.junit.Test; import java.security.MessageDigest; @@ -193,125 +197,125 @@ public void testInvalidSubProtocolHybi17() throws Exception { @Test // Client trusts all server certs public void testTLSClientTrustAll() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE, false, false, true, false, true); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE, false, false, true, false, true); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE, false, false, false, false, true); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE, false, false, false, false, true); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCertPKCS12() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PKCS12, TLSCert.NONE, false, false, false, false, true); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_PKCS12, Trust.NONE, false, false, false, false, true); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustServerCertPEM() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PEM, TLSCert.NONE, false, false, false, false, true); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_PEM, Trust.NONE, false, false, false, false, true); } @Test // Server specifies cert that the client trusts via a CA (not trust all) public void testTLSClientTrustServerCertPEM_CA() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PEM_ROOT_CA, TLSCert.NONE, false, false, false, false, true); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE, false, false, false, false, true); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustPKCS12ServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PKCS12, TLSCert.JKS, TLSCert.NONE, false, false, false, false, true); + testTLS(Cert.NONE, Trust.SERVER_PKCS12, Cert.SERVER_JKS, Trust.NONE, false, false, false, false, true); } @Test // Server specifies cert that the client trusts (not trust all) public void testTLSClientTrustPEMServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM, TLSCert.JKS, TLSCert.NONE, false, false, false, false, true); + testTLS(Cert.NONE, Trust.SERVER_PEM, Cert.SERVER_JKS, Trust.NONE, false, false, false, false, true); } @Test // Server specifies cert that the client doesn't trust public void testTLSClientUntrustedServer() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE, false, false, false, false, false); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE, false, false, false, false, false); } @Test //Client specifies cert even though it's not required public void testTLSClientCertNotRequired() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, false, false, false, false, true); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS, false, false, false, false, true); } @Test //Client specifies cert and it is required public void testTLSClientCertRequired() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, true, false, false, false, true); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS, true, false, false, false, true); } @Test //Client specifies cert and it is required public void testTLSClientCertRequiredPKCS12() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.PKCS12, true, false, false, false, true); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PKCS12, true, false, false, false, true); } @Test //Client specifies cert and it is required public void testTLSClientCertRequiredPEM() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.PEM, true, false, false, false, true); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PEM, true, false, false, false, true); } @Test //Client specifies cert and it is required public void testTLSClientCertPKCS12Required() throws Exception { - testTLS(TLSCert.PKCS12, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, true, false, false, false, true); + testTLS(Cert.CLIENT_PKCS12, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS, true, false, false, false, true); } @Test //Client specifies cert and it is required public void testTLSClientCertPEMRequired() throws Exception { - testTLS(TLSCert.PEM, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, true, false, false, false, true); + testTLS(Cert.CLIENT_PEM, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS, true, false, false, false, true); } @Test //Client specifies cert signed by CA and it is required public void testTLSClientCertPEM_CARequired() throws Exception { - testTLS(TLSCert.PEM_ROOT_CA, TLSCert.JKS, TLSCert.JKS, TLSCert.PEM_ROOT_CA, true, false, false, false, true); + testTLS(Cert.CLIENT_PEM_ROOT_CA, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PEM_ROOT_CA, true, false, false, false, true); } @Test //Client doesn't specify cert but it's required public void testTLSClientCertRequiredNoClientCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, true, false, false, false, false); + testTLS(Cert.NONE, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_JKS, true, false, false, false, false); } @Test //Client specifies cert but it's not trusted public void testTLSClientCertClientNotTrusted() throws Exception { - testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE, true, false, false, false, false); + testTLS(Cert.CLIENT_JKS, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.NONE, true, false, false, false, false); } @Test // Server specifies cert that the client does not trust via a revoked certificate of the CA public void testTLSClientRevokedServerCert() throws Exception { - testTLS(TLSCert.NONE, TLSCert.PEM_ROOT_CA, TLSCert.PEM_ROOT_CA, TLSCert.NONE, false, false, false, true, false); + testTLS(Cert.NONE, Trust.SERVER_PEM_ROOT_CA, Cert.SERVER_PEM_ROOT_CA, Trust.NONE, false, false, false, true, false); } @Test //Client specifies cert that the server does not trust via a revoked certificate of the CA public void testTLSRevokedClientCertServer() throws Exception { - testTLS(TLSCert.PEM_ROOT_CA, TLSCert.JKS, TLSCert.JKS, TLSCert.PEM_ROOT_CA, true, true, false, false, false); + testTLS(Cert.CLIENT_PEM_ROOT_CA, Trust.SERVER_JKS, Cert.SERVER_JKS, Trust.CLIENT_PEM_ROOT_CA, true, true, false, false, false); } @Test // Test with cipher suites public void testTLSCipherSuites() throws Exception { - testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.JKS, TLSCert.NONE, false, false, true, false, true, ENABLED_CIPHER_SUITES); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE, false, false, true, false, true, ENABLED_CIPHER_SUITES); } - private void testTLS(TLSCert clientCert, TLSCert clientTrust, - TLSCert serverCert, TLSCert serverTrust, + private void testTLS(Cert<?> clientCert, Trust<?> clientTrust, + Cert<?> serverCert, Trust<?> serverTrust, boolean requireClientAuth, boolean serverUsesCrl, boolean clientTrustAll, boolean clientUsesCrl, boolean shouldPass, String... enabledCipherSuites) throws Exception { @@ -323,16 +327,16 @@ private void testTLS(TLSCert clientCert, TLSCert clientTrust, if (clientUsesCrl) { options.addCrlPath("tls/root-ca/crl.pem"); } - setOptions(options, clientTrust.getClientTrustOptions()); - setOptions(options, clientCert.getClientKeyCertOptions()); + setOptions(options, clientTrust.get()); + setOptions(options, clientCert.get()); for (String suite: enabledCipherSuites) { options.addEnabledCipherSuite(suite); } client = vertx.createHttpClient(options); HttpServerOptions serverOptions = new HttpServerOptions(); serverOptions.setSsl(true); - setOptions(serverOptions, serverTrust.getServerTrustOptions()); - setOptions(serverOptions, serverCert.getServerKeyCertOptions()); + setOptions(serverOptions, serverTrust.get()); + setOptions(serverOptions, serverCert.get()); if (requireClientAuth) { serverOptions.setClientAuth(ClientAuth.REQUIRED); } diff --git a/src/test/java/io/vertx/test/core/tls/Cert.java b/src/test/java/io/vertx/test/core/tls/Cert.java new file mode 100644 --- /dev/null +++ b/src/test/java/io/vertx/test/core/tls/Cert.java @@ -0,0 +1,31 @@ +package io.vertx.test.core.tls; + +import io.vertx.core.net.JksOptions; +import io.vertx.core.net.KeyCertOptions; +import io.vertx.core.net.PemKeyCertOptions; +import io.vertx.core.net.PfxOptions; + +import java.util.function.Supplier; + +/** + * @author <a href="mailto:[email protected]">Julien Viet</a> + */ +public interface Cert<K extends KeyCertOptions> extends Supplier<K> { + + Cert<KeyCertOptions> NONE = () -> null; + Cert<JksOptions> SERVER_JKS = () -> new JksOptions().setPath("tls/server-keystore.jks").setPassword("wibble"); + Cert<JksOptions> CLIENT_JKS = () -> new JksOptions().setPath("tls/client-keystore.jks").setPassword("wibble"); + Cert<PfxOptions> SERVER_PKCS12 = () -> new PfxOptions().setPath("tls/server-keystore.p12").setPassword("wibble"); + Cert<PfxOptions> CLIENT_PKCS12 = () -> new PfxOptions().setPath("tls/client-keystore.p12").setPassword("wibble"); + Cert<PemKeyCertOptions> SERVER_PEM = () -> new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert.pem"); + Cert<PemKeyCertOptions> CLIENT_PEM = () -> new PemKeyCertOptions().setKeyPath("tls/client-key.pem").setCertPath("tls/client-cert.pem"); + Cert<JksOptions> SERVER_JKS_ROOT_CA = () -> new JksOptions().setPath("tls/server-keystore-root-ca.jks").setPassword("wibble"); + Cert<PfxOptions> SERVER_PKCS12_ROOT_CA = () -> new PfxOptions().setPath("tls/server-keystore-root-ca.p12").setPassword("wibble"); + Cert<PemKeyCertOptions> SERVER_PEM_ROOT_CA = () -> new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-root-ca.pem"); + Cert<PemKeyCertOptions> CLIENT_PEM_ROOT_CA = () -> new PemKeyCertOptions().setKeyPath("tls/client-key.pem").setCertPath("tls/client-cert-root-ca.pem"); + Cert<PemKeyCertOptions> SERVER_PEM_INT_CA = () -> new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-int-ca.pem"); + Cert<PemKeyCertOptions> SERVER_PEM_CA_CHAIN = () -> new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-ca-chain.pem"); + Cert<PemKeyCertOptions> SERVER_PEM_OTHER_CA = () -> new PemKeyCertOptions().setKeyPath("tls/server-key.pem").setCertPath("tls/server-cert-other-ca.pem"); + Cert<JksOptions> SERVER_MIM = () -> new JksOptions().setPath("tls/mim-server-keystore.jks").setPassword("wibble"); + +} diff --git a/src/test/java/io/vertx/test/core/tls/Trust.java b/src/test/java/io/vertx/test/core/tls/Trust.java new file mode 100644 --- /dev/null +++ b/src/test/java/io/vertx/test/core/tls/Trust.java @@ -0,0 +1,28 @@ +package io.vertx.test.core.tls; + +import io.vertx.core.net.JksOptions; +import io.vertx.core.net.PemTrustOptions; +import io.vertx.core.net.PfxOptions; +import io.vertx.core.net.TrustOptions; + +import java.util.function.Supplier; + +/** + * @author <a href="mailto:[email protected]">Julien Viet</a> + */ +public interface Trust<T extends TrustOptions> extends Supplier<T> { + + Trust<TrustOptions> NONE = () -> null; + Trust<JksOptions> SERVER_JKS = () -> new JksOptions().setPath("tls/client-truststore.jks").setPassword("wibble"); + Trust<JksOptions> CLIENT_JKS = () -> new JksOptions().setPath("tls/server-truststore.jks").setPassword("wibble"); + Trust<PfxOptions> SERVER_PKCS12 = () -> new PfxOptions().setPath("tls/client-truststore.p12").setPassword("wibble"); + Trust<PfxOptions> CLIENT_PKCS12 = () -> new PfxOptions().setPath("tls/server-truststore.p12").setPassword("wibble"); + Trust<PemTrustOptions> SERVER_PEM = () -> new PemTrustOptions().addCertPath("tls/server-cert.pem"); + Trust<PemTrustOptions> CLIENT_PEM = () -> new PemTrustOptions().addCertPath("tls/client-cert.pem"); + Trust<JksOptions> SERVER_JKS_ROOT_CA = () -> new JksOptions().setPath("tls/client-truststore-root-ca.jks").setPassword("wibble"); + Trust<PfxOptions> SERVER_PKCS12_ROOT_CA = () -> new PfxOptions().setPath("tls/client-truststore-root-ca.p12").setPassword("wibble"); + Trust<PemTrustOptions> SERVER_PEM_ROOT_CA = () -> new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem"); + Trust<PemTrustOptions> CLIENT_PEM_ROOT_CA = () -> new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem"); + Trust<PemTrustOptions> SERVER_PEM_ROOT_CA_AND_OTHER_CA = () -> new PemTrustOptions().addCertPath("tls/root-ca/ca-cert.pem").addCertPath("tls/other-ca/ca-cert.pem"); + +} diff --git a/src/test/java/io/vertx/test/it/SSLEngineTest.java b/src/test/java/io/vertx/test/it/SSLEngineTest.java --- a/src/test/java/io/vertx/test/it/SSLEngineTest.java +++ b/src/test/java/io/vertx/test/it/SSLEngineTest.java @@ -14,7 +14,7 @@ import io.vertx.core.net.SSLEngineOptions; import io.vertx.core.net.impl.SSLHelper; import io.vertx.test.core.HttpTestBase; -import io.vertx.test.core.TLSCert; +import io.vertx.test.core.tls.Cert; import org.junit.Test; /** @@ -66,7 +66,7 @@ private void doTest(SSLEngineOptions engine, .setSslEngineOptions(engine) .setPort(DEFAULT_HTTP_PORT) .setHost(DEFAULT_HTTP_HOST) - .setKeyCertOptions(TLSCert.PEM.getServerKeyCertOptions()) + .setKeyCertOptions(Cert.SERVER_PEM.get()) .setSsl(true) .setUseAlpn(useAlpn); try { diff --git a/src/test/resources/tls/openssl.cnf b/src/test/resources/tls/openssl.cnf --- a/src/test/resources/tls/openssl.cnf +++ b/src/test/resources/tls/openssl.cnf @@ -11,6 +11,16 @@ default_days = 365 crlnumber = root-ca/crlnumber default_crl_days = 365 +[ CA_other ] +new_certs_dir = other-ca +database = other-ca/index.txt +default_md = sha1 +policy = policy_match +serial = other-ca/serial +default_days = 365 +crlnumber = other-ca/crlnumber +default_crl_days = 365 + [ CA_int ] new_certs_dir = int-ca database = int-ca/index.txt diff --git a/src/test/resources/tls/other-ca/01.pem b/src/test/resources/tls/other-ca/01.pem new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/01.pem @@ -0,0 +1,69 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: CN=localhost + Validity + Not Before: Sep 6 21:33:44 2016 GMT + Not After : Sep 6 21:33:44 2017 GMT + Subject: CN=localhost + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:9a:c7:2c:01:f8:a4:3d:f8:72:40:39:ed:94:74: + 8a:e8:d7:2f:59:fb:85:45:97:83:7f:f2:78:5b:be: + db:12:fd:7b:36:4c:92:75:1f:a1:0b:eb:ec:7b:9e: + 2e:13:d7:81:94:09:27:0a:54:46:08:83:03:62:1d: + 53:29:5e:18:31:95:84:47:9f:14:f1:3a:58:10:64: + 24:4e:c0:d5:71:30:c1:26:2e:bc:6a:e0:d5:8e:c0: + 66:dd:43:2c:09:ee:18:06:de:ba:36:ea:b3:3f:43: + 34:70:2e:14:5b:09:1f:a0:b1:77:6c:52:f7:03:fe: + 7a:ed:94:3d:b8:cf:f4:5f:07:03:68:79:3c:d8:ee: + ce:29:a8:15:6a:7b:11:ed:4f:0a:6c:6e:b4:e2:2a: + d6:60:e7:b9:2f:d0:a2:25:18:8a:01:d9:53:9e:12: + 8f:96:06:0c:d9:ff:a0:7f:58:f8:9b:9e:29:7c:a0: + 4c:76:4d:c6:c9:87:85:6f:ce:ab:4d:80:6f:b2:02: + 2b:58:9d:c9:b0:27:96:77:a8:55:44:78:4d:ab:29: + 2c:62:8c:e2:d6:86:4d:20:5c:6f:2e:af:21:85:8b: + 78:0b:fa:a8:94:8d:75:05:6f:62:19:c7:45:8b:77: + 5d:5a:dc:cb:5a:bc:7d:68:9d:0c:93:62:b0:e5:73: + 31:c7 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Alternative Name: + DNS:localhost + Signature Algorithm: sha1WithRSAEncryption + ae:3d:ab:a9:f6:d7:f3:3f:1b:5f:7f:b5:11:7f:ec:33:e9:9a: + c9:fc:70:23:af:48:d6:ca:fc:ac:ca:91:dc:28:bf:3c:b4:86: + 70:86:b8:76:5f:17:32:22:5d:d4:2c:5b:70:88:7b:ec:6e:5c: + bf:53:00:35:2b:36:d6:bf:1d:2f:fd:32:16:7f:e0:aa:d1:20: + b6:cd:3f:81:c2:6b:46:ab:f2:0d:79:a1:53:9e:33:17:a5:40: + 7e:60:6c:d5:56:9c:9d:0b:89:c6:07:6a:92:a2:00:7f:03:b1: + 83:9a:9a:79:01:81:d3:4b:95:41:1e:07:94:d6:1c:a5:53:1c: + 49:01:17:a0:49:45:9f:4f:ca:28:12:c6:6d:cc:5a:b6:90:d0: + a1:0b:b5:62:47:63:92:13:0d:af:35:e6:10:4d:66:ec:3f:61: + a6:a2:4c:3d:39:10:63:0f:d4:88:fc:90:f5:5e:01:5d:0c:60: + 45:29:a8:3e:92:fb:35:80:d4:88:f6:e6:d7:d3:09:79:ef:7c: + 03:76:11:d8:7b:db:8d:92:cf:f6:e6:50:13:d3:d7:e8:11:89: + 92:af:c5:e7:4e:89:f5:e5:f2:41:de:27:54:f2:1e:1b:17:ec: + 04:71:7a:7d:7a:40:db:45:c9:50:0f:9f:87:fc:a4:35:50:83: + cf:f7:41:21 +-----BEGIN CERTIFICATE----- +MIICuzCCAaOgAwIBAgIBATANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDEwlsb2Nh +bGhvc3QwHhcNMTYwOTA2MjEzMzQ0WhcNMTcwOTA2MjEzMzQ0WjAUMRIwEAYDVQQD +Ewlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCaxywB ++KQ9+HJAOe2UdIro1y9Z+4VFl4N/8nhbvtsS/Xs2TJJ1H6EL6+x7ni4T14GUCScK +VEYIgwNiHVMpXhgxlYRHnxTxOlgQZCROwNVxMMEmLrxq4NWOwGbdQywJ7hgG3ro2 +6rM/QzRwLhRbCR+gsXdsUvcD/nrtlD24z/RfBwNoeTzY7s4pqBVqexHtTwpsbrTi +KtZg57kv0KIlGIoB2VOeEo+WBgzZ/6B/WPibnil8oEx2TcbJh4VvzqtNgG+yAitY +ncmwJ5Z3qFVEeE2rKSxijOLWhk0gXG8uryGFi3gL+qiUjXUFb2IZx0WLd11a3Mta +vH1onQyTYrDlczHHAgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkq +hkiG9w0BAQUFAAOCAQEArj2rqfbX8z8bX3+1EX/sM+mayfxwI69I1sr8rMqR3Ci/ +PLSGcIa4dl8XMiJd1CxbcIh77G5cv1MANSs21r8dL/0yFn/gqtEgts0/gcJrRqvy +DXmhU54zF6VAfmBs1VacnQuJxgdqkqIAfwOxg5qaeQGB00uVQR4HlNYcpVMcSQEX +oElFn0/KKBLGbcxatpDQoQu1YkdjkhMNrzXmEE1m7D9hpqJMPTkQYw/UiPyQ9V4B +XQxgRSmoPpL7NYDUiPbm19MJee98A3YR2HvbjZLP9uZQE9PX6BGJkq/F506J9eXy +Qd4nVPIeGxfsBHF6fXpA20XJUA+fh/ykNVCDz/dBIQ== +-----END CERTIFICATE----- diff --git a/src/test/resources/tls/other-ca/ca-cert.pem b/src/test/resources/tls/other-ca/ca-cert.pem new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/ca-cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIJAKwEua1HODABMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV +BAMTCWxvY2FsaG9zdDAeFw0xNjA5MDYyMTMzMDhaFw0xNjEwMDYyMTMzMDhaMBQx +EjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL9ewDrSBF9ca9M76h3shgda9hVmIiHE0V1jSkXwNxKF/AE5qPU81BVLZYmU +l79Aoy3DW7puISZVOwQgk+XEb8yx5DChPEyrRy/2o5PBIoTImNbIq52OaRYkMzwI +ARuPu1sALAJcp8JmoUlDJmuwL6muK4/QG19EamLuv1e3OPJ3ph9mvt14mRKn95Ci +Q4jPb/I2CK/VgaCUXDDqPqBIBMW89Yqc6Aet3jyvPa+grg5hjnhJ9CsVZ06TQjxn +zRo6EzF6H7rKOINcvOeRO8yDw0gI6CoW/K89zgXXmNTvC3NPZGlIzJI9sNoMGL8J +HdslGvaRIqcUO3tNByBvcc6XzYsCAwEAAaN1MHMwHQYDVR0OBBYEFHnlh9N5EGIP +yWeKMCmt7S79NWO5MEQGA1UdIwQ9MDuAFHnlh9N5EGIPyWeKMCmt7S79NWO5oRik +FjAUMRIwEAYDVQQDEwlsb2NhbGhvc3SCCQCsBLmtRzgwATAMBgNVHRMEBTADAQH/ +MA0GCSqGSIb3DQEBBQUAA4IBAQBwdCgqPoSQk862Ygbj7nG3xWwCDqt2igZS8luo +H/Ki4PXo0rpQAgIF7Va+YrOZIFO5vsSmSnMg9vJdtL/pMTzAnTKzgj6UmKQRK/Br +bg80mKkxudZ8KaGejlMlid2eeFDjMgsXVyLkrElINpP7T7KsMWp8/iAzjpzg+zv2 +KdMLbBPeJk7qqQHqxTnF78sxpjQDAR9L88xSPPHTYLC8eLd4S7Ev9wU0HDmWcmuY +S/aNIs87OdzVXJg9bYlKex48xQVBFVHR89wmVqf5Fq0UuBcZWwZb7P0Uq1YPg3BB +WUyPOCs+x7p6WDaDkWQ7s2p/0Gxdn6AoUdTXJXAvHEjdtvDP +-----END CERTIFICATE----- diff --git a/src/test/resources/tls/other-ca/ca-key.pem b/src/test/resources/tls/other-ca/ca-key.pem new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/ca-key.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,D8DE143B04407920 + +OqMSGXrluJfgRmNkbhW8hpENJqaT/YqnW/6W+iV8MWdEH3tYrfcNhimRpJMVi1Tl +/lUNQDtEFlQJGN+THR8jcB+PGFWNkOEmkS0DhTm17oKLOn0tz75TPuf+IcQBp0Kf +X5h5YY9SvIMpGsVHvR8nPzzMi9q2tQxSqkBFxQ3Ztu/T0e1zZaL/1F7RBovQRqtY +PWl2z5FW8PQnkMW7IzPnlgrs+gMfMJ2R/UNMNiBaU7ssCtxU/D6stncsib+B3FaF +ooozGBIy0YBnsk6VCNhsqnNh23kCgguupVNcpneTMMQQFUqZzNrUjUgpEPWk0sT4 +UeVMAQ0GX/xzh/RM21dptB92U7zTTT/z6Sw/cmUcwIYP49u6LV2A4PaEpZzDNF4q +n1Uj8tW6q9Cpum04KjIOkV3KYgF6g/9bn2Q0Ehs5ndmvk+zLGrJ5iwt92/SmN2vF +aeDra48rLLPSHtPHAeunu6m0G1icvqP90OpOtKBxlkaVj3SH5HO+mPgXjq6QvuTE +rY4f+6Nitg7lm6ts3LP+3mq8FivsNe+jHvHprZ+b5WCUwnsm+m/rDvs04S0llypF +vkLNrOPjxX+cKK2a4QpfCREebQNcih+sI8fiNcSDN3KB5BLq9aznI9/tIYBZYapp +LTi0n2NAigFn5wGeXCnT9BAntzKxUoE52judp3tiT3xnom2w5tzZSMQvfyAhFi12 ++UwDjhH8/63eRW+aifROnDVIH2V7EolcqSggHcPIaQtuxuG+nbTQ6MdIxJAzTCuM +kiOQ4LkZt9Hw+X8U26NcriwAD7wJ9fYtM9q1kKPfNMejcoh82KrLkYZIWlWb+A3G +Lr9EgWQ721AuAkxdFJFq/L8dqmD58UFNnYDTr50N2293lJr8gBme1Nof8NUA5rpO +Kb39y29gstn2IjkECGICI3ih4IVC3CKyQjFMPu2Q/QYTModdflLNIqLjwPT2X6CX +Kg26oeXJ5sJd//YGBHDGF5+LNh9pBIrALHErOYKJxiviBEUIkmweDcv4YJLl5oN/ +kgaKS1iT/lOHjs6g1XzsCSJL4roq1GnzQ6BQc5LzzGinIdDrk98cne1wu1wiJv6h +YHYEdzCYiLkuiHmhtM9+EQXVLQjFnbHdSICDqdTRVJpvI7dYA/pN9G/l9YWnM3sf +zcrgyYI/hZ8O+twcEaEiu5nQZv5NPpxzZTsRJMcZD3pZLG/t5/teNJ6MPcvkBCTF +fXk+c3elGwVH8hp4tVqPNsUkhba+xr4Wp0XBSie5RVosPVH4yTWbkg1hk17IDb+d +SuLEokNBS6pJxjojZQ2WcCvCVg3X3KJTW0Wy/Bf5BKOM0vjbgQSMADou5nu5V+cx +21oURSNL1cY+0oeJFd15YE19vkiz7W/Ml3/YTeZdiRZ6RRj3AFmly1uyGMgkI5Y+ +k1f7cVB5dEQvH+gjHPNcOGsLrP60AqIwit8wcmBZR+QFD3hVQ00OLOk8m521Iio0 +z2hzoeUhSmmOngN6YNuhDgolQoNyVmSB4Gx1eYtVv+QHEiwgn7gJ9LK4P3P0yXRI +4Fc5OTM26pZ6A7A3xCW6fGcaC6mt+UmqqUee1xntqawsXzkhOz9GQniuuhhA87DX +-----END RSA PRIVATE KEY----- diff --git a/src/test/resources/tls/other-ca/crlnumber b/src/test/resources/tls/other-ca/crlnumber new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/crlnumber @@ -0,0 +1 @@ +1000 diff --git a/src/test/resources/tls/other-ca/index.txt b/src/test/resources/tls/other-ca/index.txt new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/index.txt @@ -0,0 +1 @@ +V 170906213344Z 01 unknown /CN=localhost diff --git a/src/test/resources/tls/other-ca/index.txt.attr b/src/test/resources/tls/other-ca/index.txt.attr new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/index.txt.attr @@ -0,0 +1 @@ +unique_subject = no diff --git a/src/test/resources/tls/other-ca/index.txt.attr.old b/src/test/resources/tls/other-ca/index.txt.attr.old new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/index.txt.attr.old @@ -0,0 +1 @@ +unique_subject = no diff --git a/src/test/resources/tls/other-ca/index.txt.old b/src/test/resources/tls/other-ca/index.txt.old new file mode 100644 diff --git a/src/test/resources/tls/other-ca/serial b/src/test/resources/tls/other-ca/serial new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/serial @@ -0,0 +1 @@ +02 diff --git a/src/test/resources/tls/other-ca/serial.old b/src/test/resources/tls/other-ca/serial.old new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/other-ca/serial.old @@ -0,0 +1 @@ +01 diff --git a/src/test/resources/tls/server-cert-other-ca.pem b/src/test/resources/tls/server-cert-other-ca.pem new file mode 100644 --- /dev/null +++ b/src/test/resources/tls/server-cert-other-ca.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICuzCCAaOgAwIBAgIBATANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDEwlsb2Nh +bGhvc3QwHhcNMTYwOTA2MjEzMzQ0WhcNMTcwOTA2MjEzMzQ0WjAUMRIwEAYDVQQD +Ewlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCaxywB ++KQ9+HJAOe2UdIro1y9Z+4VFl4N/8nhbvtsS/Xs2TJJ1H6EL6+x7ni4T14GUCScK +VEYIgwNiHVMpXhgxlYRHnxTxOlgQZCROwNVxMMEmLrxq4NWOwGbdQywJ7hgG3ro2 +6rM/QzRwLhRbCR+gsXdsUvcD/nrtlD24z/RfBwNoeTzY7s4pqBVqexHtTwpsbrTi +KtZg57kv0KIlGIoB2VOeEo+WBgzZ/6B/WPibnil8oEx2TcbJh4VvzqtNgG+yAitY +ncmwJ5Z3qFVEeE2rKSxijOLWhk0gXG8uryGFi3gL+qiUjXUFb2IZx0WLd11a3Mta +vH1onQyTYrDlczHHAgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkq +hkiG9w0BAQUFAAOCAQEArj2rqfbX8z8bX3+1EX/sM+mayfxwI69I1sr8rMqR3Ci/ +PLSGcIa4dl8XMiJd1CxbcIh77G5cv1MANSs21r8dL/0yFn/gqtEgts0/gcJrRqvy +DXmhU54zF6VAfmBs1VacnQuJxgdqkqIAfwOxg5qaeQGB00uVQR4HlNYcpVMcSQEX +oElFn0/KKBLGbcxatpDQoQu1YkdjkhMNrzXmEE1m7D9hpqJMPTkQYw/UiPyQ9V4B +XQxgRSmoPpL7NYDUiPbm19MJee98A3YR2HvbjZLP9uZQE9PX6BGJkq/F506J9eXy +Qd4nVPIeGxfsBHF6fXpA20XJUA+fh/ykNVCDz/dBIQ== +-----END CERTIFICATE----- diff --git a/src/test/resources/tls/ssl.txt b/src/test/resources/tls/ssl.txt --- a/src/test/resources/tls/ssl.txt +++ b/src/test/resources/tls/ssl.txt @@ -176,6 +176,25 @@ openssl pkcs12 -in client-keystore.p12 -nokeys -out client-cert.pem +# Signed by other CA server->client +(cert contains alt subject name "localhost" as required by Java for hostname verification) + +## PEM signed by other CA + +1) Create a other CA database + +mkdir other-ca +openssl req -x509 -newkey rsa:2048 -subj "/CN=localhost" -keyout other-ca/ca-key.pem -out other-ca/ca-cert.pem +touch other-ca/index.txt +echo 01 > other-ca/serial +echo 1000 > other-ca/crlnumber +echo "unique_subject = no" > other-ca/index.txt.attr + +3) Sign the server cert with the other CA and convert it to the X.509 format + +openssl ca -config openssl.cnf -name CA_other -keyfile other-ca/ca-key.pem -cert other-ca/ca-cert.pem -in server-csr.pem -extensions req_ext -extfile openssl.cnf | openssl x509 -out server-cert-other-ca.pem -outform PEM + + # PEM signed by root CA client-server (not sure this is useful)
Unable to load multiple client certificates into PEM trust store If I try to load multiple client certificates for client authentication, only one of the certificates gets loaded. ``` java PemTrustOptions trustStore = new PemTrustOptions(); File certDir = new File("cert"); File clientCertsDir = new File(certDir,"clients"); Files.find(clientCertsDir.toPath(), 1, (Path path, BasicFileAttributes attrs)->{ return path.getFileName().toString().endsWith(".pem"); }).forEach(certPath ->{ log.info("Adding cert "+certPath); trustStore.addCertPath(certPath.toString()); }); ``` I have created pull request #1612 that _should_ fix this issue. The certificates were all being loaded with the same name/alias into the keystore.
@eyce9000 can you make a test for this ?
2016-09-07T08:06:30Z
3.3
eclipse-vertx/vert.x
1,604
eclipse-vertx__vert.x-1604
[ "1602" ]
1adf3f020e91bf4525f5b5fe0120d5e04f5c1d14
diff --git a/src/main/java/io/vertx/core/net/impl/NetClientImpl.java b/src/main/java/io/vertx/core/net/impl/NetClientImpl.java --- a/src/main/java/io/vertx/core/net/impl/NetClientImpl.java +++ b/src/main/java/io/vertx/core/net/impl/NetClientImpl.java @@ -200,13 +200,13 @@ private void connect(int port, String host, Handler<AsyncResult<NetSocket>> conn io.netty.util.concurrent.Future<Channel> fut = sslHandler.handshakeFuture(); fut.addListener(future2 -> { if (future2.isSuccess()) { - connected(context, ch, connectHandler); + connected(context, ch, connectHandler, host, port); } else { failed(context, ch, future2.cause(), connectHandler); } }); } else { - connected(context, ch, connectHandler); + connected(context, ch, connectHandler, host, port); } } else { @@ -227,10 +227,12 @@ private void connect(int port, String host, Handler<AsyncResult<NetSocket>> conn channelProvider.connect(vertx, bootstrap, options.getProxyOptions(), host, port, channelInitializer, channelHandler); } - private void connected(ContextImpl context, Channel ch, Handler<AsyncResult<NetSocket>> connectHandler) { + private void connected(ContextImpl context, Channel ch, Handler<AsyncResult<NetSocket>> connectHandler, String host, int port) { // Need to set context before constructor is called as writehandler registration needs this ContextImpl.setContext(context); NetSocketImpl sock = new NetSocketImpl(vertx, ch, context, sslHelper, true, metrics, null); + // remember host and port in case upgradeToSsl needs it + sock.setHostPort(host, port); VertxNetHandler handler = ch.pipeline().get(VertxNetHandler.class); handler.conn = sock; socketMap.put(ch, sock); diff --git a/src/main/java/io/vertx/core/net/impl/NetSocketImpl.java b/src/main/java/io/vertx/core/net/impl/NetSocketImpl.java --- a/src/main/java/io/vertx/core/net/impl/NetSocketImpl.java +++ b/src/main/java/io/vertx/core/net/impl/NetSocketImpl.java @@ -64,6 +64,8 @@ public class NetSocketImpl extends ConnectionBase implements NetSocket { private final SSLHelper helper; private final boolean client; private Object metric; + private String host; + private int port; private Handler<Buffer> dataHandler; private Handler<Void> endHandler; private Handler<Void> drainHandler; @@ -81,6 +83,11 @@ public NetSocketImpl(VertxInternal vertx, Channel channel, ContextImpl context, registration = vertx.eventBus().<Buffer>localConsumer(writeHandlerID).handler(writeHandler); } + protected void setHostPort(String host, int port) { + this.host = host; + this.port = port; + } + protected synchronized void setMetric(Object metric) { this.metric = metric; } @@ -246,8 +253,11 @@ public synchronized void close() { public synchronized NetSocket upgradeToSsl(final Handler<Void> handler) { SslHandler sslHandler = channel.pipeline().get(SslHandler.class); if (sslHandler == null) { - - sslHandler = helper.createSslHandler(vertx, this.remoteName(), this.remoteAddress().port()); + if (host != null) { + sslHandler = helper.createSslHandler(vertx, host, port); + } else { + sslHandler = helper.createSslHandler(vertx, this.remoteName(), this.remoteAddress().port()); + } channel.pipeline().addFirst("ssl", sslHandler); } sslHandler.handshakeFuture().addListener(future -> context.executeFromIO(() -> {
diff --git a/src/test/java/io/vertx/test/core/NetTest.java b/src/test/java/io/vertx/test/core/NetTest.java --- a/src/test/java/io/vertx/test/core/NetTest.java +++ b/src/test/java/io/vertx/test/core/NetTest.java @@ -2299,11 +2299,6 @@ private TestLoggerFactory testLogging() throws Exception { */ @Test public void testWithSocks5Proxy() { - server.close(); - NetServerOptions options = new NetServerOptions().setHost("localhost").setPort(1234); - - NetServer server = vertx.createNetServer(options); - NetClientOptions clientOptions = new NetClientOptions() .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setPort(11080)); NetClient client = vertx.createNetClient(clientOptions); @@ -2333,11 +2328,6 @@ public void testWithSocks5Proxy() { */ @Test public void testWithSocks5ProxyAuth() { - server.close(); - NetServerOptions options = new NetServerOptions().setHost("localhost").setPort(1234); - - NetServer server = vertx.createNetServer(options); - NetClientOptions clientOptions = new NetClientOptions() .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setPort(11080) .setUsername("username").setPassword("username")); @@ -2350,12 +2340,7 @@ public void testWithSocks5ProxyAuth() { server.listen(ar -> { assertTrue(ar.succeeded()); client.connect(1234, "localhost", ar2 -> { - if (ar2.failed()) { - log.warn("failed", ar2.cause()); - } assertTrue(ar2.succeeded()); - // make sure we have gone through the proxy - assertEquals("localhost:1234", proxy.getLastUri()); testComplete(); }); }); @@ -2364,17 +2349,89 @@ public void testWithSocks5ProxyAuth() { } /** - * test http connect proxy for accessing a arbitrary server port - * note that this may not work with a "real" proxy since there are usually access rules defined - * that limit the target host and ports (e.g. connecting to localhost may not be allowed) + * test socks5 proxy when accessing ssl server port with correct cert. */ @Test - public void testWithHttpConnectProxy() { + public void testConnectSSLWithSocks5Proxy() { server.close(); - NetServerOptions options = new NetServerOptions().setHost("localhost").setPort(1234); + NetServerOptions options = new NetServerOptions() + .setPort(1234) + .setHost("localhost") + .setSsl(true) + .setKeyCertOptions(TLSCert.JKS_ROOT_CA.getServerKeyCertOptions()); + NetServer server = vertx.createNetServer(options); + NetClientOptions clientOptions = new NetClientOptions() + .setHostnameVerificationAlgorithm("HTTPS") + .setSsl(true) + .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setHost("127.0.0.1").setPort(11080)) + .setTrustOptions(TLSCert.JKS_ROOT_CA.getClientTrustOptions()); + NetClient client = vertx.createNetClient(clientOptions); + server.connectHandler(sock -> { + + }); + proxy = new SocksProxy(null); + proxy.start(vertx, v -> { + server.listen(ar -> { + assertTrue(ar.succeeded()); + client.connect(1234, "localhost", ar2 -> { + assertTrue(ar2.succeeded()); + testComplete(); + }); + }); + }); + await(); + } + + /** + * test socks5 proxy for accessing ssl server port with upgradeToSsl. + * https://github.com/eclipse/vert.x/issues/1602 + */ + @Test + public void testUpgradeSSLWithSocks5Proxy() { + server.close(); + NetServerOptions options = new NetServerOptions() + .setPort(1234) + .setHost("localhost") + .setSsl(true) + .setKeyCertOptions(TLSCert.JKS_ROOT_CA.getServerKeyCertOptions()); NetServer server = vertx.createNetServer(options); + NetClientOptions clientOptions = new NetClientOptions() + .setHostnameVerificationAlgorithm("HTTPS") + .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setHost("127.0.0.1").setPort(11080)) + .setTrustOptions(TLSCert.JKS_ROOT_CA.getClientTrustOptions()); + NetClient client = vertx.createNetClient(clientOptions); + server.connectHandler(sock -> { + + }); + proxy = new SocksProxy(null); + proxy.start(vertx, v -> { + server.listen(ar -> { + assertTrue(ar.succeeded()); + client.connect(1234, "localhost", ar2 -> { + assertTrue(ar2.succeeded()); + NetSocket ns = ar2.result(); + ns.exceptionHandler(th -> { + fail(th); + }); + ns.upgradeToSsl(v2 -> { + // failure would occur before upgradeToSsl completes + testComplete(); + }); + }); + }); + }); + await(); + } + + /** + * test http connect proxy for accessing a arbitrary server port + * note that this may not work with a "real" proxy since there are usually access rules defined + * that limit the target host and ports (e.g. connecting to localhost or to port 25 may not be allowed) + */ + @Test + public void testWithHttpConnectProxy() { NetClientOptions clientOptions = new NetClientOptions() .setProxyOptions(new ProxyOptions().setType(ProxyType.HTTP).setPort(13128)); NetClient client = vertx.createNetClient(clientOptions); @@ -2404,11 +2461,6 @@ public void testWithHttpConnectProxy() { */ @Test public void testWithSocks4aProxy() { - server.close(); - NetServerOptions options = new NetServerOptions().setHost("localhost").setPort(1234); - - NetServer server = vertx.createNetServer(options); - NetClientOptions clientOptions = new NetClientOptions() .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS4).setPort(11080)); NetClient client = vertx.createNetClient(clientOptions); @@ -2438,11 +2490,6 @@ public void testWithSocks4aProxy() { */ @Test public void testWithSocks4aProxyAuth() { - server.close(); - NetServerOptions options = new NetServerOptions().setHost("localhost").setPort(1234); - - NetServer server = vertx.createNetServer(options); - NetClientOptions clientOptions = new NetClientOptions() .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS4).setPort(11080) .setUsername("username")); @@ -2473,11 +2520,6 @@ public void testWithSocks4aProxyAuth() { */ @Test public void testWithSocks4LocalResolver() { - server.close(); - NetServerOptions options = new NetServerOptions().setHost("localhost").setPort(1234); - - NetServer server = vertx.createNetServer(options); - NetClientOptions clientOptions = new NetClientOptions() .setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS4).setPort(11080)); NetClient client = vertx.createNetClient(clientOptions);
NetClient with SOCKS Proxy checks wrong hostname on upgradeToSsl() When using a NetClient with SOCKS Proxy, the upgradeToSsl() checks the ssl cert against the name of the proxy, not the name of the target server. I created a unit test that shows the issue by setting the proxy hostname to 127.0.0.1 and connecting to a server at localhost, this way it fails with "No subject alternative names matching IP address 127.0.0.1 found". A unlikely usecase, however I got the error when trying to send a mail via smtp with starttls over TOR, which uses SOCKS5 to connect.
2016-09-03T13:04:57Z
3.3
eclipse-vertx/vert.x
1,565
eclipse-vertx__vert.x-1565
[ "1564" ]
07b7f47ae702d9d5f2f63228776ea00ea290e848
diff --git a/src/main/java/io/vertx/core/net/impl/SSLHelper.java b/src/main/java/io/vertx/core/net/impl/SSLHelper.java --- a/src/main/java/io/vertx/core/net/impl/SSLHelper.java +++ b/src/main/java/io/vertx/core/net/impl/SSLHelper.java @@ -33,7 +33,6 @@ import io.vertx.core.net.NetClientOptions; import io.vertx.core.net.NetServerOptions; import io.vertx.core.net.OpenSSLEngineOptions; -import io.vertx.core.net.PemKeyCertOptions; import io.vertx.core.net.SSLEngineOptions; import io.vertx.core.net.TCPSSLOptions; import io.vertx.core.net.TrustOptions; @@ -41,7 +40,6 @@ import javax.net.ssl.*; import java.io.ByteArrayInputStream; import java.security.KeyStore; -import java.security.PrivateKey; import java.security.cert.CRL; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; @@ -242,41 +240,19 @@ private SslContext createContext(VertxInternal vertx) { if (client) { builder = SslContextBuilder.forClient(); if (keyMgrFactory != null) { - if (openSsl) { - if (keyCertOptions instanceof PemKeyCertOptions) { - KeyStoreHelper.KeyCert keyStoreHelper =(KeyStoreHelper.KeyCert) KeyStoreHelper.create(vertx, keyCertOptions); - X509Certificate[] certs = keyStoreHelper.loadCerts(); - PrivateKey privateKey = keyStoreHelper.loadPrivateKey(); - builder.keyManager(privateKey, certs); - } else { - throw new VertxException("OpenSSL server key/certificate must be configured with .pem format"); - } - } else { - builder.keyManager(keyMgrFactory); - } + builder.keyManager(keyMgrFactory); } } else { - if (openSsl) { - if (keyCertOptions instanceof PemKeyCertOptions) { - KeyStoreHelper.KeyCert keyStoreHelper =(KeyStoreHelper.KeyCert) KeyStoreHelper.create(vertx, keyCertOptions); - X509Certificate[] certs = keyStoreHelper.loadCerts(); - PrivateKey privateKey = keyStoreHelper.loadPrivateKey(); - builder = SslContextBuilder.forServer(privateKey, certs); - } else { - throw new VertxException("OpenSSL server key/certificate must be configured with .pem format"); - } - } else { - if (keyMgrFactory == null) { - throw new VertxException("Key/certificate is mandatory for SSL"); - } - builder = SslContextBuilder.forServer(keyMgrFactory); + if (keyMgrFactory == null) { + throw new VertxException("Key/certificate is mandatory for SSL"); } + builder = SslContextBuilder.forServer(keyMgrFactory); } Collection<String> cipherSuites = enabledCipherSuites; if (openSsl) { builder.sslProvider(SslProvider.OPENSSL); if (cipherSuites == null || cipherSuites.isEmpty()) { - cipherSuites = OpenSsl.availableCipherSuites(); + cipherSuites = OpenSsl.availableOpenSslCipherSuites(); } } else { builder.sslProvider(SslProvider.JDK); diff --git a/src/main/java/io/vertx/core/net/package-info.java b/src/main/java/io/vertx/core/net/package-info.java --- a/src/main/java/io/vertx/core/net/package-info.java +++ b/src/main/java/io/vertx/core/net/package-info.java @@ -667,9 +667,6 @@ * and use http://netty.io/wiki/forked-tomcat-native.html[netty-tcnative] jar on the classpath. Using tcnative may require * OpenSSL to be installed on your OS depending on the tcnative implementation. * - * OpenSSL restricts the key/certificate configuration to `.pem` files. However it is still possible to use any trust - * configuration. - * * ===== Jetty-ALPN support * * Jetty-ALPN is a small jar that overrides a few classes of Java 8 distribution to support ALPN.
diff --git a/src/test/java/io/vertx/test/core/HttpTLSTest.java b/src/test/java/io/vertx/test/core/HttpTLSTest.java --- a/src/test/java/io/vertx/test/core/HttpTLSTest.java +++ b/src/test/java/io/vertx/test/core/HttpTLSTest.java @@ -276,7 +276,19 @@ public void testTLSVerifyNonMatchingHost() throws Exception { testTLS(TLSCert.NONE, TLSCert.NONE, TLSCert.MIM, TLSCert.NONE).clientTrustAll().clientVerifyHost().fail(); } - // OpenSSL tests + // OpenSSL tests + + @Test + // Server uses OpenSSL with JKS + public void testTLSClientTrustServerCertJKSOpenSSL() throws Exception { + testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.JKS, TLSCert.NONE).serverOpenSSL().pass(); + } + + @Test + // Server uses OpenSSL with PKCS12 + public void testTLSClientTrustServerCertPKCS12OpenSSL() throws Exception { + testTLS(TLSCert.NONE, TLSCert.JKS, TLSCert.PKCS12, TLSCert.NONE).serverOpenSSL().pass(); + } @Test // Server uses OpenSSL with PEM @@ -302,6 +314,24 @@ public void testTLSClientTrustServerCertWithPEMOpenSSL() throws Exception { testTLS(TLSCert.NONE, TLSCert.PEM, TLSCert.JKS, TLSCert.NONE).clientOpenSSL().pass(); } + @Test + // Client specifies cert and it is required + public void testTLSClientCertRequiredOpenSSL() throws Exception { + testTLS(TLSCert.JKS, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).clientOpenSSL().requiresClientAuth().pass(); + } + + @Test + // Client specifies cert and it is required + public void testTLSClientCertPKCS12RequiredOpenSSL() throws Exception { + testTLS(TLSCert.PKCS12, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).clientOpenSSL().requiresClientAuth().pass(); + } + + @Test + // Client specifies cert and it is required + public void testTLSClientCertPEMRequiredOpenSSL() throws Exception { + testTLS(TLSCert.PEM, TLSCert.JKS, TLSCert.JKS, TLSCert.JKS).clientOpenSSL().requiresClientAuth().pass(); + } + class TLSTest { HttpVersion version; @@ -563,20 +593,6 @@ public void testJKSInvalidPassword() { testInvalidKeyStore(((JksOptions) TLSCert.JKS.getServerKeyCertOptions()).setPassword("wrongpassword"), "Keystore was tampered with, or password was incorrect", null); } - @Test - public void testJKSOpenSSL() { - HttpServerOptions serverOptions = new HttpServerOptions().setOpenSslEngineOptions(new OpenSSLEngineOptions()); - setOptions(serverOptions, TLSCert.JKS.getServerKeyCertOptions()); - testStore(serverOptions, Collections.singletonList("OpenSSL server key/certificate must be configured with .pem format"), null); - } - - @Test - public void testPKCS12OpenSSL() { - HttpServerOptions serverOptions = new HttpServerOptions().setOpenSslEngineOptions(new OpenSSLEngineOptions()); - setOptions(serverOptions, TLSCert.JKS.getServerKeyCertOptions()); - testStore(serverOptions, Collections.singletonList("OpenSSL server key/certificate must be configured with .pem format"), null); - } - @Test public void testPKCS12InvalidPath() { testInvalidKeyStore(((PfxOptions) TLSCert.PKCS12.getServerKeyCertOptions()).setPath("/invalid.p12"), "java.nio.file.NoSuchFileException: ", "invalid.p12");
Remove KeyCertOptions limitation for OpenSSL The previous version of OpenSSL engine was restricted to use `pem` file format. Now the engine can use a generic `KeyManagerFactory` : https://github.com/netty/netty/pull/5439 We can so support it.
2016-08-05T14:10:13Z
3.3
eclipse-vertx/vert.x
1,476
eclipse-vertx__vert.x-1476
[ "1475" ]
1bbbc092ece499643d951defd4bd9a41c638b5f7
diff --git a/src/main/generated/io/vertx/core/dns/AddressResolverOptionsConverter.java b/src/main/generated/io/vertx/core/dns/AddressResolverOptionsConverter.java --- a/src/main/generated/io/vertx/core/dns/AddressResolverOptionsConverter.java +++ b/src/main/generated/io/vertx/core/dns/AddressResolverOptionsConverter.java @@ -45,6 +45,9 @@ public static void fromJson(JsonObject json, AddressResolverOptions obj) { if (json.getValue("maxQueries") instanceof Number) { obj.setMaxQueries(((Number)json.getValue("maxQueries")).intValue()); } + if (json.getValue("ndots") instanceof Number) { + obj.setNdots(((Number)json.getValue("ndots")).intValue()); + } if (json.getValue("optResourceEnabled") instanceof Boolean) { obj.setOptResourceEnabled((Boolean)json.getValue("optResourceEnabled")); } @@ -54,6 +57,12 @@ public static void fromJson(JsonObject json, AddressResolverOptions obj) { if (json.getValue("rdFlag") instanceof Boolean) { obj.setRdFlag((Boolean)json.getValue("rdFlag")); } + if (json.getValue("searchDomains") instanceof JsonArray) { + json.getJsonArray("searchDomains").forEach(item -> { + if (item instanceof String) + obj.addSearchDomain((String)item); + }); + } if (json.getValue("servers") instanceof JsonArray) { json.getJsonArray("servers").forEach(item -> { if (item instanceof String) @@ -73,9 +82,17 @@ public static void toJson(AddressResolverOptions obj, JsonObject json) { json.put("hostsValue", obj.getHostsValue().getBytes()); } json.put("maxQueries", obj.getMaxQueries()); + json.put("ndots", obj.getNdots()); json.put("optResourceEnabled", obj.isOptResourceEnabled()); json.put("queryTimeout", obj.getQueryTimeout()); json.put("rdFlag", obj.getRdFlag()); + if (obj.getSearchDomains() != null) { + json.put("searchDomains", new JsonArray( + obj.getSearchDomains(). + stream(). + map(item -> item). + collect(java.util.stream.Collectors.toList()))); + } if (obj.getServers() != null) { json.put("servers", new JsonArray( obj.getServers(). diff --git a/src/main/java/examples/CoreExamples.java b/src/main/java/examples/CoreExamples.java --- a/src/main/java/examples/CoreExamples.java +++ b/src/main/java/examples/CoreExamples.java @@ -328,6 +328,13 @@ public void configureHosts() { ); } + public void configureSearchDomains() { + Vertx vertx = Vertx.vertx(new VertxOptions(). + setAddressResolverOptions( + new AddressResolverOptions().addSearchDomain("foo.com").addSearchDomain("bar.com")) + ); + } + public void deployVerticleWithDifferentWorkerPool(Vertx vertx) { vertx.deployVerticle("the-verticle", new DeploymentOptions().setWorkerPoolName("the-specific-pool")); } diff --git a/src/main/java/io/vertx/core/dns/AddressResolverOptions.java b/src/main/java/io/vertx/core/dns/AddressResolverOptions.java --- a/src/main/java/io/vertx/core/dns/AddressResolverOptions.java +++ b/src/main/java/io/vertx/core/dns/AddressResolverOptions.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * Configuration options for Vert.x hostname resolver. The resolver uses the local <i>hosts</i> file and performs @@ -48,6 +49,8 @@ public class AddressResolverOptions { public static final int DEFAULT_QUERY_TIMEOUT = 5000; public static final int DEFAULT_MAX_QUERIES = 3; public static final boolean DEFAULT_RD_FLAG = true; + public static final List<String> DEFAULT_SEACH_DOMAINS = null; + public static final int DEFAULT_NDOTS = 1; private String hostsPath; private Buffer hostsValue; @@ -59,6 +62,8 @@ public class AddressResolverOptions { private long queryTimeout; private int maxQueries; private boolean rdFlag; + private List<String> searchDomains; + private int ndots; public AddressResolverOptions() { servers = DEFAULT_SERVERS; @@ -69,6 +74,8 @@ public AddressResolverOptions() { queryTimeout = DEFAULT_QUERY_TIMEOUT; maxQueries = DEFAULT_MAX_QUERIES; rdFlag = DEFAULT_RD_FLAG; + searchDomains = null; + ndots = DEFAULT_NDOTS; } public AddressResolverOptions(AddressResolverOptions other) { @@ -82,6 +89,8 @@ public AddressResolverOptions(AddressResolverOptions other) { this.queryTimeout = other.queryTimeout; this.maxQueries = other.maxQueries; this.rdFlag = other.rdFlag; + this.searchDomains = other.searchDomains != null ? new ArrayList<>(other.searchDomains) : null; + this.ndots = other.ndots; } public AddressResolverOptions(JsonObject json) { @@ -200,6 +209,9 @@ public int getCacheMinTimeToLive() { * @return a reference to this, so the API can be used fluently */ public AddressResolverOptions setCacheMinTimeToLive(int cacheMinTimeToLive) { + if (cacheMinTimeToLive < 0) { + throw new IllegalArgumentException("cacheMinTimeToLive must be >= 0"); + } this.cacheMinTimeToLive = cacheMinTimeToLive; return this; } @@ -219,6 +231,9 @@ public int getCacheMaxTimeToLive() { * @return a reference to this, so the API can be used fluently */ public AddressResolverOptions setCacheMaxTimeToLive(int cacheMaxTimeToLive) { + if (cacheMaxTimeToLive < 0) { + throw new IllegalArgumentException("cacheMaxTimeToLive must be >= 0"); + } this.cacheMaxTimeToLive = cacheMaxTimeToLive; return this; } @@ -239,6 +254,9 @@ public int getCacheNegativeTimeToLive() { * @return a reference to this, so the API can be used fluently */ public AddressResolverOptions setCacheNegativeTimeToLive(int cacheNegativeTimeToLive) { + if (cacheNegativeTimeToLive < 0) { + throw new IllegalArgumentException("cacheNegativeTimeToLive must be >= 0"); + } this.cacheNegativeTimeToLive = cacheNegativeTimeToLive; return this; } @@ -257,6 +275,9 @@ public long getQueryTimeout() { * @return a reference to this, so the API can be used fluently */ public AddressResolverOptions setQueryTimeout(long queryTimeout) { + if (queryTimeout < 1) { + throw new IllegalArgumentException("queryTimeout must be > 0"); + } this.queryTimeout = queryTimeout; return this; } @@ -275,6 +296,9 @@ public int getMaxQueries() { * @return a reference to this, so the API can be used fluently */ public AddressResolverOptions setMaxQueries(int maxQueries) { + if (maxQueries < 1) { + throw new IllegalArgumentException("maxQueries must be > 0"); + } this.maxQueries = maxQueries; return this; } @@ -297,6 +321,61 @@ public AddressResolverOptions setRdFlag(boolean rdFlag) { return this; } + /** + * @return the list of search domains + */ + public List<String> getSearchDomains() { + return searchDomains; + } + + /** + * Set the lists of DNS search domains. + * <p/> + * When the search domain list is null, the effective search domain list will be populated using + * the system DNS search domains. + * + * @param searchDomains the search domains + */ + public AddressResolverOptions setSearchDomains(List<String> searchDomains) { + this.searchDomains = searchDomains; + return this; + } + + /** + * Add a DNS search domain. + * + * @param searchDomain the search domain to add + * @return a reference to this, so the API can be used fluently + */ + public AddressResolverOptions addSearchDomain(String searchDomain) { + if (searchDomains == null) { + searchDomains = new ArrayList<>(); + } + searchDomains.add(searchDomain); + return this; + } + + /** + * @return the ndots value + */ + public int getNdots() { + return ndots; + } + + /** + * Set the ndots value used when resolving using search domains, the default value is {@code 1}. + * + * @param ndots the new ndots value + * @return a reference to this, so the API can be used fluently + */ + public AddressResolverOptions setNdots(int ndots) { + if (ndots < 1) { + throw new IllegalArgumentException("ndots must be > 0"); + } + this.ndots = ndots; + return this; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -309,6 +388,8 @@ public boolean equals(Object o) { if (queryTimeout != that.queryTimeout) return false; if (maxQueries != that.maxQueries) return false; if (rdFlag != that.rdFlag) return false; + if (!Objects.equals(searchDomains, that.searchDomains)) return false; + if (ndots != that.ndots) return false; return servers != null ? servers.equals(that.servers) : that.servers == null; } @@ -321,6 +402,8 @@ public int hashCode() { result = 31 * result + cacheNegativeTimeToLive; result = 31 * result + Long.hashCode(queryTimeout); result = 31 * result + maxQueries; + result = 31 * result + (searchDomains != null ? searchDomains.hashCode() : 0); + result = 31 * result + ndots; result = 31 * result + Boolean.hashCode(rdFlag); return result; } diff --git a/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolver.java b/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolver.java --- a/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolver.java +++ b/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolver.java @@ -38,8 +38,10 @@ import io.netty.resolver.dns.*; import io.netty.util.NetUtil; import io.netty.util.ReferenceCountUtil; +import io.netty.util.concurrent.DefaultPromise; import io.netty.util.concurrent.FastThreadLocal; import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.FutureListener; import io.netty.util.concurrent.Promise; import io.netty.util.internal.UnstableApi; import io.netty.util.internal.logging.InternalLogger; @@ -48,6 +50,7 @@ import java.net.IDN; import java.net.InetAddress; import java.net.InetSocketAddress; +import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -115,6 +118,8 @@ protected DnsServerAddressStream initialValue() throws Exception { private final int maxPayloadSize; private final boolean optResourceEnabled; private final HostsFileEntriesResolver hostsFileEntriesResolver; + private final List<String> searchDomains; + private final int ndots; /** * Creates a new DNS-based name resolver that communicates with the specified list of DNS servers. @@ -134,6 +139,8 @@ protected DnsServerAddressStream initialValue() throws Exception { * @param maxPayloadSize the capacity of the datagram packet buffer * @param optResourceEnabled if automatic inclusion of a optional records is enabled * @param hostsFileEntriesResolver the {@link HostsFileEntriesResolver} used to check for local aliases + * @param searchDomains TODO + * @param ndots TODO */ public DnsNameResolver( EventLoop eventLoop, @@ -148,7 +155,9 @@ public DnsNameResolver( boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, - HostsFileEntriesResolver hostsFileEntriesResolver) { + HostsFileEntriesResolver hostsFileEntriesResolver, + List<String> searchDomains, + int ndots) { super(eventLoop); checkNotNull(channelFactory, "channelFactory"); @@ -163,6 +172,8 @@ public DnsNameResolver( this.optResourceEnabled = optResourceEnabled; this.hostsFileEntriesResolver = checkNotNull(hostsFileEntriesResolver, "hostsFileEntriesResolver"); this.resolveCache = resolveCache; + this.searchDomains = checkNotNull(searchDomains, "searchDomains"); + this.ndots = checkPositive(ndots, "ndots"); bindFuture = newChannel(channelFactory, localAddress); ch = (DatagramChannel) bindFuture.channel(); @@ -369,28 +380,87 @@ private static void setSuccess(Promise<InetAddress> promise, InetAddress result) } } + private boolean searchDomains(String hostname) { + if (searchDomains.isEmpty() || (hostname.length() > 0 && hostname.charAt(hostname.length() - 1) == '.')) { + return false; + } else { + int idx = hostname.length(); + int dots = 0; + while (idx-- > 0) { + if (hostname.charAt(idx) == '.') { + dots++; + } + if (dots >= ndots) { + return false; + } + } + return true; + } + } + private void doResolveUncached(String hostname, Promise<InetAddress> promise, DnsCache resolveCache) { - final DnsNameResolverContext<InetAddress> ctx = - new DnsNameResolverContext<InetAddress>(this, hostname, promise, resolveCache) { - @Override - protected boolean finishResolve( - Class<? extends InetAddress> addressType, List<DnsCacheEntry> resolvedEntries) { + doResolveUncached(hostname, promise, resolveCache, searchDomains.size() > 0 && !hostname.endsWith(".")); - final int numEntries = resolvedEntries.size(); - for (int i = 0; i < numEntries; i++) { - final InetAddress a = resolvedEntries.get(i).address(); - if (addressType.isInstance(a)) { - setSuccess(promise(), a); - return true; + } + private void doResolveUncached(String hostname, + Promise<InetAddress> promise, + DnsCache resolveCache, boolean trySearchDomain) { + if (trySearchDomain) { + Promise<InetAddress> original = promise; + promise = new DefaultPromise<>(executor()); + FutureListener<InetAddress> globalListener = future -> { + if (future.isSuccess()) { + original.setSuccess(future.getNow()); + } else { + FutureListener<InetAddress> sdListener = new FutureListener<InetAddress>() { + int count; + @Override + public void operationComplete(Future<InetAddress> future) throws Exception { + if (future.isSuccess()) { + original.trySuccess(future.getNow()); + } else { + if (count < searchDomains.size()) { + String searchDomain = searchDomains.get(count++); + Promise<InetAddress> p = new DefaultPromise<>(executor()); + doResolveUncached(hostname + "." + searchDomain, p, resolveCache, false); + p.addListener(this); + } else { + original.tryFailure(future.cause()); + } } } - return false; - } - }; + }; + future.addListener(sdListener); + } + }; + promise.addListener(globalListener); + } + if (searchDomains(hostname)) { + promise.tryFailure(new UnknownHostException(hostname)); + } else { + final DnsNameResolverContext<InetAddress> ctx = + new DnsNameResolverContext<InetAddress>(this, hostname, promise, resolveCache) { + @Override + protected boolean finishResolve( + Class<? extends InetAddress> addressType, List<DnsCacheEntry> resolvedEntries) { + + final int numEntries = resolvedEntries.size(); + for (int i = 0; i < numEntries; i++) { + final InetAddress a = resolvedEntries.get(i).address(); + if (addressType.isInstance(a)) { + setSuccess(promise(), a); + return true; + } + } + return false; + } + }; - ctx.resolve(); + + ctx.resolve(); + } } @Override diff --git a/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolverBuilder.java b/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolverBuilder.java --- a/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolverBuilder.java +++ b/src/main/java/io/vertx/core/dns/impl/fix/DnsNameResolverBuilder.java @@ -25,7 +25,10 @@ import io.netty.util.internal.InternalThreadLocalMap; import io.netty.util.internal.UnstableApi; +import java.lang.reflect.Method; import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import static io.netty.util.internal.ObjectUtil.checkNotNull; @@ -37,6 +40,25 @@ @UnstableApi public final class DnsNameResolverBuilder { + private static final List<String> DEFAULT_SEACH_DOMAINS; + + static { + ArrayList<String> searchDomains = new ArrayList<>(); + try { + Class<?> configClass = Class.forName("sun.net.dns.ResolverConfiguration"); + Method open = configClass.getMethod("open"); + Method nameservers = configClass.getMethod("searchlist"); + Object instance = open.invoke(null); + + @SuppressWarnings("unchecked") + List<String> list = (List<String>) nameservers.invoke(instance); + searchDomains.addAll(list); + } catch (Exception ignore) { + // Failed to get the system name search domain list. + } + DEFAULT_SEACH_DOMAINS = Collections.unmodifiableList(searchDomains); + } + private final EventLoop eventLoop; private ChannelFactory<? extends DatagramChannel> channelFactory; private InetSocketAddress localAddress = DnsNameResolver.ANY_LOCAL_ADDR; @@ -53,6 +75,8 @@ public final class DnsNameResolverBuilder { private int maxPayloadSize = 4096; private boolean optResourceEnabled = true; private HostsFileEntriesResolver hostsFileEntriesResolver = HostsFileEntriesResolver.DEFAULT; + private List<String> searchDomains = DEFAULT_SEACH_DOMAINS; + private int ndots = 1; /** * Creates a new builder. @@ -301,6 +325,24 @@ public DnsNameResolverBuilder hostsFileEntriesResolver(HostsFileEntriesResolver return this; } + public List<String> searchDomains() { + return searchDomains; + } + + public DnsNameResolverBuilder searchDomains(List<String> searchDomains) { + this.searchDomains = searchDomains; + return this; + } + + public int ndots() { + return ndots; + } + + public DnsNameResolverBuilder ndots(int ndots) { + this.ndots = ndots; + return this; + } + /** * Returns a new {@link DnsNameResolver} instance. * @@ -328,6 +370,8 @@ public DnsNameResolver build() { traceEnabled, maxPayloadSize, optResourceEnabled, - hostsFileEntriesResolver); + hostsFileEntriesResolver, + searchDomains, + ndots); } } diff --git a/src/main/java/io/vertx/core/dns/impl/fix/package-info.java b/src/main/java/io/vertx/core/dns/impl/fix/package-info.java --- a/src/main/java/io/vertx/core/dns/impl/fix/package-info.java +++ b/src/main/java/io/vertx/core/dns/impl/fix/package-info.java @@ -1,5 +1,10 @@ /** * fixed dns resolver to be removed when Netty with https://github.com/netty/netty/pull/5413 * is released + * + * added dns search domain for doResolveUncached (https://github.com/netty/netty/issues/4665) + * not implemented: + * - doResolveAllUncached as we don't need it + * - /etc/resolv.conf parsing to determine "domain" and "options/ndots" */ package io.vertx.core.dns.impl.fix; \ No newline at end of file diff --git a/src/main/java/io/vertx/core/impl/AddressResolver.java b/src/main/java/io/vertx/core/impl/AddressResolver.java --- a/src/main/java/io/vertx/core/impl/AddressResolver.java +++ b/src/main/java/io/vertx/core/impl/AddressResolver.java @@ -18,6 +18,7 @@ import io.netty.channel.socket.nio.NioDatagramChannel; import io.netty.resolver.AddressResolverGroup; +import io.netty.resolver.DefaultAddressResolverGroup; import io.netty.resolver.HostsFileParser; import io.netty.resolver.InetSocketAddressResolver; import io.netty.resolver.dns.DnsServerAddresses; @@ -49,89 +50,103 @@ */ public class AddressResolver { + private static final String DISABLE_DNS_RESOLVER_PROP_NAME = "vertx.disableDnsResolver"; + private static final boolean DISABLE_DNS_RESOLVER = Boolean.getBoolean(DISABLE_DNS_RESOLVER_PROP_NAME); + private final Vertx vertx; private final AddressResolverGroup<InetSocketAddress> resolverGroup; public AddressResolver(VertxImpl vertx, AddressResolverOptions options) { - DnsNameResolverBuilder builder = new DnsNameResolverBuilder(vertx.createEventLoopContext(null, null, new JsonObject(), Thread.currentThread().getContextClassLoader()).nettyEventLoop()); - builder.channelType(NioDatagramChannel.class); - if (options != null) { - List<String> dnsServers = options.getServers(); - if (dnsServers != null && dnsServers.size() > 0) { - List<InetSocketAddress> serverList = new ArrayList<>(); - for (String dnsServer : dnsServers) { - int sep = dnsServer.indexOf(':'); - String ipAddress; - int port; - if (sep != -1) { - ipAddress = dnsServer.substring(0, sep); - port = Integer.parseInt(dnsServer.substring(sep + 1)); - } else { - ipAddress = dnsServer; - port = 53; + + if (!DISABLE_DNS_RESOLVER) { + DnsNameResolverBuilder builder = new DnsNameResolverBuilder(vertx.createEventLoopContext(null, null, new JsonObject(), Thread.currentThread().getContextClassLoader()).nettyEventLoop()); + builder.channelType(NioDatagramChannel.class); + if (options != null) { + List<String> dnsServers = options.getServers(); + if (dnsServers != null && dnsServers.size() > 0) { + List<InetSocketAddress> serverList = new ArrayList<>(); + for (String dnsServer : dnsServers) { + int sep = dnsServer.indexOf(':'); + String ipAddress; + int port; + if (sep != -1) { + ipAddress = dnsServer.substring(0, sep); + port = Integer.parseInt(dnsServer.substring(sep + 1)); + } else { + ipAddress = dnsServer; + port = 53; + } + try { + serverList.add(new InetSocketAddress(InetAddress.getByAddress(NetUtil.createByteArrayFromIpAddressString(ipAddress)), port)); + } catch (UnknownHostException e) { + throw new VertxException(e); + } + } + DnsServerAddresses nameServerAddresses = DnsServerAddresses.sequential(serverList); + builder.nameServerAddresses(nameServerAddresses); + } + + + Map<String, InetAddress> entries; + if (options.getHostsPath() != null) { + File file = vertx.resolveFile(options.getHostsPath()).getAbsoluteFile(); + try { + if (!file.exists() || !file.isFile()) { + throw new IOException(); + } + entries = HostsFileParser.parse(file); + } catch (IOException e) { + throw new VertxException("Cannot read hosts file " + file.getAbsolutePath()); } + } else if (options.getHostsValue() != null) { try { - serverList.add(new InetSocketAddress(InetAddress.getByAddress(NetUtil.createByteArrayFromIpAddressString(ipAddress)), port)); - } catch (UnknownHostException e) { - throw new VertxException(e); + entries = HostsFileParser.parse(new StringReader(options.getHostsValue().toString())); + } catch (IOException e) { + throw new VertxException("Cannot read hosts config ", e); } + } else { + entries = HostsFileParser.parseSilently(); } - DnsServerAddresses nameServerAddresses = DnsServerAddresses.sequential(serverList); - builder.nameServerAddresses(nameServerAddresses); - } - - Map<String, InetAddress> entries; - if (options.getHostsPath() != null) { - File file = vertx.resolveFile(options.getHostsPath()).getAbsoluteFile(); + // When localhost is missing we just resolve it and add it try { - if (!file.exists() || !file.isFile()) { - throw new IOException(); + if (!entries.containsKey("localhost")) { + entries.put("localhost", InetAddress.getByName("localhost")); } - entries = HostsFileParser.parse(file); - } catch (IOException e) { - throw new VertxException("Cannot read hosts file " + file.getAbsolutePath()); + } catch (UnknownHostException ignore) { } - } else if (options.getHostsValue() != null) { - try { - entries = HostsFileParser.parse(new StringReader(options.getHostsValue().toString())); - } catch (IOException e) { - throw new VertxException("Cannot read hosts config ", e); + builder.hostsFileEntriesResolver(entries::get); + + builder.optResourceEnabled(options.isOptResourceEnabled()); + builder.ttl(options.getCacheMinTimeToLive(), options.getCacheMaxTimeToLive()); + builder.negativeTtl(options.getCacheNegativeTimeToLive()); + builder.queryTimeoutMillis(options.getQueryTimeout()); + builder.maxQueriesPerResolve(options.getMaxQueries()); + builder.recursionDesired(options.getRdFlag()); + + if (options.getSearchDomains() != null) { + builder.searchDomains(options.getSearchDomains()); + builder.ndots(options.getNdots()); } - } else { - entries = HostsFileParser.parseSilently(); } - // When localhost is missing we just resolve it and add it - try { - if (!entries.containsKey("localhost")) { - entries.put("localhost", InetAddress.getByName("localhost")); + resolverGroup = new AddressResolverGroup<InetSocketAddress>() { + @Override + protected io.netty.resolver.AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) throws Exception { + DnsNameResolver resolver = builder.build(); + return new InetSocketAddressResolver(executor, resolver) { + @Override + public void close() { + // Workaround for bug https://github.com/netty/netty/issues/2545 + resolver.close(); + } + }; } - } catch (UnknownHostException ignore) { - } - builder.hostsFileEntriesResolver(entries::get); - - builder.optResourceEnabled(options.isOptResourceEnabled()); - builder.ttl(options.getCacheMinTimeToLive(), options.getCacheMaxTimeToLive()); - builder.negativeTtl(options.getCacheNegativeTimeToLive()); - builder.queryTimeoutMillis(options.getQueryTimeout()); - builder.maxQueriesPerResolve(options.getMaxQueries()); - builder.recursionDesired(options.getRdFlag()); + }; + } else { + resolverGroup = DefaultAddressResolverGroup.INSTANCE; } - this.resolverGroup = new AddressResolverGroup<InetSocketAddress>() { - @Override - protected io.netty.resolver.AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) throws Exception { - DnsNameResolver resolver = builder.build(); - return new InetSocketAddressResolver(executor, resolver) { - @Override - public void close() { - // Workaround for bug https://github.com/netty/netty/issues/2545 - resolver.close(); - } - }; - } - }; this.vertx = vertx; } diff --git a/src/main/java/io/vertx/core/package-info.java b/src/main/java/io/vertx/core/package-info.java --- a/src/main/java/io/vertx/core/package-info.java +++ b/src/main/java/io/vertx/core/package-info.java @@ -1238,6 +1238,20 @@ * {@link examples.CoreExamples#configureHosts} * ---- * + * By default the resolver will use the system DNS search domains from the environment. Alternatively an explicit search domain + * list can be provided: + * + * [source,$lang] + * ---- + * {@link examples.CoreExamples#configureSearchDomains()} + * ---- + * + * When a search domain list is used, the threshold for the number of dots is {@code 1}, it can be configured with + * {@link io.vertx.core.dns.AddressResolverOptions#setNdots(int)}. + * + * NOTE: sometimes it can be desirable to use the JVM built-in resolver, the JVM system property + * _-Dvertx.disableDnsResolver=true_ activates this behavior + * * == High Availability and Fail-Over * * Vert.x allows you to run your verticles with high availability (HA) support. In that case, when a vert.x
diff --git a/src/test/java/io/vertx/test/core/HostnameResolutionTest.java b/src/test/java/io/vertx/test/core/HostnameResolutionTest.java --- a/src/test/java/io/vertx/test/core/HostnameResolutionTest.java +++ b/src/test/java/io/vertx/test/core/HostnameResolutionTest.java @@ -35,6 +35,7 @@ import io.vertx.core.net.NetServer; import io.vertx.core.net.NetServerOptions; import io.vertx.test.fakedns.FakeDNSServer; +import org.apache.directory.server.dns.DnsServer; import org.junit.Test; import java.io.File; @@ -43,7 +44,9 @@ import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -101,6 +104,10 @@ public void testAsyncResolveFail() throws Exception { @Test public void testNet() throws Exception { + testNet("vertx.io"); + } + + private void testNet(String hostname) throws Exception { NetClient client = vertx.createNetClient(); NetServer server = vertx.createNetServer().connectHandler(so -> { so.handler(buff -> { @@ -110,11 +117,11 @@ public void testNet() throws Exception { }); try { CountDownLatch listenLatch = new CountDownLatch(1); - server.listen(1234, "vertx.io", onSuccess(s -> { + server.listen(1234, hostname, onSuccess(s -> { listenLatch.countDown(); })); awaitLatch(listenLatch); - client.connect(1234, "vertx.io", onSuccess(so -> { + client.connect(1234, hostname, onSuccess(so -> { Buffer buffer = Buffer.buffer(); so.handler(buffer::appendBuffer); so.closeHandler(v -> { @@ -168,24 +175,72 @@ public void testOptions() { assertEquals(AddressResolverOptions.DEFAULT_QUERY_TIMEOUT, options.getQueryTimeout()); assertEquals(AddressResolverOptions.DEFAULT_MAX_QUERIES, options.getMaxQueries()); assertEquals(AddressResolverOptions.DEFAULT_RD_FLAG, options.getRdFlag()); + assertEquals(AddressResolverOptions.DEFAULT_NDOTS, options.getNdots()); + assertEquals(AddressResolverOptions.DEFAULT_SEACH_DOMAINS, options.getSearchDomains()); boolean optResourceEnabled = TestUtils.randomBoolean(); List<String> servers = Arrays.asList("1.2.3.4", "5.6.7.8"); int minTTL = TestUtils.randomPositiveInt(); - int maxTTL = minTTL + TestUtils.randomPositiveInt(); + int maxTTL = minTTL + 1000; int negativeTTL = TestUtils.randomPositiveInt(); int queryTimeout = 1 + TestUtils.randomPositiveInt(); int maxQueries = 1 + TestUtils.randomPositiveInt(); boolean rdFlag = TestUtils.randomBoolean(); + int ndots = TestUtils.randomPositiveInt(); + List<String> searchDomains = new ArrayList<>(); + for (int i = 0;i < 2;i++) { + searchDomains.add(TestUtils.randomAlphaString(15)); + } assertSame(options, options.setOptResourceEnabled(optResourceEnabled)); assertSame(options, options.setServers(new ArrayList<>(servers))); + assertSame(options, options.setCacheMinTimeToLive(0)); assertSame(options, options.setCacheMinTimeToLive(minTTL)); + try { + options.setCacheMinTimeToLive(-1); + fail("Should throw exception"); + } catch (IllegalArgumentException e) { + // OK + } + assertSame(options, options.setCacheMaxTimeToLive(0)); assertSame(options, options.setCacheMaxTimeToLive(maxTTL)); + try { + options.setCacheMaxTimeToLive(-1); + fail("Should throw exception"); + } catch (IllegalArgumentException e) { + // OK + } + assertSame(options, options.setCacheNegativeTimeToLive(0)); assertSame(options, options.setCacheNegativeTimeToLive(negativeTTL)); + try { + options.setCacheNegativeTimeToLive(-1); + fail("Should throw exception"); + } catch (IllegalArgumentException e) { + // OK + } assertSame(options, options.setQueryTimeout(queryTimeout)); + try { + options.setQueryTimeout(0); + fail("Should throw exception"); + } catch (IllegalArgumentException e) { + // OK + } assertSame(options, options.setMaxQueries(maxQueries)); + try { + options.setMaxQueries(0); + fail("Should throw exception"); + } catch (IllegalArgumentException e) { + // OK + } assertSame(options, options.setRdFlag(rdFlag)); + assertSame(options, options.setSearchDomains(searchDomains)); + assertSame(options, options.setNdots(ndots)); + try { + options.setNdots(0); + fail("Should throw exception"); + } catch (IllegalArgumentException e) { + // OK + } assertEquals(optResourceEnabled, options.isOptResourceEnabled()); assertEquals(servers, options.getServers()); @@ -195,6 +250,8 @@ public void testOptions() { assertEquals(queryTimeout, options.getQueryTimeout()); assertEquals(maxQueries, options.getMaxQueries()); assertEquals(rdFlag, options.getRdFlag()); + assertEquals(ndots, options.getNdots()); + assertEquals(searchDomains, options.getSearchDomains()); // Test copy and json copy AddressResolverOptions copy = new AddressResolverOptions(options); @@ -208,6 +265,8 @@ public void testOptions() { options.setQueryTimeout(AddressResolverOptions.DEFAULT_QUERY_TIMEOUT); options.setMaxQueries(AddressResolverOptions.DEFAULT_MAX_QUERIES); options.setRdFlag(AddressResolverOptions.DEFAULT_RD_FLAG); + options.setNdots(AddressResolverOptions.DEFAULT_NDOTS); + options.setSearchDomains(AddressResolverOptions.DEFAULT_SEACH_DOMAINS); assertEquals(optResourceEnabled, copy.isOptResourceEnabled()); assertEquals(servers, copy.getServers()); @@ -217,6 +276,8 @@ public void testOptions() { assertEquals(queryTimeout, copy.getQueryTimeout()); assertEquals(maxQueries, copy.getMaxQueries()); assertEquals(rdFlag, copy.getRdFlag()); + assertEquals(ndots, copy.getNdots()); + assertEquals(searchDomains, copy.getSearchDomains()); assertEquals(optResourceEnabled, jsonCopy.isOptResourceEnabled()); assertEquals(servers, jsonCopy.getServers()); @@ -226,6 +287,8 @@ public void testOptions() { assertEquals(queryTimeout, jsonCopy.getQueryTimeout()); assertEquals(maxQueries, jsonCopy.getMaxQueries()); assertEquals(rdFlag, jsonCopy.getRdFlag()); + assertEquals(ndots, jsonCopy.getNdots()); + assertEquals(searchDomains, jsonCopy.getSearchDomains()); } @Test @@ -239,6 +302,8 @@ public void testDefaultJsonOptions() { assertEquals(AddressResolverOptions.DEFAULT_QUERY_TIMEOUT, options.getQueryTimeout()); assertEquals(AddressResolverOptions.DEFAULT_MAX_QUERIES, options.getMaxQueries()); assertEquals(AddressResolverOptions.DEFAULT_RD_FLAG, options.getRdFlag()); + assertEquals(AddressResolverOptions.DEFAULT_SEACH_DOMAINS, options.getSearchDomains()); + assertEquals(AddressResolverOptions.DEFAULT_NDOTS, options.getNdots()); } @Test @@ -320,6 +385,7 @@ public void testResolveMissingLocalhost() throws Exception { InetAddress localhost = InetAddress.getByName("localhost"); // Set a dns resolver that won't resolve localhost + dnsServer.stop(); dnsServer = FakeDNSServer.testResolveASameServer("127.0.0.1"); dnsServer.start(); dnsServerAddress = (InetSocketAddress) dnsServer.getTransports()[0].getAcceptor().getLocalAddress(); @@ -372,4 +438,188 @@ public void testResolveMissingLocalhost() throws Exception { }); test3.get(10, TimeUnit.SECONDS); } + + @Test + public void testSearchDomain() throws Exception { + + Map<String, String> records = new HashMap<>(); + records.put("host1.foo.com", "127.0.0.1"); + records.put("host1", "127.0.0.2"); + records.put("host3", "127.0.0.3"); + records.put("host4.sub.foo.com", "127.0.0.4"); + records.put("host5.sub.foo.com", "127.0.0.5"); + records.put("host5.sub", "127.0.0.6"); + + dnsServer.stop(); + dnsServer = FakeDNSServer.testResolveA(records); + dnsServer.start(); + VertxInternal vertx = (VertxInternal) vertx(new VertxOptions().setAddressResolverOptions( + new AddressResolverOptions(). + addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()). + setOptResourceEnabled(false). + addSearchDomain("foo.com") + )); + + // host1 resolves host1.foo.com with foo.com search domain + CountDownLatch latch1 = new CountDownLatch(1); + vertx.resolveAddress("host1", onSuccess(resolved -> { + assertEquals("127.0.0.1", resolved.getHostAddress()); + latch1.countDown(); + })); + awaitLatch(latch1); + + // "host1." absolute query + CountDownLatch latch2 = new CountDownLatch(1); + vertx.resolveAddress("host1.", onSuccess(resolved -> { + assertEquals("127.0.0.2", resolved.getHostAddress()); + latch2.countDown(); + })); + awaitLatch(latch2); + + // "host2" not resolved + CountDownLatch latch3 = new CountDownLatch(1); + vertx.resolveAddress("host2", onFailure(cause -> { + assertTrue(cause instanceof UnknownHostException); + latch3.countDown(); + })); + awaitLatch(latch3); + + // "host3" does not contain a dot or is not absolute + CountDownLatch latch4 = new CountDownLatch(1); + vertx.resolveAddress("host3", onFailure(cause -> { + assertTrue(cause instanceof UnknownHostException); + latch4.countDown(); + })); + awaitLatch(latch4); + + // "host3." does not contain a dot but is absolute + CountDownLatch latch5 = new CountDownLatch(1); + vertx.resolveAddress("host3.", onSuccess(resolved -> { + assertEquals("127.0.0.3", resolved.getHostAddress()); + latch5.countDown(); + })); + awaitLatch(latch5); + + // "host4.sub" contains a dot but not resolved then resolved to "host4.sub.foo.com" with "foo.com" search domain + CountDownLatch latch6 = new CountDownLatch(1); + vertx.resolveAddress("host4.sub", onSuccess(resolved -> { + assertEquals("127.0.0.4", resolved.getHostAddress()); + latch6.countDown(); + })); + awaitLatch(latch6); + + // "host5.sub" contains a dot and is resolved + CountDownLatch latch7 = new CountDownLatch(1); + vertx.resolveAddress("host5.sub", onSuccess(resolved -> { + assertEquals("127.0.0.6", resolved.getHostAddress()); + latch7.countDown(); + })); + awaitLatch(latch7); + } + + @Test + public void testMultipleSearchDomain() throws Exception { + + Map<String, String> records = new HashMap<>(); + records.put("host1.foo.com", "127.0.0.1"); + records.put("host2.bar.com", "127.0.0.2"); + records.put("host3.bar.com", "127.0.0.3"); + records.put("host3.foo.com", "127.0.0.4"); + + dnsServer.stop(); + dnsServer = FakeDNSServer.testResolveA(records); + dnsServer.start(); + VertxInternal vertx = (VertxInternal) vertx(new VertxOptions().setAddressResolverOptions( + new AddressResolverOptions(). + addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()). + setOptResourceEnabled(false). + addSearchDomain("foo.com"). + addSearchDomain("bar.com") + )); + + // "host1" resolves via the "foo.com" search path + CountDownLatch latch1 = new CountDownLatch(1); + vertx.resolveAddress("host1", onSuccess(resolved -> { + assertEquals("127.0.0.1", resolved.getHostAddress()); + latch1.countDown(); + })); + awaitLatch(latch1); + + // "host3" resolves via the "bar.com" search path + CountDownLatch latch2 = new CountDownLatch(1); + vertx.resolveAddress("host2", onSuccess(resolved -> { + assertEquals("127.0.0.2", resolved.getHostAddress()); + latch2.countDown(); + })); + awaitLatch(latch2); + + // "host3" resolves via the the "foo.com" search path as it is the first one + CountDownLatch latch3 = new CountDownLatch(1); + vertx.resolveAddress("host3", onSuccess(resolved -> { + assertEquals("127.0.0.4", resolved.getHostAddress()); + latch3.countDown(); + })); + awaitLatch(latch3); + + // "host4" does not resolve + vertx.resolveAddress("host4", onFailure(cause -> { + assertTrue(cause instanceof UnknownHostException); + testComplete(); + })); + + await(); + } + + @Test + public void testSearchDomainWithNdots2() throws Exception { + + Map<String, String> records = new HashMap<>(); + records.put("host1.sub.foo.com", "127.0.0.1"); + records.put("host2.sub.foo.com", "127.0.0.2"); + records.put("host2.sub", "127.0.0.3"); + + dnsServer.stop(); + dnsServer = FakeDNSServer.testResolveA(records); + dnsServer.start(); + VertxInternal vertx = (VertxInternal) vertx(new VertxOptions().setAddressResolverOptions( + new AddressResolverOptions(). + addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()). + setOptResourceEnabled(false). + addSearchDomain("foo.com"). + addSearchDomain("bar.com"). + setNdots(2) + )); + + CountDownLatch latch1 = new CountDownLatch(1); + vertx.resolveAddress("host1.sub", onSuccess(resolved -> { + assertEquals("127.0.0.1", resolved.getHostAddress()); + latch1.countDown(); + })); + awaitLatch(latch1); + + // "host2.sub" is resolved with the foo.com search domain as ndots = 2 + CountDownLatch latch2 = new CountDownLatch(1); + vertx.resolveAddress("host2.sub", onSuccess(resolved -> { + assertEquals("127.0.0.2", resolved.getHostAddress()); + latch2.countDown(); + })); + awaitLatch(latch2); + + } + + @Test + public void testNetSearchDomain() throws Exception { + Map<String, String> records = new HashMap<>(); + records.put("host1.foo.com", "127.0.0.1"); + dnsServer.stop(); + dnsServer = FakeDNSServer.testResolveA(records); + dnsServer.start(); + vertx = vertx(new VertxOptions().setAddressResolverOptions( + new AddressResolverOptions(). + addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()). + setOptResourceEnabled(false). + addSearchDomain("foo.com") + )); + testNet("host1"); + } } diff --git a/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java b/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java --- a/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java +++ b/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java @@ -42,8 +42,11 @@ import org.apache.mina.transport.socket.DatagramSessionConfig; import java.io.IOException; +import java.util.Collections; import java.util.HashSet; +import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; /** * @author <a href="mailto:[email protected]">Norman Maurer</a> @@ -61,19 +64,22 @@ private FakeDNSServer(RecordStore store) { } public static FakeDNSServer testResolveA(final String ipAddress) { + return testResolveA(Collections.singletonMap("dns.vertx.io", ipAddress)); + } + + public static FakeDNSServer testResolveA(Map<String, String> entries) { return new FakeDNSServer(new RecordStore() { @Override public Set<ResourceRecord> getRecords(QuestionRecord questionRecord) throws org.apache.directory.server.dns.DnsException { - Set<ResourceRecord> set = new HashSet<>(); - - ResourceRecordModifier rm = new ResourceRecordModifier(); - rm.setDnsClass(RecordClass.IN); - rm.setDnsName("dns.vertx.io"); - rm.setDnsTtl(100); - rm.setDnsType(RecordType.A); - rm.put(DnsAttribute.IP_ADDRESS, ipAddress); - set.add(rm.getEntry()); - return set; + return entries.entrySet().stream().map(entry -> { + ResourceRecordModifier rm = new ResourceRecordModifier(); + rm.setDnsClass(RecordClass.IN); + rm.setDnsName(entry.getKey()); + rm.setDnsTtl(100); + rm.setDnsType(RecordType.A); + rm.put(DnsAttribute.IP_ADDRESS, entry.getValue()); + return rm.getEntry(); + }).collect(Collectors.toSet()); } }); }
DNS search domains resolution Implements DNS search domains for the AddressResolver
2016-06-21T23:40:20Z
3.3
eclipse-vertx/vert.x
1,366
eclipse-vertx__vert.x-1366
[ "1345" ]
1ecfe11ae6a05bd56994e0e67c4273e66cf7537f
diff --git a/src/main/java/io/vertx/core/Starter.java b/src/main/java/io/vertx/core/Starter.java --- a/src/main/java/io/vertx/core/Starter.java +++ b/src/main/java/io/vertx/core/Starter.java @@ -477,14 +477,20 @@ private String readMainVerticleFromManifest() { try { Enumeration<URL> resources = getClass().getClassLoader().getResources("META-INF/MANIFEST.MF"); while (resources.hasMoreElements()) { - Manifest manifest = new Manifest(resources.nextElement().openStream()); - Attributes attributes = manifest.getMainAttributes(); - String mainClass = attributes.getValue("Main-Class"); - if (Starter.class.getName().equals(mainClass)) { - String theMainVerticle = attributes.getValue("Main-Verticle"); - if (theMainVerticle != null) { - return theMainVerticle; + InputStream stream = null; + try { + stream = resources.nextElement().openStream(); + Manifest manifest = new Manifest(stream); + Attributes attributes = manifest.getMainAttributes(); + String mainClass = attributes.getValue("Main-Class"); + if (Starter.class.getName().equals(mainClass)) { + String theMainVerticle = attributes.getValue("Main-Verticle"); + if (theMainVerticle != null) { + return theMainVerticle; + } } + } finally { + closeQuietly(stream); } } } catch (IOException e) { @@ -493,6 +499,16 @@ private String readMainVerticleFromManifest() { return null; } + private void closeQuietly(InputStream stream) { + if (stream != null) { + try { + stream.close(); + } catch (IOException e) { + // Ignore it. + } + } + } + private void displaySyntax() { String usage = diff --git a/src/main/java/io/vertx/core/impl/FileResolver.java b/src/main/java/io/vertx/core/impl/FileResolver.java --- a/src/main/java/io/vertx/core/impl/FileResolver.java +++ b/src/main/java/io/vertx/core/impl/FileResolver.java @@ -18,10 +18,8 @@ import io.vertx.core.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; +import java.io.*; +import java.io.Closeable; import java.net.URL; import java.net.URLDecoder; import java.nio.file.FileAlreadyExistsException; @@ -164,8 +162,8 @@ private synchronized File unpackFromFileURL(URL url, String fileName, ClassLoade } private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoader cl) { + ZipFile zip = null; try { - ZipFile zip; String path = url.getPath(); int idx1 = path.lastIndexOf(".jar!"); if (idx1 == -1) { @@ -208,11 +206,23 @@ private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoader } } catch (IOException e) { throw new VertxException(e); + } finally { + closeQuietly(zip); } return new File(cacheDir, fileName); } + private void closeQuietly(Closeable zip) { + if (zip != null) { + try { + zip.close(); + } catch (IOException e) { + // Ignored. + } + } + } + /** * bundle:// urls are used by OSGi implementations to refer to a file contained in a bundle, or in a fragment. There * is not much we can do to get the file from it, except reading it from the url. This method copies the files by
diff --git a/src/test/java/io/vertx/core/logging/SLF4JLogDelegateTest.java b/src/test/java/io/vertx/core/logging/SLF4JLogDelegateTest.java --- a/src/test/java/io/vertx/core/logging/SLF4JLogDelegateTest.java +++ b/src/test/java/io/vertx/core/logging/SLF4JLogDelegateTest.java @@ -29,6 +29,7 @@ import static junit.framework.Assert.assertTrue; import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * Theses test checks the SLF4J log delegate. It assumes the binding used by SLF4J is slf4j-simple with the default @@ -56,30 +57,30 @@ public void testInfo() { Logger logger = LoggerFactory.getLogger("my-slf4j-logger"); String result = record(() -> logger.info("hello")); - assertEquals("[main] INFO my-slf4j-logger - hello\n", result); + assertContains("[main] INFO my-slf4j-logger - hello", result); result = record(() -> logger.info("exception", new NullPointerException())); - assertTrue(result.contains("[main] INFO my-slf4j-logger - exception\n")); + assertTrue(result.contains("[main] INFO my-slf4j-logger - exception")); assertTrue(result.contains("java.lang.NullPointerException")); result = record(() -> logger.info("hello {} and {}", "Paulo", "Julien")); - assertEquals("[main] INFO my-slf4j-logger - hello Paulo and Julien\n", result); + assertContains("[main] INFO my-slf4j-logger - hello Paulo and Julien", result); result = record(() -> logger.info("hello {}", "vert.x")); - assertEquals("[main] INFO my-slf4j-logger - hello vert.x\n", result); + assertContains("[main] INFO my-slf4j-logger - hello vert.x", result); result = record(() -> logger.info("hello {} - {}", "vert.x")); - assertEquals("[main] INFO my-slf4j-logger - hello vert.x - {}\n", result); + assertContains("[main] INFO my-slf4j-logger - hello vert.x - {}", result); result = record(() -> logger.info("hello {}", "vert.x", "foo")); - assertEquals("[main] INFO my-slf4j-logger - hello vert.x\n", result); + assertContains("[main] INFO my-slf4j-logger - hello vert.x", result); result = record(() -> logger.info("{}, an exception has been thrown", new IllegalStateException(), "Luke")); - assertTrue(result.contains("[main] INFO my-slf4j-logger - Luke, an exception has been thrown\n")); + assertTrue(result.contains("[main] INFO my-slf4j-logger - Luke, an exception has been thrown")); assertTrue(result.contains("java.lang.IllegalStateException")); result = record(() -> logger.info("{}, an exception has been thrown", "Luke", new IllegalStateException())); - assertTrue(result.contains("[main] INFO my-slf4j-logger - Luke, an exception has been thrown\n")); + assertTrue(result.contains("[main] INFO my-slf4j-logger - Luke, an exception has been thrown")); assertTrue(result.contains("java.lang.IllegalStateException")); } @@ -87,62 +88,67 @@ public void testInfo() { public void testError() { Logger logger = LoggerFactory.getLogger("my-slf4j-logger"); String result = record(() -> logger.error("hello")); - assertEquals("[main] ERROR my-slf4j-logger - hello\n", result); + assertContains("[main] ERROR my-slf4j-logger - hello", result); result = record(() -> logger.error("exception", new NullPointerException())); - assertTrue(result.contains("[main] ERROR my-slf4j-logger - exception\n")); + assertTrue(result.contains("[main] ERROR my-slf4j-logger - exception")); assertTrue(result.contains("java.lang.NullPointerException")); result = record(() -> logger.error("hello {} and {}", "Paulo", "Julien")); - assertEquals("[main] ERROR my-slf4j-logger - hello Paulo and Julien\n", result); + assertContains("[main] ERROR my-slf4j-logger - hello Paulo and Julien", result); result = record(() -> logger.error("hello {}", "vert.x")); - assertEquals("[main] ERROR my-slf4j-logger - hello vert.x\n", result); + assertContains("[main] ERROR my-slf4j-logger - hello vert.x", result); result = record(() -> logger.error("hello {} - {}", "vert.x")); - assertEquals("[main] ERROR my-slf4j-logger - hello vert.x - {}\n", result); + assertContains("[main] ERROR my-slf4j-logger - hello vert.x - {}", result); result = record(() -> logger.error("hello {}", "vert.x", "foo")); - assertEquals("[main] ERROR my-slf4j-logger - hello vert.x\n", result); + assertContains("[main] ERROR my-slf4j-logger - hello vert.x", result); result = record(() -> logger.error("{}, an exception has been thrown", new IllegalStateException(), "Luke")); - assertTrue(result.contains("[main] ERROR my-slf4j-logger - Luke, an exception has been thrown\n")); + assertTrue(result.contains("[main] ERROR my-slf4j-logger - Luke, an exception has been thrown")); assertTrue(result.contains("java.lang.IllegalStateException")); result = record(() -> logger.error("{}, an exception has been thrown", "Luke", new IllegalStateException())); - assertTrue(result.contains("[main] ERROR my-slf4j-logger - Luke, an exception has been thrown\n")); + assertTrue(result.contains("[main] ERROR my-slf4j-logger - Luke, an exception has been thrown")); assertTrue(result.contains("java.lang.IllegalStateException")); } + private void assertContains(String expectedExcerpt, String object) { + assertNotNull(object); + assertTrue(object.contains(expectedExcerpt)); + } + @Test public void testWarning() { Logger logger = LoggerFactory.getLogger("my-slf4j-logger"); String result = record(() -> logger.warn("hello")); - assertEquals("[main] WARN my-slf4j-logger - hello\n", result); + assertContains("[main] WARN my-slf4j-logger - hello", result); result = record(() -> logger.warn("exception", new NullPointerException())); - assertTrue(result.contains("[main] WARN my-slf4j-logger - exception\n")); + assertTrue(result.contains("[main] WARN my-slf4j-logger - exception")); assertTrue(result.contains("java.lang.NullPointerException")); result = record(() -> logger.warn("hello {} and {}", "Paulo", "Julien")); - assertEquals("[main] WARN my-slf4j-logger - hello Paulo and Julien\n", result); + assertContains("[main] WARN my-slf4j-logger - hello Paulo and Julien", result); result = record(() -> logger.warn("hello {}", "vert.x")); - assertEquals("[main] WARN my-slf4j-logger - hello vert.x\n", result); + assertContains("[main] WARN my-slf4j-logger - hello vert.x", result); result = record(() -> logger.warn("hello {} - {}", "vert.x")); - assertEquals("[main] WARN my-slf4j-logger - hello vert.x - {}\n", result); + assertContains("[main] WARN my-slf4j-logger - hello vert.x - {}", result); result = record(() -> logger.warn("hello {}", "vert.x", "foo")); - assertEquals("[main] WARN my-slf4j-logger - hello vert.x\n", result); + assertContains("[main] WARN my-slf4j-logger - hello vert.x", result); result = record(() -> logger.warn("{}, an exception has been thrown", new IllegalStateException(), "Luke")); - assertTrue(result.contains("[main] WARN my-slf4j-logger - Luke, an exception has been thrown\n")); + assertTrue(result.contains("[main] WARN my-slf4j-logger - Luke, an exception has been thrown")); assertTrue(result.contains("java.lang.IllegalStateException")); result = record(() -> logger.warn("{}, an exception has been thrown", "Luke", new IllegalStateException())); - assertTrue(result.contains("[main] WARN my-slf4j-logger - Luke, an exception has been thrown\n")); + assertTrue(result.contains("[main] WARN my-slf4j-logger - Luke, an exception has been thrown")); assertTrue(result.contains("java.lang.IllegalStateException")); }
Nested zip tests fails on Windows ``` Failed tests: NestedZipFileResolverTest>AsyncTestBase.lambda$onSuccess$1:622->FileResolverTestBase.lambda$testCacheDirDeletedOnVertxClose$3:197->AsyncTestBase.assertFalse:208 null NestedZipFileResolverTest>AsyncTestBase.lambda$onSuccess$1:620->AsyncTestBase.fail:262 java.nio.file.FileSystemException: C:\Users\FTM\Documents\NetBeansProjects\vert.x\.vertx\file-cache-bd9e09f4-0e7a-4400-b8cf-a97a8735ea7c\lib\nested.zip: The process cannot access the file because it is being used by another process. NestedZipFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedZipFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedZipFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedZipFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedZipFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedZipFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null Tests run: 17, Failures: 8, Errors: 0, Skipped: 0 ``` reported by @FainTMako on Window 7
same for nested jar: ``` Results : Failed tests: NestedJarFileResolverTest>AsyncTestBase.lambda$onSuccess$1:622->FileResolverTestBase.lambda$testCacheDirDeletedOnVertxClose$3:197->AsyncTestBase.assertFalse:208 null NestedJarFileResolverTest>AsyncTestBase.lambda$onSuccess$1:620->AsyncTestBase.fail:262 java.nio.file.FileSystemException: C:\Users\FTM\Documents\NetBeansProjects\vert.x\.vertx\file-cache-57edbe91-cbfb-42f6-ac78-37a39f53a324\lib\nested.jar: The process cannot access the file because it is being used by another process. NestedJarFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedJarFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedJarFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedJarFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedJarFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null NestedJarFileResolverTest.after:60->AsyncTestBase.after:81->FileResolverTestBase.tearDown:52->AsyncTestBase.awaitLatch:592->AsyncTestBase.assertTrue:372 null Tests run: 17, Failures: 8, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ ``` Will have a look during my next windows sprint (should not be too far, as we also have an issue on nested JS modules) There are some file handlers that we don't close... Investigating...
2016-04-05T15:04:56Z
3.2
eclipse-vertx/vert.x
1,300
eclipse-vertx__vert.x-1300
[ "1298" ]
5b27163986f0fe344dc126acab030a307d842c38
diff --git a/src/main/java/io/vertx/core/impl/FileResolver.java b/src/main/java/io/vertx/core/impl/FileResolver.java --- a/src/main/java/io/vertx/core/impl/FileResolver.java +++ b/src/main/java/io/vertx/core/impl/FileResolver.java @@ -19,21 +19,21 @@ import io.vertx.core.*; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.URL; +import java.net.URLClassLoader; import java.net.URLDecoder; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; import java.nio.file.StandardCopyOption; +import java.util.Enumeration; import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - +import java.util.zip.ZipFile; /** * Sometimes the file resources of an application are bundled into jars, or are somewhere on the classpath but not @@ -164,25 +164,24 @@ private synchronized File unpackFromFileURL(URL url, String fileName, ClassLoade return cacheFile; } - private static ZipInputStream toZipInputStream(URL url, ClassLoader cl) throws IOException{ - String[] breadcrumbs = url.getPath().substring(5).split(".jar!"); - if (breadcrumbs.length == 2){ - // Normal case. Jar is on file system and desired path is in there - // Need to urldecode it too, since bug in JDK URL class which does not url decode it, so if it contains spaces we - // are screwed - File file = new File(URLDecoder.decode(breadcrumbs[0] + ".jar", "UTF-8")); - return new ZipInputStream(new FileInputStream(file)); - } else{ - // Jar of jars. Desired path is inside a jar that is itself inside another jar - // E.g., Spring Boot fat jar format: application.jar!/lib/dependency.jar!/webroot/hello.html - return new ZipInputStream(cl.getResourceAsStream(breadcrumbs[1].substring(1) + ".jar")); - } - } + private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoader cl) { + try { + ZipFile zip; + String path = url.getPath(); + int idx1 = path.lastIndexOf(".jar!"); + int idx2 = path.lastIndexOf(".jar!", idx1 - 1); + if (idx2 == -1) { + File file = new File(URLDecoder.decode(path.substring(5, idx1 + 4), "UTF-8")); + zip = new ZipFile(file); + } else { + String s = path.substring(idx2 + 6, idx1) + ".jar"; + File file = resolveFile(s); + zip = new ZipFile(file); + } - private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoader cl) { - try (ZipInputStream zip = toZipInputStream(url, cl)){ - ZipEntry entry = zip.getNextEntry(); - while (entry != null) { + Enumeration<? extends ZipEntry> entries = zip.entries(); + while (entries.hasMoreElements()) { + ZipEntry entry = entries.nextElement(); String name = entry.getName(); if (name.startsWith(fileName)) { File file = new File(cacheDir, name); @@ -191,19 +190,16 @@ private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoade file.mkdirs(); } else { file.getParentFile().mkdirs(); - try { + try (InputStream is = zip.getInputStream(entry)) { if (ENABLE_CACHING) { - Files.copy(zip, file.toPath()); + Files.copy(is, file.toPath()); } else { - Files.copy(zip, file.toPath(), StandardCopyOption.REPLACE_EXISTING); + Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING); } } catch (FileAlreadyExistsException ignore) { - } finally { - zip.closeEntry(); } } } - entry = zip.getNextEntry(); } } catch (IOException e) { throw new VertxException(e); @@ -213,9 +209,9 @@ private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoade } /** - * bundle:/, bundleresource:/ and bundleentry:/ urls are used by OSGi implementations to refer to a file - * contained in a bundle, or in a fragment. There is not much we can do to get the file from it, except - * reading it from the url. This method copies the files by reading it from the url. + * bundle:// urls are used by OSGi implementations to refer to a file contained in a bundle, or in a fragment. There + * is not much we can do to get the file from it, except reading it from the url. This method copies the files by + * reading it from the url. * * @param url the url * @return the extracted file
diff --git a/src/test/java/io/vertx/test/core/NestedJarFileResolverTest.java b/src/test/java/io/vertx/test/core/NestedJarFileResolverTest.java --- a/src/test/java/io/vertx/test/core/NestedJarFileResolverTest.java +++ b/src/test/java/io/vertx/test/core/NestedJarFileResolverTest.java @@ -30,17 +30,17 @@ public class NestedJarFileResolverTest extends FileResolverTestBase { public void setUp() throws Exception { super.setUp(); // This is inside the jar webroot3.jar - webRoot = "webroot3"; + webRoot = "webroot4"; prevCL = Thread.currentThread().getContextClassLoader(); - URL webroot3URL = prevCL.getResource("webroot3.jar"); + URL webroot3URL = prevCL.getResource("webroot4.jar"); ClassLoader loader = new ClassLoader(prevCL = Thread.currentThread().getContextClassLoader()) { @Override public URL getResource(String name) { try { if (name.startsWith("lib/")) { return new URL("jar:" + webroot3URL + "!/" + name); - } else if (name.startsWith("webroot3")) { + } else if (name.startsWith("webroot4")) { return new URL("jar:" + webroot3URL + "!/lib/nested.jar!/" + name.substring(7)); } } catch (MalformedURLException e) { diff --git a/src/test/resources/webroot3.jar b/src/test/resources/webroot3.jar deleted file mode 100644 Binary files a/src/test/resources/webroot3.jar and /dev/null differ diff --git a/src/test/resources/webroot4.jar b/src/test/resources/webroot4.jar new file mode 100644 Binary files /dev/null and b/src/test/resources/webroot4.jar differ
FileResolver performance issue Fatjar it creates perf issues when unpacking resources because it went from ZipFile#entries() (that is basically a lookup in the Zip dir structure) to ZipFileInputStream that performs a scan of the Zip file. See this commit : https://github.com/eclipse/vert.x/commit/29000c63a56d5a9410498e39f6ab63567ad7ed91#diff-4f1620acdced3de97ebe522db0fd106a
Reproducer : https://github.com/KlausSchaefers/vertx-static-slow2 Also need to add tests for nested jars because I don't see any.
2016-02-01T08:43:34Z
3.2
eclipse-vertx/vert.x
1,287
eclipse-vertx__vert.x-1287
[ "1286" ]
bb44eb6ff024a338da6824da7169a324cfc87954
diff --git a/src/main/java/io/vertx/core/json/JsonArray.java b/src/main/java/io/vertx/core/json/JsonArray.java --- a/src/main/java/io/vertx/core/json/JsonArray.java +++ b/src/main/java/io/vertx/core/json/JsonArray.java @@ -20,12 +20,7 @@ import io.vertx.core.shareddata.impl.ClusterSerializable; import java.time.Instant; -import java.util.ArrayList; -import java.util.Base64; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import java.util.stream.Stream; import static java.time.format.DateTimeFormatter.ISO_INSTANT; @@ -477,10 +472,17 @@ public boolean remove(Object value) { * Remove the value at the specified position in the JSON array. * * @param pos the position to remove the value at - * @return the removed value if removed, null otherwise + * @return the removed value if removed, null otherwise. If the value is a Map, a {@link JsonObject} is built from + * this Map and returned. It the value is a List, a {@link JsonArray} is built form this List and returned. */ public Object remove(int pos) { - return list.remove(pos); + Object removed = list.remove(pos); + if (removed instanceof Map) { + return new JsonObject((Map) removed); + } else if (removed instanceof ArrayList) { + return new JsonArray((List) removed); + } + return removed; } /**
diff --git a/src/test/java/io/vertx/test/core/JsonArrayTest.java b/src/test/java/io/vertx/test/core/JsonArrayTest.java --- a/src/test/java/io/vertx/test/core/JsonArrayTest.java +++ b/src/test/java/io/vertx/test/core/JsonArrayTest.java @@ -1063,6 +1063,25 @@ public void testStreamCorrectTypes() throws Exception { testStreamCorrectTypes(object); } + @Test + public void testRemoveMethodReturnedObject() { + JsonArray obj = new JsonArray(); + obj.add("bar") + .add(new JsonObject().put("name", "vert.x").put("count", 2)) + .add(new JsonArray().add(1.0).add(2.0)); + + Object removed = obj.remove(0); + assertTrue(removed instanceof String); + + removed = obj.remove(0); + assertTrue(removed instanceof JsonObject); + assertEquals(((JsonObject) removed).getString("name"), "vert.x"); + + removed = obj.remove(0); + assertTrue(removed instanceof JsonArray); + assertEquals(((JsonArray) removed).getDouble(0), 1.0, 0.0); + } + private void testStreamCorrectTypes(JsonObject object) { object.getJsonArray("object1").stream().forEach(innerMap -> { assertTrue("Expecting JsonObject, found: " + innerMap.getClass().getCanonicalName(), innerMap instanceof JsonObject); diff --git a/src/test/java/io/vertx/test/core/JsonObjectTest.java b/src/test/java/io/vertx/test/core/JsonObjectTest.java --- a/src/test/java/io/vertx/test/core/JsonObjectTest.java +++ b/src/test/java/io/vertx/test/core/JsonObjectTest.java @@ -1629,6 +1629,28 @@ public void testStreamCorrectTypes() throws Exception { testStreamCorrectTypes(object); } + @Test + public void testRemoveMethodReturnedObject() { + JsonObject obj = new JsonObject(); + obj.put("simple", "bar") + .put("object", new JsonObject().put("name", "vert.x").put("count", 2)) + .put("array", new JsonArray().add(1.0).add(2.0)); + + Object removed = obj.remove("missing"); + assertNull(removed); + + removed = obj.remove("simple"); + assertTrue(removed instanceof String); + + removed = obj.remove("object"); + assertTrue(removed instanceof JsonObject); + assertEquals(((JsonObject) removed).getString("name"), "vert.x"); + + removed = obj.remove("array"); + assertTrue(removed instanceof JsonArray); + assertEquals(((JsonArray) removed).getDouble(0), 1.0, 0.0); + } + private void testStreamCorrectTypes(JsonObject object) { object.stream().forEach(entry -> { String key = entry.getKey();
JsonArray.remove(int pos) should return JsonArray or JsonObject instead of their underlying implementations The current implementation returns / leaks a `java.util.ArrayList<?>` in case of a `JsonArray` or a Map in case of a `JsonObject`. It should check for these implementations and return a JsonArray or JsonObject wrapper. See https://github.com/eclipse/vert.x/blob/master/src/main/java/io/vertx/core/json/JsonArray.java#L482
2016-01-18T14:44:02Z
3.2
tailwindlabs/tailwindcss
17,647
tailwindlabs__tailwindcss-17647
[ "17643" ]
c0af1e2129828110fb4498f57b77d2e3bc1d3396
diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -4399,6 +4399,14 @@ export function createUtilities(theme: Theme) { { let value = resolveThemeColor(candidate, theme, ['--drop-shadow-color', '--color']) if (value) { + if (value === 'inherit') { + return [ + filterProperties(), + decl('--tw-drop-shadow-color', 'inherit'), + decl('--tw-drop-shadow', `var(--tw-drop-shadow-size)`), + ] + } + return [ filterProperties(), decl('--tw-drop-shadow-color', withAlpha(value, 'var(--tw-drop-shadow-alpha)')), @@ -5127,6 +5135,10 @@ export function createUtilities(theme: Theme) { case 'none': if (candidate.modifier) return return [textShadowProperties(), decl('text-shadow', 'none')] + + case 'inherit': + if (candidate.modifier) return + return [textShadowProperties(), decl('--tw-text-shadow-color', 'inherit')] } // Shadow size @@ -5275,6 +5287,10 @@ export function createUtilities(theme: Theme) { decl('--tw-shadow', nullShadow), decl('box-shadow', cssBoxShadowValue), ] + + case 'inherit': + if (candidate.modifier) return + return [boxShadowProperties(), decl('--tw-shadow-color', 'inherit')] } // Shadow size @@ -5397,6 +5413,10 @@ export function createUtilities(theme: Theme) { decl('--tw-inset-shadow', nullShadow), decl('box-shadow', cssBoxShadowValue), ] + + case 'inherit': + if (candidate.modifier) return + return [boxShadowProperties(), decl('--tw-inset-shadow-color', 'inherit')] } // Shadow size
diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -20943,6 +20943,8 @@ test('filter', async () => { 'drop-shadow-[0_0_red]', 'drop-shadow-red-500', 'drop-shadow-red-500/50', + 'drop-shadow-none', + 'drop-shadow-inherit', 'saturate-0', 'saturate-[1.75]', 'saturate-[var(--value)]', @@ -21046,6 +21048,16 @@ test('filter', async () => { 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-none { + --tw-drop-shadow: ; + 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-inherit { + --tw-drop-shadow-color: inherit; + --tw-drop-shadow: var(--tw-drop-shadow-size); + } + .drop-shadow-red-500 { --tw-drop-shadow-color: #ef4444; --tw-drop-shadow: var(--tw-drop-shadow-size); @@ -23568,12 +23580,6 @@ test('text-shadow', async () => { --tw-text-shadow-color: inherit; } - @supports (color: color-mix(in lab, red, red)) { - .text-shadow-inherit { - --tw-text-shadow-color: color-mix(in oklab, inherit var(--tw-text-shadow-alpha), transparent); - } - } - .text-shadow-none { text-shadow: none; } @@ -23968,12 +23974,6 @@ test('shadow', async () => { --tw-shadow-color: inherit; } - @supports (color: color-mix(in lab, red, red)) { - .shadow-inherit { - --tw-shadow-color: color-mix(in oklab, inherit var(--tw-shadow-alpha), transparent); - } - } - .shadow-red-500 { --tw-shadow-color: #ef4444; } @@ -24447,12 +24447,6 @@ test('inset-shadow', async () => { --tw-inset-shadow-color: inherit; } - @supports (color: color-mix(in lab, red, red)) { - .inset-shadow-inherit { - --tw-inset-shadow-color: color-mix(in oklab, inherit var(--tw-inset-shadow-alpha), transparent); - } - } - .inset-shadow-red-500 { --tw-inset-shadow-color: #ef4444; }
`shadow-inherit` is broken **What version of Tailwind CSS are you using?** For example: v4.1.3 **What build tool (or framework if it abstracts the build tool) are you using?** Tailwind Play **What version of Node.js are you using?** Tailwind Play **What browser are you using?** Firefox and Chrome **What operating system are you using?** Windows **Reproduction URL** https://play.tailwindcss.com/FYzL24UYiA **Describe your issue** No shadow is shown when using `shadow-inherit`. When using `shadow-inherit` the following property is generated: ```css --tw-shadow-color: color-mix(in oklab, inherit var(--tw-shadow-alpha), transparent); ``` I don't think `inherit` is a [`<color>`](https://developer.mozilla.org/docs/Web/CSS/color_value) as required by [`color-mix()`](https://developer.mozilla.org/docs/Web/CSS/color_value/color-mix). I also suppose browsers don't reject the declaration as invalid because it's assigning to a CSS variable with syntax "*". Regression from 60b0da9? cc @philipp-spiess
Seems like `inherit` is incompatible with the intensity modifiers of box shadows introduced in https://github.com/tailwindlabs/tailwindcss/pull/17398. I guess the `color-mix()` could be removed from the `inherit` value, or ~~to retain the intensity modifier, we move the intensity `color-mix()` into the `shadow-<size>` class~~? (can't do that, otherwise the compatibility fallbacks for the `color-mix()` won't work)
2025-04-11T08:49:07Z
4.1
tailwindlabs/tailwindcss
17,754
tailwindlabs__tailwindcss-17754
[ "17295" ]
2bf2b4db98dd4e910d024d885416a2038f70d0d2
diff --git a/packages/@tailwindcss-postcss/src/index.ts b/packages/@tailwindcss-postcss/src/index.ts --- a/packages/@tailwindcss-postcss/src/index.ts +++ b/packages/@tailwindcss-postcss/src/index.ts @@ -103,6 +103,10 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin { let context = getContextFromCache(inputFile, opts) let inputBasePath = path.dirname(path.resolve(inputFile)) + // Whether this is the first build or not, if it is, then we can + // optimize the build by not creating the compiler until we need it. + let isInitialBuild = context.compiler === null + async function createCompiler() { DEBUG && I.start('Setup compiler') if (context.fullRebuildPaths.length > 0 && !isInitialBuild) { @@ -119,9 +123,7 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin { let compiler = await compileAst(ast, { base: inputBasePath, shouldRewriteUrls: true, - onDependency: (path) => { - context.fullRebuildPaths.push(path) - }, + onDependency: (path) => context.fullRebuildPaths.push(path), // In CSS Module files, we have to disable the `@property` polyfill since these will // emit global `*` rules which are considered to be non-pure and will cause builds // to fail. @@ -133,190 +135,207 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin { return compiler } - // Whether this is the first build or not, if it is, then we can - // optimize the build by not creating the compiler until we need it. - let isInitialBuild = context.compiler === null + try { + // Setup the compiler if it doesn't exist yet. This way we can + // guarantee a `build()` function is available. + context.compiler ??= createCompiler() - // Setup the compiler if it doesn't exist yet. This way we can - // guarantee a `build()` function is available. - context.compiler ??= createCompiler() + if ((await context.compiler).features === Features.None) { + return + } - if ((await context.compiler).features === Features.None) { - return - } + let rebuildStrategy: 'full' | 'incremental' = 'incremental' - let rebuildStrategy: 'full' | 'incremental' = 'incremental' + // Track file modification times to CSS files + DEBUG && I.start('Register full rebuild paths') + { + for (let file of context.fullRebuildPaths) { + result.messages.push({ + type: 'dependency', + plugin: '@tailwindcss/postcss', + file: path.resolve(file), + parent: result.opts.from, + }) + } - // Track file modification times to CSS files - DEBUG && I.start('Register full rebuild paths') - { - for (let file of context.fullRebuildPaths) { - result.messages.push({ - type: 'dependency', - plugin: '@tailwindcss/postcss', - file: path.resolve(file), - parent: result.opts.from, + let files = result.messages.flatMap((message) => { + if (message.type !== 'dependency') return [] + return message.file }) - } - - let files = result.messages.flatMap((message) => { - if (message.type !== 'dependency') return [] - return message.file - }) - files.push(inputFile) - - for (let file of files) { - let changedTime = fs.statSync(file, { throwIfNoEntry: false })?.mtimeMs ?? null - if (changedTime === null) { - if (file === inputFile) { - rebuildStrategy = 'full' + files.push(inputFile) + + for (let file of files) { + let changedTime = fs.statSync(file, { throwIfNoEntry: false })?.mtimeMs ?? null + if (changedTime === null) { + if (file === inputFile) { + rebuildStrategy = 'full' + } + continue } - continue - } - let prevTime = context.mtimes.get(file) - if (prevTime === changedTime) continue + let prevTime = context.mtimes.get(file) + if (prevTime === changedTime) continue - rebuildStrategy = 'full' - context.mtimes.set(file, changedTime) + rebuildStrategy = 'full' + context.mtimes.set(file, changedTime) + } + } + DEBUG && I.end('Register full rebuild paths') + + if ( + rebuildStrategy === 'full' && + // We can re-use the compiler if it was created during the + // initial build. If it wasn't, we need to create a new one. + !isInitialBuild + ) { + context.compiler = createCompiler() } - } - DEBUG && I.end('Register full rebuild paths') - - if ( - rebuildStrategy === 'full' && - // We can re-use the compiler if it was created during the - // initial build. If it wasn't, we need to create a new one. - !isInitialBuild - ) { - context.compiler = createCompiler() - } - let compiler = await context.compiler + let compiler = await context.compiler - if (context.scanner === null || rebuildStrategy === 'full') { - DEBUG && I.start('Setup scanner') - let sources = (() => { - // Disable auto source detection - if (compiler.root === 'none') { - return [] - } - - // No root specified, use the base directory - if (compiler.root === null) { - return [{ base, pattern: '**/*', negated: false }] - } + if (context.scanner === null || rebuildStrategy === 'full') { + DEBUG && I.start('Setup scanner') + let sources = (() => { + // Disable auto source detection + if (compiler.root === 'none') { + return [] + } - // Use the specified root - return [{ ...compiler.root, negated: false }] - })().concat(compiler.sources) + // No root specified, use the base directory + if (compiler.root === null) { + return [{ base, pattern: '**/*', negated: false }] + } - // Look for candidates used to generate the CSS - context.scanner = new Scanner({ sources }) - DEBUG && I.end('Setup scanner') - } + // Use the specified root + return [{ ...compiler.root, negated: false }] + })().concat(compiler.sources) - DEBUG && I.start('Scan for candidates') - let candidates = compiler.features & Features.Utilities ? context.scanner.scan() : [] - DEBUG && I.end('Scan for candidates') - - if (compiler.features & Features.Utilities) { - DEBUG && I.start('Register dependency messages') - // Add all found files as direct dependencies - // Note: With Turbopack, the input file might not be a resolved path - let resolvedInputFile = path.resolve(base, inputFile) - for (let file of context.scanner.files) { - let absolutePath = path.resolve(file) - // The CSS file cannot be a dependency of itself - if (absolutePath === resolvedInputFile) { - continue - } - result.messages.push({ - type: 'dependency', - plugin: '@tailwindcss/postcss', - file: absolutePath, - parent: result.opts.from, - }) + // Look for candidates used to generate the CSS + context.scanner = new Scanner({ sources }) + DEBUG && I.end('Setup scanner') } - // Register dependencies so changes in `base` cause a rebuild while - // giving tools like Vite or Parcel a glob that can be used to limit - // the files that cause a rebuild to only those that match it. - for (let { base: globBase, pattern } of context.scanner.globs) { - // Avoid adding a dependency on the base directory itself, since it - // causes Next.js to start an endless recursion if the `distDir` is - // configured to anything other than the default `.next` dir. - if (pattern === '*' && base === globBase) { - continue - } - - if (pattern === '') { + DEBUG && I.start('Scan for candidates') + let candidates = compiler.features & Features.Utilities ? context.scanner.scan() : [] + DEBUG && I.end('Scan for candidates') + + if (compiler.features & Features.Utilities) { + DEBUG && I.start('Register dependency messages') + // Add all found files as direct dependencies + // Note: With Turbopack, the input file might not be a resolved path + let resolvedInputFile = path.resolve(base, inputFile) + for (let file of context.scanner.files) { + let absolutePath = path.resolve(file) + // The CSS file cannot be a dependency of itself + if (absolutePath === resolvedInputFile) { + continue + } result.messages.push({ type: 'dependency', plugin: '@tailwindcss/postcss', - file: path.resolve(globBase), - parent: result.opts.from, - }) - } else { - result.messages.push({ - type: 'dir-dependency', - plugin: '@tailwindcss/postcss', - dir: path.resolve(globBase), - glob: pattern, + file: absolutePath, parent: result.opts.from, }) } + + // Register dependencies so changes in `base` cause a rebuild while + // giving tools like Vite or Parcel a glob that can be used to limit + // the files that cause a rebuild to only those that match it. + for (let { base: globBase, pattern } of context.scanner.globs) { + // Avoid adding a dependency on the base directory itself, since it + // causes Next.js to start an endless recursion if the `distDir` is + // configured to anything other than the default `.next` dir. + if (pattern === '*' && base === globBase) { + continue + } + + if (pattern === '') { + result.messages.push({ + type: 'dependency', + plugin: '@tailwindcss/postcss', + file: path.resolve(globBase), + parent: result.opts.from, + }) + } else { + result.messages.push({ + type: 'dir-dependency', + plugin: '@tailwindcss/postcss', + dir: path.resolve(globBase), + glob: pattern, + parent: result.opts.from, + }) + } + } + DEBUG && I.end('Register dependency messages') } - DEBUG && I.end('Register dependency messages') - } - DEBUG && I.start('Build utilities') - let tailwindCssAst = compiler.build(candidates) - DEBUG && I.end('Build utilities') + DEBUG && I.start('Build utilities') + let tailwindCssAst = compiler.build(candidates) + DEBUG && I.end('Build utilities') - if (context.tailwindCssAst !== tailwindCssAst) { - if (optimize) { - DEBUG && I.start('Optimization') + if (context.tailwindCssAst !== tailwindCssAst) { + if (optimize) { + DEBUG && I.start('Optimization') - DEBUG && I.start('AST -> CSS') - let css = toCss(tailwindCssAst) - DEBUG && I.end('AST -> CSS') + DEBUG && I.start('AST -> CSS') + let css = toCss(tailwindCssAst) + DEBUG && I.end('AST -> CSS') - DEBUG && I.start('Lightning CSS') - let ast = optimizeCss(css, { - minify: typeof optimize === 'object' ? optimize.minify : true, - }) - DEBUG && I.end('Lightning CSS') - - DEBUG && I.start('CSS -> PostCSS AST') - context.optimizedPostCssAst = postcss.parse(ast, result.opts) - DEBUG && I.end('CSS -> PostCSS AST') - - DEBUG && I.end('Optimization') - } else { - // Convert our AST to a PostCSS AST - DEBUG && I.start('Transform Tailwind CSS AST into PostCSS AST') - context.cachedPostCssAst = cssAstToPostCssAst(tailwindCssAst, root.source) - DEBUG && I.end('Transform Tailwind CSS AST into PostCSS AST') + DEBUG && I.start('Lightning CSS') + let ast = optimizeCss(css, { + minify: typeof optimize === 'object' ? optimize.minify : true, + }) + DEBUG && I.end('Lightning CSS') + + DEBUG && I.start('CSS -> PostCSS AST') + context.optimizedPostCssAst = postcss.parse(ast, result.opts) + DEBUG && I.end('CSS -> PostCSS AST') + + DEBUG && I.end('Optimization') + } else { + // Convert our AST to a PostCSS AST + DEBUG && I.start('Transform Tailwind CSS AST into PostCSS AST') + context.cachedPostCssAst = cssAstToPostCssAst(tailwindCssAst, root.source) + DEBUG && I.end('Transform Tailwind CSS AST into PostCSS AST') + } } - } - context.tailwindCssAst = tailwindCssAst + context.tailwindCssAst = tailwindCssAst + + DEBUG && I.start('Update PostCSS AST') + root.removeAll() + root.append( + optimize + ? context.optimizedPostCssAst.clone().nodes + : context.cachedPostCssAst.clone().nodes, + ) + + // Trick PostCSS into thinking the indent is 2 spaces, so it uses that + // as the default instead of 4. + root.raws.indent = ' ' + DEBUG && I.end('Update PostCSS AST') - DEBUG && I.start('Update PostCSS AST') - root.removeAll() - root.append( - optimize - ? context.optimizedPostCssAst.clone().nodes - : context.cachedPostCssAst.clone().nodes, - ) + DEBUG && I.end(`[@tailwindcss/postcss] ${relative(base, inputFile)}`) + } catch (error) { + // An error requires a full rebuild to fix + context.compiler = null - // Trick PostCSS into thinking the indent is 2 spaces, so it uses that - // as the default instead of 4. - root.raws.indent = ' ' - DEBUG && I.end('Update PostCSS AST') + // Ensure all dependencies we have collected thus far are included so that the rebuild + // is correctly triggered + for (let file of context.fullRebuildPaths) { + result.messages.push({ + type: 'dependency', + plugin: '@tailwindcss/postcss', + file: path.resolve(file), + parent: result.opts.from, + }) + } - DEBUG && I.end(`[@tailwindcss/postcss] ${relative(base, inputFile)}`) + // We found that throwing the error will cause PostCSS to no longer watch for changes + // in some situations so we instead log the error and continue with an empty stylesheet. + console.error(error) + root.removeAll() + } }, }, ],
diff --git a/integrations/postcss/index.test.ts b/integrations/postcss/index.test.ts --- a/integrations/postcss/index.test.ts +++ b/integrations/postcss/index.test.ts @@ -635,3 +635,91 @@ test( await fs.expectFileToContain('project-a/dist/out.css', [candidate`content-['c/src/index.js']`]) }, ) + +test( + 'rebuild error recovery', + { + fs: { + 'package.json': json` + { + "devDependencies": { + "postcss": "^8", + "postcss-cli": "^10", + "tailwindcss": "workspace:^", + "@tailwindcss/postcss": "workspace:^" + } + } + `, + 'postcss.config.js': js` + module.exports = { + plugins: { + '@tailwindcss/postcss': {}, + }, + } + `, + 'src/index.html': html` + <div class="underline"></div> + `, + 'src/index.css': css` @import './tailwind.css'; `, + 'src/tailwind.css': css` + @reference 'tailwindcss/does-not-exist'; + @import 'tailwindcss/utilities'; + `, + }, + }, + async ({ fs, expect, spawn }) => { + let process = await spawn('pnpm postcss src/index.css --output dist/out.css --watch --verbose') + + await process.onStderr((message) => + message.includes('Package path ./does-not-exist is not exported from package'), + ) + + expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(` + " + --- dist/out.css --- + <EMPTY> + " + `) + + await process.onStderr((message) => message.includes('Waiting for file changes...')) + + // Fix the CSS file + await fs.write( + 'src/tailwind.css', + css` + @reference 'tailwindcss/theme'; + @import 'tailwindcss/utilities'; + `, + ) + await process.onStderr((message) => message.includes('Finished src/index.css')) + + expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(` + " + --- dist/out.css --- + .underline { + text-decoration-line: underline; + } + " + `) + + // Now break the CSS file again + await fs.write( + 'src/tailwind.css', + css` + @reference 'tailwindcss/does-not-exist'; + @import 'tailwindcss/utilities'; + `, + ) + await process.onStderr((message) => + message.includes('Package path ./does-not-exist is not exported from package'), + ) + await process.onStderr((message) => message.includes('Finished src/index.css')) + + expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(` + " + --- dist/out.css --- + <EMPTY> + " + `) + }, +) diff --git a/packages/tailwindcss/src/compat/config.test.ts b/packages/tailwindcss/src/compat/config.test.ts --- a/packages/tailwindcss/src/compat/config.test.ts +++ b/packages/tailwindcss/src/compat/config.test.ts @@ -1217,7 +1217,7 @@ test('utilities used in @apply must be prefixed', async () => { `) // Non-prefixed utilities cause an error - expect(() => + await expect( compile( css` @config "./config.js"; @@ -1405,7 +1405,7 @@ test('blocklisted candidates are not generated', async () => { }) test('blocklisted candidates cannot be used with `@apply`', async () => { - await expect(() => + await expect( compile( css` @theme reference { diff --git a/packages/tailwindcss/src/index.test.ts b/packages/tailwindcss/src/index.test.ts --- a/packages/tailwindcss/src/index.test.ts +++ b/packages/tailwindcss/src/index.test.ts @@ -454,9 +454,9 @@ describe('@apply', () => { `) }) - it('should error when using @apply with a utility that does not exist', () => { - return expect( - compileCss(css` + it('should error when using @apply with a utility that does not exist', async () => { + await expect( + compile(css` @tailwind utilities; .foo { @@ -468,9 +468,9 @@ describe('@apply', () => { ) }) - it('should error when using @apply with a variant that does not exist', () => { - return expect( - compileCss(css` + it('should error when using @apply with a variant that does not exist', async () => { + await expect( + compile(css` @tailwind utilities; .foo { diff --git a/packages/tailwindcss/src/prefix.test.ts b/packages/tailwindcss/src/prefix.test.ts --- a/packages/tailwindcss/src/prefix.test.ts +++ b/packages/tailwindcss/src/prefix.test.ts @@ -80,7 +80,7 @@ test('utilities used in @apply must be prefixed', async () => { `) // Non-prefixed utilities cause an error - expect(() => + await expect( compile(css` @theme reference prefix(tw);
Angular 19 cannot automatically recover using @apply with Tailwind CSS 4 Tailwind CSS: 4.0.14 Angular: 19.2.4 Node: 23.6.0 Chrome: 134.0.6998.89 (Official Build) (arm64) MacOS: Sequoia 15.3.2 (24D81) **Reproduction URL** [https://github.com/micobarac/angular19](https://github.com/micobarac/angular19) **Describe your issue** Reproducing the issue: - run `yarn install && yarn start` - open `src/tailwind.css` - change `bg-white` class within `@apply` directive to `bg-unknown` at line 4 - observe the error: ``` ✘ [ERROR] Cannot apply unknown utility class: bg-unknown [plugin angular-css] angular:styles/global:styles:1:8: 1 │ @import 'src/styles.css'; ``` - change `bg-unknown` class within `@apply` directive back to `bg-white` at line 4 - observe the error (**Angular should have recovered by now**): ``` ✘ [ERROR] Cannot apply unknown utility class: bg-unknown [plugin angular-css] angular:styles/global:styles:1:8: 1 │ @import 'src/styles.css'; ``` I can't tell if this problem resides inside `Angular 19` or `Tailwind CSS 4`. I opened issue here: [https://github.com/angular/angular-cli/issues/29789](https://github.com/angular/angular-cli/issues/29789) [https://github.com/angular/angular-cli/issues/29789#issuecomment-2737483148](https://github.com/angular/angular-cli/issues/29789#issuecomment-2737483148) _In Tailwind CSS version 4, syntax errors trigger an exception instead of a PostCSS error. This causes PostCSS to crash, preventing it from tracking the files Tailwind processes. As a result, these files aren't added to the file watcher / dependency tree, leading to issues where cached compilation results aren't invalidated when a file changes, since it isn't recognized as a transitive dependency._ I opened discussion here, too: [https://github.com/tailwindlabs/tailwindcss/discussions/17077](https://github.com/tailwindlabs/tailwindcss/discussions/17077)
Same problem with Nuxt (vue js) What's worse, Angular team does not plan to fix this, stating: _Closing as there isn’t much we can do here. Tailwind is throwing an exception that causes the underlying PostCSS instance to crash and not return which files to watch._ I am guessing it is crashing here ... https://github.com/tailwindlabs/tailwindcss/blob/main/packages/tailwindcss/src/apply.ts#L166 I am guessing If some tests will be added, problem will be fixed soon ... having this issue as well; it's inconsistent—the error always pops up on initial build, but if new builds are generated during `ng serve`, it will work just fine I am experiencing the same issue with the latest version of Angular. CSS changes are not reflecting without restarting ng serve when using Tailwind CSS V4. Here is my Angular CLI version Angular CLI: 19.2.8 Node: 22.14.0 Package Manager: npm 11.1.0 Angular: 19.2.7 Application bundle generation failed. [0.479 seconds] ✘ [ERROR] Cannot apply unknown utility class: md:w-auto [plugin angular-css] Experiencing this problem a well. We have a lot of `@apply` statements in a big project, and it would require a lot of refactoring to change this. Any known workaround ? Same problem, so I switched back to TW 3.x.
2025-04-23T12:49:41Z
4.1
tailwindlabs/tailwindcss
17,301
tailwindlabs__tailwindcss-17301
[ "17288" ]
a1acaeeee0150a14c6b6843361805ffb961ad170
diff --git a/packages/tailwindcss/src/index.ts b/packages/tailwindcss/src/index.ts --- a/packages/tailwindcss/src/index.ts +++ b/packages/tailwindcss/src/index.ts @@ -696,6 +696,7 @@ export async function compileAst( } let didChange = defaultDidChange + let didAddExternalVariable = false defaultDidChange = false // Add all new candidates unless we know that they are invalid. @@ -703,11 +704,13 @@ export async function compileAst( for (let candidate of newRawCandidates) { if (!designSystem.invalidCandidates.has(candidate)) { if (candidate[0] === '-' && candidate[1] === '-') { - designSystem.theme.markUsedVariable(candidate) + let didMarkVariableAsUsed = designSystem.theme.markUsedVariable(candidate) + didChange ||= didMarkVariableAsUsed + didAddExternalVariable ||= didMarkVariableAsUsed } else { allValidCandidates.add(candidate) + didChange ||= allValidCandidates.size !== prevSize } - didChange ||= allValidCandidates.size !== prevSize } } @@ -725,7 +728,7 @@ export async function compileAst( // If no new ast nodes were generated, then we can return the original // CSS. This currently assumes that we only add new ast nodes and never // remove any. - if (previousAstNodeCount === newNodes.length) { + if (!didAddExternalVariable && previousAstNodeCount === newNodes.length) { compiled ??= optimizeAst(ast, designSystem) return compiled } diff --git a/packages/tailwindcss/src/theme.ts b/packages/tailwindcss/src/theme.ts --- a/packages/tailwindcss/src/theme.ts +++ b/packages/tailwindcss/src/theme.ts @@ -193,11 +193,13 @@ export class Theme { return `var(${escape(this.prefixKey(themeKey))}${fallback ? `, ${fallback}` : ''})` } - markUsedVariable(themeKey: string) { + markUsedVariable(themeKey: string): boolean { let key = unescape(this.#unprefixKey(themeKey)) let value = this.values.get(key) - if (!value) return + if (!value) return false + let isUsed = value.options & ThemeOptions.USED value.options |= ThemeOptions.USED + return !isUsed } resolve(candidateValue: string | null, themeKeys: ThemeKey[]): string | null {
diff --git a/integrations/cli/index.test.ts b/integrations/cli/index.test.ts --- a/integrations/cli/index.test.ts +++ b/integrations/cli/index.test.ts @@ -1303,11 +1303,11 @@ test( `, ) - fs.expectFileToContain( + // prettier-ignore + await fs.expectFileToContain( './dist/out.css', css` - :root, - :host { + :root, :host { --color-blue-500: blue; } `,
Changes in CSS file do not update Next.js setup <img width="701" alt="Image" src="https://github.com/user-attachments/assets/b7b9486e-7c1d-4412-8caf-b4bca1fe15a5" /> Section says that i can use CSS variables directly. It might be true in case of `static` theme, but it does not work for custom non-static theme which gets only the values picket up by the scanner from classnames. The confusion is that it is never mentioned, that scanner does not pickup CSS variables used directly to include them in a server theme layer: ![Image](https://github.com/user-attachments/assets/5884e0ed-9cf9-44a8-9fb5-78fa7e3fbcad) ![Image](https://github.com/user-attachments/assets/2e37afae-b759-43c7-9e2b-9ede48b04b5c)
Hey there! This seems like a bug on our end, I agree that this should _just work_. We'll look into it. In the mean time, can you maybe share the contents of the file that references the CSS variable? I want to make sure we add a test case for your setup 👍 Also curious what extension you are using? Vite/CLI/PostCSS or something else? > Hey there! This seems like a bug on our end, I agree that this should _just work_. We'll look into it. > > In the mean time, can you maybe share the contents of the file that references the CSS variable? I want to make sure we add a test case for your setup 👍 Also curious what extension you are using? Vite/CLI/PostCSS or something else? Hey there, thank you so much for a quick reply. My setup is: `"next": 14.2.14` (therefore PostCSS extension) `"tailwindcss": 4.0.14` `"@tailwindcss/postcss": 4.0.14` `"postcss": 8.4.41` Issue persists both in client and server components **App server is ran within docker container** Update: Seems like containerization is the issue. When i apply the variable and restart the container it gets added to the layer, however when i change it to other variable it is not refreshed until I restart the container again P.S. What also magically refreshes the thing is randomly making any changes to contents of the `@theme` (actually even no changes required, just saving any `.css` file already updates the thing). The whole `src` folder is included in volume, so it shouldn't be the issue. P.P.S I tracked the changes inside of `.next/static/css/layout.css` path. it indeed updates only when i refresh any `.css` file in the project Update: I created a dummy Next.js App (sorry, should have tested with such minimal settings initially). Turns out containerization is not the issue, but it does not update in Next.js app in general. How to reproduce: 1. Create Next.js app via `npx create-next-app@latest` and start a server 2. set two random variables in `@theme` in `global.css` file e.g. `@theme { --color-background: red; --color-foreground: pink; }` 3. Go to any component a try to render a plain `<div />`. 4. Add a style to that div with CSS var as `<div style={{ color: "var(--color-foreground)" }}/>` 5. Notice that static CSS file is not refreshed therefore CSS Var is not added. 6. Try to save (with or without changes) any `.css` file and notice that it refreshes static CSS file 7. Try to change variable and notice that until you save `.css` file or restart the server the variable is not picked up Update: I've setup a dummy `vite` project and tested all the steps above. Issue still persists. Workaround currently is the same: restart `vite` server or save any `.css` file
2025-03-20T11:47:57Z
4
tailwindlabs/tailwindcss
16,800
tailwindlabs__tailwindcss-16800
[ "15467" ]
662c6862ac77f39498331ea2a0434d81f7e340c4
diff --git a/integrations/utils.ts b/integrations/utils.ts --- a/integrations/utils.ts +++ b/integrations/utils.ts @@ -42,7 +42,7 @@ interface TestContext { exec(command: string, options?: ChildProcessOptions, execOptions?: ExecOptions): Promise<string> spawn(command: string, options?: ChildProcessOptions): Promise<SpawnedProcess> fs: { - write(filePath: string, content: string): Promise<void> + write(filePath: string, content: string, encoding?: BufferEncoding): Promise<void> create(filePaths: string[]): Promise<void> read(filePath: string): Promise<string> glob(pattern: string): Promise<[string, string][]> @@ -268,7 +268,11 @@ export function test( } }, fs: { - async write(filename: string, content: string | Uint8Array): Promise<void> { + async write( + filename: string, + content: string | Uint8Array, + encoding: BufferEncoding = 'utf8', + ): Promise<void> { let full = path.join(root, filename) let dir = path.dirname(full) await fs.mkdir(dir, { recursive: true }) @@ -286,7 +290,7 @@ export function test( content = content.replace(/\n/g, '\r\n') } - await fs.writeFile(full, content, 'utf-8') + await fs.writeFile(full, content, encoding) }, async create(filenames: string[]): Promise<void> { diff --git a/packages/tailwindcss/src/css-parser.ts b/packages/tailwindcss/src/css-parser.ts --- a/packages/tailwindcss/src/css-parser.ts +++ b/packages/tailwindcss/src/css-parser.ts @@ -31,6 +31,7 @@ const AT_SIGN = 0x40 const EXCLAMATION_MARK = 0x21 export function parse(input: string) { + if (input[0] === '\uFEFF') input = input.slice(1) input = input.replaceAll('\r\n', '\n') let ast: AstNode[] = []
diff --git a/integrations/cli/index.test.ts b/integrations/cli/index.test.ts --- a/integrations/cli/index.test.ts +++ b/integrations/cli/index.test.ts @@ -1314,3 +1314,79 @@ test( ) }, ) + +test( + 'can read files with UTF-8 files with BOM', + { + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "workspace:^", + "@tailwindcss/cli": "workspace:^" + } + } + `, + 'index.css': withBOM(css` + @reference 'tailwindcss/theme.css'; + @import 'tailwindcss/utilities'; + `), + 'index.html': withBOM(html` + <div class="underline"></div> + `), + }, + }, + async ({ fs, exec, expect }) => { + await exec('pnpm tailwindcss --input index.css --output dist/out.css') + + expect(await fs.dumpFiles('./dist/*.css')).toMatchInlineSnapshot(` + " + --- ./dist/out.css --- + .underline { + text-decoration-line: underline; + } + " + `) + }, +) + +test( + 'fails when reading files with UTF-16 files with BOM', + { + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "workspace:^", + "@tailwindcss/cli": "workspace:^" + } + } + `, + }, + }, + async ({ fs, exec, expect }) => { + await fs.write( + 'index.css', + withBOM(css` + @reference 'tailwindcss/theme.css'; + @import 'tailwindcss/utilities'; + `), + 'utf16le', + ) + await fs.write( + 'index.html', + withBOM(html` + <div class="underline"></div> + `), + 'utf16le', + ) + + await expect(exec('pnpm tailwindcss --input index.css --output dist/out.css')).rejects.toThrow( + /Invalid declaration:/, + ) + }, +) + +function withBOM(text: string): string { + return '\uFEFF' + text +} diff --git a/integrations/upgrade/index.test.ts b/integrations/upgrade/index.test.ts --- a/integrations/upgrade/index.test.ts +++ b/integrations/upgrade/index.test.ts @@ -2745,3 +2745,71 @@ test( `) }, ) + +test( + `can read files with BOM`, + { + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "^3", + "@tailwindcss/upgrade": "workspace:^" + }, + "devDependencies": { + "@tailwindcss/cli": "workspace:^" + } + } + `, + 'tailwind.config.js': js` + /** @type {import('tailwindcss').Config} */ + module.exports = { + content: ['./src/**/*.{html,js}'], + } + `, + 'src/index.html': withBOM(html` + <div class="ring"></div> + `), + 'src/input.css': withBOM(css` + @tailwind base; + @tailwind components; + @tailwind utilities; + `), + }, + }, + async ({ exec, fs, expect }) => { + await exec('npx @tailwindcss/upgrade') + + expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` + " + --- ./src/index.html --- + <div class="ring-3"></div> + + --- ./src/input.css --- + @import 'tailwindcss'; + + /* + The default border color has changed to \`currentColor\` in Tailwind CSS v4, + so we've added these compatibility styles to make sure everything still + looks the same as it did with Tailwind CSS v3. + + If we ever want to remove these styles, we need to add an explicit border + color utility to any element that depends on these defaults. + */ + @layer base { + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + border-color: var(--color-gray-200, currentColor); + } + } + " + `) + }, +) + +function withBOM(text: string): string { + return '\uFEFF' + text +} diff --git a/packages/tailwindcss/src/css-parser.test.ts b/packages/tailwindcss/src/css-parser.test.ts --- a/packages/tailwindcss/src/css-parser.test.ts +++ b/packages/tailwindcss/src/css-parser.test.ts @@ -1154,4 +1154,15 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => { ) }) }) + + it('ignores BOM at the beginning of a file', () => { + expect(parse("\uFEFF@reference 'tailwindcss';")).toEqual([ + { + kind: 'at-rule', + name: '@reference', + nodes: [], + params: "'tailwindcss'", + }, + ]) + }) })
Tailwindcss-cli silently fails when file is not UTF-8 **What version of Tailwind CSS are you using?** tailwindcss-cli v3.4.16 **What build tool (or framework if it abstracts the build tool) are you using?** tailwindcss-cli **What version of Node.js are you using?** none **What browser are you using?** N/A **What operating system are you using?** Windows **Describe your issue** Working on a legacy project I had problem getting utility classes generated from some files but not others, even when located next to each other. It turned out after a lot of hair pulling that the problematic files where encoded in UTF-16 with BOM. Converting all files to UTF-8 fixed the problem. Sugestion: At minimum show an error message when a file can't be processed.
2025-02-25T14:19:37Z
4
tailwindlabs/tailwindcss
16,631
tailwindlabs__tailwindcss-16631
[ "16358" ]
b9af722d13aadd271bef5ef9455b0725fdcb9d1c
diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -4,15 +4,13 @@ import { Scanner } from '@tailwindcss/oxide' import { Features as LightningCssFeatures, transform } from 'lightningcss' import fs from 'node:fs/promises' import path from 'node:path' -import type { Plugin, ResolvedConfig, Rollup, Update, ViteDevServer } from 'vite' +import type { Plugin, ResolvedConfig, ViteDevServer } from 'vite' const DEBUG = env.DEBUG const SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/ const COMMON_JS_PROXY_RE = /\?commonjs-proxy/ const INLINE_STYLE_ID_RE = /[?&]index\=\d+\.css$/ -const IGNORED_DEPENDENCIES = ['tailwind-merge'] - export default function tailwindcss(): Plugin[] { let servers: ViteDevServer[] = [] let config: ResolvedConfig | null = null @@ -20,25 +18,6 @@ export default function tailwindcss(): Plugin[] { let isSSR = false let minify = false - // The Vite extension has two types of sources for candidates: - // - // 1. The module graph: These are all modules that vite transforms and we want - // them to be automatically scanned for candidates. - // 2. Root defined `@source`s - // - // Module graph candidates are global to the Vite extension since we do not - // know which CSS roots will be used for the modules. We are using a custom - // scanner instance with auto source discovery disabled to parse these. - // - // For candidates coming from custom `@source` directives of the CSS roots, we - // create an individual scanner for each root. - // - // Note: To improve performance, we do not remove candidates from this set. - // This means a longer-ongoing dev mode session might contain candidates that - // are no longer referenced in code. - let moduleGraphCandidates = new DefaultMap<string, Set<string>>(() => new Set<string>()) - let moduleGraphScanner = new Scanner({}) - let roots: DefaultMap<string, Root> = new DefaultMap((id) => { let cssResolver = config!.createResolver({ ...config!.resolve, @@ -56,133 +35,9 @@ export default function tailwindcss(): Plugin[] { function customJsResolver(id: string, base: string) { return jsResolver(id, base, true, isSSR) } - return new Root( - id, - () => moduleGraphCandidates, - config!.base, - customCssResolver, - customJsResolver, - ) + return new Root(id, config!.root, customCssResolver, customJsResolver) }) - function scanFile(id: string, content: string, extension: string) { - for (let dependency of IGNORED_DEPENDENCIES) { - // We validated that Vite IDs always use posix style path separators, even on Windows. - // In dev build, Vite precompiles dependencies - if (id.includes(`.vite/deps/${dependency}.js`)) { - return - } - // In prod builds, use the node_modules path - if (id.includes(`/node_modules/${dependency}/`)) { - return - } - } - - let updated = false - for (let candidate of moduleGraphScanner.scanFiles([{ content, extension }])) { - updated = true - moduleGraphCandidates.get(id).add(candidate) - } - - if (updated) { - invalidateAllRoots() - } - } - - function invalidateAllRoots() { - for (let server of servers) { - let updates: Update[] = [] - for (let [id] of roots.entries()) { - let module = server.moduleGraph.getModuleById(id) - if (!module) continue - - roots.get(id).requiresRebuild = false - server.moduleGraph.invalidateModule(module) - updates.push({ - type: `${module.type}-update`, - path: module.url, - acceptedPath: module.url, - timestamp: Date.now(), - }) - } - if (updates.length > 0) { - server.hot.send({ type: 'update', updates }) - } - } - } - - async function regenerateOptimizedCss( - root: Root, - addWatchFile: (file: string) => void, - I: Instrumentation, - ) { - let content = root.lastContent - let generated = await root.generate(content, addWatchFile, I) - if (generated === false) { - return - } - DEBUG && I.start('Optimize CSS') - let result = optimizeCss(generated, { minify }) - DEBUG && I.end('Optimize CSS') - return result - } - - // Manually run the transform functions of non-Tailwind plugins on the given CSS - async function transformWithPlugins(context: Rollup.PluginContext, id: string, css: string) { - let transformPluginContext = { - ...context, - getCombinedSourcemap: () => { - throw new Error('getCombinedSourcemap not implemented') - }, - } - - for (let plugin of config!.plugins) { - if (!plugin.transform) continue - - if (plugin.name.startsWith('@tailwindcss/')) { - // We do not run any Tailwind transforms anymore - continue - } else if ( - plugin.name.startsWith('vite:') && - // Apply the vite:css plugin to generated CSS for transformations like - // URL path rewriting and image inlining. - plugin.name !== 'vite:css' && - // In build mode, since `renderStart` runs after all transformations, we - // need to also apply vite:css-post. - plugin.name !== 'vite:css-post' && - // The vite:vue plugin handles CSS specific post-processing for Vue - plugin.name !== 'vite:vue' - ) { - continue - } else if (plugin.name === 'ssr-styles') { - // The Nuxt ssr-styles plugin emits styles from server-side rendered - // components, we can't run it in the `renderStart` phase so we're - // skipping it. - continue - } - - let transformHandler = - 'handler' in plugin.transform! ? plugin.transform.handler : plugin.transform! - - try { - // Directly call the plugin's transform function to process the - // generated CSS. In build mode, this updates the chunks later used to - // generate the bundle. In serve mode, the transformed source should be - // applied in transform. - let result = await transformHandler.call(transformPluginContext, css, id) - if (!result) continue - if (typeof result === 'string') { - css = result - } else if (result.code) { - css = result.code - } - } catch (e) { - console.error(`Error running ${plugin.name} on Tailwind CSS output. Skipping.`) - } - } - return css - } - return [ { // Step 1: Scan source files for candidates @@ -198,19 +53,6 @@ export default function tailwindcss(): Plugin[] { minify = config.build.cssMinify !== false isSSR = config.build.ssr !== false && config.build.ssr !== undefined }, - - // Scan all non-CSS files for candidates - transformIndexHtml(html, { path }) { - // SolidStart emits HTML chunks with an undefined path and the html content of `\`. - if (!path) return - - scanFile(path, html, 'html') - }, - transform(src, id, options) { - let extension = getExtension(id) - if (isPotentialCssRootFile(id)) return - scanFile(id, src, extension) - }, }, { @@ -223,26 +65,17 @@ export default function tailwindcss(): Plugin[] { if (!isPotentialCssRootFile(id)) return using I = new Instrumentation() - I.start('[@tailwindcss/vite] Generate CSS (serve)') + DEBUG && I.start('[@tailwindcss/vite] Generate CSS (serve)') let root = roots.get(id) - if (!options?.ssr) { - // Wait until all other files have been processed, so we can extract - // all candidates before generating CSS. This must not be called - // during SSR or it will block the server. - // - // The reason why we can not rely on the invalidation here is that the - // users would otherwise see a flicker in the styles as the CSS might - // be loaded with an invalid set of candidates first. - await Promise.all(servers.map((server) => server.waitForRequestsIdle(id))) - } - let generated = await root.generate(src, (file) => this.addWatchFile(file), I) if (!generated) { roots.delete(id) return src } + + DEBUG && I.end('[@tailwindcss/vite] Generate CSS (serve)') return { code: generated } }, }, @@ -257,49 +90,22 @@ export default function tailwindcss(): Plugin[] { if (!isPotentialCssRootFile(id)) return using I = new Instrumentation() - I.start('[@tailwindcss/vite] Generate CSS (build)') + DEBUG && I.start('[@tailwindcss/vite] Generate CSS (build)') let root = roots.get(id) - // We do a first pass to generate valid CSS for the downstream plugins. - // However, since not all candidates are guaranteed to be extracted by - // this time, we have to re-run a transform for the root later. let generated = await root.generate(src, (file) => this.addWatchFile(file), I) if (!generated) { roots.delete(id) return src } - return { code: generated } - }, + DEBUG && I.end('[@tailwindcss/vite] Generate CSS (build)') - // `renderStart` runs in the bundle generation stage after all transforms. - // We must run before `enforce: post` so the updated chunks are picked up - // by vite:css-post. - async renderStart() { - using I = new Instrumentation() - I.start('[@tailwindcss/vite] (render start)') - - for (let [id, root] of roots.entries()) { - let generated = await regenerateOptimizedCss( - root, - // During the renderStart phase, we can not add watch files since - // those would not be causing a refresh of the right CSS file. This - // should not be an issue since we did already process the CSS file - // before and the dependencies should not be changed (only the - // candidate list might have) - () => {}, - I, - ) - if (!generated) { - roots.delete(id) - continue - } + DEBUG && I.start('[@tailwindcss/vite] Optimize CSS') + generated = optimizeCss(generated, { minify }) + DEBUG && I.end('[@tailwindcss/vite] Optimize CSS') - // These plugins have side effects which, during build, results in CSS - // being written to the output dir. We need to run them here to ensure - // the CSS is written before the bundle is generated. - await transformWithPlugins(this, id, generated) - } + return { code: generated } }, }, ] satisfies Plugin[] @@ -325,7 +131,7 @@ function optimizeCss( input: string, { file = 'input.css', minify = false }: { file?: string; minify?: boolean } = {}, ) { - function optimize(code: Buffer | Uint8Array) { + function optimize(code: Buffer | Uint8Array | any) { return transform({ filename: file, code, @@ -383,39 +189,24 @@ class DefaultMap<K, V> extends Map<K, V> { } class Root { - // Content is only used in serve mode where we need to capture the initial - // contents of the root file so that we can restore it during the - // `renderStart` hook. - public lastContent: string = '' - // The lazily-initialized Tailwind compiler components. These are persisted // throughout rebuilds but will be re-initialized if the rebuild strategy is // set to `full`. private compiler?: Awaited<ReturnType<typeof compile>> - public requiresRebuild: boolean = true - - // This is the compiler-specific scanner instance that is used only to scan - // files for custom @source paths. All other modules we scan for candidates - // will use the shared moduleGraphScanner instance. + // The lazily-initialized Tailwind scanner. private scanner?: Scanner // List of all candidates that were being returned by the root scanner during // the lifetime of the root. private candidates: Set<string> = new Set<string>() - // List of all dependencies captured while generating the root. These are - // retained so we can clear the require cache when we rebuild the root. - private dependencies = new Set<string>() - - // The resolved path given to `source(…)`. When not given this is `null`. - private basePath: string | null = null - - public overwriteCandidates: string[] | null = null + // List of all build dependencies (e.g. imported stylesheets or plugins) and + // their last modification timestamp + private buildDependencies = new Map<string, number>() constructor( private id: string, - private getSharedCandidates: () => Map<string, Set<string>>, private base: string, private customCssResolver: (id: string, base: string) => Promise<string | false | undefined>, @@ -429,38 +220,43 @@ class Root { addWatchFile: (file: string) => void, I: Instrumentation, ): Promise<string | false> { - this.lastContent = content - + let requiresBuildPromise = this.requiresBuild() let inputPath = idToPath(this.id) let inputBase = path.dirname(path.resolve(inputPath)) - if (!this.compiler || !this.scanner || this.requiresRebuild) { - clearRequireCache(Array.from(this.dependencies)) - this.dependencies = new Set([idToPath(inputPath)]) + if (!this.compiler || !this.scanner || (await requiresBuildPromise)) { + clearRequireCache(Array.from(this.buildDependencies.keys())) + this.buildDependencies.clear() + + this.addBuildDependency(idToPath(inputPath)) DEBUG && I.start('Setup compiler') + let addBuildDependenciesPromises: Promise<void>[] = [] this.compiler = await compile(content, { base: inputBase, shouldRewriteUrls: true, onDependency: (path) => { addWatchFile(path) - this.dependencies.add(path) + addBuildDependenciesPromises.push(this.addBuildDependency(path)) }, customCssResolver: this.customCssResolver, customJsResolver: this.customJsResolver, }) + await Promise.all(addBuildDependenciesPromises) DEBUG && I.end('Setup compiler') + DEBUG && I.start('Setup scanner') + let sources = (() => { // Disable auto source detection if (this.compiler.root === 'none') { return [] } - // No root specified, use the module graph + // No root specified, auto-detect based on the `**/*` pattern if (this.compiler.root === null) { - return [] + return [{ base: this.base, pattern: '**/*' }] } // Use the specified root @@ -468,6 +264,7 @@ class Root { })().concat(this.compiler.globs) this.scanner = new Scanner({ sources }) + DEBUG && I.end('Setup scanner') } if ( @@ -479,7 +276,7 @@ class Root { return false } - if (!this.overwriteCandidates || this.compiler.features & Features.Utilities) { + if (this.compiler.features & Features.Utilities) { // This should not be here, but right now the Vite plugin is setup where we // setup a new scanner and compiler every time we request the CSS file // (regardless whether it actually changed or not). @@ -525,59 +322,29 @@ class Root { `The path given to \`source(…)\` must be a directory but got \`source(${basePath})\` instead.`, ) } - - this.basePath = basePath - } else if (root === null) { - this.basePath = null } } } - this.requiresRebuild = true - DEBUG && I.start('Build CSS') - let result = this.compiler.build( - this.overwriteCandidates - ? this.overwriteCandidates - : [...this.sharedCandidates(), ...this.candidates], - ) + let result = this.compiler.build([...this.candidates]) DEBUG && I.end('Build CSS') return result } - private sharedCandidates(): Set<string> { - if (!this.compiler) return new Set() - if (this.compiler.root === 'none') return new Set() - - const HAS_DRIVE_LETTER = /^[A-Z]:/ - - let shouldIncludeCandidatesFrom = (id: string) => { - if (this.basePath === null) return true - - if (id.startsWith(this.basePath)) return true - - // This is a windows absolute path that doesn't match so return false - if (HAS_DRIVE_LETTER.test(id)) return false - - // We've got a path that's not absolute and not on Windows - // TODO: this is probably a virtual module -- not sure if we need to scan it - if (!id.startsWith('/')) return true - - // This is an absolute path on POSIX and it does not match - return false - } - - let shared = new Set<string>() - - for (let [id, candidates] of this.getSharedCandidates()) { - if (!shouldIncludeCandidatesFrom(id)) continue + private async addBuildDependency(path: string) { + let stat = await fs.stat(path) + this.buildDependencies.set(path, stat.mtimeMs) + } - for (let candidate of candidates) { - shared.add(candidate) + private async requiresBuild(): Promise<boolean> { + for (let [path, mtime] of this.buildDependencies) { + let stat = await fs.stat(path) + if (stat.mtimeMs > mtime) { + return true } } - - return shared + return false } }
diff --git a/integrations/vite/astro.test.ts b/integrations/vite/astro.test.ts --- a/integrations/vite/astro.test.ts +++ b/integrations/vite/astro.test.ts @@ -1,4 +1,4 @@ -import { candidate, fetchStyles, html, json, retryAssertion, test, ts } from '../utils' +import { candidate, fetchStyles, html, js, json, retryAssertion, test, ts } from '../utils' test( 'dev mode', @@ -19,11 +19,7 @@ test( import { defineConfig } from 'astro/config' // https://astro.build/config - export default defineConfig({ - vite: { - plugins: [tailwindcss()], - }, - }) + export default defineConfig({ vite: { plugins: [tailwindcss()] } }) `, 'src/pages/index.astro': html` <div class="underline">Hello, world!</div> @@ -70,3 +66,58 @@ test( }) }, ) + +test( + 'build mode', + { + fs: { + 'package.json': json` + { + "type": "module", + "dependencies": { + "astro": "^4.15.2", + "react": "^19", + "react-dom": "^19", + "@astrojs/react": "^4", + "@tailwindcss/vite": "workspace:^", + "tailwindcss": "workspace:^" + } + } + `, + 'astro.config.mjs': ts` + import tailwindcss from '@tailwindcss/vite' + import react from '@astrojs/react' + import { defineConfig } from 'astro/config' + + // https://astro.build/config + export default defineConfig({ vite: { plugins: [tailwindcss()] }, integrations: [react()] }) + `, + 'src/pages/index.astro': html` + --- + import ClientOnly from './client-only'; + --- + + <div class="underline">Hello, world!</div> + + <ClientOnly client:only="react" /> + + <style is:global> + @import 'tailwindcss'; + </style> + `, + 'src/pages/client-only.jsx': js` + export default function ClientOnly() { + return <div className="overline">Hello, world!</div> + } + `, + }, + }, + async ({ fs, exec, expect }) => { + await exec('pnpm astro build') + + let files = await fs.glob('dist/**/*.css') + expect(files).toHaveLength(1) + + await fs.expectFileToContain(files[0][0], [candidate`underline`, candidate`overline`]) + }, +) diff --git a/integrations/vite/index.test.ts b/integrations/vite/index.test.ts --- a/integrations/vite/index.test.ts +++ b/integrations/vite/index.test.ts @@ -174,21 +174,10 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => { return Boolean(url) }) - // Candidates are resolved lazily, so the first visit of index.html - // will only have candidates from this file. await retryAssertion(async () => { let styles = await fetchStyles(url, '/index.html') expect(styles).toContain(candidate`underline`) expect(styles).toContain(candidate`flex`) - expect(styles).not.toContain(candidate`font-bold`) - }) - - // Going to about.html will extend the candidate list to include - // candidates from about.html. - await retryAssertion(async () => { - let styles = await fetchStyles(url, '/about.html') - expect(styles).toContain(candidate`underline`) - expect(styles).toContain(candidate`flex`) expect(styles).toContain(candidate`font-bold`) }) @@ -696,7 +685,7 @@ describe.each(['postcss', 'lightningcss'])('%s', (transformer) => { }) test( - `demote Tailwind roots to regular CSS files and back to Tailwind roots while restoring all candidates`, + `demote Tailwind roots to regular CSS files and back to Tailwind roots`, { fs: { 'package.json': json` @@ -750,19 +739,9 @@ test( return Boolean(url) }) - // Candidates are resolved lazily, so the first visit of index.html - // will only have candidates from this file. await retryAssertion(async () => { let styles = await fetchStyles(url, '/index.html') expect(styles).toContain(candidate`underline`) - expect(styles).not.toContain(candidate`font-bold`) - }) - - // Going to about.html will extend the candidate list to include - // candidates from about.html. - await retryAssertion(async () => { - let styles = await fetchStyles(url, '/about.html') - expect(styles).toContain(candidate`underline`) expect(styles).toContain(candidate`font-bold`) }) diff --git a/integrations/vite/react-router.test.ts b/integrations/vite/react-router.test.ts new file mode 100644 --- /dev/null +++ b/integrations/vite/react-router.test.ts @@ -0,0 +1,178 @@ +import { candidate, css, fetchStyles, json, retryAssertion, test, ts, txt } from '../utils' + +const WORKSPACE = { + 'package.json': json` + { + "type": "module", + "dependencies": { + "@react-router/dev": "^7", + "@react-router/node": "^7", + "@react-router/serve": "^7", + "@tailwindcss/vite": "workspace:^", + "@types/node": "^20", + "@types/react-dom": "^19", + "@types/react": "^19", + "isbot": "^5", + "react-dom": "^19", + "react-router": "^7", + "react": "^19", + "tailwindcss": "workspace:^", + "vite": "^5" + } + } + `, + 'react-router.config.ts': ts` + import type { Config } from '@react-router/dev/config' + export default { ssr: true } satisfies Config + `, + 'vite.config.ts': ts` + import { defineConfig } from 'vite' + import { reactRouter } from '@react-router/dev/vite' + import tailwindcss from '@tailwindcss/vite' + + export default defineConfig({ + plugins: [tailwindcss(), reactRouter()], + }) + `, + 'app/routes/home.tsx': ts` + export default function Home() { + return <h1 className="font-bold">Welcome to React Router</h1> + } + `, + 'app/app.css': css`@import 'tailwindcss';`, + 'app/routes.ts': ts` + import { type RouteConfig, index } from '@react-router/dev/routes' + export default [index('routes/home.tsx')] satisfies RouteConfig + `, + 'app/root.tsx': ts` + import { Links, Meta, Outlet, Scripts, ScrollRestoration } from 'react-router' + import './app.css' + export function Layout({ children }: { children: React.ReactNode }) { + return ( + <html lang="en"> + <head> + <meta charSet="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <Meta /> + <Links /> + </head> + <body> + {children} + <ScrollRestoration /> + <Scripts /> + </body> + </html> + ) + } + + export default function App() { + return <Outlet /> + } + `, +} + +test('dev mode', { fs: WORKSPACE }, async ({ fs, spawn, expect }) => { + let process = await spawn('pnpm react-router dev') + + let url = '' + await process.onStdout((m) => { + let match = /Local:\s*(http.*)\//.exec(m) + if (match) url = match[1] + return Boolean(url) + }) + + await retryAssertion(async () => { + let css = await fetchStyles(url) + expect(css).toContain(candidate`font-bold`) + }) + + await retryAssertion(async () => { + await fs.write( + 'app/routes/home.tsx', + ts` + export default function Home() { + return <h1 className="font-bold underline">Welcome to React Router</h1> + } + `, + ) + + let css = await fetchStyles(url) + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`font-bold`) + }) +}) + +test('build mode', { fs: WORKSPACE }, async ({ spawn, exec, expect }) => { + await exec('pnpm react-router build') + let process = await spawn('pnpm react-router-serve ./build/server/index.js') + + let url = '' + await process.onStdout((m) => { + let match = /\[react-router-serve\]\s*(http.*)\ \/?/.exec(m) + if (match) url = match[1] + return url != '' + }) + + await retryAssertion(async () => { + let css = await fetchStyles(url) + expect(css).toContain(candidate`font-bold`) + }) +}) + +test( + 'build mode using ?url stylesheet imports should only build one stylesheet (requires `file-system` scanner)', + { + fs: { + ...WORKSPACE, + 'app/root.tsx': ts` + import { Links, Meta, Outlet, Scripts, ScrollRestoration } from 'react-router' + import styles from './app.css?url' + export const links: Route.LinksFunction = () => [{ rel: 'stylesheet', href: styles }] + export function Layout({ children }: { children: React.ReactNode }) { + return ( + <html lang="en"> + <head> + <meta charSet="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <Meta /> + <Links /> + </head> + <body class="dark"> + {children} + <ScrollRestoration /> + <Scripts /> + </body> + </html> + ) + } + + export default function App() { + return <Outlet /> + } + `, + 'vite.config.ts': ts` + import { defineConfig } from 'vite' + import { reactRouter } from '@react-router/dev/vite' + import tailwindcss from '@tailwindcss/vite' + + export default defineConfig({ + plugins: [tailwindcss(), reactRouter()], + }) + `, + '.gitignore': txt` + node_modules/ + build/ + `, + }, + }, + async ({ fs, exec, expect }) => { + await exec('pnpm react-router build') + + let files = await fs.glob('build/client/assets/**/*.css') + + expect(files).toHaveLength(1) + let [filename] = files[0] + + await fs.expectFileToContain(filename, [candidate`font-bold`]) + }, +) diff --git a/integrations/vite/ssr.test.ts b/integrations/vite/ssr.test.ts --- a/integrations/vite/ssr.test.ts +++ b/integrations/vite/ssr.test.ts @@ -1,5 +1,30 @@ import { candidate, css, html, json, test, ts } from '../utils' +const WORKSPACE = { + 'index.html': html` + <body> + <div id="app"></div> + <script type="module" src="./src/index.ts"></script> + </body> + `, + 'src/index.css': css`@import 'tailwindcss';`, + 'src/index.ts': ts` + import './index.css' + + document.querySelector('#app').innerHTML = \` + <div class="underline m-2">Hello, world!</div> + \` + `, + 'server.ts': ts` + import css from './src/index.css?url' + + document.querySelector('#app').innerHTML = \` + <link rel="stylesheet" href="\${css}"> + <div class="overline m-3">Hello, world!</div> + \` + `, +} + test( 'Vite 5', { @@ -27,31 +52,9 @@ test( ssrEmitAssets: true, }, plugins: [tailwindcss()], - ssr: { resolve: { conditions: [] } }, }) `, - 'index.html': html` - <body> - <div id="app"></div> - <script type="module" src="./src/index.ts"></script> - </body> - `, - 'src/index.css': css`@import 'tailwindcss';`, - 'src/index.ts': ts` - import './index.css' - - document.querySelector('#app').innerHTML = \` - <div class="underline m-2">Hello, world!</div> - \` - `, - 'server.ts': ts` - import css from './src/index.css?url' - - document.querySelector('#app').innerHTML = \` - <link rel="stylesheet" href="\${css}"> - <div class="underline m-2">Hello, world!</div> - \` - `, + ...WORKSPACE, }, }, async ({ fs, exec, expect }) => { @@ -62,9 +65,10 @@ test( let [filename] = files[0] await fs.expectFileToContain(filename, [ - // candidate`underline`, candidate`m-2`, + candidate`overline`, + candidate`m-3`, ]) }, ) @@ -95,31 +99,9 @@ test( ssrEmitAssets: true, }, plugins: [tailwindcss()], - ssr: { resolve: { conditions: [] } }, }) `, - 'index.html': html` - <body> - <div id="app"></div> - <script type="module" src="./src/index.ts"></script> - </body> - `, - 'src/index.css': css`@import 'tailwindcss';`, - 'src/index.ts': ts` - import './index.css' - - document.querySelector('#app').innerHTML = \` - <div class="underline m-2">Hello, world!</div> - \` - `, - 'server.ts': ts` - import css from './src/index.css?url' - - document.querySelector('#app').innerHTML = \` - <link rel="stylesheet" href="\${css}"> - <div class="underline m-2">Hello, world!</div> - \` - `, + ...WORKSPACE, }, }, async ({ fs, exec, expect }) => { @@ -130,9 +112,10 @@ test( let [filename] = files[0] await fs.expectFileToContain(filename, [ - // candidate`underline`, candidate`m-2`, + candidate`overline`, + candidate`m-3`, ]) }, )
Vue static vdom stringifier breaks PostCSS in Nuxt Production build <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v4.0.4 **What build tool (or framework if it abstracts the build tool) are you using?** [email protected] **What version of Node.js are you using?** v20.11.0 **What browser are you using?** N/A **What operating system are you using?** Ubuntu 20.04.6 LTS (in Windows Subsystem for Linux) **Reproduction URL** https://github.com/wongjn/tailwind-nuxt **Describe your issue** See my original debugging journey at https://github.com/tailwindlabs/tailwindcss/discussions/15818#discussioncomment-12098822 Perhaps related to https://github.com/tailwindlabs/tailwindcss/issues/16133 in terms of HTML entity encoding causing the issue. When you have a template with enough elements with props on them, i.e: ```html <script setup lang="ts"> const includedFeatures = ["Foo", "Bar", "Baz"]; </script> <template> <main class="" lang="de"> <div class=""> <div class=""> <div class=""> <div class=""> <img class="" src="" alt="" /> </div> </div> </div> </div> </main> </template> ``` It [passes a threshold in Vue's compiler to compile the template as a "static" VNode](https://github.com/vuejs/core/blob/119f18c773b8d437fada3e0b8b847a282182c8dd/packages/compiler-dom/src/transforms/stringifyStatic.ts#L93-L106): ```js import { defineComponent as _defineComponent } from 'vue' import { createElementVNode as _createElementVNode, createStaticVNode as _createStaticVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue" const _hoisted_1 = { class: "", lang: "de" } export default /*@__PURE__*/_defineComponent({ __name: 'index', setup(__props) { const includedFeatures = ["Foo", "Bar", "Baz"]; return (_ctx: any,_cache: any) => { return (_openBlock(), _createElementBlock("main", _hoisted_1, _cache[0] || (_cache[0] = [ _createStaticVNode("<div class=\\"\\"><div class=\\"\\"><div class=\\"\\"><div class=\\"\\"><img class=\\"\\" src=\\"\\" alt=\\"\\"></div></div></div></div>", 1) ]))) } } }) ``` However, if we have a valid Tailwind class in there: ```diff <div class=""> - <div class=""> + <div class="after:content-['']"> <img class="" src="" alt="" /> ``` Then Vue compiles it to (snipped for brevity): ```js return (_ctx: any,_cache: any) => { return (_openBlock(), _createElementBlock("main", _hoisted_1, _cache[0] || (_cache[0] = [ _createStaticVNode("<div class=\\"\\"><div class=\\"\\"><div class=\\"after:content-[&#39;&#39;]\\"><div class=\\"\\"><img class=\\"\\" src=\\"\\" alt=\\"\\"></div></div></div></div>", 1) ]))) } } ``` Notice the `after:content-[&#39;&#39;]`. Since this is a module in Vite's module graph, this gets scanned for class candidates by Tailwind. It sees `after:content-[&#39;&#39;]` as a valid class and generates a rule for it: ```css .after\:content-\[\&\#39\;\&\#39\;\] { &::after { content: var(--tw-content); --tw-content: &#39;&#39;; content: var(--tw-content); } } ``` And then when the default PostCSS pipeline in Nuxt runs on this, it errors out: ``` ERROR Nuxt Build Error: [vite:css] [postcss] /path/to/project/assets/css/main.css:128:24: Unknown word nuxi 11:01:10 PM file: /path/to/project/assets/css/main.css:128:23 file: assets/css/main.css:128:23 at Input.error (node_modules/postcss/lib/input.js:109:16) at Parser.unknownWord (node_modules/postcss/lib/parser.js:593:22) at Parser.other (node_modules/postcss/lib/parser.js:435:12) at Parser.parse (node_modules/postcss/lib/parser.js:470:16) at parse (node_modules/postcss/lib/parse.js:11:12) at new LazyResult (node_modules/postcss/lib/lazy-result.js:133:16) at Processor.process (node_modules/postcss/lib/processor.js:53:14) at compileCSS (node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:48784:59) at async Object.transform (node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:48039:11) at async transform (node_modules/rollup/dist/es/shared/node-entry.js:19787:16) ```
2025-02-18T13:38:06Z
4
tailwindlabs/tailwindcss
16,078
tailwindlabs__tailwindcss-16078
[ "16039" ]
88c890615a529cc8f7f253d75e25bd19bcf7e306
diff --git a/packages/@tailwindcss-node/src/urls.ts b/packages/@tailwindcss-node/src/urls.ts --- a/packages/@tailwindcss-node/src/urls.ts +++ b/packages/@tailwindcss-node/src/urls.ts @@ -149,9 +149,12 @@ async function doUrlReplace( return `${funcName}(${wrap}${newUrl}${wrap})` } -function skipUrlReplacer(rawUrl: string) { +function skipUrlReplacer(rawUrl: string, aliases?: string[]) { return ( - isExternalUrl(rawUrl) || isDataUrl(rawUrl) || rawUrl[0] === '#' || functionCallRE.test(rawUrl) + isExternalUrl(rawUrl) || + isDataUrl(rawUrl) || + !rawUrl[0].match(/[\.a-zA-Z0-9_]/) || + functionCallRE.test(rawUrl) ) }
diff --git a/packages/@tailwindcss-node/src/urls.test.ts b/packages/@tailwindcss-node/src/urls.test.ts --- a/packages/@tailwindcss-node/src/urls.test.ts +++ b/packages/@tailwindcss-node/src/urls.test.ts @@ -24,6 +24,20 @@ test('URLs can be rewritten', async () => { background: url('/image.jpg'); background: url("/image.jpg"); + /* Potentially Vite-aliased URLs: ignored */ + background: url(~/image.jpg); + background: url(~/foo/image.jpg); + background: url('~/image.jpg'); + background: url("~/image.jpg"); + background: url(#/image.jpg); + background: url(#/foo/image.jpg); + background: url('#/image.jpg'); + background: url("#/image.jpg"); + background: url(@/image.jpg); + background: url(@/foo/image.jpg); + background: url('@/image.jpg'); + background: url("@/image.jpg"); + /* External URL: ignored */ background: url(http://example.com/image.jpg); background: url('http://example.com/image.jpg'); @@ -109,6 +123,18 @@ test('URLs can be rewritten', async () => { background: url(/foo/image.jpg); background: url('/image.jpg'); background: url("/image.jpg"); + background: url(~/image.jpg); + background: url(~/foo/image.jpg); + background: url('~/image.jpg'); + background: url("~/image.jpg"); + background: url(#/image.jpg); + background: url(#/foo/image.jpg); + background: url('#/image.jpg'); + background: url("#/image.jpg"); + background: url(@/image.jpg); + background: url(@/foo/image.jpg); + background: url('@/image.jpg'); + background: url("@/image.jpg"); background: url(http://example.com/image.jpg); background: url('http://example.com/image.jpg'); background: url("http://example.com/image.jpg");
`@tailwindcss/vite` breaks `url()` using `resolve.alias` <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** 4.0.1 **What build tool (or framework if it abstracts the build tool) are you using?** Vite 6.0.11 with @tailwindcss/vite 4.0.1 For example: postcss-cli 8.3.1, Next.js 10.0.9, webpack 5.28.0 **What version of Node.js are you using?** 22.13.0 **What browser are you using?** Chrome **What operating system are you using?** Windows **Reproduction URL** https://stackblitz.com/edit/vitejs-vite-twabw18q?file=vite.config.ts,src%2Fstyles%2Fstyle.css&terminal=dev 1. Download the project from this button ![Image](https://github.com/user-attachments/assets/56ddae73-e21d-44f1-82b4-741e34c650d0) 2. Run `npm i` 3. Run `npm run dev` 4. Open `http://localhost:5173` 5. The background image is not shown ![Image](https://github.com/user-attachments/assets/ce1797fd-230f-4596-bc00-41315c008b8a) **Describe your issue** In Vite, I can use alias set with `resolve.alias` in `url()`. For example: ```css .logo.vanilla { background-image: url('~/images/javascript.svg'); } ``` This does not work when `@tailwindcss/vite` is used. (It works when `@tailwind/postcss` is used with Vite) If you comment out `plugins: [tailwind()],` from `vite.config.ts` in the reproduction, you can see the background image shown, which is the expected behavior. ![Image](https://github.com/user-attachments/assets/9b2e34bb-8a68-4843-b4c1-a015116804fd)
Same issue for me
2025-01-30T17:03:42Z
4
tailwindlabs/tailwindcss
16,103
tailwindlabs__tailwindcss-16103
[ "16100" ]
d85e9cfcab27f6e42a7e8a791979e072015790a3
diff --git a/packages/tailwindcss/src/compat/plugin-api.ts b/packages/tailwindcss/src/compat/plugin-api.ts --- a/packages/tailwindcss/src/compat/plugin-api.ts +++ b/packages/tailwindcss/src/compat/plugin-api.ts @@ -499,15 +499,18 @@ export function objectToAst(rules: CssInJs | CssInJs[]): AstNode[] { for (let [name, value] of entries) { if (typeof value !== 'object') { - if (!name.startsWith('--') && value === '@slot') { - ast.push(rule(name, [atRule('@slot')])) - } else { + if (!name.startsWith('--')) { + if (value === '@slot') { + ast.push(rule(name, [atRule('@slot')])) + continue + } + // Convert camelCase to kebab-case: // https://github.com/postcss/postcss-js/blob/b3db658b932b42f6ac14ca0b1d50f50c4569805b/parser.js#L30-L35 name = name.replace(/([A-Z])/g, '-$1').toLowerCase() - - ast.push(decl(name, String(value))) } + + ast.push(decl(name, String(value))) } else if (Array.isArray(value)) { for (let item of value) { if (typeof item === 'string') {
diff --git a/packages/tailwindcss/src/compat/plugin-api.test.ts b/packages/tailwindcss/src/compat/plugin-api.test.ts --- a/packages/tailwindcss/src/compat/plugin-api.test.ts +++ b/packages/tailwindcss/src/compat/plugin-api.test.ts @@ -1534,6 +1534,38 @@ describe('addBase', () => { " `) }) + + test('does not modify CSS variables', async () => { + let input = css` + @plugin "my-plugin"; + ` + + let compiler = await compile(input, { + loadModule: async () => ({ + module: plugin(function ({ addBase }) { + addBase({ + ':root': { + '--PascalCase': '1', + '--camelCase': '1', + '--UPPERCASE': '1', + }, + }) + }), + base: '/root', + }), + }) + + expect(compiler.build([])).toMatchInlineSnapshot(` + "@layer base { + :root { + --PascalCase: 1; + --camelCase: 1; + --UPPERCASE: 1; + } + } + " + `) + }) }) describe('addVariant', () => {
CSS variables created by plugins are modified <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v4.0.1 **What operating system are you using?** macOS **Reproduction URL** - Pull tailwindcss project - Add the test below to `packages/tailwindcss/src/plugin.test.ts` ```diff diff --git a/packages/tailwindcss/src/plugin.test.ts b/packages/tailwindcss/src/plugin.test.ts index 9af3a55f..89129df7 100644 --- a/packages/tailwindcss/src/plugin.test.ts +++ b/packages/tailwindcss/src/plugin.test.ts @@ -32,6 +32,36 @@ test('plugin', async () => { `) }) +test('plugin CSS variables', async () => { + let input = css` + @plugin "my-plugin"; + ` + + let compiler = await compile(input, { + loadModule: async () => ({ + module: plugin(function ({ addBase }) { + addBase({ + body: { + '--jun-drawerOpen': '1', + '--jun-ES-drawerWidth': '18rem', + }, + }) + }), + base: '/root', + }), + }) + + expect(compiler.build([])).toMatchInlineSnapshot(` + "@layer base { + body { + --jun-drawerOpen: 1; + --jun-ES-drawerWidth: 18rem; + } + } + " + `) +}) + test('plugin.withOptions', async () => { let input = css` @plugin "my-plugin"; ``` Run the test to see the error: <img width="631" alt="Image" src="https://github.com/user-attachments/assets/b61ffa5a-4630-4b40-bf3d-3759a8a9feb3" /> **Describe your issue** Tailwind CSS should not modify the CSS variables created by plugins.
Seems like it's coming from https://github.com/tailwindlabs/tailwindcss/blob/c09bb5e2562293c14248ad8fbad5bdb5b9b22058/packages/tailwindcss/src/compat/plugin-api.ts#L507. I can create a PR if this issue is labeled as a bug.
2025-01-31T09:20:27Z
4
tailwindlabs/tailwindcss
16,069
tailwindlabs__tailwindcss-16069
[ "16036" ]
deb33a93abbd94fd40fd2471f47df2e075a2107c
diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -8,6 +8,7 @@ import type { Plugin, ResolvedConfig, Rollup, Update, ViteDevServer } from 'vite const DEBUG = env.DEBUG const SPECIAL_QUERY_RE = /[?&](raw|url)\b/ +const INLINE_STYLE_ID_RE = /[?&]index\=\d+\.css$/ const IGNORED_DEPENDENCIES = ['tailwind-merge'] @@ -312,7 +313,7 @@ function isPotentialCssRootFile(id: string) { if (id.includes('/.vite/')) return let extension = getExtension(id) let isCssFile = - (extension === 'css' || id.includes('&lang.css')) && + (extension === 'css' || id.includes('&lang.css') || id.match(INLINE_STYLE_ID_RE)) && // Don't intercept special static asset resources !SPECIAL_QUERY_RE.test(id)
diff --git a/integrations/vite/html-style-blocks.test.ts b/integrations/vite/html-style-blocks.test.ts new file mode 100644 --- /dev/null +++ b/integrations/vite/html-style-blocks.test.ts @@ -0,0 +1,58 @@ +import { html, json, test, ts } from '../utils' + +test( + 'transforms html style blocks', + { + fs: { + 'package.json': json` + { + "type": "module", + "dependencies": { + "tailwindcss": "workspace:^" + }, + "devDependencies": { + "@tailwindcss/vite": "workspace:^", + "vite": "^6" + } + } + `, + 'vite.config.ts': ts` + import { defineConfig } from 'vite' + import tailwindcss from '@tailwindcss/vite' + + export default defineConfig({ + plugins: [tailwindcss()], + }) + `, + 'index.html': html` + <!doctype html> + <html> + <body> + <div class="foo"></div> + <style> + .foo { + @apply underline; + } + </style> + </body> + </html> + `, + }, + }, + async ({ fs, exec, expect }) => { + await exec('pnpm vite build') + + expect(await fs.dumpFiles('dist/*.html')).toMatchInlineSnapshot(` + " + --- dist/index.html --- + <!doctype html> + <html> + <body> + <div class="foo"></div> + <style>.foo{text-decoration-line:underline}</style> + </body> + </html> + " + `) + }, +)
Cannot use HTML style tag with Vite to apply a theme <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v4.0.1 **What build tool (or framework if it abstracts the build tool) are you using?** Latest Vite with autoprefixer **What version of Node.js are you using?** NodeJS v22.10.0 **What browser are you using?** Brave **What operating system are you using?** macOS **Reproduction URL** ```html <!DOCTYPE html> <html> <head> <style> @import "tailwindcss"; @layer components { h1{ @apply text-2xl; } } </style> </head> <body> <h1>Test</h1> </body> </html> ``` Vite config ```js module.exports = { root: "./example", base: "./", appType: "custom", build: { rollupOptions: { input: "./example/test.html", }, outDir: "./example-min/", emptyOutDir: true, copyPublicDir: false, }, plugins: [ tailwindcss(), ], css: { postcss: { plugins: [autoprefixer()], }, }, } ``` **Describe your issue** We have single HTML files which are report templates in a facility for analysis reportings that are styled with tailwindcss. These are later processed by Vite to reduce their size and to process tailwindcss classes. We aren't able to support external CSS or JS here since these templates are generated by another tool which has its own syntax and templates. When processing these HTML with Vite tailwindcss seems to ignore inline CSS even with `text/tailwindcss`. Using the CDN works fine, but our reports need to work offline (companies that size do not allow these machines to have internet access on pruporse ofc). The reason we use the style tag is because that way we can provided a versioned theme to each report template and do not need to touch our template files which consist of many smaller modules that we do not want to touch that often and because each customer can have its own styled theme or custom styles for individuallity.
At best it would be if `<style type="text/tailwindcss">` is allowed in Vite, taken by tailwind and later replaced with `<style>` so other post processors can like minify the contents if not already.
2025-01-30T14:50:37Z
4
tailwindlabs/tailwindcss
15,576
tailwindlabs__tailwindcss-15576
[ "15562" ]
a3aec1790882223426a0705b99307c3e9342eaac
diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -445,7 +445,7 @@ function optimizeCss( deepSelectorCombinator: true, }, include: Features.Nesting, - exclude: Features.LogicalProperties | Features.DirSelector, + exclude: Features.LogicalProperties | Features.DirSelector | Features.LightDark, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), diff --git a/packages/@tailwindcss-postcss/src/index.ts b/packages/@tailwindcss-postcss/src/index.ts --- a/packages/@tailwindcss-postcss/src/index.ts +++ b/packages/@tailwindcss-postcss/src/index.ts @@ -317,7 +317,10 @@ function optimizeCss( deepSelectorCombinator: true, }, include: LightningCssFeatures.Nesting, - exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector, + exclude: + LightningCssFeatures.LogicalProperties | + LightningCssFeatures.DirSelector | + LightningCssFeatures.LightDark, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -375,7 +375,10 @@ function optimizeCss( deepSelectorCombinator: true, }, include: LightningCssFeatures.Nesting, - exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector, + exclude: + LightningCssFeatures.LogicalProperties | + LightningCssFeatures.DirSelector | + LightningCssFeatures.LightDark, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), diff --git a/packages/tailwindcss/src/test-utils/run.ts b/packages/tailwindcss/src/test-utils/run.ts --- a/packages/tailwindcss/src/test-utils/run.ts +++ b/packages/tailwindcss/src/test-utils/run.ts @@ -28,7 +28,7 @@ export function optimizeCss( deepSelectorCombinator: true, }, include: Features.Nesting, - exclude: Features.LogicalProperties | Features.DirSelector, + exclude: Features.LogicalProperties | Features.DirSelector | Features.LightDark, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8),
diff --git a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap --- a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap +++ b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap @@ -400,9 +400,9 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` } hr { + height: 0; color: inherit; border-top-width: 1px; - height: 0; } abbr:where([title]) { @@ -472,7 +472,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` } ol, ul, menu { - list-style: none; + list-style-type: none; } img, svg, video, canvas, audio, iframe, embed, object { @@ -533,8 +533,8 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` } ::-webkit-date-and-time-value { - text-align: inherit; min-height: 1lh; + text-align: inherit; } ::-webkit-datetime-edit { diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -6839,53 +6839,26 @@ test('color-scheme', async () => { ]), ).toMatchInlineSnapshot(` ".scheme-dark { - --lightningcss-light: ; - --lightningcss-dark: initial; - --lightningcss-light: ; - --lightningcss-dark: initial; color-scheme: dark; } .scheme-light { - --lightningcss-light: initial; - --lightningcss-dark: ; - --lightningcss-light: initial; - --lightningcss-dark: ; color-scheme: light; } .scheme-light-dark { - --lightningcss-light: initial; - --lightningcss-dark: ; - --lightningcss-light: initial; - --lightningcss-dark: ; color-scheme: light dark; } - @media (prefers-color-scheme: dark) { - .scheme-light-dark { - --lightningcss-light: ; - --lightningcss-dark: initial; - } - } - .scheme-normal { color-scheme: normal; } .scheme-only-dark { - --lightningcss-light: ; - --lightningcss-dark: initial; - --lightningcss-light: ; - --lightningcss-dark: initial; color-scheme: dark only; } .scheme-only-light { - --lightningcss-light: initial; - --lightningcss-dark: ; - --lightningcss-light: initial; - --lightningcss-dark: ; color-scheme: light only; }" `) @@ -14376,7 +14349,7 @@ test('transition', async () => { } .transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, -webkit-backdrop-filter, -webkit-backdrop-filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter; transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); transition-duration: var(--tw-duration, var(--default-transition-duration)); } @@ -14443,7 +14416,7 @@ test('transition', async () => { } .transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, -webkit-backdrop-filter, -webkit-backdrop-filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter; transition-timing-function: var(--tw-ease, ease); transition-duration: var(--tw-duration, .1s); } diff --git a/packages/tailwindcss/src/variants.test.ts b/packages/tailwindcss/src/variants.test.ts --- a/packages/tailwindcss/src/variants.test.ts +++ b/packages/tailwindcss/src/variants.test.ts @@ -53,7 +53,11 @@ test('first-line', async () => { test('marker', async () => { expect(await run(['marker:flex'])).toMatchInlineSnapshot(` - ".marker\\:flex ::marker, .marker\\:flex::marker { + ".marker\\:flex ::marker { + display: flex; + } + + .marker\\:flex::marker { display: flex; }" `) @@ -1533,25 +1537,25 @@ test('not', async () => { } } - @media not (width < 640px) { + @media (width >= 640px) { .not-max-sm\\:flex { display: flex; } } - @media not (width < 130px) { + @media (width >= 130px) { .not-max-\\[130px\\]\\:flex { display: flex; } } - @media not (width >= 130px) { + @media (width < 130px) { .not-min-\\[130px\\]\\:flex { display: flex; } } - @media not (width >= 640px) { + @media (width < 640px) { .not-min-sm\\:flex, .not-sm\\:flex { display: flex; } @@ -2165,7 +2169,15 @@ test('variant order', async () => { } } - .first-letter\\:flex:first-letter, .first-line\\:flex:first-line, .marker\\:flex ::marker, .marker\\:flex::marker { + .first-letter\\:flex:first-letter, .first-line\\:flex:first-line { + display: flex; + } + + .marker\\:flex ::marker { + display: flex; + } + + .marker\\:flex::marker { display: flex; }
Update lightningcss-win32-x64-msvc 1.26.0 → 1.28.2 (minor) Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ lightningcss-win32-x64-msvc (1.26.0 → 1.28.2) · [Repo](https://github.com/parcel-bundler/lightningcss) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/parcel-bundler/lightningcss/releases/tag/v1.28.2">1.28.2</a></h4> <blockquote><h2 dir="auto">Fixes</h2> <ul dir="auto"> <li>Fix duplicate prefixed properties in <code class="notranslate">transition-property</code> – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/850">#850</a> (thanks <a href="https://bounce.depfu.com/github.com/RobinMalfait">@RobinMalfait</a> and <a href="https://bounce.depfu.com/github.com/LeoniePhiline">@LeoniePhiline</a>!)</li> <li>Fix mapping original name from source maps – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/78f2fc479537ec68a7481e33db571385cc21cdb7"><tt>78f2fc4</tt></a> </li> <li>Bump browser compat data – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/4159bc507baa1ec438f89b20bdf9e8e74c7f48e4"><tt>4159bc5</tt></a> </li> <li>Ensure consistent order of custom properties when <code class="notranslate">all</code> property is set – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/d4eec3593fe3c2244693d9e11af3547d6651ce57"><tt>d4eec35</tt></a> </li> </ul></blockquote> <h4><a href="https://github.com/parcel-bundler/lightningcss/releases/tag/v1.28.0">1.28.0</a></h4> <blockquote><h2 dir="auto">Added</h2> <ul dir="auto"> <li>Add option to avoid hashing <code class="notranslate">@container</code> names in CSS Modules by <a href="https://bounce.depfu.com/github.com/kdy1">@kdy1</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/835">#835</a> </li> <li>Improve error message of <code class="notranslate">input:placeholder</code> by <a href="https://bounce.depfu.com/github.com/kdy1">@kdy1</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/813">#813</a> </li> <li>Add an error for the deprecated <code class="notranslate">@value</code> at-rule of CSS Modules by <a href="https://bounce.depfu.com/github.com/kdy1">@kdy1</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/842">#842</a> </li> </ul> <h2 dir="auto">Fixed</h2> <ul dir="auto"> <li>Don't panic when passing system-color to color-mix by <a href="https://bounce.depfu.com/github.com/inottn">@inottn</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/819">#819</a> </li> <li>Dependency updates by <a href="https://bounce.depfu.com/github.com/kornelski">@kornelski</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/814">#814</a> </li> <li>Fix order of fallback width, height, and other size related properties – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/22a8b6f937d391ca98adb09ae7971f34a46d2b5d"><tt>22a8b6f</tt></a> </li> <li>Fix stack overflow parsing <code class="notranslate">calc</code> expression – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/e3c8e12f989651c51d3ae430d888bee7eb058207"><tt>e3c8e12</tt></a> </li> <li>Fix crash when parsing an invalid <code class="notranslate">calc</code> expression – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/378955ed60e88b00791b08c32d9e6d39bea7a4c6"><tt>378955e</tt></a> </li> <li>Skip <code class="notranslate">clamp</code> function reduction when the comparison between preferred and max value is unknown – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/ddc9ce868d82d893d579643c83a6774fd966f917"><tt>ddc9ce8</tt></a> </li> <li>Update browser compatibility data – <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/commit/f6b033ffed5f528993607b83c5d015389dedd209"><tt>f6b033f</tt></a> </li> <li>docs: Update help command docs by <a href="https://bounce.depfu.com/github.com/DylanPiercey">@DylanPiercey</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/812">#812</a> </li> <li>docs: fix link to visitor type definitions by <a href="https://bounce.depfu.com/github.com/mayank99">@mayank99</a> in <a href="https://bounce.depfu.com/github.com/parcel-bundler/lightningcss/pull/823">#823</a> </li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/lightningcss-win32-x64-msvc/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/parcel-bundler/lightningcss/compare/0bcd896e81a8a2c5d847f626a37e2cffea79e2a0...9b2e8bbe732d7c101272ddab03ac21b88bf55c4a">See the full diff on Github</a>. The new version differs by 32 commits:</p> <ul> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/9b2e8bbe732d7c101272ddab03ac21b88bf55c4a"><code>v1.28.2</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/d4eec3593fe3c2244693d9e11af3547d6651ce57"><code>Ensure consistent order of custom properties with all property</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/4159bc507baa1ec438f89b20bdf9e8e74c7f48e4"><code>Bump browser compat data</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/33265a2d7d5530b662ef834514419ccb6f7e6078"><code>Fix duplicate `-webkit-backdrop-filter` output (#850)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/78f2fc479537ec68a7481e33db571385cc21cdb7"><code>Fix mapping original name from source maps</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/a3390fd4140ca87f5035595d22bc9357cf72177e"><code>Fix cargo versions</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/8a67583105757e4a25378d65d243b87a345b2c2d"><code>v1.28.0</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/f6b033ffed5f528993607b83c5d015389dedd209"><code>Update browser compat data</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/c82e7d7a6e47d43dd72e812548add4015f5eeb0a"><code>Update TS definitions</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/701297679084bfe594ed0992bf9ce98c56c5e7c5"><code>chore: update help command docs (#812)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/c24fe64bc991be5862853aaed210f768fef90bf3"><code>fix(css-modules): Do not transform the container name in CSS Modules (#835)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/41a07a14bd7060d81d3a70d678cf458228088170"><code>feat: Add an error for the deprecated `@value` at-rule of CSS Modules (#842)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/ddc9ce868d82d893d579643c83a6774fd966f917"><code>Only reduce clamp if comparison between center and max is known</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/378955ed60e88b00791b08c32d9e6d39bea7a4c6"><code>Fix crash in invalid calc</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/e3c8e12f989651c51d3ae430d888bee7eb058207"><code>Fix stack overflows in calc</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/22a8b6f937d391ca98adb09ae7971f34a46d2b5d"><code>Flush size properties when we hit an unparsed value</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/6cb5776b56de1b3499aff2f984b2c6c02eef0d7f"><code>Dependency updates (#814)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/9097327d114a8b3c6b19a449fea5695fd338239a"><code>feat: Improve error message of `input:placeholder` (#813)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/41ce3ab22623ce1703e0ff7ef536160773e610c7"><code>fix: should not panic when passing system-color to color-mix (#819)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/84ebbed7c4645da50ce9dee14001779531366cd6"><code>docs: fix link to visitor type definitions (#823)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/eb49015cf887ae720b80a2856ccbdf61bf940ef1"><code>Update TS definitions</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/451aff74821e86f1007a4857c81c3db2979645bf"><code>v1.27.0</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/54390b4596ffd62745e821c5b5cce2f4841fe3a6"><code>Update browser compat data</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/ad2ec9f10309ac27261a996210023b8e8ad3c793"><code>Fix another copyright</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/8f45fe11fcdada63fdf2241a7a09412c4e694ce8"><code>Update copyright year on main page (#790)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/9a20b5843e7604ed4d8b31d38498fb9b8ca81dee"><code>Make CLI example work with windows (update docs.md) (#726)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/ab15b57d2ecd7469365074daa562c0082ad43689"><code>update broken selectors link (#750)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/3e066d478ab05a8996a536d778a0bc2eb6ba8867"><code>Add missing browserslist import in docs.md (#798)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/7f59c0070e75f3eaffb69b586b7eb8be5f186fd1"><code>fix: fix `box-shadow` combination of `oklch` and `currentColor` (#801)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/22ef6649c630325c970b1f1f67eb5e21bca06864"><code>feat: Implement pure mode lints for CSS Modules (#796)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/186435f929a177770d7ba73e3027c7abbfe6c377"><code>feat: Improve error message for pseudo elements followed by selectors (#797)</code></a></li> <li><a href="https://github.com/parcel-bundler/lightningcss/commit/73d4cde3b6a67b94a6d5b806c444345623927e5f"><code>feat: Add content-hash css module name pattern (#802)</code></a></li> </ul> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details>
Sorry, but the merge failed with: > At least 1 approving review is required by reviewers with write access.
2025-01-09T09:47:12Z
4
tailwindlabs/tailwindcss
15,318
tailwindlabs__tailwindcss-15318
[ "15315" ]
94a3cff6874526a75c1221f4b951c9f5b009cd91
diff --git a/packages/tailwindcss/src/compat/flatten-color-palette.ts b/packages/tailwindcss/src/compat/flatten-color-palette.ts --- a/packages/tailwindcss/src/compat/flatten-color-palette.ts +++ b/packages/tailwindcss/src/compat/flatten-color-palette.ts @@ -4,7 +4,7 @@ type Colors = { [key: string | number]: string | Colors } -export function flattenColorPalette(colors: Colors) { +export default function flattenColorPalette(colors: Colors) { let result: Record<string, string> = {} for (let [root, children] of Object.entries(colors ?? {})) { diff --git a/packages/tailwindcss/tsup.config.ts b/packages/tailwindcss/tsup.config.ts --- a/packages/tailwindcss/tsup.config.ts +++ b/packages/tailwindcss/tsup.config.ts @@ -10,6 +10,7 @@ export default defineConfig([ plugin: 'src/plugin.ts', colors: 'src/compat/colors.ts', 'default-theme': 'src/compat/default-theme.ts', + 'flatten-color-palette': 'src/compat/flatten-color-palette.ts', }, }, { @@ -21,6 +22,7 @@ export default defineConfig([ lib: 'src/index.cts', colors: 'src/compat/colors.cts', 'default-theme': 'src/compat/default-theme.cts', + 'flatten-color-palette': 'src/compat/flatten-color-palette.cts', }, }, ])
diff --git a/packages/tailwindcss/src/compat/config.test.ts b/packages/tailwindcss/src/compat/config.test.ts --- a/packages/tailwindcss/src/compat/config.test.ts +++ b/packages/tailwindcss/src/compat/config.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test, vi } from 'vitest' import { compile, type Config } from '..' import { default as plugin } from '../plugin' -import { flattenColorPalette } from './flatten-color-palette' +import flattenColorPalette from './flatten-color-palette' const css = String.raw diff --git a/packages/tailwindcss/src/compat/flatten-color-palette.test.ts b/packages/tailwindcss/src/compat/flatten-color-palette.test.ts --- a/packages/tailwindcss/src/compat/flatten-color-palette.test.ts +++ b/packages/tailwindcss/src/compat/flatten-color-palette.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { flattenColorPalette } from './flatten-color-palette' +import flattenColorPalette from './flatten-color-palette' test('it should handle private __CSS_VALUES__ to resolve to the right value', () => { expect(
Trying to upgrade a plugin to v4 <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v4 **What build tool (or framework if it abstracts the build tool) are you using?** "vite": "^6.0.1" **What version of Node.js are you using?** v20.18.0 **What browser are you using?** N/A **What operating system are you using?** macOS **Reproduction URL** new vite project with tailwind and tailwindcss-motion https://github.com/KevinGrajeda/plugin-v4 **Describe your issue** I'm the developer of https://github.com/romboHQ/tailwindcss-motion and I'm trying to check the compatibility of the plugin with Tailwind v4 and when I run the project it throws me this error: ``` [plugin:@tailwindcss/vite:generate:serve] Package subpath './lib/util/flattenColorPalette' is not defined by "exports" in /Users/yokev/dev/rombo/example/upgrade-to-v4/node_modules/.pnpm/[email protected][email protected] beta.5/node_modules/tailwindcss/package.json ``` I'm using flattenColorPalette to add animations with the theme colors https://github.com/romboHQ/tailwindcss-motion/blob/09ceaeca9654598bca430872f1c967eb066ca4a5/src/baseAnimations.js#L472-L473 Is there a new approach for doing this? What can I do?
2024-12-06T10:40:19Z
4
tailwindlabs/tailwindcss
15,183
tailwindlabs__tailwindcss-15183
[ "15170" ]
124b82bc7999391f2f551b440f1e0241bcd01af6
diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -651,6 +651,11 @@ export function createUtilities(theme: Theme) { */ staticUtility('col-auto', [['grid-column', 'auto']]) functionalUtility('col', { + supportsNegative: true, + handleBareValue: ({ value }) => { + if (!isPositiveInteger(value)) return null + return value + }, themeKeys: ['--grid-column'], handle: (value) => [decl('grid-column', value)], }) @@ -719,6 +724,11 @@ export function createUtilities(theme: Theme) { */ staticUtility('row-auto', [['grid-row', 'auto']]) functionalUtility('row', { + supportsNegative: true, + handleBareValue: ({ value }) => { + if (!isPositiveInteger(value)) return null + return value + }, themeKeys: ['--grid-row'], handle: (value) => [decl('grid-row', value)], })
diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -1086,6 +1086,8 @@ test('order', async () => { test('col', async () => { expect( await run([ + 'col-11', + '-col-12', 'col-auto', 'col-span-4', 'col-span-17', @@ -1094,7 +1096,15 @@ test('col', async () => { 'col-span-[var(--my-variable)]', ]), ).toMatchInlineSnapshot(` - ".col-\\[span_123\\/span_123\\] { + ".-col-12 { + grid-column: calc(12 * -1); + } + + .col-11 { + grid-column: 11; + } + + .col-\\[span_123\\/span_123\\] { grid-column: span 123 / span 123; } @@ -1213,6 +1223,8 @@ test('col-end', async () => { test('row', async () => { expect( await run([ + 'row-11', + '-row-12', 'row-auto', 'row-span-4', 'row-span-17', @@ -1221,7 +1233,15 @@ test('row', async () => { 'row-span-[var(--my-variable)]', ]), ).toMatchInlineSnapshot(` - ".row-\\[span_123\\/span_123\\] { + ".-row-12 { + grid-row: calc(12 * -1); + } + + .row-11 { + grid-row: 11; + } + + .row-\\[span_123\\/span_123\\] { grid-row: span 123 / span 123; }
[v4] arbritary values for row and col classes In v4 utilities some utilities like grid-cols-12 and z-40 do not depend on the theme values and just work. Does that mean that row-42 should also just work? Because it does not work in v4.0.0-beta.2. I still need the square brackets like row-[42].
Hey! I think you're looking for `row-start-42` which will work. `row-[42]` didn't work in v3 and is a new class in v4 for the shorthand `grid-row` property where I think it's most common to pass multiple values like `grid-row: 3 / 6` but it does work with one value too so maybe we can make that work anyways also. I think col-[42] and row-[42] already did work in v3: https://play.tailwindcss.com/eSauO2KMnr It would be nice if col-42 also worked. Maybe even mapping to `grid-column: 42 / span 1` instead of the `grid-column: 42` in v3 (which is maybe a little weird if col-end- was set separately). > I think col-[42] and row-[42] already did work in v3: Wow I swear when I went to test it it didn't but clearly I'm wrong 😅 Will make this work, hilariously I didn't even know you could do this and I'm excited to be able to start writing `col-3` instead of `col-start-3` all the time now. Thanks! Also related to arbitrary values for grid utilities: I use to write `grid-rows-[1fr,auto]` in v3, but that does not work in v4 anymore with the comma as a seperator. Don't know if this is intentional or not. @subhero24 Ah yeah need to use underscores there, we supported commas for 5 seconds when v3 was first released before switching to underscores because sometimes you need real commas in arbitrary values 👍
2024-11-25T22:59:47Z
4
tailwindlabs/tailwindcss
15,003
tailwindlabs__tailwindcss-15003
[ "15000" ]
4de07697bdd7cb99eb4557456a31338c53f45ccc
diff --git a/src/util/removeAlphaVariables.js b/src/util/removeAlphaVariables.js --- a/src/util/removeAlphaVariables.js +++ b/src/util/removeAlphaVariables.js @@ -18,6 +18,8 @@ export function removeAlphaVariables(container, toRemove) { for (let varName of toRemove) { if (decl.value.includes(`/ var(${varName})`)) { decl.value = decl.value.replace(`/ var(${varName})`, '') + } else if (decl.value.includes(`/ var(${varName}, 1)`)) { + decl.value = decl.value.replace(`/ var(${varName}, 1)`, '') } } }) diff --git a/src/util/withAlphaVariable.js b/src/util/withAlphaVariable.js --- a/src/util/withAlphaVariable.js +++ b/src/util/withAlphaVariable.js @@ -21,7 +21,7 @@ export default function withAlphaVariable({ color, property, variable }) { [variable]: '1', ...Object.fromEntries( properties.map((p) => { - return [p, color({ opacityVariable: variable, opacityValue: `var(${variable})` })] + return [p, color({ opacityVariable: variable, opacityValue: `var(${variable}, 1)` })] }) ), } @@ -42,7 +42,7 @@ export default function withAlphaVariable({ color, property, variable }) { [variable]: '1', ...Object.fromEntries( properties.map((p) => { - return [p, formatColor({ ...parsed, alpha: `var(${variable})` })] + return [p, formatColor({ ...parsed, alpha: `var(${variable}, 1)` })] }) ), }
diff --git a/integrations/parcel/tests/integration.test.js b/integrations/parcel/tests/integration.test.js --- a/integrations/parcel/tests/integration.test.js +++ b/integrations/parcel/tests/integration.test.js @@ -74,7 +74,7 @@ describe('static build', () => { expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } `) }) @@ -124,7 +124,7 @@ describe('static build', () => { expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } `) }) @@ -170,7 +170,7 @@ describe('watcher', () => { expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -218,7 +218,7 @@ describe('watcher', () => { expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -361,7 +361,7 @@ describe('watcher', () => { expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css` .btn { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); border-radius: 0.25rem; padding: 0.25rem 0.5rem; } diff --git a/integrations/postcss-cli/tests/integration.test.js b/integrations/postcss-cli/tests/integration.test.js --- a/integrations/postcss-cli/tests/integration.test.js +++ b/integrations/postcss-cli/tests/integration.test.js @@ -64,7 +64,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -113,7 +113,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -252,7 +252,7 @@ describe('watcher', () => { .btn { border-radius: 0.25rem; --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; diff --git a/integrations/rollup-sass/tests/integration.test.js b/integrations/rollup-sass/tests/integration.test.js --- a/integrations/rollup-sass/tests/integration.test.js +++ b/integrations/rollup-sass/tests/integration.test.js @@ -64,7 +64,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -113,7 +113,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -249,7 +249,7 @@ describe('watcher', () => { css` .btn { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); border-radius: 0.25rem; padding: 0.25rem 0.5rem; } @@ -329,7 +329,7 @@ describe('watcher', () => { css` .btn { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); border-radius: 0.25rem; padding: 0.25rem 0.5rem; } diff --git a/integrations/rollup/tests/integration.test.js b/integrations/rollup/tests/integration.test.js --- a/integrations/rollup/tests/integration.test.js +++ b/integrations/rollup/tests/integration.test.js @@ -65,7 +65,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -111,7 +111,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -154,7 +154,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -203,7 +203,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -340,7 +340,7 @@ describe('watcher', () => { .btn { border-radius: 0.25rem; --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; diff --git a/integrations/tailwindcss-cli/tests/cli.test.js b/integrations/tailwindcss-cli/tests/cli.test.js --- a/integrations/tailwindcss-cli/tests/cli.test.js +++ b/integrations/tailwindcss-cli/tests/cli.test.js @@ -262,7 +262,7 @@ describe('Build command', () => { .btn-after { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; @@ -313,7 +313,7 @@ describe('Build command', () => { .btn-after { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; diff --git a/integrations/tailwindcss-cli/tests/integration.test.js b/integrations/tailwindcss-cli/tests/integration.test.js --- a/integrations/tailwindcss-cli/tests/integration.test.js +++ b/integrations/tailwindcss-cli/tests/integration.test.js @@ -75,12 +75,12 @@ describe('static build', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .bg-red-600 { --tw-bg-opacity: 1; - background-color: rgb(220 38 38 / var(--tw-bg-opacity)); + background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1)); } .font-bold { @@ -128,7 +128,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -176,7 +176,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -224,7 +224,7 @@ describe('static build', () => { css` .bg-yellow { --tw-bg-opacity: 1; - background-color: rgb(255 255 0 / var(--tw-bg-opacity)); + background-color: rgb(255 255 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -279,7 +279,7 @@ describe('static build', () => { css` .bg-yellow { --tw-bg-opacity: 1; - background-color: rgb(255 255 0 / var(--tw-bg-opacity)); + background-color: rgb(255 255 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -313,7 +313,7 @@ describe('static build', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } ` ) @@ -356,7 +356,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -405,7 +405,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -594,7 +594,7 @@ describe('watcher', () => { .btn { border-radius: 0.25rem; --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; @@ -670,7 +670,7 @@ describe('watcher', () => { css` .bg-yellow { --tw-bg-opacity: 1; - background-color: rgb(255 255 0 / var(--tw-bg-opacity)); + background-color: rgb(255 255 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -690,7 +690,7 @@ describe('watcher', () => { css` .bg-yellow { --tw-bg-opacity: 1; - background-color: rgb(255 255 119 / var(--tw-bg-opacity)); + background-color: rgb(255 255 119 / var(--tw-bg-opacity, 1)); } ` ) @@ -722,7 +722,7 @@ describe('watcher', () => { css` .bg-yellow { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } ` ) diff --git a/integrations/vite/tests/integration.test.js b/integrations/vite/tests/integration.test.js --- a/integrations/vite/tests/integration.test.js +++ b/integrations/vite/tests/integration.test.js @@ -78,7 +78,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -122,7 +122,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -173,7 +173,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -226,7 +226,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -379,7 +379,7 @@ describe('watcher', () => { .btn { border-radius: 0.25rem; --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; diff --git a/integrations/webpack-4/tests/integration.test.js b/integrations/webpack-4/tests/integration.test.js --- a/integrations/webpack-4/tests/integration.test.js +++ b/integrations/webpack-4/tests/integration.test.js @@ -61,7 +61,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -105,7 +105,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -151,7 +151,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -203,7 +203,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -345,7 +345,7 @@ describe('watcher', () => { .btn { border-radius: 0.25rem; --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; diff --git a/integrations/webpack-5/tests/integration.test.js b/integrations/webpack-5/tests/integration.test.js --- a/integrations/webpack-5/tests/integration.test.js +++ b/integrations/webpack-5/tests/integration.test.js @@ -61,7 +61,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -105,7 +105,7 @@ describe('static build', () => { css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ` ) @@ -151,7 +151,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -203,7 +203,7 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -345,7 +345,7 @@ describe('watcher', () => { .btn { border-radius: 0.25rem; --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.25rem; @@ -390,12 +390,12 @@ describe('watcher', () => { css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .bg-red-600 { --tw-bg-opacity: 1; - background-color: rgb(220 38 38 / var(--tw-bg-opacity)); + background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1)); } .font-bold { diff --git a/tests/apply.test.js b/tests/apply.test.js --- a/tests/apply.test.js +++ b/tests/apply.test.js @@ -161,7 +161,7 @@ test('@apply', () => { expect(result.css).toMatchFormattedCss(css` .basic-example { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); border-radius: 0.375rem; padding: 0.5rem 1rem; } @@ -243,7 +243,7 @@ test('@apply', () => { .multiple, .selectors { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); border-radius: 0.375rem; padding: 0.5rem 1rem; } @@ -307,16 +307,16 @@ test('@apply', () => { } .btn-blue { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); border-radius: 0.25rem; padding: 0.5rem 1rem; font-weight: 700; } .btn-blue:hover { --tw-bg-opacity: 1; - background-color: rgb(29 78 216 / var(--tw-bg-opacity)); + background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1)); } .recursive-apply-a { font-weight: 900; @@ -651,22 +651,22 @@ test('@apply classes from outside a @layer', async () => { } .bar { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); font-weight: 700; } .bar:hover { --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(34 197 94 / var(--tw-text-opacity, 1)); } .baz { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); font-weight: 700; text-decoration-line: underline; } .baz:hover { --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(34 197 94 / var(--tw-text-opacity, 1)); } .keep-me-even-though-I-am-not-used-in-content { color: green; @@ -891,7 +891,7 @@ it('should not throw when the selector is different (but contains the base parti .bg-gray-500, .focus\:bg-gray-500 { --tw-bg-opacity: 1; - background-color: rgb(107 114 128 / var(--tw-bg-opacity)); + background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1)); } `) }) @@ -1444,13 +1444,13 @@ describe('multiple instances', () => { .a { color: red; --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(34 197 94 / var(--tw-text-opacity, 1)); color: #00f; text-decoration: underline; } .b { --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(34 197 94 / var(--tw-text-opacity, 1)); text-decoration: underline; } `) @@ -1567,7 +1567,7 @@ it('should work outside of layer', async () => { expect(result.css).toMatchFormattedCss(css` .input-text { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); background-color: red; } `) @@ -1577,7 +1577,7 @@ it('should work outside of layer', async () => { expect(result.css).toMatchFormattedCss(css` .input-text { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); background-color: red; } `) @@ -1605,7 +1605,7 @@ it('should work in layer', async () => { expect(result.css).toMatchFormattedCss(css` .input-text { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); background-color: red; } `) @@ -1644,14 +1644,14 @@ it('apply partitioning works with media queries', async () => { html, body { --tw-text-opacity: 1; - color: rgb(22 163 74 / var(--tw-text-opacity)); + color: rgb(22 163 74 / var(--tw-text-opacity, 1)); font-size: 1rem; } @media print { html, body { --tw-text-opacity: 1; - color: rgb(220 38 38 / var(--tw-text-opacity)); + color: rgb(220 38 38 / var(--tw-text-opacity, 1)); font-size: 2rem; } } @@ -1978,7 +1978,7 @@ it('should maintain the correct selector when applying other utilities', () => { .foo:hover.bar .baz, .foo:hover.bar > .baz { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); color: red; } `) @@ -2233,19 +2233,19 @@ test('applying classes with class-based dark variant to pseudo elements', async expect(result.css).toMatchFormattedCss(css` ::-webkit-scrollbar-track { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } :is(.dark *)::-webkit-scrollbar-track { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } ::-webkit-scrollbar-track:hover { --tw-bg-opacity: 1; - background-color: rgb(37 99 235 / var(--tw-bg-opacity)); + background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); } :is(.dark *)::-webkit-scrollbar-track:hover { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); } `) }) diff --git a/tests/arbitrary-values.test.css b/tests/arbitrary-values.test.css --- a/tests/arbitrary-values.test.css +++ b/tests/arbitrary-values.test.css @@ -134,13 +134,13 @@ min-height: var(--height); } .w-\[\'\)\(\)\'\] { - width: ")()"; + width: ')()'; } .w-\[\'\]\[\]\'\] { - width: "][]"; + width: '][]'; } .w-\[\'\}\{\}\'\] { - width: "}{}"; + width: '}{}'; } .w-\[\(\(\)\)\] { width: (()); @@ -353,7 +353,7 @@ cursor: pointer; } .cursor-\[url\(\'\.\/path_to_hand\.cur\'\)_2_2\2c pointer\] { - cursor: url("./path_to_hand.cur") 2 2, pointer; + cursor: url('./path_to_hand.cur') 2 2, pointer; } .cursor-\[url\(hand\.cur\)_2_2\2c pointer\] { cursor: url(hand.cur) 2 2, pointer; @@ -414,7 +414,7 @@ scroll-padding-top: var(--scroll-padding); } .list-\[\'\\1f44d\'\] { - list-style-type: "\1f44d"; + list-style-type: '\1f44d'; } .list-\[var\(--value\)\] { list-style-type: var(--value); @@ -506,7 +506,7 @@ } .divide-\[black\] > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; - border-color: rgb(0 0 0 / var(--tw-divide-opacity)); + border-color: rgb(0 0 0 / var(--tw-divide-opacity, 1)); } .divide-\[var\(--value\)\] > :not([hidden]) ~ :not([hidden]) { border-color: var(--value); @@ -580,7 +580,7 @@ } .border-\[\#f00\] { --tw-border-opacity: 1; - border-color: rgb(255 0 0 / var(--tw-border-opacity)); + border-color: rgb(255 0 0 / var(--tw-border-opacity, 1)); } .border-\[color\:var\(--value\)\] { border-color: var(--value); @@ -590,28 +590,28 @@ } .border-b-\[\#f00\] { --tw-border-opacity: 1; - border-bottom-color: rgb(255 0 0 / var(--tw-border-opacity)); + border-bottom-color: rgb(255 0 0 / var(--tw-border-opacity, 1)); } .border-b-\[color\:var\(--value\)\] { border-bottom-color: var(--value); } .border-l-\[\#f00\] { --tw-border-opacity: 1; - border-left-color: rgb(255 0 0 / var(--tw-border-opacity)); + border-left-color: rgb(255 0 0 / var(--tw-border-opacity, 1)); } .border-l-\[color\:var\(--value\)\] { border-left-color: var(--value); } .border-r-\[\#f00\] { --tw-border-opacity: 1; - border-right-color: rgb(255 0 0 / var(--tw-border-opacity)); + border-right-color: rgb(255 0 0 / var(--tw-border-opacity, 1)); } .border-r-\[color\:var\(--value\)\] { border-right-color: var(--value); } .border-t-\[\#f00\] { --tw-border-opacity: 1; - border-top-color: rgb(255 0 0 / var(--tw-border-opacity)); + border-top-color: rgb(255 0 0 / var(--tw-border-opacity, 1)); } .border-t-\[color\:var\(--value\)\] { border-top-color: var(--value); @@ -627,25 +627,25 @@ } .bg-\[\#0f0\] { --tw-bg-opacity: 1; - background-color: rgb(0 255 0 / var(--tw-bg-opacity)); + background-color: rgb(0 255 0 / var(--tw-bg-opacity, 1)); } .bg-\[\#0f0_var\(--value\)\] { background-color: #0f0 var(--value); } .bg-\[\#ff0000\] { --tw-bg-opacity: 1; - background-color: rgb(255 0 0 / var(--tw-bg-opacity)); + background-color: rgb(255 0 0 / var(--tw-bg-opacity, 1)); } .bg-\[color\:var\(--value1\)_var\(--value2\)\] { background-color: var(--value1) var(--value2); } .bg-\[hsl\(0\2c 100\%\2c 50\%\)\] { --tw-bg-opacity: 1; - background-color: hsl(0 100% 50% / var(--tw-bg-opacity)); + background-color: hsl(0 100% 50% / var(--tw-bg-opacity, 1)); } .bg-\[hsl\(0rad\2c 100\%\2c 50\%\)\] { --tw-bg-opacity: 1; - background-color: hsl(0rad 100% 50% / var(--tw-bg-opacity)); + background-color: hsl(0rad 100% 50% / var(--tw-bg-opacity, 1)); } .bg-\[hsla\(0\2c 100\%\2c 50\%\2c 0\.3\)\] { background-color: hsla(0, 100%, 50%, 0.3); @@ -655,14 +655,14 @@ } .bg-\[rgb\(123\2c 123\2c 123\)\] { --tw-bg-opacity: 1; - background-color: rgb(123 123 123 / var(--tw-bg-opacity)); + background-color: rgb(123 123 123 / var(--tw-bg-opacity, 1)); } .bg-\[rgb\(123\2c _456\2c _123\)_black\] { background-color: rgb(123, 456, 123) black; } .bg-\[rgb\(123_456_789\)\] { --tw-bg-opacity: 1; - background-color: rgb(123 456 789 / var(--tw-bg-opacity)); + background-color: rgb(123 456 789 / var(--tw-bg-opacity, 1)); } .bg-\[rgba\(123\2c 123\2c 123\2c 0\.5\)\] { background-color: rgba(123, 123, 123, 0.5); @@ -704,7 +704,7 @@ background-image: repeating-conic-gradient(#f8f9fa 0% 25%, white 0% 50%); } .bg-\[url\(\'\/path-to-image\.png\'\)\] { - background-image: url("/path-to-image.png"); + background-image: url('/path-to-image.png'); } .bg-\[url\:var\(--url\)\] { background-image: var(--url); @@ -819,16 +819,16 @@ vertical-align: 10em; } .font-\[\'Gill_Sans\'\] { - font-family: "Gill Sans"; + font-family: 'Gill Sans'; } .font-\[\'Some_Font\'\2c \'Some_Other_Font\'\] { - font-family: "Some Font", "Some Other Font"; + font-family: 'Some Font', 'Some Other Font'; } .font-\[\'Some_Font\'\2c sans-serif\] { - font-family: "Some Font", sans-serif; + font-family: 'Some Font', sans-serif; } .font-\[\'Some_Font\'\2c var\(--other-font\)\] { - font-family: "Some Font", var(--other-font); + font-family: 'Some Font', var(--other-font); } .font-\[Georgia\2c serif\] { font-family: Georgia, serif; @@ -874,22 +874,22 @@ } .text-\[black\] { --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); } .text-\[color\:var\(--color\)\] { color: var(--color); } .text-\[rgb\(123\2c 123\2c 123\)\] { --tw-text-opacity: 1; - color: rgb(123 123 123 / var(--tw-text-opacity)); + color: rgb(123 123 123 / var(--tw-text-opacity, 1)); } .text-\[rgb\(123\2c _123\2c _123\)\] { --tw-text-opacity: 1; - color: rgb(123 123 123 / var(--tw-text-opacity)); + color: rgb(123 123 123 / var(--tw-text-opacity, 1)); } .text-\[rgb\(123_123_123\)\] { --tw-text-opacity: 1; - color: rgb(123 123 123 / var(--tw-text-opacity)); + color: rgb(123 123 123 / var(--tw-text-opacity, 1)); } .text-opacity-\[0\.8\] { --tw-text-opacity: 0.8; @@ -985,7 +985,7 @@ } .ring-\[\#76ad65\] { --tw-ring-opacity: 1; - --tw-ring-color: rgb(118 173 101 / var(--tw-ring-opacity)); + --tw-ring-color: rgb(118 173 101 / var(--tw-ring-opacity, 1)); } .ring-\[color\:var\(--value\)\] { --tw-ring-color: var(--value); @@ -1055,81 +1055,90 @@ } .backdrop-blur-\[11px\] { --tw-backdrop-blur: blur(11px); - -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); + -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-brightness-\[1\.23\] { --tw-backdrop-brightness: brightness(1.23); - -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); + -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-contrast-\[0\.87\] { --tw-backdrop-contrast: contrast(0.87); - -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); + -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-\[0\.42\] { --tw-backdrop-grayscale: grayscale(0.42); - -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); + -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-hue-rotate-\[1\.57rad\] { --tw-backdrop-hue-rotate: hue-rotate(1.57rad); - -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); + -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-\[0\.66\] { --tw-backdrop-invert: invert(0.66); - -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); + -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-opacity-\[22\%\] { --tw-backdrop-opacity: opacity(22%); - -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); + -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-saturate-\[144\%\] { --tw-backdrop-saturate: saturate(144%); - -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); + -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-\[0\.38\] { --tw-backdrop-sepia: sepia(0.38); - -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); + -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); @@ -1155,11 +1164,11 @@ will-change: var(--will-change); } .content-\[\'\>\'\] { - --tw-content: ">"; + --tw-content: '>'; content: var(--tw-content); } .content-\[\'hello\'\] { - --tw-content: "hello"; + --tw-content: 'hello'; content: var(--tw-content); } .content-\[attr\(content-before\)\] { diff --git a/tests/arbitrary-values.test.js b/tests/arbitrary-values.test.js --- a/tests/arbitrary-values.test.js +++ b/tests/arbitrary-values.test.js @@ -80,7 +80,7 @@ it('should support arbitrary values for various background utilities', () => { expect(result.css).toMatchFormattedCss(css` .bg-\[\#ff0000\] { --tw-bg-opacity: 1; - background-color: rgb(255 0 0 / var(--tw-bg-opacity)); + background-color: rgb(255 0 0 / var(--tw-bg-opacity, 1)); } .bg-\[color\:var\(--bg-color\)\] { background-color: var(--bg-color); @@ -93,7 +93,7 @@ it('should support arbitrary values for various background utilities', () => { } .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .bg-\[url\(\'\/image-1-0\.png\'\)\] { background-image: url('/image-1-0.png'); diff --git a/tests/arbitrary-variants.test.js b/tests/arbitrary-variants.test.js --- a/tests/arbitrary-variants.test.js +++ b/tests/arbitrary-variants.test.js @@ -567,7 +567,7 @@ test('classes in arbitrary variants should not be prefixed', () => { .hover\:\[\&_\.foo\]\:tw-text-red-400 .foo:hover, .foo .\[\.foo_\&\]\:tw-text-red-400 { --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); + color: rgb(248 113 113 / var(--tw-text-opacity, 1)); } `) }) @@ -601,19 +601,19 @@ test('classes in the same arbitrary variant should not be prefixed', () => { expect(result.css).toMatchFormattedCss(css` .\[\&_\.foo\]\:tw-bg-white .foo { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } .\[\&_\.foo\]\:tw-text-red-400 .foo { --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); + color: rgb(248 113 113 / var(--tw-text-opacity, 1)); } .foo .\[\.foo_\&\]\:tw-bg-white { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } .foo .\[\.foo_\&\]\:tw-text-red-400 { --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); + color: rgb(248 113 113 / var(--tw-text-opacity, 1)); } `) }) diff --git a/tests/basic-usage.test.css b/tests/basic-usage.test.css --- a/tests/basic-usage.test.css +++ b/tests/basic-usage.test.css @@ -570,7 +570,7 @@ } .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; - border-color: rgb(229 231 235 / var(--tw-divide-opacity)); + border-color: rgb(229 231 235 / var(--tw-divide-opacity, 1)); } .divide-opacity-50 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 0.5; @@ -644,40 +644,40 @@ } .border-black { --tw-border-opacity: 1; - border-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-x-black { --tw-border-opacity: 1; - border-left-color: rgb(0 0 0 / var(--tw-border-opacity)); - border-right-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-left-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); + border-right-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-y-black { --tw-border-opacity: 1; - border-top-color: rgb(0 0 0 / var(--tw-border-opacity)); - border-bottom-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-top-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); + border-bottom-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-b-black { --tw-border-opacity: 1; - border-bottom-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-bottom-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-l-black { --tw-border-opacity: 1; - border-left-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-left-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-r-black { --tw-border-opacity: 1; - border-right-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-right-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-t-black { --tw-border-opacity: 1; - border-top-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-top-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-opacity-10 { --tw-border-opacity: 0.1; } .bg-green-500 { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); } .bg-opacity-20 { --tw-bg-opacity: 0.2; @@ -831,7 +831,7 @@ } .text-indigo-500 { --tw-text-opacity: 1; - color: rgb(99 102 241 / var(--tw-text-opacity)); + color: rgb(99 102 241 / var(--tw-text-opacity, 1)); } .text-opacity-10 { --tw-text-opacity: 0.1; @@ -863,7 +863,7 @@ } .placeholder-green-300::placeholder { --tw-placeholder-opacity: 1; - color: rgb(134 239 172 / var(--tw-placeholder-opacity)); + color: rgb(134 239 172 / var(--tw-placeholder-opacity, 1)); } .placeholder-opacity-60::placeholder { --tw-placeholder-opacity: 0.6; @@ -958,7 +958,7 @@ } .ring-white { --tw-ring-opacity: 1; - --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity, 1)); } .ring-opacity-40 { --tw-ring-opacity: 0.4; diff --git a/tests/basic-usage.test.js b/tests/basic-usage.test.js --- a/tests/basic-usage.test.js +++ b/tests/basic-usage.test.js @@ -243,7 +243,7 @@ test('all plugins are executed that match a candidate', () => { expect(result.css).toMatchFormattedCss(css` .bg-green-light { --tw-bg-opacity: 1; - background-color: rgb(0 128 0 / var(--tw-bg-opacity)); + background-color: rgb(0 128 0 / var(--tw-bg-opacity, 1)); } `) }) @@ -291,11 +291,11 @@ test('per-plugin colors with the same key can differ when using a custom colors expect(result.css).toMatchFormattedCss(css` .bg-theme { --tw-bg-opacity: 1; - background-color: rgb(255 0 0 / var(--tw-bg-opacity)); + background-color: rgb(255 0 0 / var(--tw-bg-opacity, 1)); } .text-theme { --tw-text-opacity: 1; - color: rgb(0 128 0 / var(--tw-text-opacity)); + color: rgb(0 128 0 / var(--tw-text-opacity, 1)); } `) }) @@ -858,7 +858,7 @@ it('Ring color utilities are generated when using respectDefaultRingColorOpacity } .ring-blue-500 { --tw-ring-opacity: 1; - --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity)); + --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); } `) }) diff --git a/tests/blocklist.test.js b/tests/blocklist.test.js --- a/tests/blocklist.test.js +++ b/tests/blocklist.test.js @@ -76,7 +76,7 @@ it('blocklists do NOT support regexes', async () => { expect(result.css).toMatchFormattedCss(css` .bg-\[\#f00d1e\] { --tw-bg-opacity: 1; - background-color: rgb(240 13 30 / var(--tw-bg-opacity)); + background-color: rgb(240 13 30 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; @@ -97,7 +97,7 @@ it('can block classes generated by the safelist', () => { expect(result.css).toMatchFormattedCss(css` .bg-red-400 { --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity)); + background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1)); } .font-bold { font-weight: 700; diff --git a/tests/collapse-adjacent-rules.test.js b/tests/collapse-adjacent-rules.test.js --- a/tests/collapse-adjacent-rules.test.js +++ b/tests/collapse-adjacent-rules.test.js @@ -102,14 +102,14 @@ test('collapse adjacent rules', () => { @supports (foo: bar) { .some-apply-thing { --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); font-weight: 700; } } @media (min-width: 768px) { .some-apply-thing { --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); font-weight: 700; } } @@ -117,7 +117,7 @@ test('collapse adjacent rules', () => { @media (min-width: 768px) { .some-apply-thing { --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); font-weight: 700; } } diff --git a/tests/color-opacity-modifiers.test.js b/tests/color-opacity-modifiers.test.js --- a/tests/color-opacity-modifiers.test.js +++ b/tests/color-opacity-modifiers.test.js @@ -30,7 +30,7 @@ test('colors with slashes are matched first', async () => { expect(result.css).toMatchFormattedCss(css` .bg-red-500\/50 { --tw-bg-opacity: 1; - background-color: rgb(255 0 0 / var(--tw-bg-opacity)); + background-color: rgb(255 0 0 / var(--tw-bg-opacity, 1)); } `) }) @@ -207,21 +207,21 @@ test('opacity modifier in combination with partial custom properties', async () expect(result.css).toMatchFormattedCss(css` .bg-\[hsl\(123\,50\%\,var\(--foo\)\)\] { --tw-bg-opacity: 1; - background-color: hsl(123 50% var(--foo) / var(--tw-bg-opacity)); + background-color: hsl(123 50% var(--foo) / var(--tw-bg-opacity, 1)); } .bg-\[hsl\(123\,50\%\,var\(--foo\)\)\]\/50 { background-color: hsl(123 50% var(--foo) / 0.5); } .bg-\[hsl\(123\,var\(--foo\)\,50\%\)\] { --tw-bg-opacity: 1; - background-color: hsl(123 var(--foo) 50% / var(--tw-bg-opacity)); + background-color: hsl(123 var(--foo) 50% / var(--tw-bg-opacity, 1)); } .bg-\[hsl\(123\,var\(--foo\)\,50\%\)\]\/50 { background-color: hsl(123 var(--foo) 50% / 0.5); } .bg-\[hsl\(var\(--foo\)\,50\%\,50\%\)\] { --tw-bg-opacity: 1; - background-color: hsl(var(--foo) 50% 50% / var(--tw-bg-opacity)); + background-color: hsl(var(--foo) 50% 50% / var(--tw-bg-opacity, 1)); } .bg-\[hsl\(var\(--foo\)\,50\%\,50\%\)\]\/50 { background-color: hsl(var(--foo) 50% 50% / 0.5); diff --git a/tests/context-reuse.test.js b/tests/context-reuse.test.js --- a/tests/context-reuse.test.js +++ b/tests/context-reuse.test.js @@ -52,14 +52,14 @@ test('re-uses the context across multiple files with the same config', async () expect(results[1].css).toMatchFormattedCss(css` body { --tw-bg-opacity: 1; - background-color: rgb(96 165 250 / var(--tw-bg-opacity)); + background-color: rgb(96 165 250 / var(--tw-bg-opacity, 1)); } `) expect(results[2].css).toMatchFormattedCss(css` body { --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); + color: rgb(248 113 113 / var(--tw-text-opacity, 1)); } `) diff --git a/tests/custom-extractors.test.js b/tests/custom-extractors.test.js --- a/tests/custom-extractors.test.js +++ b/tests/custom-extractors.test.js @@ -13,11 +13,11 @@ let sharedHtml = html` let expected = css` .bg-white { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } .text-indigo-500 { --tw-text-opacity: 1; - color: rgb(99 102 241 / var(--tw-text-opacity)); + color: rgb(99 102 241 / var(--tw-text-opacity, 1)); } ` diff --git a/tests/dark-mode.test.js b/tests/dark-mode.test.js --- a/tests/dark-mode.test.js +++ b/tests/dark-mode.test.js @@ -179,16 +179,16 @@ it('should use legacy sorting when using `darkMode: class`', () => { expect(result.css).toMatchFormattedCss(css` .hover\:text-green-200:hover { --tw-text-opacity: 1; - color: rgb(187 247 208 / var(--tw-text-opacity)); + color: rgb(187 247 208 / var(--tw-text-opacity, 1)); } .dark\:text-green-100:is(.dark *) { --tw-text-opacity: 1; - color: rgb(220 252 231 / var(--tw-text-opacity)); + color: rgb(220 252 231 / var(--tw-text-opacity, 1)); } @media (min-width: 1024px) { .lg\:text-green-300 { --tw-text-opacity: 1; - color: rgb(134 239 172 / var(--tw-text-opacity)); + color: rgb(134 239 172 / var(--tw-text-opacity, 1)); } } `) @@ -214,17 +214,17 @@ it('should use modern sorting otherwise', () => { expect(result.css).toMatchFormattedCss(css` .hover\:text-green-200:hover { --tw-text-opacity: 1; - color: rgb(187 247 208 / var(--tw-text-opacity)); + color: rgb(187 247 208 / var(--tw-text-opacity, 1)); } @media (min-width: 1024px) { .lg\:text-green-300 { --tw-text-opacity: 1; - color: rgb(134 239 172 / var(--tw-text-opacity)); + color: rgb(134 239 172 / var(--tw-text-opacity, 1)); } } .dark\:text-green-100:where(.dark, .dark *) { --tw-text-opacity: 1; - color: rgb(220 252 231 / var(--tw-text-opacity)); + color: rgb(220 252 231 / var(--tw-text-opacity, 1)); } `) }) diff --git a/tests/import-syntax.test.js b/tests/import-syntax.test.js --- a/tests/import-syntax.test.js +++ b/tests/import-syntax.test.js @@ -70,7 +70,7 @@ test('using @import instead of @tailwind', () => { } .bg-black { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } @media (min-width: 768px) { .md\:hover\:text-center:hover { diff --git a/tests/important-selector.test.js b/tests/important-selector.test.js --- a/tests/important-selector.test.js +++ b/tests/important-selector.test.js @@ -196,7 +196,7 @@ test('pseudo-elements are appended after the `:is()`', () => { #app .dark\:before\:bg-black:where(.dark, .dark *)::before { content: var(--tw-content); --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } `) }) diff --git a/tests/kitchen-sink.test.js b/tests/kitchen-sink.test.js --- a/tests/kitchen-sink.test.js +++ b/tests/kitchen-sink.test.js @@ -253,7 +253,7 @@ test('it works', () => { } .apply-test { --tw-bg-opacity: 1; - background-color: rgb(236 72 153 / var(--tw-bg-opacity)); + background-color: rgb(236 72 153 / var(--tw-bg-opacity, 1)); margin-top: 1.5rem; } .apply-test:hover, @@ -263,11 +263,11 @@ test('it works', () => { @media (min-width: 640px) { .apply-test { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); } .apply-test:nth-child(2n):focus { --tw-bg-opacity: 1; - background-color: rgb(251 207 232 / var(--tw-bg-opacity)); + background-color: rgb(251 207 232 / var(--tw-bg-opacity, 1)); } } .apply-components { @@ -315,7 +315,7 @@ test('it works', () => { @media (min-width: 640px) { .apply-with-existing:hover { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); } } .multiple, @@ -343,7 +343,7 @@ test('it works', () => { } .group:hover .apply-dark-group-example-a:where(.dark, .dark *) { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); } @media (min-width: 640px) { @media (prefers-reduced-motion: no-preference) { @@ -499,23 +499,23 @@ test('it works', () => { } .border-black { --tw-border-opacity: 1; - border-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-e-red-400 { --tw-border-opacity: 1; - border-inline-end-color: rgb(248 113 113 / var(--tw-border-opacity)); + border-inline-end-color: rgb(248 113 113 / var(--tw-border-opacity, 1)); } .border-s-green-500 { --tw-border-opacity: 1; - border-inline-start-color: rgb(34 197 94 / var(--tw-border-opacity)); + border-inline-start-color: rgb(34 197 94 / var(--tw-border-opacity, 1)); } .bg-black { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } .bg-green-500 { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); } .bg-opacity-50 { --tw-bg-opacity: 0.5; @@ -701,7 +701,7 @@ test('it works', () => { } .focus\:ring-blue-500:focus { --tw-ring-opacity: 1; - --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity)); + --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); } .focus\:hover\:font-light:hover:focus { font-weight: 300; diff --git a/tests/match-variants.test.js b/tests/match-variants.test.js --- a/tests/match-variants.test.js +++ b/tests/match-variants.test.js @@ -29,7 +29,7 @@ test('partial arbitrary variants', () => { } .potato-yellow .potato-\[yellow\]\:bg-yellow-200 { --tw-bg-opacity: 1; - background-color: rgb(254 240 138 / var(--tw-bg-opacity)); + background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1)); } `) }) @@ -64,7 +64,7 @@ test('partial arbitrary variants with at-rules', () => { @media (potato: yellow) { .potato-\[yellow\]\:bg-yellow-200 { --tw-bg-opacity: 1; - background-color: rgb(254 240 138 / var(--tw-bg-opacity)); + background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1)); } } `) @@ -100,7 +100,7 @@ test('partial arbitrary variants with at-rules and placeholder', () => { @media (potato: yellow) { .potato-\[yellow\]\:bg-yellow-200:potato { --tw-bg-opacity: 1; - background-color: rgb(254 240 138 / var(--tw-bg-opacity)); + background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1)); } } `) diff --git a/tests/opacity.test.js b/tests/opacity.test.js --- a/tests/opacity.test.js +++ b/tests/opacity.test.js @@ -119,42 +119,42 @@ it('can use <alpha-value> defining custom properties for colors (opacity plugins expect(result.css).toMatchFormattedCss(css` .divide-primary > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; - border-color: rgb(var(--color-primary) / var(--tw-divide-opacity)); + border-color: rgb(var(--color-primary) / var(--tw-divide-opacity, 1)); } .divide-opacity-50 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 0.5; } .border-primary { --tw-border-opacity: 1; - border-color: rgb(var(--color-primary) / var(--tw-border-opacity)); + border-color: rgb(var(--color-primary) / var(--tw-border-opacity, 1)); } .border-opacity-50 { --tw-border-opacity: 0.5; } .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(var(--color-primary) / var(--tw-bg-opacity)); + background-color: rgb(var(--color-primary) / var(--tw-bg-opacity, 1)); } .bg-opacity-50 { --tw-bg-opacity: 0.5; } .text-primary { --tw-text-opacity: 1; - color: rgb(var(--color-primary) / var(--tw-text-opacity)); + color: rgb(var(--color-primary) / var(--tw-text-opacity, 1)); } .text-opacity-50 { --tw-text-opacity: 0.5; } .placeholder-primary::placeholder { --tw-placeholder-opacity: 1; - color: rgb(var(--color-primary) / var(--tw-placeholder-opacity)); + color: rgb(var(--color-primary) / var(--tw-placeholder-opacity, 1)); } .placeholder-opacity-50::placeholder { --tw-placeholder-opacity: 0.5; } .ring-primary { --tw-ring-opacity: 1; - --tw-ring-color: rgb(var(--color-primary) / var(--tw-ring-opacity)); + --tw-ring-color: rgb(var(--color-primary) / var(--tw-ring-opacity, 1)); } .ring-opacity-50 { --tw-ring-opacity: 0.5; @@ -271,42 +271,42 @@ it('can use hsl helper when defining custom properties for colors (opacity plugi expect(result.css).toMatchFormattedCss(css` .divide-primary > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; - border-color: hsl(var(--color-primary) / var(--tw-divide-opacity)); + border-color: hsl(var(--color-primary) / var(--tw-divide-opacity, 1)); } .divide-opacity-50 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 0.5; } .border-primary { --tw-border-opacity: 1; - border-color: hsl(var(--color-primary) / var(--tw-border-opacity)); + border-color: hsl(var(--color-primary) / var(--tw-border-opacity, 1)); } .border-opacity-50 { --tw-border-opacity: 0.5; } .bg-primary { --tw-bg-opacity: 1; - background-color: hsl(var(--color-primary) / var(--tw-bg-opacity)); + background-color: hsl(var(--color-primary) / var(--tw-bg-opacity, 1)); } .bg-opacity-50 { --tw-bg-opacity: 0.5; } .text-primary { --tw-text-opacity: 1; - color: hsl(var(--color-primary) / var(--tw-text-opacity)); + color: hsl(var(--color-primary) / var(--tw-text-opacity, 1)); } .text-opacity-50 { --tw-text-opacity: 0.5; } .placeholder-primary::placeholder { --tw-placeholder-opacity: 1; - color: hsl(var(--color-primary) / var(--tw-placeholder-opacity)); + color: hsl(var(--color-primary) / var(--tw-placeholder-opacity, 1)); } .placeholder-opacity-50::placeholder { --tw-placeholder-opacity: 0.5; } .ring-primary { --tw-ring-opacity: 1; - --tw-ring-color: hsl(var(--color-primary) / var(--tw-ring-opacity)); + --tw-ring-color: hsl(var(--color-primary) / var(--tw-ring-opacity, 1)); } .ring-opacity-50 { --tw-ring-opacity: 0.5; @@ -643,7 +643,7 @@ it('should be possible to use an <alpha-value> as part of the color definition', expect(result.css).toMatchFormattedCss(css` .bg-primary { --tw-bg-opacity: 1; - background-color: rgb(var(--color-primary) / var(--tw-bg-opacity)); + background-color: rgb(var(--color-primary) / var(--tw-bg-opacity, 1)); } `) }) @@ -769,7 +769,7 @@ it('Theme functions can reference values with slashes in brackets', () => { expect(result.css).toMatchFormattedCss(css` .bg-foo1 { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } .bg-foo2 { background-color: #00000080; @@ -823,7 +823,7 @@ it('works with opacity values defined as a placeholder or a function in when col } .bg-foo20 { --tw-bg-opacity: 1; - background-color: rgb(255 100 0 / var(--tw-bg-opacity)); + background-color: rgb(255 100 0 / var(--tw-bg-opacity, 1)); } .bg-foo21 { background-color: #ff640080; @@ -836,7 +836,7 @@ it('works with opacity values defined as a placeholder or a function in when col } .bg-foo40 { --tw-bg-opacity: 1; - background-color: rgb(255 100 0 / var(--tw-bg-opacity)); + background-color: rgb(255 100 0 / var(--tw-bg-opacity, 1)); } .bg-foo41 { background-color: #ff640080; @@ -967,7 +967,7 @@ it('You can re-enable any opacity plugin even when disableColorOpacityUtilitiesB expect(result.css).toMatchFormattedCss(css` .divide-blue-300 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; - border-color: rgb(147 197 253 / var(--tw-divide-opacity)); + border-color: rgb(147 197 253 / var(--tw-divide-opacity, 1)); } .divide-blue-300\/50 > :not([hidden]) ~ :not([hidden]) { border-color: #93c5fd80; @@ -980,7 +980,7 @@ it('You can re-enable any opacity plugin even when disableColorOpacityUtilitiesB } .border-blue-300 { --tw-border-opacity: 1; - border-color: rgb(147 197 253 / var(--tw-border-opacity)); + border-color: rgb(147 197 253 / var(--tw-border-opacity, 1)); } .border-blue-300\/50 { border-color: #93c5fd80; @@ -993,7 +993,7 @@ it('You can re-enable any opacity plugin even when disableColorOpacityUtilitiesB } .bg-blue-300 { --tw-bg-opacity: 1; - background-color: rgb(147 197 253 / var(--tw-bg-opacity)); + background-color: rgb(147 197 253 / var(--tw-bg-opacity, 1)); } .bg-blue-300\/50 { background-color: #93c5fd80; @@ -1006,7 +1006,7 @@ it('You can re-enable any opacity plugin even when disableColorOpacityUtilitiesB } .text-blue-300 { --tw-text-opacity: 1; - color: rgb(147 197 253 / var(--tw-text-opacity)); + color: rgb(147 197 253 / var(--tw-text-opacity, 1)); } .text-blue-300\/50 { color: #93c5fd80; @@ -1019,7 +1019,7 @@ it('You can re-enable any opacity plugin even when disableColorOpacityUtilitiesB } .placeholder-blue-300::placeholder { --tw-placeholder-opacity: 1; - color: rgb(147 197 253 / var(--tw-placeholder-opacity)); + color: rgb(147 197 253 / var(--tw-placeholder-opacity, 1)); } .placeholder-blue-300\/50::placeholder { color: #93c5fd80; @@ -1032,7 +1032,7 @@ it('You can re-enable any opacity plugin even when disableColorOpacityUtilitiesB } .ring-blue-300 { --tw-ring-opacity: 1; - --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity)); + --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1)); } .ring-blue-300\/50 { --tw-ring-color: #93c5fd80; diff --git a/tests/plugins/gradientColorStops.test.js b/tests/plugins/gradientColorStops.test.js --- a/tests/plugins/gradientColorStops.test.js +++ b/tests/plugins/gradientColorStops.test.js @@ -60,11 +60,11 @@ test('opacity variables are given to colors defined as closures', () => { } .text-primary { --tw-text-opacity: 1; - color: rgba(31, 31, 31, var(--tw-text-opacity)); + color: rgba(31, 31, 31, var(--tw-text-opacity, 1)); } .text-secondary { --tw-text-opacity: 1; - color: hsl(10 50% 50% / var(--tw-text-opacity)); + color: hsl(10 50% 50% / var(--tw-text-opacity, 1)); } .text-opacity-50 { --tw-text-opacity: 0.5; diff --git a/tests/prefers-contrast.test.js b/tests/prefers-contrast.test.js --- a/tests/prefers-contrast.test.js +++ b/tests/prefers-contrast.test.js @@ -21,18 +21,18 @@ it('should be possible to use contrast-more and contrast-less variants', () => { ${defaults} .bg-white { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } @media (prefers-contrast: more) { .contrast-more\:bg-pink-500 { --tw-bg-opacity: 1; - background-color: rgb(236 72 153 / var(--tw-bg-opacity)); + background-color: rgb(236 72 153 / var(--tw-bg-opacity, 1)); } } @media (prefers-contrast: less) { .contrast-less\:bg-black { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } } `) @@ -57,13 +57,13 @@ it('dark mode should appear after the contrast variants', () => { @media (prefers-contrast: more) { .contrast-more\:bg-black { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } } @media (prefers-color-scheme: dark) { .dark\:bg-white { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } } `) diff --git a/tests/prefix.test.js b/tests/prefix.test.js --- a/tests/prefix.test.js +++ b/tests/prefix.test.js @@ -174,7 +174,7 @@ test('prefix', () => { } .dark\:tw-bg-\[rgb\(255\,0\,0\)\]:where(.tw-dark, .tw-dark *) { --tw-bg-opacity: 1; - background-color: rgb(255 0 0 / var(--tw-bg-opacity)); + background-color: rgb(255 0 0 / var(--tw-bg-opacity, 1)); } .dark\:focus\:tw-text-left:focus:where(.tw-dark, .tw-dark *) { text-align: left; @@ -530,7 +530,7 @@ test('supports non-word prefixes (1)', async () => { expect(result.css).toMatchFormattedCss(css` .\@bg-black { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } .\@underline { text-decoration-line: underline; @@ -540,7 +540,7 @@ test('supports non-word prefixes (1)', async () => { } .foo { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); background-color: red; } .hover\:before\:\@content-\[\'Hovering\'\]:hover:before { @@ -592,7 +592,7 @@ test('supports non-word prefixes (2)', async () => { expect(result.css).toMatchFormattedCss(css` .\@\]\$bg-black { --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } .\@\]\$underline { text-decoration-line: underline; @@ -602,7 +602,7 @@ test('supports non-word prefixes (2)', async () => { } .foo { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); background-color: red; } `) diff --git a/tests/raw-content.test.css b/tests/raw-content.test.css --- a/tests/raw-content.test.css +++ b/tests/raw-content.test.css @@ -368,7 +368,7 @@ } .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; - border-color: rgb(229 231 235 / var(--tw-divide-opacity)); + border-color: rgb(229 231 235 / var(--tw-divide-opacity, 1)); } .divide-opacity-50 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 0.5; @@ -419,14 +419,14 @@ } .border-black { --tw-border-opacity: 1; - border-color: rgb(0 0 0 / var(--tw-border-opacity)); + border-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); } .border-opacity-10 { --tw-border-opacity: 0.1; } .bg-green-500 { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); } .bg-opacity-20 { --tw-bg-opacity: 0.2; @@ -525,7 +525,7 @@ } .font-sans { font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, - Segoe UI Symbol, Noto Color Emoji; + Segoe UI Symbol, Noto Color Emoji; } .text-2xl { font-size: 1.5rem; @@ -566,7 +566,7 @@ } .text-indigo-500 { --tw-text-opacity: 1; - color: rgb(99 102 241 / var(--tw-text-opacity)); + color: rgb(99 102 241 / var(--tw-text-opacity, 1)); } .text-opacity-10 { --tw-text-opacity: 0.1; @@ -580,7 +580,7 @@ } .placeholder-green-300::placeholder { --tw-placeholder-opacity: 1; - color: rgb(134 239 172 / var(--tw-placeholder-opacity)); + color: rgb(134 239 172 / var(--tw-placeholder-opacity, 1)); } .placeholder-opacity-60::placeholder { --tw-placeholder-opacity: 0.6; @@ -635,7 +635,7 @@ } .ring-white { --tw-ring-opacity: 1; - --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity, 1)); } .ring-opacity-40 { --tw-ring-opacity: 0.4; diff --git a/tests/resolve-defaults-at-rules.test.js b/tests/resolve-defaults-at-rules.test.js --- a/tests/resolve-defaults-at-rules.test.js +++ b/tests/resolve-defaults-at-rules.test.js @@ -504,7 +504,7 @@ test('with borders', async () => { } .border-red-500 { --tw-border-opacity: 1; - border-color: rgb(239 68 68 / var(--tw-border-opacity)); + border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)); } @media (min-width: 768px) { .md\:border-2 { diff --git a/tests/safelist.test.js b/tests/safelist.test.js --- a/tests/safelist.test.js +++ b/tests/safelist.test.js @@ -33,7 +33,7 @@ it('should safelist strings', () => { } .text-gray-200 { --tw-text-opacity: 1; - color: rgb(229 231 235 / var(--tw-text-opacity)); + color: rgb(229 231 235 / var(--tw-text-opacity, 1)); } .hover\:underline:hover { text-decoration-line: underline; @@ -57,22 +57,22 @@ it('should safelist based on a pattern regex', () => { expect(result.css).toMatchFormattedCss(css` .bg-red-100 { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .uppercase { text-transform: uppercase; } .hover\:bg-red-100:hover { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .hover\:bg-red-200:hover { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } `) }) @@ -102,22 +102,22 @@ it('should not generate duplicates', () => { expect(result.css).toMatchFormattedCss(css` .bg-red-100 { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .uppercase { text-transform: uppercase; } .hover\:bg-red-100:hover { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .hover\:bg-red-200:hover { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } `) }) @@ -138,11 +138,11 @@ it('should safelist when using a custom prefix', () => { expect(result.css).toMatchFormattedCss(css` .tw-bg-red-100 { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .tw-bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .tw-uppercase { text-transform: uppercase; @@ -196,11 +196,11 @@ it('should not safelist any invalid variants if provided', () => { expect(result.css).toMatchFormattedCss(css` .bg-red-100 { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .uppercase { text-transform: uppercase; @@ -254,7 +254,7 @@ it('should safelist negatives based on a pattern regex', () => { expect(result.css).toMatchFormattedCss(css` .bg-red-400 { --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity)); + background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1)); } .bg-red-400\/40 { background-color: #f8717166; @@ -264,7 +264,7 @@ it('should safelist negatives based on a pattern regex', () => { } .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .bg-red-500\/40 { background-color: #ef444466; @@ -286,7 +286,7 @@ it('should safelist negatives based on a pattern regex', () => { } .hover\:bg-red-400:hover { --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity)); + background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1)); } .hover\:bg-red-400\/40:hover { background-color: #f8717166; @@ -296,7 +296,7 @@ it('should safelist negatives based on a pattern regex', () => { } .hover\:bg-red-500:hover { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .hover\:bg-red-500\/40:hover { background-color: #ef444466; @@ -381,38 +381,38 @@ it('should safelist pattern regex having !important selector with variants', () expect(result.css).toMatchFormattedCss(css` .\!bg-gray-500 { --tw-bg-opacity: 1 !important; - background-color: rgb(107 114 128 / var(--tw-bg-opacity)) !important; + background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1)) !important; } .\!bg-gray-600 { --tw-bg-opacity: 1 !important; - background-color: rgb(75 85 99 / var(--tw-bg-opacity)) !important; + background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)) !important; } .\!bg-gray-700 { --tw-bg-opacity: 1 !important; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)) !important; + background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1)) !important; } .\!bg-gray-800 { --tw-bg-opacity: 1 !important; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)) !important; + background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1)) !important; } .uppercase { text-transform: uppercase; } .hover\:\!bg-gray-500:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(107 114 128 / var(--tw-bg-opacity)) !important; + background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1)) !important; } .hover\:\!bg-gray-600:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(75 85 99 / var(--tw-bg-opacity)) !important; + background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)) !important; } .hover\:\!bg-gray-700:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)) !important; + background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1)) !important; } .hover\:\!bg-gray-800:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)) !important; + background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1)) !important; } `) }) @@ -437,54 +437,54 @@ it('should safelist multiple patterns with !important selector', () => { expect(result.css).toMatchFormattedCss(css` .\!bg-gray-200 { --tw-bg-opacity: 1 !important; - background-color: rgb(229 231 235 / var(--tw-bg-opacity)) !important; + background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)) !important; } .\!bg-gray-300 { --tw-bg-opacity: 1 !important; - background-color: rgb(209 213 219 / var(--tw-bg-opacity)) !important; + background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)) !important; } .\!bg-gray-400 { --tw-bg-opacity: 1 !important; - background-color: rgb(156 163 175 / var(--tw-bg-opacity)) !important; + background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1)) !important; } .uppercase { text-transform: uppercase; } .\!text-gray-700 { --tw-text-opacity: 1 !important; - color: rgb(55 65 81 / var(--tw-text-opacity)) !important; + color: rgb(55 65 81 / var(--tw-text-opacity, 1)) !important; } .\!text-gray-800 { --tw-text-opacity: 1 !important; - color: rgb(31 41 55 / var(--tw-text-opacity)) !important; + color: rgb(31 41 55 / var(--tw-text-opacity, 1)) !important; } .\!text-gray-900 { --tw-text-opacity: 1 !important; - color: rgb(17 24 39 / var(--tw-text-opacity)) !important; + color: rgb(17 24 39 / var(--tw-text-opacity, 1)) !important; } .hover\:\!bg-gray-200:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(229 231 235 / var(--tw-bg-opacity)) !important; + background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)) !important; } .hover\:\!bg-gray-300:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(209 213 219 / var(--tw-bg-opacity)) !important; + background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)) !important; } .hover\:\!bg-gray-400:hover { --tw-bg-opacity: 1 !important; - background-color: rgb(156 163 175 / var(--tw-bg-opacity)) !important; + background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1)) !important; } .hover\:\!text-gray-700:hover { --tw-text-opacity: 1 !important; - color: rgb(55 65 81 / var(--tw-text-opacity)) !important; + color: rgb(55 65 81 / var(--tw-text-opacity, 1)) !important; } .hover\:\!text-gray-800:hover { --tw-text-opacity: 1 !important; - color: rgb(31 41 55 / var(--tw-text-opacity)) !important; + color: rgb(31 41 55 / var(--tw-text-opacity, 1)) !important; } .hover\:\!text-gray-900:hover { --tw-text-opacity: 1 !important; - color: rgb(17 24 39 / var(--tw-text-opacity)) !important; + color: rgb(17 24 39 / var(--tw-text-opacity, 1)) !important; } `) }) diff --git a/tests/source-maps.test.js b/tests/source-maps.test.js --- a/tests/source-maps.test.js +++ b/tests/source-maps.test.js @@ -46,14 +46,14 @@ test('apply generates source maps', async () => { '4:6-33 -> 4:6-18', '4:6-33 -> 5:6-17', '4:6-33 -> 6:6-24', - '4:6-33 -> 7:6-61', + '4:6-33 -> 7:6-64', '5:4 -> 8:4', '7:4 -> 10:4', '8:6-39 -> 11:6-39', '9:6-31 -> 12:6-18', '9:6-31 -> 13:6-17', '9:6-31 -> 14:6-24', - '9:6-31 -> 15:6-61', + '9:6-31 -> 15:6-64', '10:4 -> 16:4', '13:6 -> 18:4', '13:6-29 -> 19:6-18', diff --git a/tests/syntax-lit-html.test.js b/tests/syntax-lit-html.test.js --- a/tests/syntax-lit-html.test.js +++ b/tests/syntax-lit-html.test.js @@ -19,7 +19,7 @@ test('it detects classes in lit-html templates', () => { } .bg-blue-400 { --tw-bg-opacity: 1; - background-color: rgb(96 165 250 / var(--tw-bg-opacity)); + background-color: rgb(96 165 250 / var(--tw-bg-opacity, 1)); } .px-4 { padding-left: 1rem; @@ -34,11 +34,11 @@ test('it detects classes in lit-html templates', () => { } .text-white { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); } .hover\:bg-blue-600:hover { --tw-bg-opacity: 1; - background-color: rgb(37 99 235 / var(--tw-bg-opacity)); + background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); } `) }) diff --git a/tests/syntax-svelte.test.js b/tests/syntax-svelte.test.js --- a/tests/syntax-svelte.test.js +++ b/tests/syntax-svelte.test.js @@ -18,12 +18,12 @@ test('it detects svelte based on the file extension', () => { expect(result.css).toMatchCss(css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } @media (min-width: 1024px) { .lg\:hover\:bg-blue-500:hover { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); } } `) @@ -64,12 +64,12 @@ test('using raw with svelte extension', () => { expect(result.css).toMatchCss(css` .bg-red-500 { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } @media (min-width: 1024px) { .lg\:hover\:bg-blue-500:hover { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); } } `) diff --git a/tests/variants.test.css b/tests/variants.test.css --- a/tests/variants.test.css +++ b/tests/variants.test.css @@ -60,11 +60,11 @@ } .first-letter\:text-red-500:first-letter { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); } .first-line\:bg-yellow-300:first-line { --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); } .first-line\:underline:first-line { text-decoration-line: underline; @@ -85,34 +85,34 @@ } .selection\:bg-blue-500 ::selection { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); } .selection\:text-white ::selection { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); } .selection\:bg-blue-500::selection { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); } .selection\:text-white::selection { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); } .file\:bg-blue-500::file-selector-button { --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); } .file\:text-white::file-selector-button { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); } .placeholder\:font-bold::placeholder { font-weight: 700; } .placeholder\:text-red-500::placeholder { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); } .backdrop\:shadow-md::backdrop { --tw-shadow: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a; @@ -127,7 +127,7 @@ .before\:bg-red-500:before { content: var(--tw-content); --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .after\:flex:after { content: var(--tw-content); @@ -154,7 +154,7 @@ } .open\:bg-red-200[open] { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .default\:shadow-md:default, .checked\:shadow-md:checked, @@ -207,11 +207,11 @@ } .file\:hover\:bg-blue-600:hover::file-selector-button { --tw-bg-opacity: 1; - background-color: rgb(37 99 235 / var(--tw-bg-opacity)); + background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); } .open\:hover\:bg-red-200:hover[open] { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .focus\:shadow-md:focus, .focus\:hover\:shadow-md:hover:focus, @@ -236,7 +236,7 @@ } .group[open] .group-open\:bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .group:default .group-default\:shadow-md, .group:checked .group-checked\:shadow-md, @@ -287,7 +287,7 @@ } .group[open]:focus .group-open\:group-focus\:bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .group:focus:hover .group-focus\:group-hover\:shadow-md, .group:focus-visible .group-focus-visible\:shadow-md, @@ -313,7 +313,7 @@ } .peer[open] ~ .peer-open\:bg-red-200 { --tw-bg-opacity: 1; - background-color: rgb(254 202 202 / var(--tw-bg-opacity)); + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); } .peer:default ~ .peer-default\:shadow-md, .peer:checked ~ .peer-checked\:shadow-md, @@ -380,13 +380,13 @@ @media (prefers-contrast: more) { .contrast-more\:bg-yellow-300 { --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); } } @media (prefers-contrast: less) { .contrast-less\:bg-yellow-300 { --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); } } @media (width >= 640px) { @@ -447,17 +447,17 @@ @media (orientation: portrait) { .portrait\:bg-yellow-300 { --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); } } @media (orientation: landscape) { .landscape\:bg-yellow-300 { --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); } } -.ltr\:shadow-md:where([dir="ltr"], [dir="ltr"] *), -.rtl\:shadow-md:where([dir="rtl"], [dir="rtl"] *), +.ltr\:shadow-md:where([dir='ltr'], [dir='ltr'] *), +.rtl\:shadow-md:where([dir='rtl'], [dir='rtl'] *), .dark\:shadow-md:where(.dark, .dark *), .group:disabled:focus:hover .dark\:group-disabled\:group-focus\:group-hover\:shadow-md:where(.dark, .dark *), @@ -505,8 +505,6 @@ @media print { .print\:bg-yellow-300 { --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); } } - - diff --git a/tests/variants.test.js b/tests/variants.test.js --- a/tests/variants.test.js +++ b/tests/variants.test.js @@ -299,7 +299,7 @@ test('stacked peer variants', async () => { expect(result.css).toIncludeCss(css` .peer:disabled:focus:hover ~ .peer-disabled\:peer-focus\:peer-hover\:border-blue-500 { --tw-border-opacity: 1; - border-color: rgb(59 130 246 / var(--tw-border-opacity)); + border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); } `) }) @@ -1050,7 +1050,7 @@ test('variants with slashes in them work', () => { @media (min-aspect-ratio: 1 / 10) { .ar-1\/10\:text-red-500 { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); } } `) @@ -1087,7 +1087,7 @@ test('variants with slashes support modifiers', () => { @media (min-aspect-ratio: 1 / 10) and (foo: 20) { .ar-1\/10\/20\:text-red-500 { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); } } `) diff --git a/tests/withAlphaVariable.test.js b/tests/withAlphaVariable.test.js --- a/tests/withAlphaVariable.test.js +++ b/tests/withAlphaVariable.test.js @@ -5,7 +5,7 @@ test('it adds the right custom property', () => { withAlphaVariable({ color: '#ff0000', property: 'color', variable: '--tw-text-opacity' }) ).toEqual({ '--tw-text-opacity': '1', - color: 'rgb(255 0 0 / var(--tw-text-opacity))', + color: 'rgb(255 0 0 / var(--tw-text-opacity, 1))', }) expect( withAlphaVariable({ @@ -15,7 +15,7 @@ test('it adds the right custom property', () => { }) ).toEqual({ '--tw-text-opacity': '1', - color: 'hsl(240 100% 50% / var(--tw-text-opacity))', + color: 'hsl(240 100% 50% / var(--tw-text-opacity, 1))', }) }) @@ -179,7 +179,7 @@ test('it allows a closure to be passed', () => { }) ).toEqual({ '--tw-bg-opacity': '1', - 'background-color': 'rgba(0, 0, 0, var(--tw-bg-opacity))', + 'background-color': 'rgba(0, 0, 0, var(--tw-bg-opacity, 1))', }) }) @@ -192,7 +192,7 @@ test('it transforms rgb and hsl to space-separated rgb and hsl', () => { }) ).toEqual({ '--tw-bg-opacity': '1', - 'background-color': 'rgb(50 50 50 / var(--tw-bg-opacity))', + 'background-color': 'rgb(50 50 50 / var(--tw-bg-opacity, 1))', }) expect( withAlphaVariable({ @@ -202,7 +202,7 @@ test('it transforms rgb and hsl to space-separated rgb and hsl', () => { }) ).toEqual({ '--tw-bg-opacity': '1', - 'background-color': 'rgb(50 50 50 / var(--tw-bg-opacity))', + 'background-color': 'rgb(50 50 50 / var(--tw-bg-opacity, 1))', }) expect( withAlphaVariable({ @@ -212,7 +212,7 @@ test('it transforms rgb and hsl to space-separated rgb and hsl', () => { }) ).toEqual({ '--tw-bg-opacity': '1', - 'background-color': 'hsl(50 50% 50% / var(--tw-bg-opacity))', + 'background-color': 'hsl(50 50% 50% / var(--tw-bg-opacity, 1))', }) expect( withAlphaVariable({ @@ -222,7 +222,7 @@ test('it transforms rgb and hsl to space-separated rgb and hsl', () => { }) ).toEqual({ '--tw-bg-opacity': '1', - 'background-color': 'hsl(50 50% 50% / var(--tw-bg-opacity))', + 'background-color': 'hsl(50 50% 50% / var(--tw-bg-opacity, 1))', }) }) @@ -235,6 +235,6 @@ test('it transforms named colors to rgb', () => { }) ).toEqual({ '--tw-bg-opacity': '1', - 'background-color': 'rgb(255 0 0 / var(--tw-bg-opacity))', + 'background-color': 'rgb(255 0 0 / var(--tw-bg-opacity, 1))', }) })
Selection is broken in Chrome 131 due to --tw-text-opacity and friends **What version of Tailwind CSS are you using?** Not sure what version sites are using, but I suspect less than a year old. **What build tool (or framework if it abstracts the build tool) are you using?** Don't know **What version of Node.js are you using?** Don't know **What browser are you using?** Chrome and Edge **What operating system are you using?** All **Reproduction URL** See https://issues.chromium.org/issues/378754060 for numerous reproductions. From The Verge: ``` .selection\:bg-franklin-20::selection { --tw-bg-opacity: 1; background-color: rgb(216 255 246/var(--tw-bg-opacity)); } ``` All selection is blank in Chrome 131 and later on The Verge, Bloomberg news, ... **Describe your issue** Chrome 131 and browsers using Chromium enable CSS Highlight Inheritance for ::selection. In this model custom properties for ::selection and other highlight pseudos are taken from the originating element, and not the pseudo itself. All custom properties defined on highlight pseudos are ignored. But Tailwind defines a custom property for opacity on every use of a color, including ::selection colors. There is no practical use for this because the variable is redefined all over the place and any given usage inside ::selection applies only within that ::selection block (with the old behavior). See https://developer.chrome.com/blog/selection-styling and https://blogs.igalia.com/schenney/css-custom-properties-in-highlight-pseudos/ I might try to figure out how to fix this and put up a PR for you.
2024-11-14T17:28:54Z
3.4
tailwindlabs/tailwindcss
14,962
tailwindlabs__tailwindcss-14962
[ "14960" ]
50d7355f7f81939172af1161e0930dc381d599ca
diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -387,6 +387,8 @@ export function createUtilities(theme: Theme) { handleNegativeBareValue: ({ value }) => { let multiplier = theme.resolve(null, ['--spacing']) if (!multiplier) return null + if (!isValidSpacingMultiplier(value)) return null + return `calc(${multiplier} * -${value})` }, handle,
diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -3861,6 +3861,82 @@ test('translate-x', async () => { '-translate-x-[var(--value)]/foo', ]), ).toEqual('') + + expect( + await compileCss( + css` + @theme { + --spacing: 0.25rem; + } + @tailwind utilities; + `, + ['translate-x-full', '-translate-x-full', 'translate-x-px', '-translate-x-[var(--value)]'], + ), + ).toMatchInlineSnapshot(` + ":root { + --spacing: .25rem; + } + + .-translate-x-\\[var\\(--value\\)\\] { + --tw-translate-x: calc(var(--value) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + .-translate-x-full { + --tw-translate-x: -100%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + .translate-x-full { + --tw-translate-x: 100%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + .translate-x-px { + --tw-translate-x: 1px; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + @supports (-moz-orient: inline) { + @layer base { + *, :before, :after, ::backdrop { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-translate-z: 0; + } + } + } + + @property --tw-translate-x { + syntax: "<length> | <percentage>"; + inherits: false; + initial-value: 0; + } + + @property --tw-translate-y { + syntax: "<length> | <percentage>"; + inherits: false; + initial-value: 0; + } + + @property --tw-translate-z { + syntax: "<length>"; + inherits: false; + initial-value: 0; + }" + `) + expect( + await run([ + 'perspective', + '-perspective', + 'perspective-potato', + 'perspective-123', + 'perspective-normal/foo', + 'perspective-dramatic/foo', + 'perspective-none/foo', + 'perspective-[456px]/foo', + ]), + ).toEqual('') }) test('translate-y', async () => { @@ -3933,6 +4009,82 @@ test('translate-y', async () => { '-translate-y-[var(--value)]/foo', ]), ).toEqual('') + + expect( + await compileCss( + css` + @theme { + --spacing: 0.25rem; + } + @tailwind utilities; + `, + ['translate-y-full', '-translate-y-full', 'translate-y-px', '-translate-y-[var(--value)]'], + ), + ).toMatchInlineSnapshot(` + ":root { + --spacing: .25rem; + } + + .-translate-y-\\[var\\(--value\\)\\] { + --tw-translate-y: calc(var(--value) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + .-translate-y-full { + --tw-translate-y: -100%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + .translate-y-full { + --tw-translate-y: 100%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + .translate-y-px { + --tw-translate-y: 1px; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + + @supports (-moz-orient: inline) { + @layer base { + *, :before, :after, ::backdrop { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-translate-z: 0; + } + } + } + + @property --tw-translate-x { + syntax: "<length> | <percentage>"; + inherits: false; + initial-value: 0; + } + + @property --tw-translate-y { + syntax: "<length> | <percentage>"; + inherits: false; + initial-value: 0; + } + + @property --tw-translate-z { + syntax: "<length>"; + inherits: false; + initial-value: 0; + }" + `) + expect( + await run([ + 'perspective', + '-perspective', + 'perspective-potato', + 'perspective-123', + 'perspective-normal/foo', + 'perspective-dramatic/foo', + 'perspective-none/foo', + 'perspective-[456px]/foo', + ]), + ).toEqual('') }) test('translate-z', async () => {
v4 alpha.32 translate regression <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v4 alpha 32 **What build tool (or framework if it abstracts the build tool) are you using?** vite **What version of Node.js are you using?** v22 **What browser are you using?** Edge **What operating system are you using?** Windows **Reproduction URL** A Tailwind Play link or public GitHub repo that includes a minimal reproduction of the bug. **Please do not link to your actual project**, what we need instead is a _minimal_ reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways. A reproduction is **required** when filing an issue — any issue opened without a reproduction will be closed and you'll be asked to create a new issue that includes a reproduction. We're a small team and we can't keep up with the volume of issues we receive if we need to reproduce each issue from scratch ourselves. **Describe your issue** ok alpha 31: <img width="299" alt="image" src="https://github.com/user-attachments/assets/610536c9-ce65-4997-a88a-d2ed94103b4f"> Not ok alpha 32: <img width="302" alt="image" src="https://github.com/user-attachments/assets/51cb1aac-2d14-4293-a344-26af52a0f44a">
@madmoizo Thanks for the report! I can reproduce this issue as well. Looking into it!
2024-11-11T18:09:40Z
4
tailwindlabs/tailwindcss
14,981
tailwindlabs__tailwindcss-14981
[ "14965" ]
0b908f3992d83ded583bf59f2457c41670418eca
diff --git a/integrations/utils.ts b/integrations/utils.ts --- a/integrations/utils.ts +++ b/integrations/utils.ts @@ -46,7 +46,7 @@ interface TestContext { dumpFiles(pattern: string): Promise<string> expectFileToContain( filePath: string, - contents: string | string[] | RegExp | RegExp[], + contents: string | RegExp | (string | RegExp)[], ): Promise<void> expectFileNotToContain(filePath: string, contents: string | string[]): Promise<void> } diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -59,7 +59,7 @@ export default function tailwindcss(): Plugin[] { if (!module) { // The module for this root might not exist yet if (root.builtBeforeTransform) { - return + continue } // Note: Removing this during SSR is not safe and will produce @@ -196,17 +196,17 @@ export default function tailwindcss(): Plugin[] { let root = roots.get(id) + // If the root was built outside of the transform hook (e.g. in the + // Svelte preprocessor), we still want to mark all dependencies of the + // root as watched files. if (root.builtBeforeTransform) { root.builtBeforeTransform.forEach((file) => this.addWatchFile(file)) root.builtBeforeTransform = undefined - // When a root was built before this transform hook, the candidate - // list might be outdated already by the time the transform hook is - // called. - // - // This requires us to build the CSS file again. However, we do not - // expect dependencies to have changed, so we can avoid a full - // rebuild. - root.requiresRebuild = false + } + + // We only process Svelte `<style>` tags in the `sveltePreprocessor` + if (isSvelteStyle(id)) { + return src } if (!options?.ssr) { @@ -240,16 +240,17 @@ export default function tailwindcss(): Plugin[] { let root = roots.get(id) + // If the root was built outside of the transform hook (e.g. in the + // Svelte preprocessor), we still want to mark all dependencies of the + // root as watched files. if (root.builtBeforeTransform) { root.builtBeforeTransform.forEach((file) => this.addWatchFile(file)) root.builtBeforeTransform = undefined - // When a root was built before this transform hook, the candidate - // list might be outdated already by the time the transform hook is - // called. - // - // Since we already do a second render pass in build mode, we don't - // need to do any more work here. - return + } + + // We only process Svelte `<style>` tags in the `sveltePreprocessor` + if (isSvelteStyle(id)) { + return src } // We do a first pass to generate valid CSS for the downstream plugins. @@ -268,6 +269,9 @@ export default function tailwindcss(): Plugin[] { // by vite:css-post. async renderStart() { for (let [id, root] of roots.entries()) { + // Do not do a second render pass on Svelte `<style>` tags. + if (isSvelteStyle(id)) continue + let generated = await regenerateOptimizedCss( root, // During the renderStart phase, we can not add watch files since @@ -304,13 +308,20 @@ function isPotentialCssRootFile(id: string) { (extension === 'css' || (extension === 'vue' && id.includes('&lang.css')) || (extension === 'astro' && id.includes('&lang.css')) || - (extension === 'svelte' && id.includes('&lang.css'))) && + // We want to process Svelte `<style>` tags to properly add dependency + // tracking for imported files. + isSvelteStyle(id)) && // Don't intercept special static asset resources !SPECIAL_QUERY_RE.test(id) return isCssFile } +function isSvelteStyle(id: string) { + let extension = getExtension(id) + return extension === 'svelte' && id.includes('&lang.css') +} + function optimizeCss( input: string, { file = 'input.css', minify = false }: { file?: string; minify?: boolean } = {}, @@ -403,6 +414,8 @@ class Root { // The resolved path given to `source(…)`. When not given this is `null`. private basePath: string | null = null + public overwriteCandidates: string[] | null = null + constructor( private id: string, private getSharedCandidates: () => Map<string, Set<string>>, @@ -453,14 +466,16 @@ class Root { this.scanner = new Scanner({ sources }) } - // This should not be here, but right now the Vite plugin is setup where we - // setup a new scanner and compiler every time we request the CSS file - // (regardless whether it actually changed or not). - env.DEBUG && console.time('[@tailwindcss/vite] Scan for candidates') - for (let candidate of this.scanner.scan()) { - this.candidates.add(candidate) + if (!this.overwriteCandidates) { + // This should not be here, but right now the Vite plugin is setup where we + // setup a new scanner and compiler every time we request the CSS file + // (regardless whether it actually changed or not). + env.DEBUG && console.time('[@tailwindcss/vite] Scan for candidates') + for (let candidate of this.scanner.scan()) { + this.candidates.add(candidate) + } + env.DEBUG && console.timeEnd('[@tailwindcss/vite] Scan for candidates') } - env.DEBUG && console.timeEnd('[@tailwindcss/vite] Scan for candidates') // Watch individual files found via custom `@source` paths for (let file of this.scanner.files) { @@ -506,7 +521,11 @@ class Root { this.requiresRebuild = true env.DEBUG && console.time('[@tailwindcss/vite] Build CSS') - let result = this.compiler.build([...this.sharedCandidates(), ...this.candidates]) + let result = this.compiler.build( + this.overwriteCandidates + ? this.overwriteCandidates + : [...this.sharedCandidates(), ...this.candidates], + ) env.DEBUG && console.timeEnd('[@tailwindcss/vite] Build CSS') return result @@ -552,50 +571,72 @@ class Root { // enabled. This allows us to transform CSS in `<style>` tags and create a // stricter version of CSS that passes the Svelte compiler. // -// Note that these files will undergo a second pass through the vite transpiler -// later. This is necessary to compute `@tailwind utilities;` with the right -// candidate list. +// Note that these files will not undergo a second pass through the vite +// transpiler later. This means that `@tailwind utilities;` will not be up to +// date. // -// In practice, it is not recommended to use `@tailwind utilities;` inside -// Svelte components. Use an external `.css` file instead. +// In practice, it is discouraged to use `@tailwind utilities;` inside Svelte +// components, as the styles it create would be scoped anyways. Use an external +// `.css` file instead. function svelteProcessor(roots: DefaultMap<string, Root>) { + let preprocessor = sveltePreprocess() + return { name: '@tailwindcss/svelte', api: { - sveltePreprocess: sveltePreprocess({ - aliases: [ - ['postcss', 'tailwindcss'], - ['css', 'tailwindcss'], - ], - async tailwindcss({ + sveltePreprocess: { + markup: preprocessor.markup, + script: preprocessor.script, + async style({ content, - attributes, filename, + markup, + ...rest }: { content: string - attributes: Record<string, string> filename?: string + attributes: Record<string, string | boolean> + markup: string }) { - if (!filename) return + if (!filename) return preprocessor.style?.({ ...rest, content, filename, markup }) + + // Create the ID used by Vite to identify the `<style>` contents. This + // way, the Vite `transform` hook can find the right root and thus + // track the right dependencies. let id = filename + '?svelte&type=style&lang.css' let root = roots.get(id) + + // Since a Svelte pre-processor call means that the CSS has changed, + // we need to trigger a rebuild. + root.requiresRebuild = true + // Mark this root as being built before the Vite transform hook is // called. We capture all eventually added dependencies so that we can // connect them to the vite module graph later, when the transform // hook is called. root.builtBeforeTransform = [] + + // We only want to consider candidates from the current template file, + // this ensures that no one can depend on this having the full candidate + // list in some builds (as this is undefined behavior). + let scanner = new Scanner({}) + root.overwriteCandidates = scanner.scanFiles([ + { content: markup, file: filename, extension: 'svelte' }, + ]) + let generated = await root.generate(content, (file) => root?.builtBeforeTransform?.push(file), ) if (!generated) { roots.delete(id) - return { code: content, attributes } + return preprocessor.style?.({ ...rest, content, filename, markup }) } - return { code: generated, attributes } + + return preprocessor.style?.({ ...rest, content: generated, filename, markup }) }, - }), + }, }, } }
diff --git a/integrations/vite/svelte.test.ts b/integrations/vite/svelte.test.ts --- a/integrations/vite/svelte.test.ts +++ b/integrations/vite/svelte.test.ts @@ -48,22 +48,50 @@ test( target: document.body, }) `, + 'src/index.css': css` + @import 'tailwindcss/theme' theme(reference); + @import 'tailwindcss/utilities'; + `, 'src/App.svelte': html` <script> + import './index.css' let name = 'world' </script> - <h1 class="foo underline">Hello {name}!</h1> + <h1 class="global local underline">Hello {name}!</h1> - <style global> - @import 'tailwindcss/utilities'; + <style> @import 'tailwindcss/theme' theme(reference); - @import './components.css'; + @import './other.css'; </style> `, - 'src/components.css': css` - .foo { + 'src/other.css': css` + .local { @apply text-red-500; + animation: 2s ease-in-out 0s infinite localKeyframes; + } + + :global(.global) { + @apply text-green-500; + animation: 2s ease-in-out 0s infinite globalKeyframes; + } + + @keyframes -global-globalKeyframes { + 0% { + opacity: 0; + } + 100% { + opacity: 100%; + } + } + + @keyframes localKeyframes { + 0% { + opacity: 0; + } + 100% { + opacity: 100%; + } } `, }, @@ -74,7 +102,13 @@ test( let files = await fs.glob('dist/**/*.css') expect(files).toHaveLength(1) - await fs.expectFileToContain(files[0][0], [candidate`underline`, candidate`foo`]) + await fs.expectFileToContain(files[0][0], [ + candidate`underline`, + '.global{color:var(--color-green-500);animation:2s ease-in-out 0s infinite globalKeyframes}', + /\.local.svelte-.*\{color:var\(--color-red-500\);animation:2s ease-in-out 0s infinite svelte-.*-localKeyframes\}/, + /@keyframes globalKeyframes\{/, + /@keyframes svelte-.*-localKeyframes\{/, + ]) }, ) @@ -127,20 +161,48 @@ test( `, 'src/App.svelte': html` <script> + import './index.css' let name = 'world' </script> - <h1 class="foo underline">Hello {name}!</h1> + <h1 class="local global underline">Hello {name}!</h1> - <style global> - @import 'tailwindcss/utilities'; + <style> @import 'tailwindcss/theme' theme(reference); - @import './components.css'; + @import './other.css'; </style> `, - 'src/components.css': css` - .foo { + 'src/index.css': css` + @import 'tailwindcss/theme' theme(reference); + @import 'tailwindcss/utilities'; + `, + 'src/other.css': css` + .local { @apply text-red-500; + animation: 2s ease-in-out 0s infinite localKeyframes; + } + + :global(.global) { + @apply text-green-500; + animation: 2s ease-in-out 0s infinite globalKeyframes; + } + + @keyframes -global-globalKeyframes { + 0% { + opacity: 0; + } + 100% { + opacity: 100%; + } + } + + @keyframes localKeyframes { + 0% { + opacity: 0; + } + 100% { + opacity: 100%; + } } `, }, @@ -148,30 +210,45 @@ test( async ({ fs, spawn }) => { await spawn(`pnpm vite build --watch`) - let filename = '' await retryAssertion(async () => { let files = await fs.glob('dist/**/*.css') expect(files).toHaveLength(1) - filename = files[0][0] + let [, css] = files[0] + expect(css).toContain(candidate`underline`) + expect(css).toContain( + '.global{color:var(--color-green-500);animation:2s ease-in-out 0s infinite globalKeyframes}', + ) + expect(css).toMatch( + /\.local.svelte-.*\{color:var\(--color-red-500\);animation:2s ease-in-out 0s infinite svelte-.*-localKeyframes\}/, + ) + expect(css).toMatch(/@keyframes globalKeyframes\{/) + expect(css).toMatch(/@keyframes svelte-.*-localKeyframes\{/) }) - await fs.expectFileToContain(filename, [candidate`foo`, candidate`underline`]) + await fs.write( + 'src/App.svelte', + (await fs.read('src/App.svelte')).replace('underline', 'font-bold bar'), + ) await fs.write( - 'src/components.css', - css` - .bar { - @apply text-green-500; - } - `, + 'src/other.css', + `${await fs.read('src/other.css')}\n.bar { @apply text-pink-500; }`, ) + await retryAssertion(async () => { let files = await fs.glob('dist/**/*.css') expect(files).toHaveLength(1) let [, css] = files[0] - expect(css).toContain(candidate`underline`) - expect(css).toContain(candidate`bar`) - expect(css).not.toContain(candidate`foo`) + expect(css).toContain(candidate`font-bold`) + expect(css).toContain( + '.global{color:var(--color-green-500);animation:2s ease-in-out 0s infinite globalKeyframes}', + ) + expect(css).toMatch( + /\.local.svelte-.*\{color:var\(--color-red-500\);animation:2s ease-in-out 0s infinite svelte-.*-localKeyframes\}/, + ) + expect(css).toMatch(/@keyframes globalKeyframes\{/) + expect(css).toMatch(/@keyframes svelte-.*-localKeyframes\{/) + expect(css).toMatch(/\.bar.svelte-.*\{color:var\(--color-pink-500\)\}/) }) }, )
[v4] Vite plugin breaks svelte global animation keyframes handling **What version of Tailwind CSS are you using?** v4.0.0-alpha.32 **What build tool (or framework if it abstracts the build tool) are you using?** Vite with SvelteKit 2.8.0 (latest) **What version of Node.js are you using?** For example: v23.1.0 **What browser are you using?** Chrome **What operating system are you using?** MacOS **Reproduction URL** https://github.com/emmbm/tailwind-svelte-keyframes **Describe your issue** Updating from `@tailwindcss/[email protected]` to `@tailwindcss/[email protected]` breaks svelte's expected handling (read here _renaming_) of global keyframes defined in style blocks. In svelte components, styles are scoped by default. This scoping also applies to keyframes, [unless they are defined with a `-global-` prefix which svelte then removes during build](https://svelte.dev/docs/svelte/global-styles#:global()). This behavior is broken in the current `next` version of tailwind.
Yeah it does seem that the default Svelte transforms now no longer apply at all. Looking into it, thanks for the report.
2024-11-12T17:28:56Z
4
tailwindlabs/tailwindcss
14,993
tailwindlabs__tailwindcss-14993
[ "13129" ]
dda181b833c472bf4070f6c0c1d61fb88c016368
diff --git a/packages/tailwindcss/src/property-order.ts b/packages/tailwindcss/src/property-order.ts --- a/packages/tailwindcss/src/property-order.ts +++ b/packages/tailwindcss/src/property-order.ts @@ -28,6 +28,10 @@ export default [ 'float', 'clear', + // Ensure that the included `container` class is always sorted before any + // custom container extensions + '--tw-container-component', + // How do we make `mx-0` come before `mt-0`? // Idea: `margin-x` property that we compile away with a Visitor plugin? 'margin', diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -1,6 +1,7 @@ import { atRoot, atRule, decl, styleRule, type AstNode } from './ast' import type { Candidate, CandidateModifier, NamedUtilityValue } from './candidate' import type { Theme, ThemeKey } from './theme' +import { compareBreakpoints } from './utils/compare-breakpoints' import { DefaultMap } from './utils/default-map' import { inferDataType, @@ -897,6 +898,18 @@ export function createUtilities(theme: Theme) { }) } + utilities.static('container', () => { + let breakpoints = [...theme.namespace('--breakpoint').values()] + breakpoints.sort((a, z) => compareBreakpoints(a, z, 'asc')) + + let decls: AstNode[] = [decl('--tw-sort', '--tw-container-component'), decl('width', '100%')] + for (let breakpoint of breakpoints) { + decls.push(atRule('@media', `(min-width: ${breakpoint})`, [decl('max-width', breakpoint)])) + } + + return decls + }) + /** * @css `flex` */ diff --git a/packages/tailwindcss/src/utils/compare-breakpoints.ts b/packages/tailwindcss/src/utils/compare-breakpoints.ts new file mode 100644 --- /dev/null +++ b/packages/tailwindcss/src/utils/compare-breakpoints.ts @@ -0,0 +1,48 @@ +export function compareBreakpoints(a: string, z: string, direction: 'asc' | 'desc') { + if (a === z) return 0 + + // Assumption: when a `(` exists, we are dealing with a CSS function. + // + // E.g.: `calc(100% - 1rem)` + let aIsCssFunction = a.indexOf('(') + let zIsCssFunction = z.indexOf('(') + + let aBucket = + aIsCssFunction === -1 + ? // No CSS function found, bucket by unit instead + a.replace(/[\d.]+/g, '') + : // CSS function found, bucket by function name + a.slice(0, aIsCssFunction) + + let zBucket = + zIsCssFunction === -1 + ? // No CSS function found, bucket by unit + z.replace(/[\d.]+/g, '') + : // CSS function found, bucket by function name + z.slice(0, zIsCssFunction) + + let order = + // Compare by bucket name + (aBucket === zBucket ? 0 : aBucket < zBucket ? -1 : 1) || + // If bucket names are the same, compare by value + (direction === 'asc' ? parseInt(a) - parseInt(z) : parseInt(z) - parseInt(a)) + + // If the groups are the same, and the contents are not numbers, the + // `order` will result in `NaN`. In this case, we want to make sorting + // stable by falling back to a string comparison. + // + // This can happen when using CSS functions such as `calc`. + // + // E.g.: + // + // - `min-[calc(100%-1rem)]` and `min-[calc(100%-2rem)]` + // - `@[calc(100%-1rem)]` and `@[calc(100%-2rem)]` + // + // In this scenario, we want to alphabetically sort `calc(100%-1rem)` and + // `calc(100%-2rem)` to make it deterministic. + if (Number.isNaN(order)) { + return a < z ? -1 : 1 + } + + return order +} diff --git a/packages/tailwindcss/src/variants.ts b/packages/tailwindcss/src/variants.ts --- a/packages/tailwindcss/src/variants.ts +++ b/packages/tailwindcss/src/variants.ts @@ -13,6 +13,7 @@ import { } from './ast' import { type Variant } from './candidate' import type { Theme } from './theme' +import { compareBreakpoints } from './utils/compare-breakpoints' import { DefaultMap } from './utils/default-map' import { isPositiveInteger } from './utils/infer-data-type' import { segment } from './utils/segment' @@ -869,7 +870,7 @@ export function createVariants(theme: Theme): Variants { // Helper to compare variants by their resolved values, this is used by the // responsive variants (`sm`, `md`, ...), `min-*`, `max-*` and container // queries (`@`). - function compareBreakpoints( + function compareBreakpointVariants( a: Variant, z: Variant, direction: 'asc' | 'desc', @@ -882,54 +883,7 @@ export function createVariants(theme: Theme): Variants { let zValue = lookup.get(z) if (zValue === null) return direction === 'asc' ? 1 : -1 - if (aValue === zValue) return 0 - - // Assumption: when a `(` exists, we are dealing with a CSS function. - // - // E.g.: `calc(100% - 1rem)` - let aIsCssFunction = aValue.indexOf('(') - let zIsCssFunction = zValue.indexOf('(') - - let aBucket = - aIsCssFunction === -1 - ? // No CSS function found, bucket by unit instead - aValue.replace(/[\d.]+/g, '') - : // CSS function found, bucket by function name - aValue.slice(0, aIsCssFunction) - - let zBucket = - zIsCssFunction === -1 - ? // No CSS function found, bucket by unit - zValue.replace(/[\d.]+/g, '') - : // CSS function found, bucket by function name - zValue.slice(0, zIsCssFunction) - - let order = - // Compare by bucket name - (aBucket === zBucket ? 0 : aBucket < zBucket ? -1 : 1) || - // If bucket names are the same, compare by value - (direction === 'asc' - ? parseInt(aValue) - parseInt(zValue) - : parseInt(zValue) - parseInt(aValue)) - - // If the groups are the same, and the contents are not numbers, the - // `order` will result in `NaN`. In this case, we want to make sorting - // stable by falling back to a string comparison. - // - // This can happen when using CSS functions such as `calc`. - // - // E.g.: - // - // - `min-[calc(100%-1rem)]` and `min-[calc(100%-2rem)]` - // - `@[calc(100%-1rem)]` and `@[calc(100%-2rem)]` - // - // In this scenario, we want to alphabetically sort `calc(100%-1rem)` and - // `calc(100%-2rem)` to make it deterministic. - if (Number.isNaN(order)) { - return aValue < zValue ? -1 : 1 - } - - return order + return compareBreakpoints(aValue, zValue, direction) } // Breakpoints @@ -978,7 +932,7 @@ export function createVariants(theme: Theme): Variants { { compounds: Compounds.AtRules }, ) }, - (a, z) => compareBreakpoints(a, z, 'desc', resolvedBreakpoints), + (a, z) => compareBreakpointVariants(a, z, 'desc', resolvedBreakpoints), ) variants.suggest( @@ -1013,7 +967,7 @@ export function createVariants(theme: Theme): Variants { { compounds: Compounds.AtRules }, ) }, - (a, z) => compareBreakpoints(a, z, 'asc', resolvedBreakpoints), + (a, z) => compareBreakpointVariants(a, z, 'asc', resolvedBreakpoints), ) variants.suggest( @@ -1072,7 +1026,7 @@ export function createVariants(theme: Theme): Variants { { compounds: Compounds.AtRules }, ) }, - (a, z) => compareBreakpoints(a, z, 'desc', resolvedWidths), + (a, z) => compareBreakpointVariants(a, z, 'desc', resolvedWidths), ) variants.suggest( @@ -1119,7 +1073,7 @@ export function createVariants(theme: Theme): Variants { { compounds: Compounds.AtRules }, ) }, - (a, z) => compareBreakpoints(a, z, 'asc', resolvedWidths), + (a, z) => compareBreakpointVariants(a, z, 'asc', resolvedWidths), ) variants.suggest(
diff --git a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap --- a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap @@ -3375,6 +3375,7 @@ exports[`getClassList 1`] = ` "contain-size", "contain-strict", "contain-style", + "container", "content-around", "content-baseline", "content-between", diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -3148,6 +3148,230 @@ test('max-height', async () => { ).toEqual('') }) +describe('container', () => { + test('creates the right media queries and sorts it before width', async () => { + expect( + await compileCss( + css` + @theme { + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + } + @tailwind utilities; + `, + ['w-1/2', 'container', 'max-w-[var(--breakpoint-sm)]'], + ), + ).toMatchInlineSnapshot(` + ":root { + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + } + + .container { + width: 100%; + } + + @media (width >= 40rem) { + .container { + max-width: 40rem; + } + } + + @media (width >= 48rem) { + .container { + max-width: 48rem; + } + } + + @media (width >= 64rem) { + .container { + max-width: 64rem; + } + } + + @media (width >= 80rem) { + .container { + max-width: 80rem; + } + } + + @media (width >= 96rem) { + .container { + max-width: 96rem; + } + } + + .w-1\\/2 { + width: 50%; + } + + .max-w-\\[var\\(--breakpoint-sm\\)\\] { + max-width: var(--breakpoint-sm); + }" + `) + }) + + test('sorts breakpoints based on unit and then in ascending aOrder', async () => { + expect( + await compileCss( + css` + @theme reference { + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-3xl: 1600px; + --breakpoint-sm: 40em; + --breakpoint-2xl: 96rem; + --breakpoint-xs: 30px; + --breakpoint-md: 48em; + } + @tailwind utilities; + `, + ['container'], + ), + ).toMatchInlineSnapshot(` + ".container { + width: 100%; + } + + @media (width >= 40em) { + .container { + max-width: 40em; + } + } + + @media (width >= 48em) { + .container { + max-width: 48em; + } + } + + @media (width >= 30px) { + .container { + max-width: 30px; + } + } + + @media (width >= 1600px) { + .container { + max-width: 1600px; + } + } + + @media (width >= 64rem) { + .container { + max-width: 64rem; + } + } + + @media (width >= 80rem) { + .container { + max-width: 80rem; + } + } + + @media (width >= 96rem) { + .container { + max-width: 96rem; + } + }" + `) + }) + + test('custom `@utility container` always follow the core utility ', async () => { + expect( + await compileCss( + css` + @theme { + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + } + @tailwind utilities; + + @utility container { + margin-inline: auto; + padding-inline: 1rem; + + @media (width >= theme(--breakpoint-sm)) { + padding-inline: 2rem; + } + } + `, + ['w-1/2', 'container', 'max-w-[var(--breakpoint-sm)]'], + ), + ).toMatchInlineSnapshot(` + ":root { + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + } + + .container { + width: 100%; + } + + @media (width >= 40rem) { + .container { + max-width: 40rem; + } + } + + @media (width >= 48rem) { + .container { + max-width: 48rem; + } + } + + @media (width >= 64rem) { + .container { + max-width: 64rem; + } + } + + @media (width >= 80rem) { + .container { + max-width: 80rem; + } + } + + @media (width >= 96rem) { + .container { + max-width: 96rem; + } + } + + .container { + margin-inline: auto; + padding-inline: 1rem; + } + + @media (width >= 40rem) { + .container { + padding-inline: 2rem; + } + } + + .w-1\\/2 { + width: 50%; + } + + .max-w-\\[var\\(--breakpoint-sm\\)\\] { + max-width: var(--breakpoint-sm); + }" + `) + }) +}) + test('flex', async () => { expect( await run([ @@ -16680,7 +16904,7 @@ describe('spacing utilities', () => { `) }) - test('only multiples of 0.25 with no trailing zeroes are supported with the spacing multipler', async () => { + test('only multiples of 0.25 with no trailing zeroes are supported with the spacing multiplier', async () => { let { build } = await compile(css` @theme { --spacing: 4px;
[v4] Styles are not applied to the "container" class **What version of Tailwind CSS are you using?** v.next **What build tool (or framework if it abstracts the build tool) are you using?** vite (v5.1.5), @builder.io/qwik (v1.5.1), @builder.io/qwik-city (v1.5.1), @tailwindcss/vite (v.next) **What version of Node.js are you using?** v20.9.0 **What browser are you using?** Chrome, Safari, Edge **What operating system are you using?** macOS **Reproduction URL** https://codesandbox.io/p/devbox/peaceful-hertz-jx9sd2?file=%2Fsrc%2Froutes%2Findex.tsx **Describe your issue** In TailwindCSS version 4, it seems that the styles of the "container" class are not loaded. In previous versions the "container" class works correctly.
I am using SvelteKit and I can comfirm this. Using Vite with nuxt with same problem I guess it is not implemented yet, I don't see it in the [packages/tailwindcss/src/utilities.ts](https://github.com/tailwindlabs/tailwindcss/blob/next/packages/tailwindcss/src/utilities.ts). @adamwathan Has any decision been made regarding adding this class? I think it is a very useful and widely used class. What could we use to replace the container while you guys figure out how to tackle the inclusion of the container? up I made the below suggestion in closed PR https://github.com/tailwindlabs/tailwindcss/pull/13395#issuecomment-2327178695, but I think it's more relevant here: > maybe the real ask here is a better, simpler v4 container utility. The v3 utility was for one very specific use case, whereas I could imagine v4 utilities that are both a lot simpler and a lot more like the rest of Tailwind: > > ```css > .container-sm { > width: 100%; > max-width: var(--breakpoint-sm); > } > > .container-md { > width: 100%; > max-width: var(--breakpoint-md); > } > > /* etc. */ > ``` > > Users could easily recreate the v3 `container` utility themselves, including all of its configuration options: > > ```css > @utility container { > /* Set the `max-width` to match the `min-width` of the current breakpoint */ > @apply sm:container-sm md:container-md lg:container-lg xl:container-xl 2xl:container-2xl; > > /* Center by default */ > @apply mx-auto; > > /* Add horizontal padding */ > @apply px-4 sm:px-8; > } > ```
2024-11-13T16:49:01Z
4
tailwindlabs/tailwindcss
14,744
tailwindlabs__tailwindcss-14744
[ "14726" ]
18cb3c60e6e83a7d1aad120f8552d8805a241779
diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -122,11 +122,12 @@ export async function handle(args: Result<ReturnType<typeof options>>) { env.DEBUG && console.timeEnd('[@tailwindcss/cli] Write output') } - let inputBasePath = - args['--input'] && args['--input'] !== '-' - ? path.dirname(path.resolve(args['--input'])) - : process.cwd() - let fullRebuildPaths: string[] = [] + let inputFilePath = + args['--input'] && args['--input'] !== '-' ? path.resolve(args['--input']) : null + + let inputBasePath = inputFilePath ? path.dirname(inputFilePath) : process.cwd() + + let fullRebuildPaths: string[] = inputFilePath ? [inputFilePath] : [] async function createCompiler(css: string) { env.DEBUG && console.time('[@tailwindcss/cli] Setup compiler') @@ -201,7 +202,7 @@ export async function handle(args: Result<ReturnType<typeof options>>) { @import 'tailwindcss'; ` clearRequireCache(resolvedFullRebuildPaths) - fullRebuildPaths = [] + fullRebuildPaths = inputFilePath ? [inputFilePath] : [] // Create a new compiler, given the new `input` compiler = await createCompiler(input)
diff --git a/integrations/cli/index.test.ts b/integrations/cli/index.test.ts --- a/integrations/cli/index.test.ts +++ b/integrations/cli/index.test.ts @@ -210,6 +210,23 @@ describe.each([ } `, ]) + + await fs.write( + 'project-a/src/index.css', + css` + @import 'tailwindcss/utilities'; + @theme { + --color-*: initial; + } + `, + ) + + await fs.expectFileToContain('project-a/dist/out.css', [ + css` + :root { + } + `, + ]) }, )
V4 Alpha 27/28 - `--watch` command does not work on the input css file (config file) **What version of Tailwind CSS are you using?** v4.0.0.alpha28 (also tried on alpha27) **What build tool (or framework if it abstracts the build tool) are you using?** Tailwind CLI executable only. **What version of Node.js are you using?** None. I'm using the Standalone CLI **What browser are you using?** Not relevant **What operating system are you using?** macOS Sonoma 14.6.1 **Reproduction URL** Uploading the whole executable to a Git repo doesn't make much sense but here are the instructions to reproduce the issue locally: 1. Create a new directory for the test 2. `cd` into that directory 3. [Download the version of the executable](https://github.com/tailwindlabs/tailwindcss/releases/tag/v4.0.0-alpha.28) appropriate for your OS. Assuming your version is `macos-arm64` 4. run `chmod +x tailwindcss-macos-arm64` 5. run `mv tailwindcss-macos-arm64 tailwindcss4alpha28`. I've named the executable with the specific version to make it more explicit 6. Create an empty input.css file 7. Create an empty output.css file 8. Add `@import "tailwindcss";` to the `input.css` file 9. Run `./tailwindcss4alpha28 --input input.css --output output.css --watch` 10. 🚨 Check the `output.css` file. Tailwind classes should be present but are not. 11. Run `./tailwindcss4alpha28 --input input.css --output output.css`. Note that this time it's not using the `--watch` flag 12. ✅ Check the `output.css` file. Tailwind classes are present. **Describe your issue** We've been trying to make the Tailwind 4 alphas work in Rails but noticed that the watch command isn't working when using the Standalone CLI. https://github.com/rails/tailwindcss-rails/issues/419 After some debugging we realised that the problem is not coming from our Rails implementation but from the executable provided by Tailwind.
I've updated the title to also include the regular CLI which also doesn't support --watch. I went back to [the article announcing v4](https://tailwindcss.com/blog/tailwindcss-v4-alpha) and realised it doesn't mention the `--watch` flag. Is there a reason for it? Is watch mode not supported just yet? I can't seem to reproduce this, `--watch` is working as expected for me: https://github.com/user-attachments/assets/f4ceba79-1258-488e-8c1c-85efc7b63ea8 Trying to figure out what might be different in our setups — is there any chance you could throw up a whole project that's not working for you so I can test here and try to narrow it down? Thanks to your video I've narrowed down the problem a bit more and I have a few new clues. If I change the input css file, the watcher kicks off, says it's "Done in X ms" but the changes are not present in the output file. However, if I create an html file and add an html class to it, the watcher kicks off and the new classes are present in the output.css. **So, the watcher is specifically not working on the input file** Check out this video (it was too big for GItHub): https://youtu.be/bdup23ipD4c Also I tried this on a different computer and I get the same results. I've put up a repo for ease of reproduction here: https://github.com/pinzonjulian/tailwind_css_cli_watch_bug You'll just need to add the executables
2024-10-21T20:17:01Z
4
tailwindlabs/tailwindcss
14,747
tailwindlabs__tailwindcss-14747
[ "14732" ]
338a78050a78ee1d3f0f12824d9fb04614c93700
diff --git a/packages/tailwindcss/src/compat/plugin-api.ts b/packages/tailwindcss/src/compat/plugin-api.ts --- a/packages/tailwindcss/src/compat/plugin-api.ts +++ b/packages/tailwindcss/src/compat/plugin-api.ts @@ -204,7 +204,7 @@ export function buildPluginApi( for (let [name, css] of Object.entries(utils)) { if (name.startsWith('@keyframes ')) { - designSystem.theme.addKeyframes(rule(name, objectToAst(css))) + ast.push(rule(name, objectToAst(css))) continue }
diff --git a/integrations/cli/plugins.test.ts b/integrations/cli/plugins.test.ts --- a/integrations/cli/plugins.test.ts +++ b/integrations/cli/plugins.test.ts @@ -154,6 +154,7 @@ test( candidate`duration-350`, 'transition-duration: 350ms', 'animation-duration: 350ms', + '@keyframes enter {', ]) }, ) diff --git a/packages/tailwindcss/src/compat/plugin-api.test.ts b/packages/tailwindcss/src/compat/plugin-api.test.ts --- a/packages/tailwindcss/src/compat/plugin-api.test.ts +++ b/packages/tailwindcss/src/compat/plugin-api.test.ts @@ -71,6 +71,39 @@ describe('theme', async () => { `) }) + test('keyframes added via addUtilities are appended to the AST', async () => { + let input = css` + @tailwind utilities; + @plugin "my-plugin"; + ` + + let compiler = await compile(input, { + loadModule: async (id, base) => { + return { + base, + module: plugin(function ({ addUtilities, theme }) { + addUtilities({ + '@keyframes enter': { + from: { + opacity: 'var(--tw-enter-opacity, 1)', + }, + }, + }) + }), + } + }, + }) + + expect(compiler.build([])).toMatchInlineSnapshot(` + "@keyframes enter { + from { + opacity: var(--tw-enter-opacity, 1); + } + } + " + `) + }) + test('plugin theme can extend colors', async () => { let input = css` @theme reference {
v4 alpha 0.28 breaks plugin (tailwindcss-animate) & weird behavior with new p3 color opacity <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v4.0.0-alpha.28 **What build tool (or framework if it abstracts the build tool) are you using?** postcss 8.4.47, Next.js 15.0.0-rc.1 **What version of Node.js are you using?** v20.16.0 **What browser are you using?** Chrome **What operating system are you using?** For example: macOS **Reproduction URL** https://github.com/ajayvignesh01/tailwind-v4.0.0-alpha.28-plugins **Describe your issue** The `tailwindcss-animate` plugin was working since plugin support landed a few weeks ago. But when I upgrade to alpha 0.28, it stops working. No errors are thrown, but animations that rendered with alpha 0.21 - 0.27 are now not rendering. Another bug is from the introduction of p3 colors. If you hover over the primary button which has `bg-primary hover:bg-primary/90`, the hover color shows a hue of green for some reason. Preview with alpha 0.27 - https://tailwind-v4-0-0-alpha-28-plugins-gjaplla02.vercel.app/ Preview with alpha 0.28 - https://tailwind-v4-0-0-alpha-28-plugins-4pzuz8jxf.vercel.app/
Dropping some notes for me to look at tomorrow: Regarding the colors: - This is only an issue in Chrome, FF and Safari are fine - The trigger requires an oklch/okblab color with a `none` component. Replacing it with a `0` fixes the issue. - Changing the color space of the color-mix _also_ fixes the issue (but should not be necessary) ```css button { /* broken */ background-color: color-mix(in srgb, oklch(0.985 0 none) 95%, transparent); /* works */ background-color: color-mix(in srgb, oklch(0.985 0 0) 95%, transparent); background-color: color-mix(in oklch, oklch(0.985 0 none) 95%, transparent); background-color: color-mix(in oklab, oklch(0.985 0 none) 95%, transparent); } ``` I think what's happening is that it gets converted into `color(srgb …)` internally, carries over the none component, and replaces the `none` at the end with `0` — instead of doing it before the conversion. Based on the following observations: ```css button { /* this is yellow */ background-color: color-mix(in srgb, color(srgb 1.0 1.0 none) 95%, transparent); /* as is this */ background-color: color-mix(in srgb, color(srgb 1.0 1.0 0) 95%, transparent); /* window.getComputedStyle($0)["background-color"] produces a color(srgb …) value */ background-color: color-mix(in srgb, oklch(0.985 0 none) 95%, transparent); } ```
2024-10-21T22:17:16Z
4
tailwindlabs/tailwindcss
14,877
tailwindlabs__tailwindcss-14877
[ "14784" ]
75eeed85b6cafe9b7b406a0df0fdfcbf2425360a
diff --git a/integrations/utils.ts b/integrations/utils.ts --- a/integrations/utils.ts +++ b/integrations/utils.ts @@ -29,7 +29,7 @@ interface ExecOptions { interface TestConfig { fs: { - [filePath: string]: string + [filePath: string]: string | Uint8Array } } interface TestContext { @@ -280,8 +280,14 @@ export function test( }) }, fs: { - async write(filename: string, content: string): Promise<void> { + async write(filename: string, content: string | Uint8Array): Promise<void> { let full = path.join(root, filename) + let dir = path.dirname(full) + await fs.mkdir(dir, { recursive: true }) + + if (typeof content !== 'string') { + return await fs.writeFile(full, content) + } if (filename.endsWith('package.json')) { content = await overwriteVersionsInPackageJson(content) @@ -292,8 +298,6 @@ export function test( content = content.replace(/\n/g, '\r\n') } - let dir = path.dirname(full) - await fs.mkdir(dir, { recursive: true }) await fs.writeFile(full, content, 'utf-8') }, @@ -487,6 +491,7 @@ function testIfPortTaken(port: number): Promise<boolean> { }) } +export let svg = dedent export let css = dedent export let html = dedent export let ts = dedent @@ -495,6 +500,12 @@ export let json = dedent export let yaml = dedent export let txt = dedent +export function binary(str: string | TemplateStringsArray, ...values: unknown[]): Uint8Array { + let base64 = typeof str === 'string' ? str : String.raw(str, ...values) + + return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)) +} + export function candidate(strings: TemplateStringsArray, ...values: any[]) { let output: string[] = [] for (let i = 0; i < strings.length; i++) { diff --git a/packages/@tailwindcss-node/src/compile.ts b/packages/@tailwindcss-node/src/compile.ts --- a/packages/@tailwindcss-node/src/compile.ts +++ b/packages/@tailwindcss-node/src/compile.ts @@ -9,10 +9,19 @@ import { compile as _compile, } from 'tailwindcss' import { getModuleDependencies } from './get-module-dependencies' +import { rewriteUrls } from './urls' export async function compile( css: string, - { base, onDependency }: { base: string; onDependency: (path: string) => void }, + { + base, + onDependency, + shouldRewriteUrls, + }: { + base: string + onDependency: (path: string) => void + shouldRewriteUrls?: boolean + }, ) { let compiler = await _compile(css, { base, @@ -20,7 +29,17 @@ export async function compile( return loadModule(id, base, onDependency) }, async loadStylesheet(id, base) { - return loadStylesheet(id, base, onDependency) + let sheet = await loadStylesheet(id, base, onDependency) + + if (shouldRewriteUrls) { + sheet.content = await rewriteUrls({ + css: sheet.content, + root: base, + base: sheet.base, + }) + } + + return sheet }, }) diff --git a/packages/@tailwindcss-node/src/urls.ts b/packages/@tailwindcss-node/src/urls.ts new file mode 100644 --- /dev/null +++ b/packages/@tailwindcss-node/src/urls.ts @@ -0,0 +1,201 @@ +// Inlined version of code from Vite <https://github.com/vitejs/vite> +// Copyright (c) 2019-present, VoidZero Inc. and Vite contributors +// Released under the MIT License. +// +// Minor modifications have been made to work with the Tailwind CSS codebase + +import * as path from 'node:path' +import { toCss, walk } from '../../tailwindcss/src/ast' +import { parse } from '../../tailwindcss/src/css-parser' +import { normalizePath } from './normalize-path' + +const cssUrlRE = + /(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/ +const cssImageSetRE = /(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/ +const cssNotProcessedRE = /(?:gradient|element|cross-fade|image)\(/ + +const dataUrlRE = /^\s*data:/i +const externalRE = /^([a-z]+:)?\/\// +const functionCallRE = /^[A-Z_][.\w-]*\(/i + +const imageCandidateRE = + /(?:^|\s)(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g +const nonEscapedDoubleQuoteRE = /(?<!\\)"/g +const escapedSpaceCharactersRE = /(?: |\\t|\\n|\\f|\\r)+/g + +const isDataUrl = (url: string): boolean => dataUrlRE.test(url) +const isExternalUrl = (url: string): boolean => externalRE.test(url) + +type CssUrlReplacer = (url: string, importer?: string) => string | Promise<string> + +interface ImageCandidate { + url: string + descriptor: string +} + +export async function rewriteUrls({ + css, + base, + root, +}: { + css: string + base: string + root: string +}) { + if (!css.includes('url(') && !css.includes('image-set(')) { + return css + } + + let ast = parse(css) + + let promises: Promise<void>[] = [] + + function replacerForDeclaration(url: string) { + let absoluteUrl = path.posix.join(normalizePath(base), url) + let relativeUrl = path.posix.relative(normalizePath(root), absoluteUrl) + + // If the path points to a file in the same directory, `path.relative` will + // remove the leading `./` and we need to add it back in order to still + // consider the path relative + if (!relativeUrl.startsWith('.')) { + relativeUrl = './' + relativeUrl + } + + return relativeUrl + } + + walk(ast, (node) => { + if (node.kind !== 'declaration') return + if (!node.value) return + + let isCssUrl = cssUrlRE.test(node.value) + let isCssImageSet = cssImageSetRE.test(node.value) + + if (isCssUrl || isCssImageSet) { + let rewriterToUse = isCssImageSet ? rewriteCssImageSet : rewriteCssUrls + + promises.push( + rewriterToUse(node.value, replacerForDeclaration).then((url) => { + node.value = url + }), + ) + } + }) + + if (promises.length) { + await Promise.all(promises) + } + + return toCss(ast) +} + +function rewriteCssUrls(css: string, replacer: CssUrlReplacer): Promise<string> { + return asyncReplace(css, cssUrlRE, async (match) => { + const [matched, rawUrl] = match + return await doUrlReplace(rawUrl.trim(), matched, replacer) + }) +} + +async function rewriteCssImageSet(css: string, replacer: CssUrlReplacer): Promise<string> { + return await asyncReplace(css, cssImageSetRE, async (match) => { + const [, rawUrl] = match + const url = await processSrcSet(rawUrl, async ({ url }) => { + // the url maybe url(...) + if (cssUrlRE.test(url)) { + return await rewriteCssUrls(url, replacer) + } + if (!cssNotProcessedRE.test(url)) { + return await doUrlReplace(url, url, replacer) + } + return url + }) + return url + }) +} + +async function doUrlReplace( + rawUrl: string, + matched: string, + replacer: CssUrlReplacer, + funcName: string = 'url', +) { + let wrap = '' + const first = rawUrl[0] + if (first === `"` || first === `'`) { + wrap = first + rawUrl = rawUrl.slice(1, -1) + } + + if (skipUrlReplacer(rawUrl)) { + return matched + } + + let newUrl = await replacer(rawUrl) + // The new url might need wrapping even if the original did not have it, e.g. if a space was added during replacement + if (wrap === '' && newUrl !== encodeURI(newUrl)) { + wrap = '"' + } + // If wrapping in single quotes and newUrl also contains single quotes, switch to double quotes. + // Give preference to double quotes since SVG inlining converts double quotes to single quotes. + if (wrap === "'" && newUrl.includes("'")) { + wrap = '"' + } + // Escape double quotes if they exist (they also tend to be rarer than single quotes) + if (wrap === '"' && newUrl.includes('"')) { + newUrl = newUrl.replace(nonEscapedDoubleQuoteRE, '\\"') + } + return `${funcName}(${wrap}${newUrl}${wrap})` +} + +function skipUrlReplacer(rawUrl: string) { + return ( + isExternalUrl(rawUrl) || isDataUrl(rawUrl) || rawUrl[0] === '#' || functionCallRE.test(rawUrl) + ) +} + +function processSrcSet( + srcs: string, + replacer: (arg: ImageCandidate) => Promise<string>, +): Promise<string> { + return Promise.all( + parseSrcset(srcs).map(async ({ url, descriptor }) => ({ + url: await replacer({ url, descriptor }), + descriptor, + })), + ).then(joinSrcset) +} + +function parseSrcset(string: string): ImageCandidate[] { + const matches = string + .trim() + .replace(escapedSpaceCharactersRE, ' ') + .replace(/\r?\n/, '') + .replace(/,\s+/, ', ') + .replaceAll(/\s+/g, ' ') + .matchAll(imageCandidateRE) + return Array.from(matches, ({ groups }) => ({ + url: groups?.url?.trim() ?? '', + descriptor: groups?.descriptor?.trim() ?? '', + })).filter(({ url }) => !!url) +} + +function joinSrcset(ret: ImageCandidate[]) { + return ret.map(({ url, descriptor }) => url + (descriptor ? ` ${descriptor}` : '')).join(', ') +} + +async function asyncReplace( + input: string, + re: RegExp, + replacer: (match: RegExpExecArray) => string | Promise<string>, +): Promise<string> { + let match: RegExpExecArray | null + let remaining = input + let rewritten = '' + while ((match = re.exec(remaining))) { + rewritten += remaining.slice(0, match.index) + rewritten += await replacer(match) + remaining = remaining.slice(match.index + match[0].length) + } + rewritten += remaining + return rewritten +} diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -381,6 +381,7 @@ class Root { env.DEBUG && console.time('[@tailwindcss/vite] Setup compiler') this.compiler = await compile(content, { base: inputBase, + shouldRewriteUrls: true, onDependency: (path) => { addWatchFile(path) this.dependencies.add(path) diff --git a/packages/tailwindcss/src/ast.ts b/packages/tailwindcss/src/ast.ts --- a/packages/tailwindcss/src/ast.ts +++ b/packages/tailwindcss/src/ast.ts @@ -223,16 +223,6 @@ export function toCss(ast: AstNode[]) { // AtRule else if (node.kind === 'at-rule') { - if ( - node.name === '@tailwind' && - (node.params === 'utilities' || node.params.startsWith('utilities')) - ) { - for (let child of node.nodes) { - css += stringify(child, depth) - } - return css - } - // Print at-rules without nodes with a `;` instead of an empty block. // // E.g.: @@ -240,7 +230,7 @@ export function toCss(ast: AstNode[]) { // ```css // @layer base, components, utilities; // ``` - else if (node.nodes.length === 0) { + if (node.nodes.length === 0) { return `${indent}${node.name} ${node.params};\n` } diff --git a/packages/tailwindcss/src/index.ts b/packages/tailwindcss/src/index.ts --- a/packages/tailwindcss/src/index.ts +++ b/packages/tailwindcss/src/index.ts @@ -13,6 +13,7 @@ import { WalkAction, type AstNode, type AtRule, + type Context, type StyleRule, } from './ast' import { substituteAtImports } from './at-import' @@ -100,10 +101,15 @@ async function parseCss( // Find `@tailwind utilities` so that we can later replace it with the // actual generated utility class CSS. if ( - utilitiesNode === null && node.name === '@tailwind' && (node.params === 'utilities' || node.params.startsWith('utilities')) ) { + // Any additional `@tailwind utilities` nodes can be removed + if (utilitiesNode !== null) { + replaceWith([]) + return + } + let params = segment(node.params, ' ') for (let param of params) { if (param.startsWith('source(')) { @@ -452,6 +458,14 @@ async function parseCss( firstThemeRule.nodes = nodes } + // Replace the `@tailwind utilities` node with a context since it prints + // children directly. + if (utilitiesNode) { + let node = utilitiesNode as AstNode as Context + node.kind = 'context' + node.context = {} + } + // Replace `@apply` rules with the actual utility classes. substituteAtApply(ast, designSystem)
diff --git a/integrations/vite/url-rewriting.test.ts b/integrations/vite/url-rewriting.test.ts new file mode 100644 --- /dev/null +++ b/integrations/vite/url-rewriting.test.ts @@ -0,0 +1,97 @@ +import { describe, expect } from 'vitest' +import { binary, css, html, svg, test, ts, txt } from '../utils' + +const SIMPLE_IMAGE = `iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg==` + +for (let transformer of ['postcss', 'lightningcss']) { + describe(transformer, () => { + test( + 'can rewrite urls in production builds', + { + fs: { + 'package.json': txt` + { + "type": "module", + "dependencies": { + "tailwindcss": "workspace:^" + }, + "devDependencies": { + ${transformer === 'lightningcss' ? `"lightningcss": "^1.26.0",` : ''} + "@tailwindcss/vite": "workspace:^", + "vite": "^5.3.5" + } + } + `, + 'vite.config.ts': ts` + import tailwindcss from '@tailwindcss/vite' + import { defineConfig } from 'vite' + + export default defineConfig({ + plugins: [tailwindcss()], + build: { + assetsInlineLimit: 256, + cssMinify: false, + }, + css: ${transformer === 'postcss' ? '{}' : "{ transformer: 'lightningcss' }"}, + }) + `, + 'index.html': html` + <!doctype html> + <html> + <head> + <link rel="stylesheet" href="./src/app.css" /> + </head> + <body> + <div id="app"></div> + <script type="module" src="./src/main.ts"></script> + </body> + </html> + `, + 'src/main.ts': ts``, + 'src/app.css': css` + @import './dir-1/bar.css'; + @import './dir-1/dir-2/baz.css'; + @import './dir-1/dir-2/vector.css'; + `, + 'src/dir-1/bar.css': css` + .bar { + background-image: url('../../resources/image.png'); + } + `, + 'src/dir-1/dir-2/baz.css': css` + .baz { + background-image: url('../../../resources/image.png'); + } + `, + 'src/dir-1/dir-2/vector.css': css` + .baz { + background-image: url('../../../resources/vector.svg'); + } + `, + 'resources/image.png': binary(SIMPLE_IMAGE), + 'resources/vector.svg': svg` + <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"> + <rect width="100%" height="100%" fill="red" /> + <circle cx="200" cy="100" r="80" fill="green" /> + <rect width="100%" height="100%" fill="red" /> + <circle cx="200" cy="100" r="80" fill="green" /> + </svg> + `, + }, + }, + async ({ fs, exec }) => { + await exec('pnpm vite build') + + let files = await fs.glob('dist/**/*.css') + expect(files).toHaveLength(1) + + await fs.expectFileToContain(files[0][0], [SIMPLE_IMAGE]) + + let images = await fs.glob('dist/**/*.svg') + expect(images).toHaveLength(1) + + await fs.expectFileToContain(files[0][0], [/\/assets\/vector-.*?\.svg/]) + }, + ) + }) +} diff --git a/packages/@tailwindcss-node/src/urls.test.ts b/packages/@tailwindcss-node/src/urls.test.ts new file mode 100644 --- /dev/null +++ b/packages/@tailwindcss-node/src/urls.test.ts @@ -0,0 +1,127 @@ +import { expect, test } from 'vitest' +import { rewriteUrls } from './urls' + +const css = String.raw + +test('URLs can be rewritten', async () => { + let root = '/root' + + let result = await rewriteUrls({ + root, + base: '/root/foo/bar', + // prettier-ignore + css: css` + .foo { + /* Relative URLs: replaced */ + background: url(./image.jpg); + background: url(../image.jpg); + background: url('./image.jpg'); + background: url("./image.jpg"); + + /* External URL: ignored */ + background: url(http://example.com/image.jpg); + background: url('http://example.com/image.jpg'); + background: url("http://example.com/image.jpg"); + + /* Data URI: ignored */ + /* background: url(data:image/png;base64,abc==); */ + background: url('data:image/png;base64,abc=='); + background: url("data:image/png;base64,abc=="); + + /* Function calls: ignored */ + background: url(var(--foo)); + background: url(var(--foo, './image.jpg')); + background: url(var(--foo, "./image.jpg")); + + /* Fragments: ignored */ + background: url(#dont-touch-this); + + /* Image Sets - Raw URL: replaced */ + background: image-set( + image1.jpg 1x, + image2.jpg 2x + ); + background: image-set( + 'image1.jpg' 1x, + 'image2.jpg' 2x + ); + background: image-set( + "image1.jpg" 1x, + "image2.jpg" 2x + ); + + /* Image Sets - Relative URLs: replaced */ + background: image-set( + url('image1.jpg') 1x, + url('image2.jpg') 2x + ); + background: image-set( + url("image1.jpg") 1x, + url("image2.jpg") 2x + ); + background: image-set( + url('image1.avif') type('image/avif'), + url('image2.jpg') type('image/jpeg') + ); + background: image-set( + url("image1.avif") type('image/avif'), + url("image2.jpg") type('image/jpeg') + ); + + /* Image Sets - Function calls: ignored */ + background: image-set( + linear-gradient(blue, white) 1x, + linear-gradient(blue, green) 2x + ); + + /* Image Sets - Mixed: replaced */ + background: image-set( + linear-gradient(blue, white) 1x, + url("image2.jpg") 2x + ); + } + + /* Fonts - Multiple URLs: replaced */ + @font-face { + font-family: "Newman"; + src: + local("Newman"), + url("newman-COLRv1.otf") format("opentype") tech(color-COLRv1), + url("newman-outline.otf") format("opentype"), + url("newman-outline.woff") format("woff"); + } + `, + }) + + expect(result).toMatchInlineSnapshot(` + ".foo { + background: url(./foo/bar/image.jpg); + background: url(./foo/image.jpg); + background: url('./foo/bar/image.jpg'); + background: url("./foo/bar/image.jpg"); + background: url(http://example.com/image.jpg); + background: url('http://example.com/image.jpg'); + background: url("http://example.com/image.jpg"); + background: url('data:image/png;base64,abc=='); + background: url("data:image/png;base64,abc=="); + background: url(var(--foo)); + background: url(var(--foo, './image.jpg')); + background: url(var(--foo, "./image.jpg")); + background: url(#dont-touch-this); + background: image-set(url(./foo/bar/image1.jpg) 1x, url(./foo/bar/image2.jpg) 2x); + background: image-set(url('./foo/bar/image1.jpg') 1x, url('./foo/bar/image2.jpg') 2x); + background: image-set(url("./foo/bar/image1.jpg") 1x, url("./foo/bar/image2.jpg") 2x); + background: image-set(url('./foo/bar/image1.jpg') 1x, url('./foo/bar/image2.jpg') 2x); + background: image-set(url("./foo/bar/image1.jpg") 1x, url("./foo/bar/image2.jpg") 2x); + background: image-set(url('./foo/bar/image1.avif') type('image/avif'), url('./foo/bar/image2.jpg') type('image/jpeg')); + background: image-set(url("./foo/bar/image1.avif") type('image/avif'), url("./foo/bar/image2.jpg") type('image/jpeg')); + background: image-set(linear-gradient(blue, white) 1x, linear-gradient(blue, green) 2x); + background: image-set(linear-gradient(blue, white) 1x, url("./foo/bar/image2.jpg") 2x); + } + @font-face { + font-family: "Newman"; + src: local("Newman"), url("./foo/bar/newman-COLRv1.otf") format("opentype") tech(color-COLRv1), url("./foo/bar/newman-outline.otf") format("opentype"), url("./foo/bar/newman-outline.woff") format("woff"); + } + " + `) +})
[4 alpha] breaks the default Vite `url(...)` references in imported CSS files. **What version of Tailwind CSS are you using?** For example: alpha.29 (latest) **What build tool (or framework if it abstracts the build tool) are you using?** For example: Vite 5.4.10 (latest) **What version of Node.js are you using?** For example: v20.9.0 **What browser are you using?** Mainly Safari, however it's not related to the issue 🙃 **What operating system are you using?** MacOS **Reproduction URL** https://github.com/slavarazum/tailwind4-alpha-vite/ **Describe your issue** Vite provides [@import inline and rebasing](https://vite.dev/guide/features.html#import-inlining-and-rebasing) for CSS. I'm trying to import font from the Fontsource library: https://fontsource.org/fonts/nunito which references font files using `url(...)`. As a result we have such rebased urls: ![CleanShot 2024-10-24 at 17 32 22@2x](https://github.com/user-attachments/assets/3fad2d36-a1ab-48c2-89d1-34484a90edf4) After installing Tailwind, importing it, and enabling the Vite plugin, the URLs remain with the default related paths: ![CleanShot 2024-10-24 at 17 35 46@2x](https://github.com/user-attachments/assets/c24fa7a4-707c-45c7-842a-efef23990390)
@slavarazum Thanks for the report! We'll look into it. You can work around this for now by using the `@tailwindcss/postcss` client rather than the Vite client which should preserve the existing logic. Wow, Tailwind team are really quick nowdays :) Thanx for the suggestion, have already temporary migrated.
2024-11-05T15:33:38Z
4
tailwindlabs/tailwindcss
14,269
tailwindlabs__tailwindcss-14269
[ "14106" ]
a1d56d8e24574eeb748c3045c1cb32874120b981
diff --git a/integrations/utils.ts b/integrations/utils.ts --- a/integrations/utils.ts +++ b/integrations/utils.ts @@ -1,7 +1,7 @@ import dedent from 'dedent' import fastGlob from 'fast-glob' import killPort from 'kill-port' -import { execSync, spawn } from 'node:child_process' +import { exec, spawn } from 'node:child_process' import fs from 'node:fs/promises' import net from 'node:net' import { homedir, platform, tmpdir } from 'node:os' @@ -89,11 +89,23 @@ export function test( console.log(`> cd ${relative}`) } if (debug) console.log(`> ${command}`) - return execSync(command, { - cwd, - stdio: 'pipe', - ...childProcessOptions, - }).toString() + return new Promise((resolve, reject) => { + exec( + command, + { + cwd, + ...childProcessOptions, + }, + (error, stdout, stderr) => { + if (error) { + console.error(stderr) + reject(error) + } else { + resolve(stdout.toString()) + } + }, + ) + }) }, async spawn(command: string, childProcessOptions: ChildProcessOptions = {}) { let resolveDisposal: (() => void) | undefined diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -4,56 +4,84 @@ import { clearRequireCache } from '@tailwindcss/node/require-cache' import { Scanner } from '@tailwindcss/oxide' import fixRelativePathsPlugin, { normalizePath } from 'internal-postcss-fix-relative-paths' import { Features, transform } from 'lightningcss' +import fs from 'node:fs/promises' import path from 'path' -import postcssrc from 'postcss-load-config' +import postcss from 'postcss' +import postcssImport from 'postcss-import' import type { Plugin, ResolvedConfig, Rollup, Update, ViteDevServer } from 'vite' export default function tailwindcss(): Plugin[] { let server: ViteDevServer | null = null let config: ResolvedConfig | null = null - let scanner: Scanner | null = null - let changedContent: { content: string; extension: string }[] = [] - let candidates = new Set<string>() - let fullRebuildPaths: string[] = [] - - // In serve mode this is treated as a set — the content doesn't matter. - // In build mode, we store file contents to use them in renderChunk. - let cssModules: Record< - string, - { - content: string - handled: boolean - } - > = {} + let isSSR = false let minify = false + + // A list of css plugins defined in the Vite config. We need to retain these + // so that we can rerun the right transformations in build mode where we have + // to manually rebuild the css file after the compilation is done. let cssPlugins: readonly Plugin[] = [] - // Trigger update to all CSS modules - function updateCssModules(isSSR: boolean) { + // The Vite extension has two types of sources for candidates: + // + // 1. The module graph: These are all modules that vite transforms and we want + // them to be automatically scanned for candidates. + // 2. Root defined `@source`s + // + // Module graph candidates are global to the Vite extension since we do not + // know which CSS roots will be used for the modules. We are using a custom + // scanner instance with auto source discovery disabled to parse these. + // + // For candidates coming from custom `@source` directives of the CSS roots, we + // create an individual scanner for each root. + // + // Note: To improve performance, we do not remove candidates from this set. + // This means a longer-ongoing dev mode session might contain candidates that + // are no longer referenced in code. + let moduleGraphCandidates = new Set<string>() + let moduleGraphScanner = new Scanner({}) + + let roots: DefaultMap<string, Root> = new DefaultMap( + (id) => new Root(id, () => moduleGraphCandidates, config!.base), + ) + + function scanFile(id: string, content: string, extension: string, isSSR: boolean) { + let updated = false + for (let candidate of moduleGraphScanner.scanFiles([{ content, extension }])) { + updated = true + moduleGraphCandidates.add(candidate) + } + + if (updated) { + invalidateAllRoots(isSSR) + } + } + + function invalidateAllRoots(isSSR: boolean) { // If we're building then we don't need to update anything if (!server) return let updates: Update[] = [] - for (let id of Object.keys(cssModules)) { - let cssModule = server.moduleGraph.getModuleById(id) - if (!cssModule) { + for (let id of roots.keys()) { + let module = server.moduleGraph.getModuleById(id) + if (!module) { // Note: Removing this during SSR is not safe and will produce // inconsistent results based on the timing of the removal and // the order / timing of transforms. if (!isSSR) { // It is safe to remove the item here since we're iterating on a copy // of the keys. - delete cssModules[id] + roots.delete(id) } continue } - server.moduleGraph.invalidateModule(cssModule) + roots.get(id).requiresRebuild = false + server.moduleGraph.invalidateModule(module) updates.push({ - type: `${cssModule.type}-update`, - path: cssModule.url, - acceptedPath: cssModule.url, + type: `${module.type}-update`, + path: module.url, + acceptedPath: module.url, timestamp: Date.now(), }) } @@ -63,86 +91,13 @@ export default function tailwindcss(): Plugin[] { } } - function scan(src: string, extension: string) { - let updated = false - - if (scanner === null) { - changedContent.push({ content: src, extension }) - return updated - } - - // Parse all candidates given the resolved files - for (let candidate of scanner.scanFiles([{ content: src, extension }])) { - updated = true - candidates.add(candidate) - } - - return updated - } - - async function generateCss(css: string, inputPath: string, addWatchFile: (file: string) => void) { - let inputBasePath = path.dirname(path.resolve(inputPath)) - clearRequireCache(fullRebuildPaths) - fullRebuildPaths = [] - let { build, globs } = await compile(css, { - base: inputBasePath, - onDependency(path) { - addWatchFile(path) - fullRebuildPaths.push(path) - }, - }) - - scanner = new Scanner({ - sources: globs.map(({ origin, pattern }) => ({ - // Ensure the glob is relative to the input CSS file or the config file - // where it is specified. - base: origin ? path.dirname(path.resolve(inputBasePath, origin)) : inputBasePath, - pattern, - })), - }) - - // This should not be here, but right now the Vite plugin is setup where we - // setup a new scanner and compiler every time we request the CSS file - // (regardless whether it actually changed or not). - for (let candidate of scanner.scan()) { - candidates.add(candidate) - } - - if (changedContent.length > 0) { - for (let candidate of scanner.scanFiles(changedContent.splice(0))) { - candidates.add(candidate) - } - } - - // Watch individual files - for (let file of scanner.files) { - addWatchFile(file) - } - - // Watch globs - for (let glob of scanner.globs) { - if (glob.pattern[0] === '!') continue - - let relative = path.relative(config!.root, glob.base) - if (relative[0] !== '.') { - relative = './' + relative - } - // Ensure relative is a posix style path since we will merge it with - // the glob. - relative = normalizePath(relative) - - addWatchFile(path.posix.join(relative, glob.pattern)) + async function regenerateOptimizedCss(root: Root, addWatchFile: (file: string) => void) { + let content = root.lastContent + let generated = await root.generate(content, addWatchFile) + if (generated === false) { + return } - - return build(Array.from(candidates)) - } - - async function generateOptimizedCss( - css: string, - inputPath: string, - addWatchFile: (file: string) => void, - ) { - return optimizeCss(await generateCss(css, inputPath, addWatchFile), { minify }) + return optimizeCss(generated, { minify }) } // Manually run the transform functions of non-Tailwind plugins on the given CSS @@ -208,108 +163,45 @@ export default function tailwindcss(): Plugin[] { }) }, - // Append the postcss-fix-relative-paths plugin - async config(config) { - let postcssConfig = config.css?.postcss - - if (typeof postcssConfig === 'string') { - // We expand string configs to their PostCSS config object similar to - // how Vite does it. - // See: https://github.com/vitejs/vite/blob/440783953a55c6c63cd09ec8d13728dc4693073d/packages/vite/src/node/plugins/css.ts#L1580 - let searchPath = typeof postcssConfig === 'string' ? postcssConfig : config.root - let parsedConfig = await postcssrc({}, searchPath).catch((e: Error) => { - if (!e.message.includes('No PostCSS Config found')) { - if (e instanceof Error) { - let { name, message, stack } = e - e.name = 'Failed to load PostCSS config' - e.message = `Failed to load PostCSS config (searchPath: ${searchPath}): [${name}] ${message}\n${stack}` - e.stack = '' // add stack to message to retain stack - throw e - } else { - throw new Error(`Failed to load PostCSS config: ${e}`) - } - } - return null - }) - if (parsedConfig !== null) { - postcssConfig = { - options: parsedConfig.options, - plugins: parsedConfig.plugins, - } as any - } else { - postcssConfig = {} - } - config.css = { postcss: postcssConfig } - } - - // postcssConfig is no longer a string after the above. This test is to - // avoid TypeScript errors below. - if (typeof postcssConfig === 'string') { - return - } - - if (!postcssConfig || !postcssConfig?.plugins) { - config.css = config.css || {} - config.css.postcss = postcssConfig || {} - config.css.postcss.plugins = [fixRelativePathsPlugin() as any] - } else { - postcssConfig.plugins.push(fixRelativePathsPlugin() as any) - } - }, - - // Scan index.html for candidates - transformIndexHtml(html) { - let updated = scan(html, 'html') - - // In serve mode, if the generated CSS contains a URL that causes the - // browser to load a page (e.g. an URL to a missing image), triggering a - // CSS update will cause an infinite loop. We only trigger if the - // candidates have been updated. - if (updated) { - updateCssModules(isSSR) - } - }, - // Scan all non-CSS files for candidates + transformIndexHtml(html, { path }) { + scanFile(path, html, 'html', isSSR) + }, transform(src, id, options) { - if (id.includes('/.vite/')) return let extension = getExtension(id) if (extension === '' || extension === 'css') return - - scan(src, extension) - updateCssModules(options?.ssr ?? false) + scanFile(id, src, extension, options?.ssr ?? false) }, }, - /* - * The plugins that generate CSS must run after 'enforce: pre' so @imports - * are expanded in transform. - */ - { // Step 2 (serve mode): Generate CSS name: '@tailwindcss/vite:generate:serve', apply: 'serve', + enforce: 'pre', async transform(src, id, options) { - if (!isTailwindCssFile(id, src)) return + if (!isPotentialCssRootFile(id)) return - // In serve mode, we treat cssModules as a set, ignoring the value. - cssModules[id] = { content: '', handled: true } + let root = roots.get(id) if (!options?.ssr) { // Wait until all other files have been processed, so we can extract // all candidates before generating CSS. This must not be called // during SSR or it will block the server. + // + // The reason why we can not rely on the invalidation here is that the + // users would otherwise see a flicker in the styles as the CSS might + // be loaded with an invalid set of candidates first. await server?.waitForRequestsIdle?.(id) } - let code = await transformWithPlugins( - this, - id, - await generateCss(src, id, (file) => this.addWatchFile(file)), - ) - return { code } + let generated = await root.generate(src, (file) => this.addWatchFile(file)) + if (!generated) { + roots.delete(id) + return src + } + return { code: generated } }, }, @@ -317,29 +209,48 @@ export default function tailwindcss(): Plugin[] { // Step 2 (full build): Generate CSS name: '@tailwindcss/vite:generate:build', apply: 'build', + enforce: 'pre', + + async transform(src, id) { + // TODO: Check if this is also triggered by invalidateModule + if (!isPotentialCssRootFile(id)) return - transform(src, id) { - if (!isTailwindCssFile(id, src)) return - cssModules[id] = { content: src, handled: false } + let root = roots.get(id) + + // We do a first pass to generate valid CSS for the downstream plugins. + // However, since not all candidates are guaranteed to be extracted by + // this time, we have to re-run a transform for the root later. + let generated = await root.generate(src, (file) => this.addWatchFile(file)) + if (!generated) { + roots.delete(id) + return src + } + return { code: generated } }, - // renderChunk runs in the bundle generation stage after all transforms. + // `renderStart` runs in the bundle generation stage after all transforms. // We must run before `enforce: post` so the updated chunks are picked up // by vite:css-post. - async renderChunk(_code, _chunk) { - for (let [id, file] of Object.entries(cssModules)) { - if (file.handled) { + async renderStart() { + for (let [id, root] of roots.entries()) { + let generated = await regenerateOptimizedCss( + root, + // During the renderStart phase, we can not add watch files since + // those would not be causing a refresh of the right CSS file. This + // should not be an issue since we did already process the CSS file + // before and the dependencies should not be changed (only the + // candidate list might have) + () => {}, + ) + if (!generated) { + roots.delete(id) continue } - let css = await generateOptimizedCss(file.content, id, (file) => this.addWatchFile(file)) - // These plugins have side effects which, during build, results in CSS // being written to the output dir. We need to run them here to ensure // the CSS is written before the bundle is generated. - await transformWithPlugins(this, id, css) - - file.handled = true + await transformWithPlugins(this, id, generated) } }, }, @@ -351,10 +262,22 @@ function getExtension(id: string) { return path.extname(filename).slice(1) } -function isTailwindCssFile(id: string, src: string) { +function isPotentialCssRootFile(id: string) { let extension = getExtension(id) let isCssFile = extension === 'css' || (extension === 'vue' && id.includes('&lang.css')) - return isCssFile && src.includes('@tailwind') + return isCssFile +} + +function isCssRootFile(content: string) { + return ( + content.includes('@tailwind') || + content.includes('@config') || + content.includes('@plugin') || + content.includes('@apply') || + content.includes('@theme') || + content.includes('@variant') || + content.includes('@utility') + ) } function optimizeCss( @@ -380,3 +303,150 @@ function optimizeCss( errorRecovery: true, }).code.toString() } + +function idToPath(id: string) { + return path.resolve(id.replace(/\?.*$/, '')) +} + +/** + * A Map that can generate default values for keys that don't exist. + * Generated default values are added to the map to avoid recomputation. + */ +class DefaultMap<K, V> extends Map<K, V> { + constructor(private factory: (key: K, self: DefaultMap<K, V>) => V) { + super() + } + + get(key: K): V { + let value = super.get(key) + + if (value === undefined) { + value = this.factory(key, this) + this.set(key, value) + } + + return value + } +} + +class Root { + // Content is only used in serve mode where we need to capture the initial + // contents of the root file so that we can restore it during the + // `renderStart` hook. + public lastContent: string = '' + + // The lazily-initialized Tailwind compiler components. These are persisted + // throughout rebuilds but will be re-initialized if the rebuild strategy is + // set to `full`. + private compiler?: Awaited<ReturnType<typeof compile>> + + public requiresRebuild: boolean = true + + // This is the compiler-specific scanner instance that is used only to scan + // files for custom @source paths. All other modules we scan for candidates + // will use the shared moduleGraphScanner instance. + private scanner?: Scanner + + // List of all candidates that were being returned by the root scanner during + // the lifetime of the root. + private candidates: Set<string> = new Set<string>() + + // List of all file dependencies that were captured while generating the root. + // These are retained so we can clear the require cache when we rebuild the + // root. + private dependencies = new Set<string>() + + constructor( + private id: string, + private getSharedCandidates: () => Set<string>, + private base: string, + ) {} + + // Generate the CSS for the root file. This can return false if the file is + // not considered a Tailwind root. When this happened, the root can be GCed. + public async generate( + content: string, + addWatchFile: (file: string) => void, + ): Promise<string | false> { + this.lastContent = content + + let inputPath = idToPath(this.id) + let inputBase = path.dirname(path.resolve(inputPath)) + + if (!this.compiler || !this.scanner || this.requiresRebuild) { + clearRequireCache(Array.from(this.dependencies)) + this.dependencies = new Set([idToPath(inputPath)]) + + let postcssCompiled = await postcss([ + postcssImport({ + load: (path) => { + this.dependencies.add(path) + addWatchFile(path) + return fs.readFile(path, 'utf8') + }, + }), + fixRelativePathsPlugin(), + ]).process(content, { + from: inputPath, + to: inputPath, + }) + let css = postcssCompiled.css + + // This is done inside the Root#generate() method so that we can later use + // information from the Tailwind compiler to determine if the file is a + // CSS root (necessary because we will probably inline the `@import` + // resolution at some point). + if (!isCssRootFile(css)) { + return false + } + + this.compiler = await compile(css, { + base: inputBase, + onDependency: (path) => { + addWatchFile(path) + this.dependencies.add(path) + }, + }) + + this.scanner = new Scanner({ + sources: this.compiler.globs.map(({ origin, pattern }) => ({ + // Ensure the glob is relative to the input CSS file or the config + // file where it is specified. + base: origin ? path.dirname(path.resolve(inputBase, origin)) : inputBase, + pattern, + })), + }) + } + + // This should not be here, but right now the Vite plugin is setup where we + // setup a new scanner and compiler every time we request the CSS file + // (regardless whether it actually changed or not). + for (let candidate of this.scanner.scan()) { + this.candidates.add(candidate) + } + + // Watch individual files found via custom `@source` paths + for (let file of this.scanner.files) { + addWatchFile(file) + } + + // Watch globs found via custom `@source` paths + for (let glob of this.scanner.globs) { + if (glob.pattern[0] === '!') continue + + let relative = path.relative(this.base, glob.base) + if (relative[0] !== '.') { + relative = './' + relative + } + // Ensure relative is a posix style path since we will merge it with the + // glob. + relative = normalizePath(relative) + + addWatchFile(path.posix.join(relative, glob.pattern)) + } + + this.requiresRebuild = true + + return this.compiler.build([...this.getSharedCandidates(), ...this.candidates]) + } +}
diff --git a/integrations/vite/index.test.ts b/integrations/vite/index.test.ts --- a/integrations/vite/index.test.ts +++ b/integrations/vite/index.test.ts @@ -1,5 +1,5 @@ import path from 'node:path' -import { expect } from 'vitest' +import { describe, expect } from 'vitest' import { candidate, css, @@ -12,93 +12,384 @@ import { ts, yaml, } from '../utils' +;['postcss', 'lightningcss'].forEach((transformer) => { + describe(transformer, () => { + test( + `production build`, + { + fs: { + 'package.json': json`{}`, + 'pnpm-workspace.yaml': yaml` + # + packages: + - project-a + `, + 'project-a/package.json': json` + { + "type": "module", + "dependencies": { + "@tailwindcss/vite": "workspace:^", + "tailwindcss": "workspace:^" + }, + "devDependencies": { + ${transformer === 'lightningcss' ? `"lightningcss": "^1.26.0",` : ''} + "vite": "^5.3.5" + } + } + `, + 'project-a/vite.config.ts': ts` + import tailwindcss from '@tailwindcss/vite' + import { defineConfig } from 'vite' -test( - 'production build', - { - fs: { - 'package.json': json`{}`, - 'pnpm-workspace.yaml': yaml` - # - packages: - - project-a - `, - 'project-a/package.json': json` - { - "type": "module", - "dependencies": { - "@tailwindcss/vite": "workspace:^", - "tailwindcss": "workspace:^" - }, - "devDependencies": { - "vite": "^5.3.5" - } - } - `, - 'project-a/vite.config.ts': ts` - import tailwindcss from '@tailwindcss/vite' - import { defineConfig } from 'vite' + export default defineConfig({ + css: ${transformer === 'postcss' ? '{}' : "{ transformer: 'lightningcss' }"}, + build: { cssMinify: false }, + plugins: [tailwindcss()], + }) + `, + 'project-a/index.html': html` + <head> + <link rel="stylesheet" href="./src/index.css" /> + </head> + <body> + <div class="underline m-2">Hello, world!</div> + </body> + `, + 'project-a/tailwind.config.js': js` + export default { + content: ['../project-b/src/**/*.js'], + } + `, + 'project-a/src/index.css': css` + @import 'tailwindcss/theme' theme(reference); + @import 'tailwindcss/utilities'; + @config '../tailwind.config.js'; + @source '../../project-b/src/**/*.html'; + `, + 'project-b/src/index.html': html` + <div class="flex" /> + `, + 'project-b/src/index.js': js` + const className = "content-['project-b/src/index.js']" + module.exports = { className } + `, + }, + }, + async ({ root, fs, exec }) => { + await exec('pnpm vite build', { cwd: path.join(root, 'project-a') }) - export default defineConfig({ - build: { cssMinify: false }, - plugins: [tailwindcss()], + let files = await fs.glob('project-a/dist/**/*.css') + expect(files).toHaveLength(1) + let [filename] = files[0] + + await fs.expectFileToContain(filename, [ + candidate`underline`, + candidate`m-2`, + candidate`flex`, + candidate`content-['project-b/src/index.js']`, + ]) + }, + ) + + test( + `dev mode`, + { + fs: { + 'package.json': json`{}`, + 'pnpm-workspace.yaml': yaml` + # + packages: + - project-a + `, + 'project-a/package.json': json` + { + "type": "module", + "dependencies": { + "@tailwindcss/vite": "workspace:^", + "tailwindcss": "workspace:^" + }, + "devDependencies": { + "vite": "^5.3.5" + } + } + `, + 'project-a/vite.config.ts': ts` + import tailwindcss from '@tailwindcss/vite' + import { defineConfig } from 'vite' + + export default defineConfig({ + css: ${transformer === 'postcss' ? '{}' : "{ transformer: 'lightningcss' }"}, + build: { cssMinify: false }, + plugins: [tailwindcss()], + }) + `, + 'project-a/index.html': html` + <head> + <link rel="stylesheet" href="./src/index.css" /> + </head> + <body> + <div class="underline">Hello, world!</div> + </body> + `, + 'project-a/about.html': html` + <head> + <link rel="stylesheet" href="./src/index.css" /> + </head> + <body> + <div class="font-bold">Tailwind Labs</div> + </body> + `, + 'project-a/tailwind.config.js': js` + export default { + content: ['../project-b/src/**/*.js'], + } + `, + 'project-a/src/index.css': css` + @import 'tailwindcss/theme' theme(reference); + @import 'tailwindcss/utilities'; + @config '../tailwind.config.js'; + @source '../../project-b/src/**/*.html'; + `, + 'project-b/src/index.html': html` + <div class="flex" /> + `, + 'project-b/src/index.js': js` + const className = "content-['project-b/src/index.js']" + module.exports = { className } + `, + }, + }, + async ({ root, spawn, getFreePort, fs }) => { + let port = await getFreePort() + await spawn(`pnpm vite dev --port ${port}`, { + cwd: path.join(root, 'project-a'), + }) + + // Candidates are resolved lazily, so the first visit of index.html + // will only have candidates from this file. + await retryAssertion(async () => { + let css = await fetchStyles(port, '/index.html') + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).not.toContain(candidate`font-bold`) + }) + + // Going to about.html will extend the candidate list to include + // candidates from about.html. + await retryAssertion(async () => { + let css = await fetchStyles(port, '/about.html') + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`font-bold`) }) - `, - 'project-a/index.html': html` - <head> - <link rel="stylesheet" href="./src/index.css" /> - </head> - <body> - <div class="underline m-2">Hello, world!</div> - </body> - `, - 'project-a/tailwind.config.js': js` - export default { - content: ['../project-b/src/**/*.js'], - } - `, - 'project-a/src/index.css': css` - @import 'tailwindcss/theme' theme(reference); - @import 'tailwindcss/utilities'; - @config '../tailwind.config.js'; - @source '../../project-b/src/**/*.html'; - `, - 'project-b/src/index.html': html` - <div class="flex" /> - `, - 'project-b/src/index.js': js` - const className = "content-['project-b/src/index.js']" - module.exports = { className } - `, - }, - }, - async ({ root, fs, exec }) => { - await exec('pnpm vite build', { cwd: path.join(root, 'project-a') }) - - let files = await fs.glob('project-a/dist/**/*.css') - expect(files).toHaveLength(1) - let [filename] = files[0] - - await fs.expectFileToContain(filename, [ - candidate`underline`, - candidate`flex`, - candidate`m-2`, - candidate`content-['project-b/src/index.js']`, - ]) - }, -) + + // Updates are additive and cause new candidates to be added. + await fs.write( + 'project-a/index.html', + html` + <head> + <link rel="stylesheet" href="./src/index.css" /> + </head> + <body> + <div class="underline m-2">Hello, world!</div> + </body> + `, + ) + await retryAssertion(async () => { + let css = await fetchStyles(port) + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`font-bold`) + expect(css).toContain(candidate`m-2`) + }) + + // Manually added `@source`s are watched and trigger a rebuild + await fs.write( + 'project-b/src/index.js', + js` + const className = "[.changed_&]:content-['project-b/src/index.js']" + module.exports = { className } + `, + ) + await retryAssertion(async () => { + let css = await fetchStyles(port) + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`font-bold`) + expect(css).toContain(candidate`m-2`) + expect(css).toContain(candidate`[.changed_&]:content-['project-b/src/index.js']`) + }) + + // After updates to the CSS file, all previous candidates should still be in + // the generated CSS + await fs.write( + 'project-a/src/index.css', + css` + ${await fs.read('project-a/src/index.css')} + + .red { + color: red; + } + `, + ) + await retryAssertion(async () => { + let css = await fetchStyles(port) + expect(css).toContain(candidate`red`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`m-2`) + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`[.changed_&]:content-['project-b/src/index.js']`) + expect(css).toContain(candidate`font-bold`) + }) + }, + ) + + test( + 'watch mode', + { + fs: { + 'package.json': json`{}`, + 'pnpm-workspace.yaml': yaml` + # + packages: + - project-a + `, + 'project-a/package.json': json` + { + "type": "module", + "dependencies": { + "@tailwindcss/vite": "workspace:^", + "tailwindcss": "workspace:^" + }, + "devDependencies": { + "vite": "^5.3.5" + } + } + `, + 'project-a/vite.config.ts': ts` + import tailwindcss from '@tailwindcss/vite' + import { defineConfig } from 'vite' + + export default defineConfig({ + build: { cssMinify: false }, + plugins: [tailwindcss()], + }) + `, + 'project-a/index.html': html` + <head> + <link rel="stylesheet" href="./src/index.css" /> + </head> + <body> + <div class="underline">Hello, world!</div> + </body> + `, + 'project-a/tailwind.config.js': js` + export default { + content: ['../project-b/src/**/*.js'], + } + `, + 'project-a/src/index.css': css` + @import 'tailwindcss/theme' theme(reference); + @import 'tailwindcss/utilities'; + @config '../tailwind.config.js'; + @source '../../project-b/src/**/*.html'; + `, + 'project-b/src/index.html': html` + <div class="flex" /> + `, + 'project-b/src/index.js': js` + const className = "content-['project-b/src/index.js']" + module.exports = { className } + `, + }, + }, + async ({ root, spawn, fs }) => { + await spawn(`pnpm vite build --watch`, { + cwd: path.join(root, 'project-a'), + }) + + let filename = '' + await retryAssertion(async () => { + let files = await fs.glob('project-a/dist/**/*.css') + expect(files).toHaveLength(1) + filename = files[0][0] + }) + + await fs.expectFileToContain(filename, [candidate`underline`, candidate`flex`]) + + await new Promise((resolve) => setTimeout(resolve, 1000)) + + // Updates are additive and cause new candidates to be added. + await fs.write( + 'project-a/index.html', + html` + <head> + <link rel="stylesheet" href="./src/index.css" /> + </head> + <body> + <div class="underline m-2">Hello, world!</div> + </body> + `, + ) + await retryAssertion(async () => { + let files = await fs.glob('project-a/dist/**/*.css') + expect(files).toHaveLength(1) + let [, css] = files[0] + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`m-2`) + }) + + // Manually added `@source`s are watched and trigger a rebuild + await fs.write( + 'project-b/src/index.js', + js` + const className = "[.changed_&]:content-['project-b/src/index.js']" + module.exports = { className } + `, + ) + await retryAssertion(async () => { + let files = await fs.glob('project-a/dist/**/*.css') + expect(files).toHaveLength(1) + let [, css] = files[0] + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`m-2`) + expect(css).toContain(candidate`[.changed_&]:content-['project-b/src/index.js']`) + }) + + // After updates to the CSS file, all previous candidates should still be in + // the generated CSS + await fs.write( + 'project-a/src/index.css', + css` + ${await fs.read('project-a/src/index.css')} + + .red { + color: red; + } + `, + ) + await retryAssertion(async () => { + let files = await fs.glob('project-a/dist/**/*.css') + expect(files).toHaveLength(1) + let [, css] = files[0] + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`flex`) + expect(css).toContain(candidate`m-2`) + expect(css).toContain(candidate`[.changed_&]:content-['project-b/src/index.js']`) + expect(css).toContain(candidate`red`) + }) + }, + ) + }) +}) test( - 'dev mode', + `demote Tailwind roots to regular CSS files and back to Tailwind roots while restoring all candidates`, { fs: { - 'package.json': json`{}`, - 'pnpm-workspace.yaml': yaml` - # - packages: - - project-a - `, - 'project-a/package.json': json` + 'package.json': json` { "type": "module", "dependencies": { @@ -110,7 +401,7 @@ test( } } `, - 'project-a/vite.config.ts': ts` + 'vite.config.ts': ts` import tailwindcss from '@tailwindcss/vite' import { defineConfig } from 'vite' @@ -119,7 +410,7 @@ test( plugins: [tailwindcss()], }) `, - 'project-a/index.html': html` + 'index.html': html` <head> <link rel="stylesheet" href="./src/index.css" /> </head> @@ -127,46 +418,26 @@ test( <div class="underline">Hello, world!</div> </body> `, - 'project-a/about.html': html` + 'about.html': html` <head> <link rel="stylesheet" href="./src/index.css" /> </head> <body> - <div class="font-bold ">Tailwind Labs</div> + <div class="font-bold">Tailwind Labs</div> </body> `, - 'project-a/tailwind.config.js': js` - export default { - content: ['../project-b/src/**/*.js'], - } - `, - 'project-a/src/index.css': css` - @import 'tailwindcss/theme' theme(reference); - @import 'tailwindcss/utilities'; - @config '../tailwind.config.js'; - @source '../../project-b/src/**/*.html'; - `, - 'project-b/src/index.html': html` - <div class="flex" /> - `, - 'project-b/src/index.js': js` - const className = "content-['project-b/src/index.js']" - module.exports = { className } - `, + 'src/index.css': css`@import 'tailwindcss';`, }, }, - async ({ root, spawn, getFreePort, fs }) => { + async ({ spawn, getFreePort, fs }) => { let port = await getFreePort() - await spawn(`pnpm vite dev --port ${port}`, { - cwd: path.join(root, 'project-a'), - }) + await spawn(`pnpm vite dev --port ${port}`) // Candidates are resolved lazily, so the first visit of index.html // will only have candidates from this file. await retryAssertion(async () => { let css = await fetchStyles(port, '/index.html') expect(css).toContain(candidate`underline`) - expect(css).toContain(candidate`flex`) expect(css).not.toContain(candidate`font-bold`) }) @@ -175,63 +446,14 @@ test( await retryAssertion(async () => { let css = await fetchStyles(port, '/about.html') expect(css).toContain(candidate`underline`) - expect(css).toContain(candidate`flex`) expect(css).toContain(candidate`font-bold`) }) - // Updates are additive and cause new candidates to be added. - await fs.write( - 'project-a/index.html', - html` - <head> - <link rel="stylesheet" href="./src/index.css" /> - </head> - <body> - <div class="underline m-2">Hello, world!</div> - </body> - `, - ) - await retryAssertion(async () => { - let css = await fetchStyles(port) - expect(css).toContain(candidate`underline`) - expect(css).toContain(candidate`font-bold`) - expect(css).toContain(candidate`m-2`) - }) - - // Manually added `@source`s are watched and trigger a rebuild - await fs.write( - 'project-b/src/index.js', - js` - const className = "[.changed_&]:content-['project-b/src/index.js']" - module.exports = { className } - `, - ) - await retryAssertion(async () => { - let css = await fetchStyles(port) - expect(css).toContain(candidate`underline`) - expect(css).toContain(candidate`font-bold`) - expect(css).toContain(candidate`m-2`) - expect(css).toContain(candidate`[.changed_&]:content-['project-b/src/index.js']`) - }) - - // After updates to the CSS file, all previous candidates should still be in - // the generated CSS - await fs.write( - 'project-a/src/index.css', - css` - ${await fs.read('project-a/src/index.css')} - - .red { - color: red; - } - `, - ) + // We change the CSS file so it is no longer a valid Tailwind root. + await fs.write('src/index.css', css`@import 'tailwindcss';`) await retryAssertion(async () => { let css = await fetchStyles(port) - expect(css).toContain(candidate`red`) - expect(css).toContain(candidate`m-2`) expect(css).toContain(candidate`underline`) - expect(css).toContain(candidate`[.changed_&]:content-['project-b/src/index.js']`) expect(css).toContain(candidate`font-bold`) }) },
[v4] vite build --watch only compile html classes right on the init run **What version of Tailwind CSS are you using?** v4 **What build tool (or framework if it abstracts the build tool) are you using?** Plain vite Projekt with css/html Input files in rollup config **What version of Node.js are you using?** v20.11.0 **What browser are you using?** Chrome **What operating system are you using?** Linux Debian **Describe your issue** I have some css files ans HTML files. The HTML contains some tailwindcss classes like p-2 etc. If i run vite build --watch the first build is correct. And the p-2 css Definition is in the Output css. But if i change the classes in the HTML it recompiles but dont get the new classes. If i use @apply in my source css file the Compiler works every time. So must be a bug in the HTML stuff.
try adding purge: ["./src/**/*.{html,js}"], in the tailwind config file @Massa-Albani4 Its the vite Plugin from v4 no tailwindcss config anymore @KartoffelToby Heya! Do you have a repro that you can share? We've been looking into the Vite plugin just last week and as a result of that also added a new integration test that does cover [changing a `.html` file in watch mode](https://github.com/tailwindlabs/tailwindcss/blob/next/integrations/vite/index.test.ts#L78-L157) if you need a starting point. **1. Check Vite Configuration:** Ensure that your Vite configuration is set up correctly to watch for changes in HTML files. Your vite.config.js should include the HTML files in the build.rollupOptions.input configuration. ```javascript import { defineConfig } from "vite" import path from "path" export default defineConfig({ build: { rollupOptions: { input: { main: path.resolve(__dirname, "index.html"), // Add other HTML entry points here } } } }) ``` / / **2. Tailwind CSS Configuration:** Make sure your tailwind.config.js is correctly configured to purge unused styles from the correct files. For example: ```javascript module.exports = { content: [ "/index.html", "./src/**/*.{js,ts,jsx,tsx,html}", ], theme: { extend: {}, }, plugins: [], } ``` / / **3. Update Dependencies:** Ensure all dependencies are up-to-date, including Vite and Tailwind CSS. Run: `npm update`
2024-08-27T10:21:12Z
3.4
tailwindlabs/tailwindcss
13,949
tailwindlabs__tailwindcss-13949
[ "13948" ]
62de02a37946c48c5fa6cdb800173b54198ebb9b
diff --git a/packages/tailwindcss/playwright.config.ts b/packages/tailwindcss/playwright.config.ts --- a/packages/tailwindcss/playwright.config.ts +++ b/packages/tailwindcss/playwright.config.ts @@ -36,11 +36,14 @@ export default defineConfig({ name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, - { name: 'webkit', use: { ...devices['Desktop Safari'] }, }, + { + name: 'firefox', + use: { ...devices['Desktop Firefox'] }, + }, /* Test against mobile viewports. */ // { diff --git a/packages/tailwindcss/src/ast.ts b/packages/tailwindcss/src/ast.ts --- a/packages/tailwindcss/src/ast.ts +++ b/packages/tailwindcss/src/ast.ts @@ -148,9 +148,9 @@ export function toCss(ast: AstNode[]) { } if (inherits) { - propertyFallbacksRoot.push(decl(property, initialValue ?? ' ')) + propertyFallbacksRoot.push(decl(property, initialValue ?? 'initial')) } else { - propertyFallbacksUniversal.push(decl(property, initialValue ?? ' ')) + propertyFallbacksUniversal.push(decl(property, initialValue ?? 'initial')) } seenAtProperties.add(node.selector)
diff --git a/packages/tailwindcss/src/__snapshots__/index.test.ts.snap b/packages/tailwindcss/src/__snapshots__/index.test.ts.snap --- a/packages/tailwindcss/src/__snapshots__/index.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/index.test.ts.snap @@ -431,11 +431,11 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using --tw-shadow-colored: 0 0 #0000; --tw-inset-shadow: 0 0 #0000; --tw-inset-shadow-colored: 0 0 #0000; - --tw-ring-color: ; + --tw-ring-color: initial; --tw-ring-shadow: 0 0 #0000; - --tw-inset-ring-color: ; + --tw-inset-ring-color: initial; --tw-inset-ring-shadow: 0 0 #0000; - --tw-ring-inset: ; + --tw-ring-inset: initial; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -3824,9 +3824,9 @@ test('touch-pan', () => { @supports (-moz-orient: inline) { @layer base { *, :before, :after, ::backdrop { - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: initial; + --tw-pan-y: initial; + --tw-pinch-zoom: initial; } } } @@ -3868,9 +3868,9 @@ test('touch-pinch-zoom', () => { @supports (-moz-orient: inline) { @layer base { *, :before, :after, ::backdrop { - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: initial; + --tw-pan-y: initial; + --tw-pinch-zoom: initial; } } } @@ -8239,8 +8239,8 @@ test('from', () => { --tw-gradient-from: #0000; --tw-gradient-to: #0000; --tw-gradient-via: transparent; - --tw-gradient-stops: ; - --tw-gradient-via-stops: ; + --tw-gradient-stops: initial; + --tw-gradient-via-stops: initial; --tw-gradient-from-position: 0%; --tw-gradient-via-position: 50%; --tw-gradient-to-position: 100%; @@ -8476,8 +8476,8 @@ test('via', () => { --tw-gradient-from: #0000; --tw-gradient-to: #0000; --tw-gradient-via: transparent; - --tw-gradient-stops: ; - --tw-gradient-via-stops: ; + --tw-gradient-stops: initial; + --tw-gradient-via-stops: initial; --tw-gradient-from-position: 0%; --tw-gradient-via-position: 50%; --tw-gradient-to-position: 100%; @@ -8701,8 +8701,8 @@ test('to', () => { --tw-gradient-from: #0000; --tw-gradient-to: #0000; --tw-gradient-via: transparent; - --tw-gradient-stops: ; - --tw-gradient-via-stops: ; + --tw-gradient-stops: initial; + --tw-gradient-via-stops: initial; --tw-gradient-from-position: 0%; --tw-gradient-via-position: 50%; --tw-gradient-to-position: 100%; @@ -10477,15 +10477,15 @@ test('filter', () => { @supports (-moz-orient: inline) { @layer base { *, :before, :after, ::backdrop { - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-opacity: ; - --tw-saturate: ; - --tw-sepia: ; + --tw-blur: initial; + --tw-brightness: initial; + --tw-contrast: initial; + --tw-grayscale: initial; + --tw-hue-rotate: initial; + --tw-invert: initial; + --tw-opacity: initial; + --tw-saturate: initial; + --tw-sepia: initial; } } } @@ -10787,15 +10787,15 @@ test('backdrop-filter', () => { @supports (-moz-orient: inline) { @layer base { *, :before, :after, ::backdrop { - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-backdrop-blur: initial; + --tw-backdrop-brightness: initial; + --tw-backdrop-contrast: initial; + --tw-backdrop-grayscale: initial; + --tw-backdrop-hue-rotate: initial; + --tw-backdrop-invert: initial; + --tw-backdrop-opacity: initial; + --tw-backdrop-saturate: initial; + --tw-backdrop-sepia: initial; } } } @@ -11157,10 +11157,10 @@ test('contain', () => { @supports (-moz-orient: inline) { @layer base { *, :before, :after, ::backdrop { - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; + --tw-contain-size: initial; + --tw-contain-layout: initial; + --tw-contain-paint: initial; + --tw-contain-style: initial; } } } @@ -11378,11 +11378,11 @@ test('font-variant-numeric', () => { @supports (-moz-orient: inline) { @layer base { *, :before, :after, ::backdrop { - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; + --tw-ordinal: initial; + --tw-slashed-zero: initial; + --tw-numeric-figure: initial; + --tw-numeric-spacing: initial; + --tw-numeric-fraction: initial; } } } @@ -12104,11 +12104,11 @@ test('shadow', () => { --tw-shadow-colored: 0 0 #0000; --tw-inset-shadow: 0 0 #0000; --tw-inset-shadow-colored: 0 0 #0000; - --tw-ring-color: ; + --tw-ring-color: initial; --tw-ring-shadow: 0 0 #0000; - --tw-inset-ring-color: ; + --tw-inset-ring-color: initial; --tw-inset-ring-shadow: 0 0 #0000; - --tw-ring-inset: ; + --tw-ring-inset: initial; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; @@ -12356,11 +12356,11 @@ test('inset-shadow', () => { --tw-shadow-colored: 0 0 #0000; --tw-inset-shadow: 0 0 #0000; --tw-inset-shadow-colored: 0 0 #0000; - --tw-ring-color: ; + --tw-ring-color: initial; --tw-ring-shadow: 0 0 #0000; - --tw-inset-ring-color: ; + --tw-inset-ring-color: initial; --tw-inset-ring-shadow: 0 0 #0000; - --tw-ring-inset: ; + --tw-ring-inset: initial; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; @@ -12604,11 +12604,11 @@ test('ring', () => { --tw-shadow-colored: 0 0 #0000; --tw-inset-shadow: 0 0 #0000; --tw-inset-shadow-colored: 0 0 #0000; - --tw-ring-color: ; + --tw-ring-color: initial; --tw-ring-shadow: 0 0 #0000; - --tw-inset-ring-color: ; + --tw-inset-ring-color: initial; --tw-inset-ring-shadow: 0 0 #0000; - --tw-ring-inset: ; + --tw-ring-inset: initial; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; @@ -12853,11 +12853,11 @@ test('inset-ring', () => { --tw-shadow-colored: 0 0 #0000; --tw-inset-shadow: 0 0 #0000; --tw-inset-shadow-colored: 0 0 #0000; - --tw-ring-color: ; + --tw-ring-color: initial; --tw-ring-shadow: 0 0 #0000; - --tw-inset-ring-color: ; + --tw-inset-ring-color: initial; --tw-inset-ring-shadow: 0 0 #0000; - --tw-ring-inset: ; + --tw-ring-inset: initial; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000;
Gradients do not work in Firefox in v4.0.0-alpha.16, potentially caused by special `@supports (-moz-orient: inline)` selector ### Discussed in https://github.com/tailwindlabs/tailwindcss/discussions/13941 , since it is reproducible in tailwind play, I think it is indeed a bug and created the issue for it. **What version of Tailwind CSS are you using?** v4.0.0-alpha.16 **What build tool (or framework if it abstracts the build tool) are you using?** `vite` v5.3.3, `@tailwindcss/vite` v4.0.0-alpha.16 **What version of Node.js are you using?** v22.4.0 **What browser are you using?** Chrome, Opera, Edge, Firefox **What operating system are you using?** Windows **Reproduction URL** See the following example in Chrome vs. Firefox: https://play.tailwindcss.com/ASf2fh5fiH In Chrome it works but in Firefox the gradient is not displayed. While I applied layers in the example, the same issue occurs if I just `@import 'tailwindcss';` instead: https://play.tailwindcss.com/MPNPWOGHdL?file=css **Describe your issue** <div type='discussions-op-text'> <sup>Originally posted by **sceee** July 3, 2024</sup> Gradients do not seem to work in Firefox in `v4.0.0-alpha.16` whereas they work in Chrome. See the following example in Chrome vs. Firefox: https://play.tailwindcss.com/ASf2fh5fiH In Chrome it works but in Firefox the gradient is not displayed. While I applied layers in the example, the same issue occurs if I just `@import 'tailwindcss';` instead: https://play.tailwindcss.com/MPNPWOGHdL?file=css It seems in Firefox there is a special ruling applied to the element based on the `@supports (-moz-orient: inline)` selector. It seems this is injected here: https://github.com/tailwindlabs/tailwindcss/blob/62de02a37946c48c5fa6cdb800173b54198ebb9b/packages/tailwindcss/src/ast.ts#L202 ```css @supports (-moz-orient: inline) { @layer base { *, ::before, ::after, ::backdrop { --tw-gradient-from: #0000; --tw-gradient-to: #0000; --tw-gradient-via: transparent; --tw-gradient-stops: ; --tw-gradient-via-stops: ; --tw-gradient-from-position: 0%; --tw-gradient-via-position: 50%; --tw-gradient-to-position: 100%; } } } ``` According to the Browser dev tools, `--tw-gradient-from`, `--tw-gradient-to` and `--tw-gradient-stops` are overwritten (and therefore not applied) but `--tw-gradient-via-stops` is set to [nothing] which seems to cause this issue. If I disable the `--tw-gradient-via-stops` setting from this rule in the dev tools, the gradient also appears in Firefox. Is this a known issue or shall I open a issue for this?</div>
2024-07-04T14:12:50Z
3.4
tailwindlabs/tailwindcss
13,770
tailwindlabs__tailwindcss-13770
[ "13769" ]
9fda4616eb5706223374c921c9ee4d90903f6fee
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -434,23 +434,40 @@ export let variantPlugins = { ) }, - hasVariants: ({ matchVariant }) => { - matchVariant('has', (value) => `&:has(${normalize(value)})`, { values: {} }) + hasVariants: ({ matchVariant, prefix }) => { + matchVariant('has', (value) => `&:has(${normalize(value)})`, { + values: {}, + [INTERNAL_FEATURES]: { + respectPrefix: false, + }, + }) + matchVariant( 'group-has', (value, { modifier }) => modifier - ? `:merge(.group\\/${modifier}):has(${normalize(value)}) &` - : `:merge(.group):has(${normalize(value)}) &`, - { values: {} } + ? `:merge(${prefix('.group')}\\/${modifier}):has(${normalize(value)}) &` + : `:merge(${prefix('.group')}):has(${normalize(value)}) &`, + { + values: {}, + [INTERNAL_FEATURES]: { + respectPrefix: false, + }, + } ) + matchVariant( 'peer-has', (value, { modifier }) => modifier - ? `:merge(.peer\\/${modifier}):has(${normalize(value)}) ~ &` - : `:merge(.peer):has(${normalize(value)}) ~ &`, - { values: {} } + ? `:merge(${prefix('.peer')}\\/${modifier}):has(${normalize(value)}) ~ &` + : `:merge(${prefix('.peer')}):has(${normalize(value)}) ~ &`, + { + values: {}, + [INTERNAL_FEATURES]: { + respectPrefix: false, + }, + } ) },
diff --git a/tests/prefix.test.js b/tests/prefix.test.js --- a/tests/prefix.test.js +++ b/tests/prefix.test.js @@ -637,3 +637,132 @@ test('does not prefix arbitrary group/peer classes', async () => { } `) }) + +test('does not prefix has-* variants with arbitrary values', async () => { + let config = { + prefix: 'tw-', + content: [ + { + raw: html` + <div class="has-[.active]:tw-flex foo"> + <figure class="has-[figcaption]:tw-inline-block"></figure> + <div class="has-[.foo]:tw-flex"></div> + <div class="has-[.foo:hover]:tw-block"></div> + <div class="has-[[data-active]]:tw-inline"></div> + <div class="has-[>_.potato]:tw-table"></div> + <div class="has-[+_h2]:tw-grid"></div> + <div class="has-[>_h1_+_h2]:tw-contents"></div> + <div class="has-[h2]:has-[.banana]:tw-hidden"></div> + </div> + `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + const result = await run(input, config) + + expect(result.css).toMatchFormattedCss(css` + .has-\[\.foo\:hover\]\:tw-block:has(.foo:hover) { + display: block; + } + .has-\[figcaption\]\:tw-inline-block:has(figcaption) { + display: inline-block; + } + .has-\[\[data-active\]\]\:tw-inline:has([data-active]) { + display: inline; + } + .has-\[\.active\]\:tw-flex:has(.active), + .has-\[\.foo\]\:tw-flex:has(.foo) { + display: flex; + } + .has-\[\>_\.potato\]\:tw-table:has(> .potato) { + display: table; + } + .has-\[\+_h2\]\:tw-grid:has(+ h2) { + display: grid; + } + .has-\[\>_h1_\+_h2\]\:tw-contents:has(> h1 + h2) { + display: contents; + } + .has-\[h2\]\:has-\[\.banana\]\:tw-hidden:has(.banana):has(h2) { + display: none; + } + `) +}) + +test('does not prefix group-has-* variants with arbitrary values', () => { + let config = { + prefix: 'tw-', + theme: {}, + content: [ + { + raw: html` + <div class="tw-group"> + <div class="group-has-[>_h1_+_.foo]:tw-block"></div> + </div> + <div class="tw-group/two"> + <div class="group-has-[>_h1_+_.foo]/two:tw-flex"></div> + </div> + `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .tw-group:has(> h1 + .foo) .group-has-\[\>_h1_\+_\.foo\]\:tw-block { + display: block; + } + .tw-group\/two:has(> h1 + .foo) .group-has-\[\>_h1_\+_\.foo\]\/two\:tw-flex { + display: flex; + } + `) + }) +}) + +test('does not prefix peer-has-* variants with arbitrary values', () => { + let config = { + prefix: 'tw-', + theme: {}, + content: [ + { + raw: html` + <div> + <div className="tw-peer"></div> + <div class="peer-has-[>_h1_+_.foo]:tw-block"></div> + </div> + <div> + <div className="tw-peer"></div> + <div class="peer-has-[>_h1_+_.foo]/two:tw-flex"></div> + </div> + `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .tw-peer:has(> h1 + .foo) ~ .peer-has-\[\>_h1_\+_\.foo\]\:tw-block { + display: block; + } + .tw-peer\/two:has(> h1 + .foo) ~ .peer-has-\[\>_h1_\+_\.foo\]\/two\:tw-flex { + display: flex; + } + `) + }) +})
Classes are prefixed when using `has-*` variants with arbitrary values **What version of Tailwind CSS are you using?** v3.4.3 **What build tool (or framework if it abstracts the build tool) are you using?** Tested using `play.tailwindcss.com` and added some test to `tailwindcss` repo. **What version of Node.js are you using?** v20.9.0 **What browser are you using?** Chrome **What operating system are you using?** macOS **Reproduction URL** https://play.tailwindcss.com/TJ9YW9YcGi https://play.tailwindcss.com/abhsA5hh21 ![shot2024-05-31 at 08 58 17@2x](https://github.com/tailwindlabs/tailwindcss/assets/3856862/7101deb8-559c-4f7d-b5a7-706714bf6040) **Describe your issue** Classes are prefixed when using `has-*` variants with arbitrary values
2024-05-31T06:59:16Z
3.4
tailwindlabs/tailwindcss
13,379
tailwindlabs__tailwindcss-13379
[ "13037" ]
97607f1cfb30103db96747c9b9e50fefa117fbb4
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -270,7 +270,7 @@ export let variantPlugins = { addVariant('dark', selector) } else if (mode === 'class') { // Old behavior - addVariant('dark', `:is(${selector} &)`) + addVariant('dark', `&:is(${selector} *)`) } },
diff --git a/tests/apply.test.js b/tests/apply.test.js --- a/tests/apply.test.js +++ b/tests/apply.test.js @@ -2212,3 +2212,40 @@ test('applying user defined classes with nested CSS should result in an error', `) }) }) + +test('applying classes with class-based dark variant to pseudo elements', async () => { + let config = { + darkMode: 'class', + content: [], + } + + let input = css` + ::-webkit-scrollbar-track { + @apply bg-white dark:bg-black; + } + ::-webkit-scrollbar-track:hover { + @apply bg-blue-600 dark:bg-blue-500; + } + ` + + let result = await run(input, config) + + expect(result.css).toMatchFormattedCss(css` + ::-webkit-scrollbar-track { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + } + :is(.dark *)::-webkit-scrollbar-track { + --tw-bg-opacity: 1; + background-color: rgb(0 0 0 / var(--tw-bg-opacity)); + } + ::-webkit-scrollbar-track:hover { + --tw-bg-opacity: 1; + background-color: rgb(37 99 235 / var(--tw-bg-opacity)); + } + :is(.dark *)::-webkit-scrollbar-track:hover { + --tw-bg-opacity: 1; + background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + } + `) +}) diff --git a/tests/dark-mode.test.js b/tests/dark-mode.test.js --- a/tests/dark-mode.test.js +++ b/tests/dark-mode.test.js @@ -16,7 +16,7 @@ it('should be possible to use the darkMode "class" mode', () => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` ${defaults} - :is(.dark .dark\:font-bold) { + .dark\:font-bold:is(.dark *) { font-weight: 700; } `) @@ -39,7 +39,7 @@ it('should be possible to change the class name', () => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` ${defaults} - :is(.test-dark .dark\:font-bold) { + .dark\:font-bold:is(.test-dark *) { font-weight: 700; } `) @@ -133,7 +133,7 @@ it('should support the deprecated `class` dark mode behavior', () => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` - :is(.dark .dark\:font-bold) { + .dark\:font-bold:is(.dark *) { font-weight: 700; } `) @@ -153,7 +153,7 @@ it('should support custom classes with deprecated `class` dark mode', () => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` - :is(.my-dark .dark\:font-bold) { + .dark\:font-bold:is(.my-dark *) { font-weight: 700; } `) @@ -181,7 +181,7 @@ it('should use legacy sorting when using `darkMode: class`', () => { --tw-text-opacity: 1; color: rgb(187 247 208 / var(--tw-text-opacity)); } - :is(.dark .dark\:text-green-100) { + .dark\:text-green-100:is(.dark *) { --tw-text-opacity: 1; color: rgb(220 252 231 / var(--tw-text-opacity)); }
dark selector does not work correctly in @apply starting from version 3.3.0 <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?**: v3.3.0 **What build tool (or framework if it abstracts the build tool) are you using?**: postcss-cli 8.4.32, Next.js 13.4.19, webpack **What version of Node.js are you using?**: v20 **What browser are you using?**: Chrome **What operating system are you using?**: Windows **Reproduction URL**: https://play.tailwindcss.com/8lfHYybqfC **Describe your issue** In the repro you can see that in the latest version of tw v3 the scrollbar does not turn green in dark mode, while it does in v2. There is a workaround if you use the .dark class: ```css /* THIS DOES NOT WORK */ ::-webkit-scrollbar-track { @apply bg-yellow-800 dark:bg-green-800; } ::-webkit-scrollbar-thumb { @apply bg-yellow-500 dark:bg-green-500; } ::-webkit-scrollbar-thumb:hover { @apply bg-yellow-600 dark:bg-green-600; } /* THIS DOES WORK */ ::-webkit-scrollbar-track { @apply bg-yellow-800 } ::-webkit-scrollbar-thumb { @apply bg-yellow-500 } ::-webkit-scrollbar-thumb:hover { @apply bg-yellow-600 } .dark ::-webkit-scrollbar-track { @apply bg-green-800; } .dark ::-webkit-scrollbar-thumb { @apply bg-green-500; } .dark ::-webkit-scrollbar-thumb:hover { @apply bg-green-600; } ``` This should work with the first option as well. This issue has already been reported in different discussions without a repro, or in similar issues that were linked to a specific framework. - I got the workaround from this similar discussion: https://github.com/tailwindlabs/tailwindcss/discussions/2917#discussioncomment-6435337 - description of this issue without repro https://github.com/tailwindlabs/tailwindcss/discussions/11497 - description of this issue without repro https://github.com/tailwindlabs/tailwindcss/discussions/11665 - Not sure, but I think it's related https://github.com/tailwindlabs/tailwindcss/discussions/11077 - Linked to Angular: https://github.com/tailwindlabs/tailwindcss/issues/12352 - Linked to Vue: https://github.com/tailwindlabs/tailwindcss/issues/11024 According to [the release article of v3.3](https://tailwindcss.com/blog/tailwindcss-v3-3#new-caption-side-utilities) there should be no breaking changes. This is one though.
Definitely a real bug, thanks for reporting! My gut is we can fix this by updating the `class` strategy implementation to work like the `selector` strategy implementation, where we put the `&` at the front: ```diff } else if (mode === 'class') { - addVariant('dark', `:is(${selector} &)`) + addVariant('dark', `&:is(${selector}, ${selector} *)`) } ``` By the looks of it, our internals will properly hoist out the pseudo-elements automatically if we move things around this way. Will try to get this patched up this week 👍 @adamwathan i am interested can you assign it me I came across the same issue with my next project. I solved it by making these changes in tailwind.config.js: from `darkMode: ["class", "[data-theme='dark']"],` into `darkMode: ["selector", "[data-theme='dark']"],` ["The selector strategy replaced the class strategy in Tailwind CSS v3.4.1."](https://tailwindcss.com/docs/dark-mode)
2024-03-27T14:14:41Z
3.4
tailwindlabs/tailwindcss
11,470
tailwindlabs__tailwindcss-11470
[ "11466" ]
eae2b7a3f4f3a2981614a580a9f5534b9ffe0586
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -933,7 +933,7 @@ export let corePlugins = { }, animation: ({ matchUtilities, theme, config }) => { - let prefixName = (name) => `${config('prefix')}${escapeClassName(name)}` + let prefixName = (name) => escapeClassName(config('prefix') + name) let keyframes = Object.fromEntries( Object.entries(theme('keyframes') ?? {}).map(([key, value]) => { return [key, { [`@keyframes ${prefixName(key)}`]: value }]
diff --git a/tests/animations.test.js b/tests/animations.test.js --- a/tests/animations.test.js +++ b/tests/animations.test.js @@ -277,3 +277,33 @@ test('with dots in the name and prefix', () => { `) }) }) + +test('special character prefixes are escaped in animation names', () => { + let config = { + prefix: '@', + content: [{ raw: `<div class="@animate-one"></div>` }], + theme: { + extend: { + keyframes: { + one: { to: { transform: 'rotate(360deg)' } }, + }, + animation: { + one: 'one 2s', + }, + }, + }, + } + + return run('@tailwind utilities', config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + @keyframes \@one { + to { + transform: rotate(360deg); + } + } + .\@animate-one { + animation: 2s \@one; + } + `) + }) +})
Animation Names Won't Be Escaped If Prefix Contains Especial Characters **What version of Tailwind CSS are you using?** v3.3.2 **What build tool (or framework if it abstracts the build tool) are you using?** Tailwind Play **What version of Node.js are you using?** N/A **What browser are you using?** Chrome, Safari **What operating system are you using?** macOS **Reproduction URL** https://play.tailwindcss.com/ojvPuQftlm **Describe your issue** Using the `@` prefix in my configuration file will allow me to create animation utilities without escaping it, therefore not producing valid animations. The link above allows you to test the same implementation with the `animate-spin` and `@animate-spin` utilities (by tweaking the prefix) to see that the output CSS does not escape the `@spin` animation.
2023-06-21T14:08:19Z
3.3
tailwindlabs/tailwindcss
12,404
tailwindlabs__tailwindcss-12404
[ "12401" ]
a5a61580cdb6974207a77680b70ba3906b31515b
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1129,6 +1129,7 @@ export let corePlugins = { appearance: ({ addUtilities }) => { addUtilities({ '.appearance-none': { appearance: 'none' }, + '.appearance-auto': { appearance: 'auto' }, }) },
diff --git a/tests/plugins/__snapshots__/appearance.test.js.snap b/tests/plugins/__snapshots__/appearance.test.js.snap --- a/tests/plugins/__snapshots__/appearance.test.js.snap +++ b/tests/plugins/__snapshots__/appearance.test.js.snap @@ -6,5 +6,10 @@ exports[`should test the 'appearance' plugin 1`] = ` -webkit-appearance: none; appearance: none; } + +.appearance-auto { + -webkit-appearance: auto; + appearance: auto; +} " `;
Missing `appearance-none` <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** 3.3.5 **What build tool (or framework if it abstracts the build tool) are you using?** CLI **What version of Node.js are you using?** 18.2.1 **What browser are you using?** For example: Chrome, Safari, or N/A **What operating system are you using?** Windows **Reproduction URL** https://play.tailwindcss.com/PxecKTGWVQ **Describe your issue** I'm categorizing this as a bug because Tailwind wants to have "modified" value (i.e. none) and a default value (auto) that can be used with hover for example. I believe it's on their docs somewhere but I couldn't find it In this case, there is the modified value (`appearance-none`) but not the default value (theoretically called `appearance-auto`). It's obviously quite trivial to do this via arbitrary values, but I also believe that it's a bug in Tailwind that should be fixed.
2023-11-12T16:08:50Z
3.3
tailwindlabs/tailwindcss
11,157
tailwindlabs__tailwindcss-11157
[ "11027" ]
cdca9cbcfe331b54ca4df80bc720f8cd78e303a0
diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -1,7 +1,7 @@ import dlv from 'dlv' import didYouMean from 'didyoumean' import transformThemeValue from '../util/transformThemeValue' -import parseValue from 'postcss-value-parser' +import parseValue from '../value-parser/index' import { normalizeScreens } from '../util/normalizeScreens' import buildMediaQuery from '../util/buildMediaQuery' import { toPath } from '../util/toPath' @@ -146,6 +146,9 @@ function resolveVNode(node, vNode, functions) { } function resolveFunctions(node, input, functions) { + let hasAnyFn = Object.keys(functions).some((fn) => input.includes(`${fn}(`)) + if (!hasAnyFn) return input + return parseValue(input) .walk((vNode) => { resolveVNode(node, vNode, functions) diff --git a/src/util/dataTypes.js b/src/util/dataTypes.js --- a/src/util/dataTypes.js +++ b/src/util/dataTypes.js @@ -49,10 +49,22 @@ export function normalize(value, isRoot = true) { value = value.trim() } - // Add spaces around operators inside math functions like calc() that do not follow an operator - // or '('. - value = value.replace(/(calc|min|max|clamp)\(.+\)/g, (match) => { + value = normalizeMathOperatorSpacing(value) + + return value +} + +/** + * Add spaces around operators inside math functions + * like calc() that do not follow an operator or '('. + * + * @param {string} value + * @returns {string} + */ +function normalizeMathOperatorSpacing(value) { + return value.replace(/(calc|min|max|clamp)\(.+\)/g, (match) => { let vars = [] + return match .replace(/var\((--.+?)[,)]/g, (match, g1) => { vars.push(g1) @@ -61,8 +73,6 @@ export function normalize(value, isRoot = true) { .replace(/(-?\d*\.?\d(?!\b-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, '$1 $2 ') .replace(placeholderRe, () => vars.shift()) }) - - return value } export function url(value) { diff --git a/src/value-parser/index.d.ts b/src/value-parser/index.d.ts new file mode 100644 --- /dev/null +++ b/src/value-parser/index.d.ts @@ -0,0 +1,177 @@ +declare namespace postcssValueParser { + interface BaseNode { + /** + * The offset, inclusive, inside the CSS value at which the node starts. + */ + sourceIndex: number + + /** + * The offset, exclusive, inside the CSS value at which the node ends. + */ + sourceEndIndex: number + + /** + * The node's characteristic value + */ + value: string + } + + interface ClosableNode { + /** + * Whether the parsed CSS value ended before the node was properly closed + */ + unclosed?: true + } + + interface AdjacentAwareNode { + /** + * The token at the start of the node + */ + before: string + + /** + * The token at the end of the node + */ + after: string + } + + interface CommentNode extends BaseNode, ClosableNode { + type: 'comment' + } + + interface DivNode extends BaseNode, AdjacentAwareNode { + type: 'div' + } + + interface FunctionNode extends BaseNode, ClosableNode, AdjacentAwareNode { + type: 'function' + + /** + * Nodes inside the function + */ + nodes: Node[] + } + + interface SpaceNode extends BaseNode { + type: 'space' + } + + interface StringNode extends BaseNode, ClosableNode { + type: 'string' + + /** + * The quote type delimiting the string + */ + quote: '"' | "'" + } + + interface UnicodeRangeNode extends BaseNode { + type: 'unicode-range' + } + + interface WordNode extends BaseNode { + type: 'word' + } + + /** + * Any node parsed from a CSS value + */ + type Node = + | CommentNode + | DivNode + | FunctionNode + | SpaceNode + | StringNode + | UnicodeRangeNode + | WordNode + + interface CustomStringifierCallback { + /** + * @param node The node to stringify + * @returns The serialized CSS representation of the node + */ + (nodes: Node): string | undefined + } + + interface WalkCallback { + /** + * @param node The currently visited node + * @param index The index of the node in the series of parsed nodes + * @param nodes The series of parsed nodes + * @returns Returning `false` will prevent traversal of descendant nodes (only applies if `bubble` was set to `true` in the `walk()` call) + */ + (node: Node, index: number, nodes: Node[]): void | boolean + } + + /** + * A CSS dimension, decomposed into its numeric and unit parts + */ + interface Dimension { + number: string + unit: string + } + + /** + * A wrapper around a parsed CSS value that allows for inspecting and walking nodes + */ + interface ParsedValue { + /** + * The series of parsed nodes + */ + nodes: Node[] + + /** + * Walk all parsed nodes, applying a callback + * + * @param callback A visitor callback that will be executed for each node + * @param bubble When set to `true`, walking will be done inside-out instead of outside-in + */ + walk(callback: WalkCallback, bubble?: boolean): this + } + + interface ValueParser { + /** + * Decompose a CSS dimension into its numeric and unit part + * + * @param value The dimension to decompose + * @returns An object representing `number` and `unit` part of the dimension or `false` if the decomposing fails + */ + unit(value: string): Dimension | false + + /** + * Serialize a series of nodes into a CSS value + * + * @param nodes The nodes to stringify + * @param custom A custom stringifier callback + * @returns The generated CSS value + */ + stringify(nodes: Node | Node[], custom?: CustomStringifierCallback): string + + /** + * Walk a series of nodes, applying a callback + * + * @param nodes The nodes to walk + * @param callback A visitor callback that will be executed for each node + * @param bubble When set to `true`, walking will be done inside-out instead of outside-in + */ + walk(nodes: Node[], callback: WalkCallback, bubble?: boolean): void + + /** + * Parse a CSS value into a series of nodes to operate on + * + * @param value The value to parse + */ + new (value: string): ParsedValue + + /** + * Parse a CSS value into a series of nodes to operate on + * + * @param value The value to parse + */ + (value: string): ParsedValue + } +} + +declare const postcssValueParser: postcssValueParser.ValueParser + +export = postcssValueParser diff --git a/src/value-parser/index.js b/src/value-parser/index.js new file mode 100644 --- /dev/null +++ b/src/value-parser/index.js @@ -0,0 +1,28 @@ +var parse = require('./parse') +var walk = require('./walk') +var stringify = require('./stringify') + +function ValueParser(value) { + if (this instanceof ValueParser) { + this.nodes = parse(value) + return this + } + return new ValueParser(value) +} + +ValueParser.prototype.toString = function () { + return Array.isArray(this.nodes) ? stringify(this.nodes) : '' +} + +ValueParser.prototype.walk = function (cb, bubble) { + walk(this.nodes, cb, bubble) + return this +} + +ValueParser.unit = require('./unit') + +ValueParser.walk = walk + +ValueParser.stringify = stringify + +module.exports = ValueParser diff --git a/src/value-parser/parse.js b/src/value-parser/parse.js new file mode 100644 --- /dev/null +++ b/src/value-parser/parse.js @@ -0,0 +1,303 @@ +var openParentheses = '('.charCodeAt(0) +var closeParentheses = ')'.charCodeAt(0) +var singleQuote = "'".charCodeAt(0) +var doubleQuote = '"'.charCodeAt(0) +var backslash = '\\'.charCodeAt(0) +var slash = '/'.charCodeAt(0) +var comma = ','.charCodeAt(0) +var colon = ':'.charCodeAt(0) +var star = '*'.charCodeAt(0) +var uLower = 'u'.charCodeAt(0) +var uUpper = 'U'.charCodeAt(0) +var plus = '+'.charCodeAt(0) +var isUnicodeRange = /^[a-f0-9?-]+$/i + +module.exports = function (input) { + var tokens = [] + var value = input + + var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos + var pos = 0 + var code = value.charCodeAt(pos) + var max = value.length + var stack = [{ nodes: tokens }] + var balanced = 0 + var parent + + var name = '' + var before = '' + var after = '' + + while (pos < max) { + // Whitespaces + if (code <= 32) { + next = pos + do { + next += 1 + code = value.charCodeAt(next) + } while (code <= 32) + token = value.slice(pos, next) + + prev = tokens[tokens.length - 1] + if (code === closeParentheses && balanced) { + after = token + } else if (prev && prev.type === 'div') { + prev.after = token + prev.sourceEndIndex += token.length + } else if ( + code === comma || + code === colon || + (code === slash && + value.charCodeAt(next + 1) !== star && + (!parent || (parent && parent.type === 'function' && false))) + ) { + before = token + } else { + tokens.push({ + type: 'space', + sourceIndex: pos, + sourceEndIndex: next, + value: token, + }) + } + + pos = next + + // Quotes + } else if (code === singleQuote || code === doubleQuote) { + next = pos + quote = code === singleQuote ? "'" : '"' + token = { + type: 'string', + sourceIndex: pos, + quote: quote, + } + do { + escape = false + next = value.indexOf(quote, next + 1) + if (~next) { + escapePos = next + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1 + escape = !escape + } + } else { + value += quote + next = value.length - 1 + token.unclosed = true + } + } while (escape) + token.value = value.slice(pos + 1, next) + token.sourceEndIndex = token.unclosed ? next : next + 1 + tokens.push(token) + pos = next + 1 + code = value.charCodeAt(pos) + + // Comments + } else if (code === slash && value.charCodeAt(pos + 1) === star) { + next = value.indexOf('*/', pos) + + token = { + type: 'comment', + sourceIndex: pos, + sourceEndIndex: next + 2, + } + + if (next === -1) { + token.unclosed = true + next = value.length + token.sourceEndIndex = next + } + + token.value = value.slice(pos + 2, next) + tokens.push(token) + + pos = next + 2 + code = value.charCodeAt(pos) + + // Operation within calc + } else if ((code === slash || code === star) && parent && parent.type === 'function' && true) { + token = value[pos] + tokens.push({ + type: 'word', + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token, + }) + pos += 1 + code = value.charCodeAt(pos) + + // Dividers + } else if (code === slash || code === comma || code === colon) { + token = value[pos] + + tokens.push({ + type: 'div', + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token, + before: before, + after: '', + }) + before = '' + + pos += 1 + code = value.charCodeAt(pos) + + // Open parentheses + } else if (openParentheses === code) { + // Whitespaces after open parentheses + next = pos + do { + next += 1 + code = value.charCodeAt(next) + } while (code <= 32) + parenthesesOpenPos = pos + token = { + type: 'function', + sourceIndex: pos - name.length, + value: name, + before: value.slice(parenthesesOpenPos + 1, next), + } + pos = next + + if (name === 'url' && code !== singleQuote && code !== doubleQuote) { + next -= 1 + do { + escape = false + next = value.indexOf(')', next + 1) + if (~next) { + escapePos = next + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1 + escape = !escape + } + } else { + value += ')' + next = value.length - 1 + token.unclosed = true + } + } while (escape) + // Whitespaces before closed + whitespacePos = next + do { + whitespacePos -= 1 + code = value.charCodeAt(whitespacePos) + } while (code <= 32) + if (parenthesesOpenPos < whitespacePos) { + if (pos !== whitespacePos + 1) { + token.nodes = [ + { + type: 'word', + sourceIndex: pos, + sourceEndIndex: whitespacePos + 1, + value: value.slice(pos, whitespacePos + 1), + }, + ] + } else { + token.nodes = [] + } + if (token.unclosed && whitespacePos + 1 !== next) { + token.after = '' + token.nodes.push({ + type: 'space', + sourceIndex: whitespacePos + 1, + sourceEndIndex: next, + value: value.slice(whitespacePos + 1, next), + }) + } else { + token.after = value.slice(whitespacePos + 1, next) + token.sourceEndIndex = next + } + } else { + token.after = '' + token.nodes = [] + } + pos = next + 1 + token.sourceEndIndex = token.unclosed ? next : pos + code = value.charCodeAt(pos) + tokens.push(token) + } else { + balanced += 1 + token.after = '' + token.sourceEndIndex = pos + 1 + tokens.push(token) + stack.push(token) + tokens = token.nodes = [] + parent = token + } + name = '' + + // Close parentheses + } else if (closeParentheses === code && balanced) { + pos += 1 + code = value.charCodeAt(pos) + + parent.after = after + parent.sourceEndIndex += after.length + after = '' + balanced -= 1 + stack[stack.length - 1].sourceEndIndex = pos + stack.pop() + parent = stack[balanced] + tokens = parent.nodes + + // Words + } else { + next = pos + do { + if (code === backslash) { + next += 1 + } + next += 1 + code = value.charCodeAt(next) + } while ( + next < max && + !( + code <= 32 || + code === singleQuote || + code === doubleQuote || + code === comma || + code === colon || + code === slash || + code === openParentheses || + (code === star && parent && parent.type === 'function' && true) || + (code === slash && parent.type === 'function' && true) || + (code === closeParentheses && balanced) + ) + ) + token = value.slice(pos, next) + + if (openParentheses === code) { + name = token + } else if ( + (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && + plus === token.charCodeAt(1) && + isUnicodeRange.test(token.slice(2)) + ) { + tokens.push({ + type: 'unicode-range', + sourceIndex: pos, + sourceEndIndex: next, + value: token, + }) + } else { + tokens.push({ + type: 'word', + sourceIndex: pos, + sourceEndIndex: next, + value: token, + }) + } + + pos = next + } + } + + for (pos = stack.length - 1; pos; pos -= 1) { + stack[pos].unclosed = true + stack[pos].sourceEndIndex = value.length + } + + return stack[0].nodes +} diff --git a/src/value-parser/stringify.js b/src/value-parser/stringify.js new file mode 100644 --- /dev/null +++ b/src/value-parser/stringify.js @@ -0,0 +1,41 @@ +function stringifyNode(node, custom) { + var type = node.type + var value = node.value + var buf + var customResult + + if (custom && (customResult = custom(node)) !== undefined) { + return customResult + } else if (type === 'word' || type === 'space') { + return value + } else if (type === 'string') { + buf = node.quote || '' + return buf + value + (node.unclosed ? '' : buf) + } else if (type === 'comment') { + return '/*' + value + (node.unclosed ? '' : '*/') + } else if (type === 'div') { + return (node.before || '') + value + (node.after || '') + } else if (Array.isArray(node.nodes)) { + buf = stringify(node.nodes, custom) + if (type !== 'function') { + return buf + } + return value + '(' + (node.before || '') + buf + (node.after || '') + (node.unclosed ? '' : ')') + } + return value +} + +function stringify(nodes, custom) { + var result, i + + if (Array.isArray(nodes)) { + result = '' + for (i = nodes.length - 1; ~i; i -= 1) { + result = stringifyNode(nodes[i], custom) + result + } + return result + } + return stringifyNode(nodes, custom) +} + +module.exports = stringify diff --git a/src/value-parser/unit.js b/src/value-parser/unit.js new file mode 100644 --- /dev/null +++ b/src/value-parser/unit.js @@ -0,0 +1,118 @@ +var minus = '-'.charCodeAt(0) +var plus = '+'.charCodeAt(0) +var dot = '.'.charCodeAt(0) +var exp = 'e'.charCodeAt(0) +var EXP = 'E'.charCodeAt(0) + +// Check if three code points would start a number +// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number +function likeNumber(value) { + var code = value.charCodeAt(0) + var nextCode + + if (code === plus || code === minus) { + nextCode = value.charCodeAt(1) + + if (nextCode >= 48 && nextCode <= 57) { + return true + } + + var nextNextCode = value.charCodeAt(2) + + if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { + return true + } + + return false + } + + if (code === dot) { + nextCode = value.charCodeAt(1) + + if (nextCode >= 48 && nextCode <= 57) { + return true + } + + return false + } + + if (code >= 48 && code <= 57) { + return true + } + + return false +} + +// Consume a number +// https://www.w3.org/TR/css-syntax-3/#consume-number +module.exports = function (value) { + var pos = 0 + var length = value.length + var code + var nextCode + var nextNextCode + + if (length === 0 || !likeNumber(value)) { + return false + } + + code = value.charCodeAt(pos) + + if (code === plus || code === minus) { + pos++ + } + + while (pos < length) { + code = value.charCodeAt(pos) + + if (code < 48 || code > 57) { + break + } + + pos += 1 + } + + code = value.charCodeAt(pos) + nextCode = value.charCodeAt(pos + 1) + + if (code === dot && nextCode >= 48 && nextCode <= 57) { + pos += 2 + + while (pos < length) { + code = value.charCodeAt(pos) + + if (code < 48 || code > 57) { + break + } + + pos += 1 + } + } + + code = value.charCodeAt(pos) + nextCode = value.charCodeAt(pos + 1) + nextNextCode = value.charCodeAt(pos + 2) + + if ( + (code === exp || code === EXP) && + ((nextCode >= 48 && nextCode <= 57) || + ((nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) + ) { + pos += nextCode === plus || nextCode === minus ? 3 : 2 + + while (pos < length) { + code = value.charCodeAt(pos) + + if (code < 48 || code > 57) { + break + } + + pos += 1 + } + } + + return { + number: value.slice(0, pos), + unit: value.slice(pos), + } +} diff --git a/src/value-parser/walk.js b/src/value-parser/walk.js new file mode 100644 --- /dev/null +++ b/src/value-parser/walk.js @@ -0,0 +1,18 @@ +module.exports = function walk(nodes, cb, bubble) { + var i, max, node, result + + for (i = 0, max = nodes.length; i < max; i += 1) { + node = nodes[i] + if (!bubble) { + result = cb(node, i, nodes) + } + + if (result !== false && node.type === 'function' && Array.isArray(node.nodes)) { + walk(node.nodes, cb, bubble) + } + + if (bubble) { + cb(node, i, nodes) + } + } +}
diff --git a/tests/evaluateTailwindFunctions.test.js b/tests/evaluateTailwindFunctions.test.js --- a/tests/evaluateTailwindFunctions.test.js +++ b/tests/evaluateTailwindFunctions.test.js @@ -1383,5 +1383,36 @@ crosscheck(({ stable, oxide }) => { // 4. But we've not received any further logs about it expect().toHaveBeenWarnedWith(['invalid-theme-key-in-class']) }) + + test('it works mayhaps', async () => { + let input = css` + .test { + /* prettier-ignore */ + inset: calc(-1 * (2*theme("spacing.4"))); + /* prettier-ignore */ + padding: calc(-1 * (2* theme("spacing.4"))); + } + ` + + let output = css` + .test { + /* prettier-ignore */ + inset: calc(-1 * (2*1rem)); + /* prettier-ignore */ + padding: calc(-1 * (2* 1rem)); + } + ` + + return run(input, { + theme: { + spacing: { + 4: '1rem', + }, + }, + }).then((result) => { + expect(result.css).toMatchCss(output) + expect(result.warnings().length).toBe(0) + }) + }) }) }) diff --git a/tests/source-maps.test.js b/tests/source-maps.test.js --- a/tests/source-maps.test.js +++ b/tests/source-maps.test.js @@ -260,145 +260,143 @@ crosscheck(({ stable, oxide }) => { '2:6-20 -> 304:2-12', '2:20 -> 305:0', '2:6 -> 307:0', - '2:20 -> 309:1', - '2:6 -> 310:0', - '2:6-20 -> 311:2-12', - '2:20 -> 312:0', - '2:6 -> 314:0', - '2:20 -> 316:1', - '2:6 -> 318:0', - '2:6-20 -> 319:2-18', - '2:20 -> 320:0', - '2:6 -> 322:0', - '2:20 -> 325:1', - '2:6 -> 327:0', - '2:6-20 -> 329:2-20', - '2:6-20 -> 330:2-24', - '2:20 -> 331:0', - '2:6 -> 333:0', - '2:20 -> 335:1', - '2:6 -> 337:0', - '2:6-20 -> 339:2-17', - '2:20 -> 340:0', + '2:6-20 -> 308:2-12', + '2:20 -> 309:0', + '2:6 -> 311:0', + '2:20 -> 313:1', + '2:6 -> 315:0', + '2:6-20 -> 316:2-18', + '2:20 -> 317:0', + '2:6 -> 319:0', + '2:20 -> 322:1', + '2:6 -> 324:0', + '2:6-20 -> 326:2-20', + '2:6-20 -> 327:2-24', + '2:20 -> 328:0', + '2:6 -> 330:0', + '2:20 -> 332:1', + '2:6 -> 334:0', + '2:6-20 -> 336:2-17', + '2:20 -> 337:0', + '2:6 -> 339:0', + '2:20 -> 341:1', '2:6 -> 342:0', - '2:20 -> 344:1', - '2:6 -> 345:0', - '2:6-20 -> 346:2-17', - '2:20 -> 347:0', - '2:6 -> 349:0', - '2:20 -> 353:1', - '2:6 -> 355:0', - '2:6-20 -> 363:2-24', - '2:6-20 -> 364:2-32', - '2:20 -> 365:0', - '2:6 -> 367:0', - '2:20 -> 369:1', - '2:6 -> 371:0', - '2:6-20 -> 373:2-17', - '2:6-20 -> 374:2-14', - '2:20 -> 375:0', - '2:6-20 -> 377:0-72', - '2:6 -> 378:0', - '2:6-20 -> 379:2-15', - '2:20 -> 380:0', - '2:6 -> 382:0', - '2:6-20 -> 383:2-26', - '2:6-20 -> 384:2-26', - '2:6-20 -> 385:2-21', - '2:6-20 -> 386:2-21', - '2:6-20 -> 387:2-16', - '2:6-20 -> 388:2-16', - '2:6-20 -> 389:2-16', - '2:6-20 -> 390:2-17', - '2:6-20 -> 391:2-17', - '2:6-20 -> 392:2-15', - '2:6-20 -> 393:2-15', - '2:6-20 -> 394:2-20', - '2:6-20 -> 395:2-40', - '2:6-20 -> 396:2-32', - '2:6-20 -> 397:2-31', - '2:6-20 -> 398:2-30', - '2:6-20 -> 399:2-17', - '2:6-20 -> 400:2-22', - '2:6-20 -> 401:2-24', - '2:6-20 -> 402:2-25', - '2:6-20 -> 403:2-26', - '2:6-20 -> 404:2-20', - '2:6-20 -> 405:2-29', - '2:6-20 -> 406:2-30', - '2:6-20 -> 407:2-40', - '2:6-20 -> 408:2-36', - '2:6-20 -> 409:2-29', - '2:6-20 -> 410:2-24', - '2:6-20 -> 411:2-32', - '2:6-20 -> 412:2-14', + '2:6-20 -> 343:2-17', + '2:20 -> 344:0', + '2:6 -> 346:0', + '2:20 -> 350:1', + '2:6 -> 352:0', + '2:6-20 -> 360:2-24', + '2:6-20 -> 361:2-32', + '2:20 -> 362:0', + '2:6 -> 364:0', + '2:20 -> 366:1', + '2:6 -> 368:0', + '2:6-20 -> 370:2-17', + '2:6-20 -> 371:2-14', + '2:20 -> 372:0', + '2:6-20 -> 374:0-72', + '2:6 -> 375:0', + '2:6-20 -> 376:2-15', + '2:20 -> 377:0', + '2:6 -> 379:0', + '2:6-20 -> 380:2-26', + '2:6-20 -> 381:2-26', + '2:6-20 -> 382:2-21', + '2:6-20 -> 383:2-21', + '2:6-20 -> 384:2-16', + '2:6-20 -> 385:2-16', + '2:6-20 -> 386:2-16', + '2:6-20 -> 387:2-17', + '2:6-20 -> 388:2-17', + '2:6-20 -> 389:2-15', + '2:6-20 -> 390:2-15', + '2:6-20 -> 391:2-20', + '2:6-20 -> 392:2-40', + '2:6-20 -> 393:2-32', + '2:6-20 -> 394:2-31', + '2:6-20 -> 395:2-30', + '2:6-20 -> 396:2-17', + '2:6-20 -> 397:2-22', + '2:6-20 -> 398:2-24', + '2:6-20 -> 399:2-25', + '2:6-20 -> 400:2-26', + '2:6-20 -> 401:2-20', + '2:6-20 -> 402:2-29', + '2:6-20 -> 403:2-30', + '2:6-20 -> 404:2-40', + '2:6-20 -> 405:2-36', + '2:6-20 -> 406:2-29', + '2:6-20 -> 407:2-24', + '2:6-20 -> 408:2-32', + '2:6-20 -> 409:2-14', + '2:6-20 -> 410:2-20', + '2:6-20 -> 411:2-18', + '2:6-20 -> 412:2-19', '2:6-20 -> 413:2-20', - '2:6-20 -> 414:2-18', - '2:6-20 -> 415:2-19', - '2:6-20 -> 416:2-20', - '2:6-20 -> 417:2-16', - '2:6-20 -> 418:2-18', - '2:6-20 -> 419:2-15', - '2:6-20 -> 420:2-21', - '2:6-20 -> 421:2-23', + '2:6-20 -> 414:2-16', + '2:6-20 -> 415:2-18', + '2:6-20 -> 416:2-15', + '2:6-20 -> 417:2-21', + '2:6-20 -> 418:2-23', + '2:6-20 -> 419:2-29', + '2:6-20 -> 420:2-27', + '2:6-20 -> 421:2-28', '2:6-20 -> 422:2-29', - '2:6-20 -> 423:2-27', - '2:6-20 -> 424:2-28', - '2:6-20 -> 425:2-29', - '2:6-20 -> 426:2-25', - '2:6-20 -> 427:2-26', - '2:6-20 -> 428:2-27', - '2:6 -> 429:2', - '2:20 -> 430:0', - '2:6 -> 432:0', - '2:6-20 -> 433:2-26', - '2:6-20 -> 434:2-26', - '2:6-20 -> 435:2-21', - '2:6-20 -> 436:2-21', - '2:6-20 -> 437:2-16', - '2:6-20 -> 438:2-16', - '2:6-20 -> 439:2-16', - '2:6-20 -> 440:2-17', - '2:6-20 -> 441:2-17', - '2:6-20 -> 442:2-15', - '2:6-20 -> 443:2-15', - '2:6-20 -> 444:2-20', - '2:6-20 -> 445:2-40', - '2:6-20 -> 446:2-32', - '2:6-20 -> 447:2-31', - '2:6-20 -> 448:2-30', - '2:6-20 -> 449:2-17', - '2:6-20 -> 450:2-22', - '2:6-20 -> 451:2-24', - '2:6-20 -> 452:2-25', - '2:6-20 -> 453:2-26', - '2:6-20 -> 454:2-20', - '2:6-20 -> 455:2-29', - '2:6-20 -> 456:2-30', - '2:6-20 -> 457:2-40', - '2:6-20 -> 458:2-36', - '2:6-20 -> 459:2-29', - '2:6-20 -> 460:2-24', - '2:6-20 -> 461:2-32', - '2:6-20 -> 462:2-14', + '2:6-20 -> 423:2-25', + '2:6-20 -> 424:2-26', + '2:6-20 -> 425:2-27', + '2:6 -> 426:2', + '2:20 -> 427:0', + '2:6 -> 429:0', + '2:6-20 -> 430:2-26', + '2:6-20 -> 431:2-26', + '2:6-20 -> 432:2-21', + '2:6-20 -> 433:2-21', + '2:6-20 -> 434:2-16', + '2:6-20 -> 435:2-16', + '2:6-20 -> 436:2-16', + '2:6-20 -> 437:2-17', + '2:6-20 -> 438:2-17', + '2:6-20 -> 439:2-15', + '2:6-20 -> 440:2-15', + '2:6-20 -> 441:2-20', + '2:6-20 -> 442:2-40', + '2:6-20 -> 443:2-32', + '2:6-20 -> 444:2-31', + '2:6-20 -> 445:2-30', + '2:6-20 -> 446:2-17', + '2:6-20 -> 447:2-22', + '2:6-20 -> 448:2-24', + '2:6-20 -> 449:2-25', + '2:6-20 -> 450:2-26', + '2:6-20 -> 451:2-20', + '2:6-20 -> 452:2-29', + '2:6-20 -> 453:2-30', + '2:6-20 -> 454:2-40', + '2:6-20 -> 455:2-36', + '2:6-20 -> 456:2-29', + '2:6-20 -> 457:2-24', + '2:6-20 -> 458:2-32', + '2:6-20 -> 459:2-14', + '2:6-20 -> 460:2-20', + '2:6-20 -> 461:2-18', + '2:6-20 -> 462:2-19', '2:6-20 -> 463:2-20', - '2:6-20 -> 464:2-18', - '2:6-20 -> 465:2-19', - '2:6-20 -> 466:2-20', - '2:6-20 -> 467:2-16', - '2:6-20 -> 468:2-18', - '2:6-20 -> 469:2-15', - '2:6-20 -> 470:2-21', - '2:6-20 -> 471:2-23', + '2:6-20 -> 464:2-16', + '2:6-20 -> 465:2-18', + '2:6-20 -> 466:2-15', + '2:6-20 -> 467:2-21', + '2:6-20 -> 468:2-23', + '2:6-20 -> 469:2-29', + '2:6-20 -> 470:2-27', + '2:6-20 -> 471:2-28', '2:6-20 -> 472:2-29', - '2:6-20 -> 473:2-27', - '2:6-20 -> 474:2-28', - '2:6-20 -> 475:2-29', - '2:6-20 -> 476:2-25', - '2:6-20 -> 477:2-26', - '2:6-20 -> 478:2-27', - '2:6 -> 479:2', - '2:20 -> 480:0', + '2:6-20 -> 473:2-25', + '2:6-20 -> 474:2-26', + '2:6-20 -> 475:2-27', + '2:6 -> 476:2', + '2:20 -> 477:0', ]) })
Incorrect parsing of theme functions within calc operations without spaces <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v3.3.1 **What build tool (or framework if it abstracts the build tool) are you using?** [play.tailwindcss.com](https://play.tailwindcss.com/) or Webpack **What version of Node.js are you using?** N/A **What browser are you using?** Chrome **What operating system are you using?** macOS **Reproduction URL** https://play.tailwindcss.com/sQrIVhIaM7?file=css **Describe your issue** Usage of the `theme` function isn’t getting replaced by the corresponding value when the function is in a `calc` expression without spaces. For example: ```css .test { /* Input: */ inset: calc(-1 * (2*theme("spacing.4"))); /* Expected: */ inset: calc(-1 * (2*1rem)); /* Actual: */ inset: calc(-1 * (2*theme("spacing.4"))); } ``` --- I believe this might be the same issue as https://github.com/TrySound/postcss-value-parser/issues/86, but thought I’d report it here as I’m not 100% sure and it definitely affects Tailwind. This happened for us because we use Sass alongside Tailwind, via Webpack. sass-loader apparently outputs Sass differently in Webpack production and development mode (https://github.com/webpack-contrib/sass-loader/issues/1129), with spaces removed in production.
2023-05-04T13:50:14Z
3.3
tailwindlabs/tailwindcss
12,113
tailwindlabs__tailwindcss-12113
[ "12111" ]
457d2b1b1c5dc09b2edbc92f1dd1499a00cd4ef0
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -815,10 +815,19 @@ function applyFinalFormat(match, { context, candidate }) { } try { - rule.selector = finalizeSelector(rule.selector, finalFormat, { + let selector = finalizeSelector(rule.selector, finalFormat, { candidate, context, }) + + // Finalize Selector determined that this candidate is irrelevant + // TODO: This elimination should happen earlier so this never happens + if (selector === null) { + rule.remove() + return + } + + rule.selector = selector } catch { // If this selector is invalid we also want to skip it // But it's likely that being invalid here means there's a bug in a plugin rather than too loosely matching content diff --git a/src/util/formatVariantSelector.js b/src/util/formatVariantSelector.js --- a/src/util/formatVariantSelector.js +++ b/src/util/formatVariantSelector.js @@ -186,6 +186,13 @@ export function finalizeSelector(current, formats, { context, candidate, base }) // Remove extraneous selectors that do not include the base candidate selector.each((sel) => eliminateIrrelevantSelectors(sel, base)) + // If ffter eliminating irrelevant selectors, we end up with nothing + // Then the whole "rule" this is associated with does not need to exist + // We use `null` as a marker value for that case + if (selector.length === 0) { + return null + } + // If there are no formats that means there were no variants added to the candidate // so we can just return the selector as-is let formatAst = Array.isArray(formats)
diff --git a/tests/basic-usage.test.js b/tests/basic-usage.test.js --- a/tests/basic-usage.test.js +++ b/tests/basic-usage.test.js @@ -792,3 +792,46 @@ test('Skips classes inside :not() when nested inside an at-rule', async () => { expect(result.css).toMatchFormattedCss(css``) }) + +test('Irrelevant rules are removed when applying variants', async () => { + let config = { + content: [ + { + raw: html` <div class="md:w-full"></div> `, + }, + ], + corePlugins: { preflight: false }, + plugins: [ + function ({ addUtilities }) { + addUtilities({ + '@supports (foo: bar)': { + // This doesn't contain `w-full` so it should not exist in the output + '.outer': { color: 'red' }, + '.outer:is(.w-full)': { color: 'green' }, + }, + }) + }, + ], + } + + let input = css` + @tailwind utilities; + ` + + // We didn't find the hand class therefore + // nothing should be generated + let result = await run(input, config) + + expect(result.css).toMatchFormattedCss(css` + @media (min-width: 768px) { + .md\:w-full { + width: 100%; + } + @supports (foo: bar) { + .outer.md\:w-full { + color: green; + } + } + } + `) +})
Combination of TW JS based config and a class causes malformed CSS **What version of Tailwind CSS are you using?** v3.3.3 **What build tool (or framework if it abstracts the build tool) are you using?** Vite v4.4.9 **What version of Node.js are you using?** v20.7.0 **What browser are you using?** Any **What operating system are you using?** macOS 14.0 **Reproduction URL** https://play.tailwindcss.com/jZXL8Axggn **Describe your issue** What I have is this: **A Tailwind config file containing the following:** ```js '@media screen(md)': { '.outer-grid': { rowGap: theme('spacing.16'), paddingTop: theme('spacing.16'), paddingBottom: theme('spacing.16'), }, '.outer-grid>*:last-child:is(.w-full)': { marginBottom: `-${theme('spacing.16')}`, }, }, ``` **A class in my templates** `[&>*]:after:w-full` The combination of this JS config and this class trips up something and results in compilation warings and the following CSS in my compiled file: ```css @media (min-width: 768px) { { content: var(--tw-content); row-gap: 4rem; padding-top: 4rem; padding-bottom: 4rem } .outer-grid>*:last-child:is(.\[\&\>\*\]\:before\:w-full>*):before { content: var(--tw-content); margin-bottom: -4rem } } ``` I noticed this because of the error `npm run build` produces: ``` warnings when minifying css: ▲ [WARNING] Unexpected "{" [css-syntax-error] <stdin>:2610:3: 2610 │ { ``` And I can even see in VS code with the TW extension the malformed CSS when I hover over this one class: <img width="893" alt="Screenshot_2023-09-28_at_17 09 03" src="https://github.com/tailwindlabs/tailwindcss/assets/69107412/a8730642-f74d-43e7-8439-0c0903778464"> When I either: - Remove the class from my templates, or - Remove the ` '.outer-grid>*:last-child:is(.w-full)'` statement from the `@media sceen(md)` query, the warning and malformed CSS is gone. Note that the ` '.outer-grid>*:last-child:is(.w-full)'` statement _not_ in a media query compiles without issues. A workaround is to use an attribute selector instead `[class~="w-full"]`. https://play.tailwindcss.com/i6OoVDdQbc?file=config
2023-09-29T20:14:25Z
3.3
tailwindlabs/tailwindcss
11,002
tailwindlabs__tailwindcss-11002
[ "10989" ]
e3a9d5f53bd9f8aadb0bee7ed9c20ea69bb8fcc3
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1750,7 +1750,13 @@ export let corePlugins = { return withAlphaValue(value, 0, 'rgb(255 255 255 / 0)') } - return function ({ matchUtilities, theme }) { + return function ({ matchUtilities, theme, addDefaults }) { + addDefaults('gradient-color-stops', { + '--tw-gradient-from-position': ' ', + '--tw-gradient-via-position': ' ', + '--tw-gradient-to-position': ' ', + }) + let options = { values: flattenColorPalette(theme('gradientColorStops')), type: ['color', 'any'], @@ -1767,13 +1773,9 @@ export let corePlugins = { let transparentToValue = transparentTo(value) return { - '--tw-gradient-from': `${toColorValue( - value, - 'from' - )} var(--tw-gradient-from-position)`, - '--tw-gradient-from-position': ' ', - '--tw-gradient-to': `${transparentToValue} var(--tw-gradient-from-position)`, - '--tw-gradient-to-position': ' ', + '@defaults gradient-color-stops': {}, + '--tw-gradient-from': `${toColorValue(value)} var(--tw-gradient-from-position)`, + '--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`, '--tw-gradient-stops': `var(--tw-gradient-from), var(--tw-gradient-to)`, } }, @@ -1798,12 +1800,10 @@ export let corePlugins = { let transparentToValue = transparentTo(value) return { - '--tw-gradient-via-position': ' ', + '@defaults gradient-color-stops': {}, '--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`, - '--tw-gradient-to-position': ' ', '--tw-gradient-stops': `var(--tw-gradient-from), ${toColorValue( - value, - 'via' + value )} var(--tw-gradient-via-position), var(--tw-gradient-to)`, } }, @@ -1825,8 +1825,8 @@ export let corePlugins = { matchUtilities( { to: (value) => ({ - '--tw-gradient-to': `${toColorValue(value, 'to')} var(--tw-gradient-to-position)`, - '--tw-gradient-to-position': ' ', + '@defaults gradient-color-stops': {}, + '--tw-gradient-to': `${toColorValue(value)} var(--tw-gradient-to-position)`, }), }, options
diff --git a/tests/any-type.test.js b/tests/any-type.test.js --- a/tests/any-type.test.js +++ b/tests/any-type.test.js @@ -500,21 +500,16 @@ crosscheck(({ stable, oxide }) => { } .from-\[var\(--any-value\)\] { --tw-gradient-from: var(--any-value) var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fff0 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fff0 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-\[var\(--any-value\)\] { - --tw-gradient-via-position: ; --tw-gradient-to: #fff0 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), var(--any-value) var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-\[var\(--any-value\)\] { --tw-gradient-to: var(--any-value) var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .fill-\[var\(--any-value\)\] { fill: var(--any-value); @@ -1063,21 +1058,16 @@ crosscheck(({ stable, oxide }) => { } .from-\[var\(--any-value\)\] { --tw-gradient-from: var(--any-value) var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fff0 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fff0 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-\[var\(--any-value\)\] { - --tw-gradient-via-position: ; --tw-gradient-to: #fff0 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), var(--any-value) var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-\[var\(--any-value\)\] { --tw-gradient-to: var(--any-value) var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .fill-\[var\(--any-value\)\] { fill: var(--any-value); diff --git a/tests/arbitrary-values.oxide.test.css b/tests/arbitrary-values.oxide.test.css --- a/tests/arbitrary-values.oxide.test.css +++ b/tests/arbitrary-values.oxide.test.css @@ -134,13 +134,13 @@ min-height: var(--height); } .w-\[\'\)\(\)\'\] { - width: ")()"; + width: ')()'; } .w-\[\'\]\[\]\'\] { - width: "][]"; + width: '][]'; } .w-\[\'\}\{\}\'\] { - width: "}{}"; + width: '}{}'; } .w-\[\(\(\)\)\] { width: (()); @@ -176,7 +176,7 @@ width: var(--width, calc(100% + 1rem)); } .w-\[\{\{\}\}\] { - width: {{} } + width: {{}} } .w-\[\{\}\] { width: {} @@ -345,10 +345,10 @@ cursor: pointer; } .cursor-\[url\(\'\.\/path_to_hand\.cur\'\)_2_2\,pointer\] { - cursor: url("./path_to_hand.cur") 2 2, pointer; + cursor: url('./path_to_hand.cur') 2 2, pointer; } .cursor-\[url\(hand\.cur\)_2_2\,pointer\] { - cursor: url("hand.cur") 2 2, pointer; + cursor: url('hand.cur') 2 2, pointer; } .cursor-\[var\(--value\)\] { cursor: var(--value); @@ -406,13 +406,13 @@ scroll-padding-top: var(--scroll-padding); } .list-\[\'\\1f44d\'\] { - list-style-type: "👍"; + list-style-type: '👍'; } .list-\[var\(--value\)\] { list-style-type: var(--value); } .list-image-\[url\(\.\/my-image\.png\)\] { - list-style-image: url("./my-image.png"); + list-style-image: url('./my-image.png'); } .list-image-\[var\(--value\)\] { list-style-image: var(--value); @@ -653,46 +653,36 @@ background-image: linear-gradient(to left, rgb(var(--green)), blue); } .bg-\[url\(\'\/path-to-image\.png\'\)\] { - background-image: url("/path-to-image.png"); + background-image: url('/path-to-image.png'); } .bg-\[url\:var\(--url\)\] { background-image: var(--url); } .from-\[\#da5b66\] { --tw-gradient-from: #da5b66 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #da5b6600 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #da5b6600 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .from-\[var\(--color\)\] { --tw-gradient-from: var(--color) var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fff0 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fff0 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-\[\#da5b66\] { - --tw-gradient-via-position: ; --tw-gradient-to: #da5b6600 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #da5b66 var(--tw-gradient-via-position), var(--tw-gradient-to); } .via-\[var\(--color\)\] { - --tw-gradient-via-position: ; --tw-gradient-to: #fff0 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), var(--color) var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-\[\#da5b66\] { --tw-gradient-to: #da5b66 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .to-\[var\(--color\)\] { --tw-gradient-to: var(--color) var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .bg-\[length\:200px_100px\] { background-size: 200px 100px; @@ -713,7 +703,7 @@ fill: #da5b66; } .fill-\[url\(\#icon-gradient\)\] { - fill: url("#icon-gradient"); + fill: url('#icon-gradient'); } .fill-\[var\(--value\)\] { fill: var(--value); @@ -725,7 +715,7 @@ stroke: var(--value); } .stroke-\[url\(\#icon-gradient\)\] { - stroke: url("#icon-gradient"); + stroke: url('#icon-gradient'); } .stroke-\[20px\] { stroke-width: 20px; @@ -787,7 +777,7 @@ font-family: Some Font, sans-serif; } .font-\[\'Some_Font\'\,var\(--other-font\)\] { - font-family: "Some Font", var(--other-font); + font-family: 'Some Font', var(--other-font); } .font-\[Georgia\,serif\] { font-family: Georgia, serif; @@ -1062,11 +1052,11 @@ will-change: var(--will-change); } .content-\[\'\>\'\] { - --tw-content: ">"; + --tw-content: '>'; content: var(--tw-content); } .content-\[\'hello\'\] { - --tw-content: "hello"; + --tw-content: 'hello'; content: var(--tw-content); } .content-\[attr\(content-before\)\] { @@ -1078,4 +1068,3 @@ grid-template-columns: 200px repeat(auto-fill, minmax(15%, 100px)) 300px; } } - diff --git a/tests/arbitrary-values.test.css b/tests/arbitrary-values.test.css --- a/tests/arbitrary-values.test.css +++ b/tests/arbitrary-values.test.css @@ -176,7 +176,7 @@ width: var(--width, calc(100% + 1rem)); } .w-\[\{\{\}\}\] { - width: {{} } + width: {{}} } .w-\[\{\}\] { width: {} @@ -412,7 +412,7 @@ list-style-type: var(--value); } .list-image-\[url\(\.\/my-image\.png\)\] { - list-style-image: url("./my-image.png"); + list-style-image: url('./my-image.png'); } .list-image-\[var\(--value\)\] { list-style-image: var(--value); @@ -689,39 +689,29 @@ } .from-\[\#da5b66\] { --tw-gradient-from: #da5b66 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #da5b6600 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #da5b6600 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .from-\[var\(--color\)\] { --tw-gradient-from: var(--color) var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fff0 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fff0 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-\[\#da5b66\] { - --tw-gradient-via-position: ; --tw-gradient-to: #da5b6600 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #da5b66 var(--tw-gradient-via-position), var(--tw-gradient-to); } .via-\[var\(--color\)\] { - --tw-gradient-via-position: ; --tw-gradient-to: #fff0 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), var(--color) var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-\[\#da5b66\] { --tw-gradient-to: #da5b66 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .to-\[var\(--color\)\] { --tw-gradient-to: var(--color) var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .bg-\[length\:200px_100px\] { background-size: 200px 100px; diff --git a/tests/basic-usage.oxide.test.css b/tests/basic-usage.oxide.test.css --- a/tests/basic-usage.oxide.test.css +++ b/tests/basic-usage.oxide.test.css @@ -15,6 +15,9 @@ --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; @@ -608,21 +611,16 @@ } .from-red-300 { --tw-gradient-from: #fca5a5 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fca5a500 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fca5a500 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-purple-200 { - --tw-gradient-via-position: ; --tw-gradient-to: #e9d5ff00 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #e9d5ff var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-blue-400 { --tw-gradient-to: #60a5fa var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .decoration-slice { -webkit-box-decoration-break: slice; @@ -1028,4 +1026,3 @@ --tw-content: none; content: var(--tw-content); } - diff --git a/tests/basic-usage.test.css b/tests/basic-usage.test.css --- a/tests/basic-usage.test.css +++ b/tests/basic-usage.test.css @@ -15,6 +15,9 @@ --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; @@ -626,21 +629,16 @@ } .from-red-300 { --tw-gradient-from: #fca5a5 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fca5a500 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fca5a500 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-purple-200 { - --tw-gradient-via-position: ; --tw-gradient-to: #e9d5ff00 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #e9d5ff var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-blue-400 { --tw-gradient-to: #60a5fa var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .decoration-slice { -webkit-box-decoration-break: slice; diff --git a/tests/color-opacity-modifiers.test.js b/tests/color-opacity-modifiers.test.js --- a/tests/color-opacity-modifiers.test.js +++ b/tests/color-opacity-modifiers.test.js @@ -173,9 +173,7 @@ crosscheck(({ stable, oxide }) => { expect(result.css).toMatchFormattedCss(css` .from-red-500\/50 { --tw-gradient-from: #ef444480 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #ef444400 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #ef444400 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .fill-red-500\/25 { diff --git a/tests/kitchen-sink.test.js b/tests/kitchen-sink.test.js --- a/tests/kitchen-sink.test.js +++ b/tests/kitchen-sink.test.js @@ -528,9 +528,7 @@ crosscheck(({ stable, oxide }) => { } .from-foo { --tw-gradient-from: #bada55 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #bada5500 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #bada5500 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .px-1 { @@ -1090,9 +1088,7 @@ crosscheck(({ stable, oxide }) => { } .from-foo { --tw-gradient-from: #bada55 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #bada5500 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #bada5500 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .px-1 { diff --git a/tests/oxide-svelte.test.css b/tests/oxide-svelte.test.css --- a/tests/oxide-svelte.test.css +++ b/tests/oxide-svelte.test.css @@ -14,6 +14,9 @@ --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; @@ -60,6 +63,9 @@ --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; diff --git a/tests/plugins/gradientColorStops.test.js b/tests/plugins/gradientColorStops.test.js --- a/tests/plugins/gradientColorStops.test.js +++ b/tests/plugins/gradientColorStops.test.js @@ -35,39 +35,29 @@ crosscheck(({ stable, oxide }) => { stable.expect(result.css).toMatchFormattedCss(css` .from-primary { --tw-gradient-from: #1f1f1f var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #1f1f1f00 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #1f1f1f00 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .from-secondary { --tw-gradient-from: #bf5540 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #bf554000 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #bf554000 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-primary { - --tw-gradient-via-position: ; --tw-gradient-to: #1f1f1f00 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #1f1f1f var(--tw-gradient-via-position), var(--tw-gradient-to); } .via-secondary { - --tw-gradient-via-position: ; --tw-gradient-to: #bf554000 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #bf5540 var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-primary { --tw-gradient-to: #1f1f1f var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .to-secondary { --tw-gradient-to: #bf5540 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .text-primary { --tw-text-opacity: 1; @@ -84,39 +74,29 @@ crosscheck(({ stable, oxide }) => { oxide.expect(result.css).toMatchFormattedCss(css` .from-primary { --tw-gradient-from: #1f1f1f var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #1f1f1f00 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #1f1f1f00 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .from-secondary { --tw-gradient-from: #bf5540 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #bf554000 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #bf554000 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-primary { - --tw-gradient-via-position: ; --tw-gradient-to: #1f1f1f00 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #1f1f1f var(--tw-gradient-via-position), var(--tw-gradient-to); } .via-secondary { - --tw-gradient-via-position: ; --tw-gradient-to: #bf554000 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #bf5540 var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-primary { --tw-gradient-to: #1f1f1f var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .to-secondary { --tw-gradient-to: #bf5540 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .text-primary { color: #1f1f1f; @@ -154,16 +134,12 @@ crosscheck(({ stable, oxide }) => { } .from-\[--from-value\] { --tw-gradient-from: var(--from-value) var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fff0 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fff0 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .from-red-500 { --tw-gradient-from: #ef4444 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #ef444400 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #ef444400 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .from-10\% { @@ -176,16 +152,12 @@ crosscheck(({ stable, oxide }) => { --tw-gradient-from-position: 12px; } .via-\[--via-value\] { - --tw-gradient-via-position: ; --tw-gradient-to: #fff0 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), var(--via-value) var(--tw-gradient-via-position), var(--tw-gradient-to); } .via-pink-500 { - --tw-gradient-via-position: ; --tw-gradient-to: #ec489900 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #ec4899 var(--tw-gradient-via-position), var(--tw-gradient-to); } @@ -200,11 +172,9 @@ crosscheck(({ stable, oxide }) => { } .to-\[--to-value\] { --tw-gradient-to: var(--to-value) var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .to-violet-400 { --tw-gradient-to: #a78bfa var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .to-30\% { --tw-gradient-to-position: 30%; diff --git a/tests/raw-content.oxide.test.css b/tests/raw-content.oxide.test.css --- a/tests/raw-content.oxide.test.css +++ b/tests/raw-content.oxide.test.css @@ -424,21 +424,16 @@ } .from-red-300 { --tw-gradient-from: #fca5a5 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fca5a500 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fca5a500 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-purple-200 { - --tw-gradient-via-position: ; --tw-gradient-to: #e9d5ff00 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #e9d5ff var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-blue-400 { --tw-gradient-to: #60a5fa var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .decoration-slice { -webkit-box-decoration-break: slice; diff --git a/tests/raw-content.test.css b/tests/raw-content.test.css --- a/tests/raw-content.test.css +++ b/tests/raw-content.test.css @@ -436,21 +436,16 @@ } .from-red-300 { --tw-gradient-from: #fca5a5 var(--tw-gradient-from-position); - --tw-gradient-from-position: ; - --tw-gradient-to: #fca5a500 var(--tw-gradient-from-position); - --tw-gradient-to-position: ; + --tw-gradient-to: #fca5a500 var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .via-purple-200 { - --tw-gradient-via-position: ; --tw-gradient-to: #e9d5ff00 var(--tw-gradient-to-position); - --tw-gradient-to-position: ; --tw-gradient-stops: var(--tw-gradient-from), #e9d5ff var(--tw-gradient-via-position), var(--tw-gradient-to); } .to-blue-400 { --tw-gradient-to: #60a5fa var(--tw-gradient-to-position); - --tw-gradient-to-position: ; } .decoration-slice { -webkit-box-decoration-break: slice; diff --git a/tests/source-maps.test.js b/tests/source-maps.test.js --- a/tests/source-maps.test.js +++ b/tests/source-maps.test.js @@ -308,84 +308,90 @@ crosscheck(({ stable, oxide }) => { '2:6-20 -> 384:2-15', '2:6-20 -> 385:2-20', '2:6-20 -> 386:2-40', - '2:6-20 -> 387:2-17', - '2:6-20 -> 388:2-22', - '2:6-20 -> 389:2-24', - '2:6-20 -> 390:2-25', - '2:6-20 -> 391:2-26', - '2:6-20 -> 392:2-20', - '2:6-20 -> 393:2-29', - '2:6-20 -> 394:2-30', - '2:6-20 -> 395:2-40', - '2:6-20 -> 396:2-36', - '2:6-20 -> 397:2-29', - '2:6-20 -> 398:2-24', - '2:6-20 -> 399:2-32', - '2:6-20 -> 400:2-14', - '2:6-20 -> 401:2-20', - '2:6-20 -> 402:2-18', - '2:6-20 -> 403:2-19', + '2:6-20 -> 387:2-32', + '2:6-20 -> 388:2-31', + '2:6-20 -> 389:2-30', + '2:6-20 -> 390:2-17', + '2:6-20 -> 391:2-22', + '2:6-20 -> 392:2-24', + '2:6-20 -> 393:2-25', + '2:6-20 -> 394:2-26', + '2:6-20 -> 395:2-20', + '2:6-20 -> 396:2-29', + '2:6-20 -> 397:2-30', + '2:6-20 -> 398:2-40', + '2:6-20 -> 399:2-36', + '2:6-20 -> 400:2-29', + '2:6-20 -> 401:2-24', + '2:6-20 -> 402:2-32', + '2:6-20 -> 403:2-14', '2:6-20 -> 404:2-20', - '2:6-20 -> 405:2-16', - '2:6-20 -> 406:2-18', - '2:6-20 -> 407:2-15', - '2:6-20 -> 408:2-21', - '2:6-20 -> 409:2-23', - '2:6-20 -> 410:2-29', - '2:6-20 -> 411:2-27', - '2:6-20 -> 412:2-28', + '2:6-20 -> 405:2-18', + '2:6-20 -> 406:2-19', + '2:6-20 -> 407:2-20', + '2:6-20 -> 408:2-16', + '2:6-20 -> 409:2-18', + '2:6-20 -> 410:2-15', + '2:6-20 -> 411:2-21', + '2:6-20 -> 412:2-23', '2:6-20 -> 413:2-29', - '2:6-20 -> 414:2-25', - '2:6-20 -> 415:2-26', - '2:6-20 -> 416:2-27', - '2:6 -> 417:2', - '2:20 -> 418:0', - '2:6 -> 420:0', - '2:6-20 -> 421:2-26', - '2:6-20 -> 422:2-26', - '2:6-20 -> 423:2-21', - '2:6-20 -> 424:2-21', - '2:6-20 -> 425:2-16', - '2:6-20 -> 426:2-16', - '2:6-20 -> 427:2-16', - '2:6-20 -> 428:2-17', - '2:6-20 -> 429:2-17', - '2:6-20 -> 430:2-15', - '2:6-20 -> 431:2-15', - '2:6-20 -> 432:2-20', - '2:6-20 -> 433:2-40', - '2:6-20 -> 434:2-17', - '2:6-20 -> 435:2-22', - '2:6-20 -> 436:2-24', - '2:6-20 -> 437:2-25', - '2:6-20 -> 438:2-26', - '2:6-20 -> 439:2-20', - '2:6-20 -> 440:2-29', - '2:6-20 -> 441:2-30', - '2:6-20 -> 442:2-40', - '2:6-20 -> 443:2-36', - '2:6-20 -> 444:2-29', - '2:6-20 -> 445:2-24', - '2:6-20 -> 446:2-32', - '2:6-20 -> 447:2-14', - '2:6-20 -> 448:2-20', - '2:6-20 -> 449:2-18', - '2:6-20 -> 450:2-19', - '2:6-20 -> 451:2-20', - '2:6-20 -> 452:2-16', - '2:6-20 -> 453:2-18', - '2:6-20 -> 454:2-15', - '2:6-20 -> 455:2-21', - '2:6-20 -> 456:2-23', - '2:6-20 -> 457:2-29', - '2:6-20 -> 458:2-27', - '2:6-20 -> 459:2-28', - '2:6-20 -> 460:2-29', - '2:6-20 -> 461:2-25', - '2:6-20 -> 462:2-26', - '2:6-20 -> 463:2-27', - '2:6 -> 464:2', - '2:20 -> 465:0', + '2:6-20 -> 414:2-27', + '2:6-20 -> 415:2-28', + '2:6-20 -> 416:2-29', + '2:6-20 -> 417:2-25', + '2:6-20 -> 418:2-26', + '2:6-20 -> 419:2-27', + '2:6 -> 420:2', + '2:20 -> 421:0', + '2:6 -> 423:0', + '2:6-20 -> 424:2-26', + '2:6-20 -> 425:2-26', + '2:6-20 -> 426:2-21', + '2:6-20 -> 427:2-21', + '2:6-20 -> 428:2-16', + '2:6-20 -> 429:2-16', + '2:6-20 -> 430:2-16', + '2:6-20 -> 431:2-17', + '2:6-20 -> 432:2-17', + '2:6-20 -> 433:2-15', + '2:6-20 -> 434:2-15', + '2:6-20 -> 435:2-20', + '2:6-20 -> 436:2-40', + '2:6-20 -> 437:2-32', + '2:6-20 -> 438:2-31', + '2:6-20 -> 439:2-30', + '2:6-20 -> 440:2-17', + '2:6-20 -> 441:2-22', + '2:6-20 -> 442:2-24', + '2:6-20 -> 443:2-25', + '2:6-20 -> 444:2-26', + '2:6-20 -> 445:2-20', + '2:6-20 -> 446:2-29', + '2:6-20 -> 447:2-30', + '2:6-20 -> 448:2-40', + '2:6-20 -> 449:2-36', + '2:6-20 -> 450:2-29', + '2:6-20 -> 451:2-24', + '2:6-20 -> 452:2-32', + '2:6-20 -> 453:2-14', + '2:6-20 -> 454:2-20', + '2:6-20 -> 455:2-18', + '2:6-20 -> 456:2-19', + '2:6-20 -> 457:2-20', + '2:6-20 -> 458:2-16', + '2:6-20 -> 459:2-18', + '2:6-20 -> 460:2-15', + '2:6-20 -> 461:2-21', + '2:6-20 -> 462:2-23', + '2:6-20 -> 463:2-29', + '2:6-20 -> 464:2-27', + '2:6-20 -> 465:2-28', + '2:6-20 -> 466:2-29', + '2:6-20 -> 467:2-25', + '2:6-20 -> 468:2-26', + '2:6-20 -> 469:2-27', + '2:6 -> 470:2', + '2:20 -> 471:0', ]) }) diff --git a/tests/util/defaults.js b/tests/util/defaults.js --- a/tests/util/defaults.js +++ b/tests/util/defaults.js @@ -24,6 +24,9 @@ export function defaults({ defaultRingColor = `#3b82f680` } = {}) { --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; diff --git a/tests/variants.oxide.test.css b/tests/variants.oxide.test.css --- a/tests/variants.oxide.test.css +++ b/tests/variants.oxide.test.css @@ -15,6 +15,9 @@ --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; diff --git a/tests/variants.test.css b/tests/variants.test.css --- a/tests/variants.test.css +++ b/tests/variants.test.css @@ -15,6 +15,9 @@ --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ;
Unexpected gradient-stop behavior across light and dark modes <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** `v3.3.1` **What build tool (or framework if it abstracts the build tool) are you using?** `"@remix-run/react": "^1.14.1"` `"postcss-cli": "^10.1.0"` **What version of Node.js are you using?** `v16.15.0` **What browser are you using?** Chrome **What operating system are you using?** macOS **Reproduction URL** [Tailwind Play](https://play.tailwindcss.com/i3a4lpE2I3) **Describe your issue** Utilizing the newest tailwind `from-` and `to-` features for specifying gradient color stops seems to be referencing only the `from` color definition when there is a specifier for both viewing modes (with and without the dark variant). For example, the following `className` will yield some unexpected results ([Tailwind Play](https://play.tailwindcss.com/i3a4lpE2I3)): `bg-gradient-to-br from-white from-15% to-neutral-200 to-30% dark:from-neutral-500`. It seems reasonable to expect that `dark:from-neutral-500` would yield the following CSS class: ```css @media (prefers-color-scheme: dark) .dark\:from-neutral-500 { --tw-gradient-from: #737373 var(--tw-gradient-from-position); --tw-gradient-from-position: 15%; --tw-gradient-to: rgb(115 115 115 / 0) var(--tw-gradient-from-position); --tw-gradient-to-position: 30%; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } ``` However, the result lacks the `--tw-gradient-from-position` and `--tw-gradient-to-position`. The following screenshot shows that not only is the definition missing, but it's also referencing `from-position` rather than `to-position` for the `to-color` <img width="418" alt="image" src="https://user-images.githubusercontent.com/4250423/231343342-468dd81a-02b8-4ade-95c1-d70096c02f18.png" />
2023-04-13T15:50:48Z
3.3
tailwindlabs/tailwindcss
10,288
tailwindlabs__tailwindcss-10288
[ "10267" ]
b05918ab75370bfbecb3d556fec8846cbd285f0d
diff --git a/src/lib/offsets.js b/src/lib/offsets.js --- a/src/lib/offsets.js +++ b/src/lib/offsets.js @@ -13,6 +13,7 @@ import { remapBitfield } from './remap-bitfield.js' * @property {function | undefined} sort The sort function * @property {string|null} value The value we want to compare * @property {string|null} modifier The modifier that was used (if any) + * @property {bigint} variant The variant bitmask */ /** @@ -127,6 +128,8 @@ export class Offsets { * @returns {RuleOffset} */ applyVariantOffset(rule, variant, options) { + options.variant = variant.variants + return { ...rule, layer: 'variants', @@ -211,6 +214,19 @@ export class Offsets { for (let bOptions of b.options) { if (aOptions.id !== bOptions.id) continue if (!aOptions.sort || !bOptions.sort) continue + + let maxFnVariant = max([aOptions.variant, bOptions.variant]) ?? 0n + + // Create a mask of 0s from bits 1..N where N represents the mask of the Nth bit + let mask = ~(maxFnVariant | (maxFnVariant - 1n)) + let aVariantsAfterFn = a.variants & mask + let bVariantsAfterFn = b.variants & mask + + // If the variants the same, we _can_ sort them + if (aVariantsAfterFn !== bVariantsAfterFn) { + continue + } + let result = aOptions.sort( { value: aOptions.value,
diff --git a/tests/arbitrary-variants.test.js b/tests/arbitrary-variants.test.js --- a/tests/arbitrary-variants.test.js +++ b/tests/arbitrary-variants.test.js @@ -1158,3 +1158,201 @@ it('Invalid arbitrary variants selectors should produce nothing instead of faili expect(result.css).toMatchFormattedCss(css``) }) }) + +it('should output responsive variants + stacked variants in the right order', () => { + let config = { + content: [ + { + raw: html` + <div class="xl:p-1"></div> + <div class="md:[&_ul]:flex-row"></div> + <div class="[&_ul]:flex"></div> + <div class="[&_ul]:flex-col"></div> + `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + @media (min-width: 1280px) { + .xl\:p-1 { + padding: 0.25rem; + } + } + .\[\&_ul\]\:flex ul { + display: flex; + } + .\[\&_ul\]\:flex-col ul { + flex-direction: column; + } + @media (min-width: 768px) { + .md\:\[\&_ul\]\:flex-row ul { + flex-direction: row; + } + } + `) + }) +}) + +it('should sort multiple variant fns with normal variants between them', () => { + /** @type {string[]} */ + let lines = [] + + for (let a of [1, 2]) { + for (let b of [2, 1]) { + for (let c of [1, 2]) { + for (let d of [2, 1]) { + for (let e of [1, 2]) { + lines.push(`<div class="fred${a}:qux-[${b}]:baz${c}:bar-[${d}]:foo${e}:p-1"></div>`) + } + } + } + } + } + + // Fisher-Yates shuffle + for (let i = lines.length - 1; i > 0; i--) { + let j = Math.floor(Math.random() * i) + ;[lines[i], lines[j]] = [lines[j], lines[i]] + } + + let config = { + content: [ + { + raw: lines.join('\n'), + }, + ], + corePlugins: { preflight: false }, + plugins: [ + function ({ addVariant, matchVariant }) { + addVariant('foo1', '&[data-foo=1]') + addVariant('foo2', '&[data-foo=2]') + + matchVariant('bar', (value) => `&[data-bar=${value}]`, { + sort: (a, b) => b.value - a.value, + }) + + addVariant('baz1', '&[data-baz=1]') + addVariant('baz2', '&[data-baz=2]') + + matchVariant('qux', (value) => `&[data-qux=${value}]`, { + sort: (a, b) => b.value - a.value, + }) + + addVariant('fred1', '&[data-fred=1]') + addVariant('fred2', '&[data-fred=2]') + }, + ], + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .fred1\:qux-\[2\]\:baz1\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='1'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz1\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='1'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz1\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='1'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz1\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='1'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz2\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='2'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz2\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='2'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz2\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='2'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[2\]\:baz2\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='2'][data-qux='2'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz1\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='1'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz1\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='1'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz1\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='1'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz1\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='1'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz2\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='2'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz2\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='2'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz2\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='2'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred1\:qux-\[1\]\:baz2\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='2'][data-qux='1'][data-fred='1'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz1\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='1'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz1\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='1'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz1\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='1'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz1\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='1'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz2\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='2'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz2\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='2'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz2\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='2'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[2\]\:baz2\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='2'][data-qux='2'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz1\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='1'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz1\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='1'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz1\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='1'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz1\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='1'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz2\:bar-\[2\]\:foo1\:p-1[data-foo='1'][data-bar='2'][data-baz='2'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz2\:bar-\[2\]\:foo2\:p-1[data-foo='2'][data-bar='2'][data-baz='2'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz2\:bar-\[1\]\:foo1\:p-1[data-foo='1'][data-bar='1'][data-baz='2'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + .fred2\:qux-\[1\]\:baz2\:bar-\[1\]\:foo2\:p-1[data-foo='2'][data-bar='1'][data-baz='2'][data-qux='1'][data-fred='2'] { + padding: 0.25rem; + } + `) + }) +})
Order of CSS selectors is not correct with v3.2.x in specific scenarios **What version of Tailwind CSS are you using?** v3.2.4 **What build tool (or framework if it abstracts the build tool) are you using?** I use Vite. But I was able to reproduce the bug with `npx tailwindcss -i ./src/style.css -o ./dist/style.css`. **What version of Node.js are you using?** v16.16.0 **What browser are you using?** Chrome **What operating system are you using?** Windows 10 **Reproduction URL** https://replit.com/@rahulv3a/Tailwind-bug. Please click on `Run` to run the instance and `Show files` to view the code. I couldn't replicate it on play.tailwindcss.com because the files are required to be in a specific folder structure to reproduce. **Describe your issue** I have a PHP project with hundreds of files. Markup of various components (like menus) is generated by a CMS. As adding classes is not an option, I need to use `[&_]` on the containers to style them. Some layouts break when I update from `v3.1.x` to `v3.2.x` because the CSS order of certain selectors in the CSS generated is wrong. It occurs only when: - `[&_]` classes are used with `v3.2.x`. Everything works flawlessly with `v3.1.x`. - specific conditions are met. I'm still trying to figure them out. But I was able to create an isolated demo for you. **Example** In the following markup, the list items should be stacked in SM, and side-by-side from MD onwards. But they stay stacked in all viewports. ```html <div class="[&_ul]:flex [&_ul]:flex-col md:[&_ul]:flex-row"> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </div> ``` Generated CSS: ```css @media (min-width: 768px) { .md\:\[\&_ul\]\:flex-row ul { flex-direction: row; } } .\[\&_ul\]\:flex ul { display: flex; } .\[\&_ul\]\:flex-col ul { flex-direction: column; } ``` Expected CSS: ```css .\[\&_ul\]\:flex ul { display: flex; } .\[\&_ul\]\:flex-col ul { flex-direction: column; } @media (min-width: 768px) { .md\:\[\&_ul\]\:flex-row ul { flex-direction: row; } } ``` **Demo** I created an online demo https://replit.com/@rahulv3a/Tailwind-bug of the example mentioned above. It contains only the code required to reproduce the bug. Please click on `Run` to run the instance and `Show files` to view the code. - Tailwind setup - v3.2.4 is being used. - `yarn tailwindcss -i ./src/style.css -o ./dist/style.css` is used to generate the CSS. - `preflight` is disabled to keep things simple. - Conditions - tailwind.config.js - `content` has `["./inc/**/*.php", "./templates/**/*.php"]`. - The order of the paths is important to replicate the issue. - inc/functions.php - It contains two comments. In my project, `./inc` contains hundreds of functions that are documented in detail. The comments contain words like contents, lowercase, etc. Tailwind creates classes for them which is fine. But for some reason unknown, the comments that start with `//` interfere with the order of CSS selectors. - template/01-required.php - I don't know why but this code is required to replicate the issue. - template/component.php - This file contains the actual code mentioned in the example above. **More examples** Here are some more examples of the bug I experience in my project with `v3.2.x`: - `<br>` stays hidden in all viewports. ```html <h1 class="[&amp;_br]:hidden [&amp;_br]:xl:block"> Lorem<br /> Ipsum </h1> ``` - `<img>` stays full width in all viewports. ```html <figure class="[&_img]:w-full md:[&_img]:w-[300px] xl:[&_img]:w-[340px]"> <img src="./image.jpg" alt="some image" /> </figure> ``` I can create isolated demos for each of them if it helps you debug. Please let me know if you need any other information.
Thanks for reporting, I was able to distill the reproduction down to this minimal demo on Tailwind Play: https://play.tailwindcss.com/3ujiz5LanM Can see the sorting issue in the "Generated CSS" tab. Will look at this one next week! Thanks for the reporting...
2023-01-10T14:50:56Z
3.2
tailwindlabs/tailwindcss
10,074
tailwindlabs__tailwindcss-10074
[ "9832" ]
25d17db78c7c04c0314f8597138dc4564fc07c16
diff --git a/src/util/dataTypes.js b/src/util/dataTypes.js --- a/src/util/dataTypes.js +++ b/src/util/dataTypes.js @@ -10,6 +10,9 @@ function isCSSFunction(value) { return cssFunctions.some((fn) => new RegExp(`^${fn}\\(.*\\)`).test(value)) } +const placeholder = '--tw-placeholder' +const placeholderRe = new RegExp(placeholder, 'g') + // This is not a data type, but rather a function that can normalize the // correct values. export function normalize(value, isRoot = true) { @@ -49,10 +52,14 @@ export function normalize(value, isRoot = true) { // Add spaces around operators inside math functions like calc() that do not follow an operator // or '('. value = value.replace(/(calc|min|max|clamp)\(.+\)/g, (match) => { - return match.replace( - /(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, - '$1 $2 ' - ) + let vars = [] + return match + .replace(/var\((--.+?)[,)]/g, (match, g1) => { + vars.push(g1) + return match.replace(g1, placeholder) + }) + .replace(/(-?\d*\.?\d(?!\b-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, '$1 $2 ') + .replace(placeholderRe, () => vars.shift()) }) return value
diff --git a/tests/arbitrary-values.test.css b/tests/arbitrary-values.test.css --- a/tests/arbitrary-values.test.css +++ b/tests/arbitrary-values.test.css @@ -191,6 +191,15 @@ .w-\[\'\}\{\}\'\] { width: '}{}'; } +.min-w-\[calc\(1-var\(--something\)\*0\.5\)\] { + min-width: calc(1 - var(--something) * 0.5); +} +.min-w-\[calc\(1-\(var\(--something\)\*0\.5\)\)\] { + min-width: calc(1 - (var(--something) * 0.5)); +} +.min-w-\[calc\(1-\(\(12-3\)\*0\.5\)\)\] { + min-width: calc(1 - ((12 - 3) * 0.5)); +} .min-w-\[3\.23rem\] { min-width: 3.23rem; } diff --git a/tests/arbitrary-values.test.html b/tests/arbitrary-values.test.html --- a/tests/arbitrary-values.test.html +++ b/tests/arbitrary-values.test.html @@ -67,6 +67,9 @@ <div class="w-[var(--width)]"></div> <div class="w-[var(--width,calc(100%+1rem))]"></div> <div class="w-[calc(100%/3-1rem*2)]"></div> + <div class="min-w-[calc(1-var(--something)*0.5)]"></div> + <div class="min-w-[calc(1-(var(--something)*0.5))]"></div> + <div class="min-w-[calc(1-((12-3)*0.5))]"></div> <div class="min-w-[3.23rem]"></div> <div class="min-w-[calc(100%+1rem)]"></div>
Subtraction in `calc()` arbitrary values not always normalized properly <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v3.2.4 **What build tool (or framework if it abstracts the build tool) are you using?** Tailwind Play, Webpack v5 **What version of Node.js are you using?** v16.13.0 **What browser are you using?** Chrome **What operating system are you using?** Ubuntu 18.04 via WSL **Reproduction URL** https://play.tailwindcss.com/KnpyuskR45 **Describe your issue** A value like `calc(1-(var(--something)*0.5))` or `calc(1-var(--something)*0.5)` in an arbitrary variant is not normalized properly, with spaces missing around the subtraction operator: ```css .mt-\[calc\(1-var\(--something\)\*0\.5\)\] { margin-top: calc(1-var(--something) * 0.5); /* expected margin-top: calc(1 - var(--something) * 0.5); */ } ``` I would have expected this function consistently akin to the other mathematical operators which seem to be fine: ```css .mt-\[calc\(1\+\(var\(--something\)\*0\.5\)\)\] { margin-top: calc(1 + (var(--something) * 0.5)); } ```
The only place you can use the calc() function is in values. See these examples where we’re setting the value for a number of different properties. .el { font-size: calc(3vw + 2px); width: calc(100% - 20px); height: calc(100vh - 20px); padding: calc(1vw + 5px); }
2022-12-14T11:48:57Z
3.2
tailwindlabs/tailwindcss
10,601
tailwindlabs__tailwindcss-10601
[ "10582" ]
66c640b73599e36c6087644d3b2c231cc17b37ff
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -3,10 +3,14 @@ import selectorParser from 'postcss-selector-parser' import parseObjectStyles from '../util/parseObjectStyles' import isPlainObject from '../util/isPlainObject' import prefixSelector from '../util/prefixSelector' -import { updateAllClasses, filterSelectorsForClass, getMatchingTypes } from '../util/pluginUtils' +import { updateAllClasses, getMatchingTypes } from '../util/pluginUtils' import log from '../util/log' import * as sharedState from './sharedState' -import { formatVariantSelector, finalizeSelector } from '../util/formatVariantSelector' +import { + formatVariantSelector, + finalizeSelector, + eliminateIrrelevantSelectors, +} from '../util/formatVariantSelector' import { asClass } from '../util/nameClass' import { normalize } from '../util/dataTypes' import { isValidVariantFormatString, parseVariant } from './setupContextUtils' @@ -111,22 +115,28 @@ function applyImportant(matches, classCandidate) { if (matches.length === 0) { return matches } + let result = [] for (let [meta, rule] of matches) { let container = postcss.root({ nodes: [rule.clone()] }) + container.walkRules((r) => { - r.selector = updateAllClasses( - filterSelectorsForClass(r.selector, classCandidate), - (className) => { - if (className === classCandidate) { - return `!${className}` - } - return className - } + let ast = selectorParser().astSync(r.selector) + + // Remove extraneous selectors that do not include the base candidate + ast.each((sel) => eliminateIrrelevantSelectors(sel, classCandidate)) + + // Update all instances of the base candidate to include the important marker + updateAllClasses(ast, (className) => + className === classCandidate ? `!${className}` : className ) + + r.selector = ast.toString() + r.walkDecls((d) => (d.important = true)) }) + result.push([{ ...meta, important: true }, container.nodes[0]]) } diff --git a/src/util/formatVariantSelector.js b/src/util/formatVariantSelector.js --- a/src/util/formatVariantSelector.js +++ b/src/util/formatVariantSelector.js @@ -120,7 +120,7 @@ function resortSelector(sel) { * @param {Selector} ast * @param {string} base */ -function eliminateIrrelevantSelectors(sel, base) { +export function eliminateIrrelevantSelectors(sel, base) { let hasClassesMatchingCandidate = false sel.walk((child) => { diff --git a/src/util/pluginUtils.js b/src/util/pluginUtils.js --- a/src/util/pluginUtils.js +++ b/src/util/pluginUtils.js @@ -1,4 +1,3 @@ -import selectorParser from 'postcss-selector-parser' import escapeCommas from './escapeCommas' import { withAlphaValue } from './withAlphaVariable' import { @@ -21,37 +20,19 @@ import negateValue from './negateValue' import { backgroundSize } from './validateFormalSyntax' import { flagEnabled } from '../featureFlags.js' +/** + * @param {import('postcss-selector-parser').Container} selectors + * @param {(className: string) => string} updateClass + * @returns {string} + */ export function updateAllClasses(selectors, updateClass) { - let parser = selectorParser((selectors) => { - selectors.walkClasses((sel) => { - let updatedClass = updateClass(sel.value) - sel.value = updatedClass - if (sel.raws && sel.raws.value) { - sel.raws.value = escapeCommas(sel.raws.value) - } - }) - }) - - let result = parser.processSync(selectors) + selectors.walkClasses((sel) => { + sel.value = updateClass(sel.value) - return result -} - -export function filterSelectorsForClass(selectors, classCandidate) { - let parser = selectorParser((selectors) => { - selectors.each((sel) => { - const containsClass = sel.nodes.some( - (node) => node.type === 'class' && node.value === classCandidate - ) - if (!containsClass) { - sel.remove() - } - }) + if (sel.raws && sel.raws.value) { + sel.raws.value = escapeCommas(sel.raws.value) + } }) - - let result = parser.processSync(selectors) - - return result } function resolveArbitraryValue(modifier, validate) {
diff --git a/tests/important-modifier.test.js b/tests/important-modifier.test.js --- a/tests/important-modifier.test.js +++ b/tests/important-modifier.test.js @@ -108,4 +108,46 @@ crosscheck(() => { `) }) }) + + test('the important modifier works on utilities using :where()', () => { + let config = { + content: [ + { + raw: html` <div class="btn hover:btn !btn hover:focus:disabled:!btn"></div> `, + }, + ], + corePlugins: { preflight: false }, + plugins: [ + function ({ addComponents }) { + addComponents({ + ':where(.btn)': { + backgroundColor: '#00f', + }, + }) + }, + ], + } + + let input = css` + @tailwind components; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + :where(.\!btn) { + background-color: #00f !important; + } + :where(.btn) { + background-color: #00f; + } + :where(.hover\:btn:hover) { + background-color: #00f; + } + :where(.hover\:focus\:disabled\:\!btn:disabled:focus:hover) { + background-color: #00f !important; + } + `) + }) + }) })
Using `:where(.anything)` in a plugin and having `!anything` inside HTML, creates invalid CSS <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** 3.2.6 **What build tool (or framework if it abstracts the build tool) are you using?** Tailwind Play (or any tool) **Reproduction URL** https://play.tailwindcss.com/Oy7NHRkftL?file=config **Describe your issue** If there is string with `!` prefix with the same class from a plugin that has a `:where()` selector, Tailwind creates invalid CSS HTML: ``` !btn ``` tailwind.config.js: ```js const plugin = require('tailwindcss/plugin') module.exports = { plugins: [ plugin(function({ addComponents }) { addComponents({ '.btn': { backgroundColor: 'red', }, ':where(.btn)': { backgroundColor: 'blue', }, }) }) ] } ``` Generated CSS: ```css .\!btn { background-color: red !important } { background-color: blue !important } ``` As you can see it can't apply important to the `:where()` selector and it generates an empty selector.
Thanks for reporting! Here's a slightly simplified reproduction for our own reference: https://play.tailwindcss.com/4MqOxcleAv?file=config
2023-02-16T14:48:07Z
3.2
tailwindlabs/tailwindcss
9,704
tailwindlabs__tailwindcss-9704
[ "9677" ]
c9369894d6484ff2b95a987fb1f63595d5fb1891
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -3,7 +3,7 @@ import selectorParser from 'postcss-selector-parser' import parseObjectStyles from '../util/parseObjectStyles' import isPlainObject from '../util/isPlainObject' import prefixSelector from '../util/prefixSelector' -import { updateAllClasses, getMatchingTypes } from '../util/pluginUtils' +import { updateAllClasses, filterSelectorsForClass, getMatchingTypes } from '../util/pluginUtils' import log from '../util/log' import * as sharedState from './sharedState' import { formatVariantSelector, finalizeSelector } from '../util/formatVariantSelector' @@ -116,12 +116,15 @@ function applyImportant(matches, classCandidate) { for (let [meta, rule] of matches) { let container = postcss.root({ nodes: [rule.clone()] }) container.walkRules((r) => { - r.selector = updateAllClasses(r.selector, (className) => { - if (className === classCandidate) { - return `!${className}` + r.selector = updateAllClasses( + filterSelectorsForClass(r.selector, classCandidate), + (className) => { + if (className === classCandidate) { + return `!${className}` + } + return className } - return className - }) + ) r.walkDecls((d) => (d.important = true)) }) result.push([{ ...meta, important: true }, container.nodes[0]]) diff --git a/src/util/pluginUtils.js b/src/util/pluginUtils.js --- a/src/util/pluginUtils.js +++ b/src/util/pluginUtils.js @@ -37,6 +37,23 @@ export function updateAllClasses(selectors, updateClass) { return result } +export function filterSelectorsForClass(selectors, classCandidate) { + let parser = selectorParser((selectors) => { + selectors.each((sel) => { + const containsClass = sel.nodes.some( + (node) => node.type === 'class' && node.value === classCandidate + ) + if (!containsClass) { + sel.remove() + } + }) + }) + + let result = parser.processSync(selectors) + + return result +} + function resolveArbitraryValue(modifier, validate) { if (!isArbitraryValue(modifier)) { return undefined
diff --git a/tests/important-modifier.test.js b/tests/important-modifier.test.js --- a/tests/important-modifier.test.js +++ b/tests/important-modifier.test.js @@ -13,12 +13,13 @@ test('important modifier', () => { <div class="lg:!opacity-50"></div> <div class="xl:focus:disabled:!float-right"></div> <div class="!custom-parent-5"></div> + <div class="btn !disabled"></div> `, }, ], corePlugins: { preflight: false }, plugins: [ - function ({ theme, matchUtilities }) { + function ({ theme, matchUtilities, addComponents }) { matchUtilities( { 'custom-parent': (value) => { @@ -31,6 +32,13 @@ test('important modifier', () => { }, { values: theme('spacing') } ) + addComponents({ + '.btn': { + '&.disabled, &:disabled': { + color: 'gray', + }, + }, + }) }, ], } @@ -70,6 +78,13 @@ test('important modifier', () => { max-width: 1536px !important; } } + .btn.disabled, + .btn:disabled { + color: gray; + } + .btn.\!disabled { + color: gray !important; + } .\!font-bold { font-weight: 700 !important; }
Unexpected !important added when rules have multiple selectors <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v3.2.1 **What build tool (or framework if it abstracts the build tool) are you using?** webpack 5.74.0 **What version of Node.js are you using?** v16.18.0 **What browser are you using?** Firefox **What operating system are you using?** macOS **Reproduction URL** https://play.tailwindcss.com/VMLRCIqg77?file=config **Describe your issue** When adding rules with multiple selectors in a plugin, the generated CSS for the `!important` modifier can cause issues. The `!important` rule includes all selectors from the original rule, even those which don't include the modified class. For example, when adding a utility or component with these rules ``` '.btn': { '&.disabled, &:disabled': { color: 'gray', } } ``` the following CSS is generated ``` .btn.disabled, .btn:disabled { color: gray; } .btn.\!disabled, .btn:disabled { color: gray !important; } ``` but I think the following makes more sense ``` .btn.disabled, .btn:disabled { color: gray; } .btn.\!disabled { color: gray !important; } ``` The workaround in this case is straightforward, just splitting the rule in two. ``` '.btn': { '&.disabled': { color: 'gray', }, '&:disabled': { color: 'gray', } } ```
2022-11-01T12:39:13Z
3.2
tailwindlabs/tailwindcss
9,405
tailwindlabs__tailwindcss-9405
[ "6517" ]
bf4494104953b13a5f326b250d7028074815e77e
diff --git a/src/cli.js b/src/cli.js --- a/src/cli.js +++ b/src/cli.js @@ -1,29 +1,12 @@ #!/usr/bin/env node -import { lazyPostcss, lazyPostcssImport, lazyCssnano, lazyAutoprefixer } from '../peers/index.js' - -import chokidar from 'chokidar' import path from 'path' import arg from 'arg' import fs from 'fs' -import postcssrc from 'postcss-load-config' -import { lilconfig } from 'lilconfig' -import loadPlugins from 'postcss-load-config/src/plugins' // Little bit scary, looking at private/internal API -import loadOptions from 'postcss-load-config/src/options' // Little bit scary, looking at private/internal API -import tailwind from './processTailwindFeatures' -import resolveConfigInternal from '../resolveConfig' -import fastGlob from 'fast-glob' -import getModuleDependencies from './lib/getModuleDependencies' -import log from './util/log' -import packageJson from '../package.json' -import normalizePath from 'normalize-path' -import micromatch from 'micromatch' -import { validateConfig } from './util/validateConfig.js' -import { parseCandidateFiles } from './lib/content.js' -let env = { - DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0', -} +import { build } from './cli/build' +import { help } from './cli/help' +import { init } from './cli/init' function isESM() { const pkgPath = path.resolve('./package.json') @@ -48,112 +31,6 @@ let configs = isESM() // --- -function indentRecursive(node, indent = 0) { - node.each && - node.each((child, i) => { - if (!child.raws.before || !child.raws.before.trim() || child.raws.before.includes('\n')) { - child.raws.before = `\n${node.type !== 'rule' && i > 0 ? '\n' : ''}${' '.repeat(indent)}` - } - child.raws.after = `\n${' '.repeat(indent)}` - indentRecursive(child, indent + 1) - }) -} - -function formatNodes(root) { - indentRecursive(root) - if (root.first) { - root.first.raws.before = '' - } -} - -async function outputFile(file, contents) { - if (fs.existsSync(file) && (await fs.promises.readFile(file, 'utf8')) === contents) { - return // Skip writing the file - } - - // Write the file - await fs.promises.writeFile(file, contents, 'utf8') -} - -function drainStdin() { - return new Promise((resolve, reject) => { - let result = '' - process.stdin.on('data', (chunk) => { - result += chunk - }) - process.stdin.on('end', () => resolve(result)) - process.stdin.on('error', (err) => reject(err)) - }) -} - -function help({ message, usage, commands, options }) { - let indent = 2 - - // Render header - console.log() - console.log(`${packageJson.name} v${packageJson.version}`) - - // Render message - if (message) { - console.log() - for (let msg of message.split('\n')) { - console.log(msg) - } - } - - // Render usage - if (usage && usage.length > 0) { - console.log() - console.log('Usage:') - for (let example of usage) { - console.log(' '.repeat(indent), example) - } - } - - // Render commands - if (commands && commands.length > 0) { - console.log() - console.log('Commands:') - for (let command of commands) { - console.log(' '.repeat(indent), command) - } - } - - // Render options - if (options) { - let groupedOptions = {} - for (let [key, value] of Object.entries(options)) { - if (typeof value === 'object') { - groupedOptions[key] = { ...value, flags: [key] } - } else { - groupedOptions[value].flags.push(key) - } - } - - console.log() - console.log('Options:') - for (let { flags, description, deprecated } of Object.values(groupedOptions)) { - if (deprecated) continue - - if (flags.length === 1) { - console.log( - ' '.repeat(indent + 4 /* 4 = "-i, ".length */), - flags.slice().reverse().join(', ').padEnd(20, ' '), - description - ) - } else { - console.log( - ' '.repeat(indent), - flags.slice().reverse().join(', ').padEnd(24, ' '), - description - ) - } - } - } - - console.log() -} - function oneOf(...options) { return Object.assign( (value = true) => { @@ -170,15 +47,6 @@ function oneOf(...options) { ) } -function loadPostcss() { - // Try to load a local `postcss` version first - try { - return require('postcss') - } catch {} - - return lazyPostcss() -} - let commands = { init: { run: init, @@ -352,675 +220,4 @@ if (args['--help']) { process.exit(0) } -run() - -// --- - -function init() { - let messages = [] - - let tailwindConfigLocation = path.resolve(args['_'][1] ?? `./${configs.tailwind}`) - if (fs.existsSync(tailwindConfigLocation)) { - messages.push(`${path.basename(tailwindConfigLocation)} already exists.`) - } else { - let stubFile = fs.readFileSync( - args['--full'] - ? path.resolve(__dirname, '../stubs/defaultConfig.stub.js') - : path.resolve(__dirname, '../stubs/simpleConfig.stub.js'), - 'utf8' - ) - - // Change colors import - stubFile = stubFile.replace('../colors', 'tailwindcss/colors') - - fs.writeFileSync(tailwindConfigLocation, stubFile, 'utf8') - - messages.push(`Created Tailwind CSS config file: ${path.basename(tailwindConfigLocation)}`) - } - - if (args['--postcss']) { - let postcssConfigLocation = path.resolve(`./${configs.postcss}`) - if (fs.existsSync(postcssConfigLocation)) { - messages.push(`${path.basename(postcssConfigLocation)} already exists.`) - } else { - let stubFile = fs.readFileSync( - path.resolve(__dirname, '../stubs/defaultPostCssConfig.stub.js'), - 'utf8' - ) - - fs.writeFileSync(postcssConfigLocation, stubFile, 'utf8') - - messages.push(`Created PostCSS config file: ${path.basename(postcssConfigLocation)}`) - } - } - - if (messages.length > 0) { - console.log() - for (let message of messages) { - console.log(message) - } - } -} - -async function build() { - let input = args['--input'] - let output = args['--output'] - let shouldWatch = args['--watch'] - let shouldPoll = args['--poll'] - let shouldCoalesceWriteEvents = shouldPoll || process.platform === 'win32' - let includePostCss = args['--postcss'] - - // Polling interval in milliseconds - // Used only when polling or coalescing add/change events on Windows - let pollInterval = 10 - - // TODO: Deprecate this in future versions - if (!input && args['_'][1]) { - console.error('[deprecation] Running tailwindcss without -i, please provide an input file.') - input = args['--input'] = args['_'][1] - } - - if (input && input !== '-' && !fs.existsSync((input = path.resolve(input)))) { - console.error(`Specified input file ${args['--input']} does not exist.`) - process.exit(9) - } - - if (args['--config'] && !fs.existsSync((args['--config'] = path.resolve(args['--config'])))) { - console.error(`Specified config file ${args['--config']} does not exist.`) - process.exit(9) - } - - let configPath = args['--config'] - ? args['--config'] - : ((defaultPath) => (fs.existsSync(defaultPath) ? defaultPath : null))( - path.resolve(`./${configs.tailwind}`) - ) - - async function loadPostCssPlugins() { - let customPostCssPath = typeof args['--postcss'] === 'string' ? args['--postcss'] : undefined - let config = customPostCssPath - ? await (async () => { - let file = path.resolve(customPostCssPath) - - // Implementation, see: https://unpkg.com/browse/[email protected]/src/index.js - let { config = {} } = await lilconfig('postcss').load(file) - if (typeof config === 'function') { - config = config() - } else { - config = Object.assign({}, config) - } - - if (!config.plugins) { - config.plugins = [] - } - - return { - file, - plugins: loadPlugins(config, file), - options: loadOptions(config, file), - } - })() - : await postcssrc() - - let configPlugins = config.plugins - - let configPluginTailwindIdx = configPlugins.findIndex((plugin) => { - if (typeof plugin === 'function' && plugin.name === 'tailwindcss') { - return true - } - - if (typeof plugin === 'object' && plugin !== null && plugin.postcssPlugin === 'tailwindcss') { - return true - } - - return false - }) - - let beforePlugins = - configPluginTailwindIdx === -1 ? [] : configPlugins.slice(0, configPluginTailwindIdx) - let afterPlugins = - configPluginTailwindIdx === -1 - ? configPlugins - : configPlugins.slice(configPluginTailwindIdx + 1) - - return [beforePlugins, afterPlugins, config.options] - } - - function loadBuiltinPostcssPlugins() { - let postcss = loadPostcss() - let IMPORT_COMMENT = '__TAILWIND_RESTORE_IMPORT__: ' - return [ - [ - (root) => { - root.walkAtRules('import', (rule) => { - if (rule.params.slice(1).startsWith('tailwindcss/')) { - rule.after(postcss.comment({ text: IMPORT_COMMENT + rule.params })) - rule.remove() - } - }) - }, - (() => { - try { - return require('postcss-import') - } catch {} - - return lazyPostcssImport() - })(), - (root) => { - root.walkComments((rule) => { - if (rule.text.startsWith(IMPORT_COMMENT)) { - rule.after( - postcss.atRule({ - name: 'import', - params: rule.text.replace(IMPORT_COMMENT, ''), - }) - ) - rule.remove() - } - }) - }, - ], - [], - {}, - ] - } - - function resolveConfig() { - let config = configPath ? require(configPath) : {} - - if (args['--purge']) { - log.warn('purge-flag-deprecated', [ - 'The `--purge` flag has been deprecated.', - 'Please use `--content` instead.', - ]) - if (!args['--content']) { - args['--content'] = args['--purge'] - } - } - - if (args['--content']) { - let files = args['--content'].split(/(?<!{[^}]+),/) - let resolvedConfig = resolveConfigInternal(config, { content: { files } }) - resolvedConfig.content.files = files - resolvedConfig = validateConfig(resolvedConfig) - return resolvedConfig - } - - let resolvedConfig = resolveConfigInternal(config) - resolvedConfig = validateConfig(resolvedConfig) - return resolvedConfig - } - - function extractFileGlobs(config) { - let context = { - tailwindConfig: config, - userConfigPath: configPath, - } - - let contentPaths = parseCandidateFiles(context, config) - - return contentPaths.map((contentPath) => contentPath.pattern) - } - - function extractRawContent(config) { - return config.content.files.filter((file) => { - return typeof file === 'object' && file !== null - }) - } - - function getChangedContent(config) { - let changedContent = [] - - // Resolve globs from the content config - let globs = extractFileGlobs(config) - let files = fastGlob.sync(globs) - - for (let file of files) { - changedContent.push({ - content: fs.readFileSync(path.resolve(file), 'utf8'), - extension: path.extname(file).slice(1), - }) - } - - // Resolve raw content in the tailwind config - for (let { raw: content, extension = 'html' } of extractRawContent(config)) { - changedContent.push({ content, extension }) - } - - return changedContent - } - - async function buildOnce() { - let config = resolveConfig() - let changedContent = getChangedContent(config) - - let tailwindPlugin = () => { - return { - postcssPlugin: 'tailwindcss', - Once(root, { result }) { - tailwind(({ createContext }) => { - return () => { - return createContext(config, changedContent) - } - })(root, result) - }, - } - } - - tailwindPlugin.postcss = true - - let [beforePlugins, afterPlugins, postcssOptions] = includePostCss - ? await loadPostCssPlugins() - : loadBuiltinPostcssPlugins() - - let plugins = [ - ...beforePlugins, - tailwindPlugin, - !args['--minify'] && formatNodes, - ...afterPlugins, - !args['--no-autoprefixer'] && - (() => { - // Try to load a local `autoprefixer` version first - try { - return require('autoprefixer') - } catch {} - - return lazyAutoprefixer() - })(), - args['--minify'] && - (() => { - let options = { preset: ['default', { cssDeclarationSorter: false }] } - - // Try to load a local `cssnano` version first - try { - return require('cssnano') - } catch {} - - return lazyCssnano()(options) - })(), - ].filter(Boolean) - - let postcss = loadPostcss() - let processor = postcss(plugins) - - function processCSS(css) { - let start = process.hrtime.bigint() - return Promise.resolve() - .then(() => (output ? fs.promises.mkdir(path.dirname(output), { recursive: true }) : null)) - .then(() => processor.process(css, { ...postcssOptions, from: input, to: output })) - .then((result) => { - if (!output) { - return process.stdout.write(result.css) - } - - return Promise.all( - [ - outputFile(output, result.css), - result.map && outputFile(output + '.map', result.map.toString()), - ].filter(Boolean) - ) - }) - .then(() => { - let end = process.hrtime.bigint() - console.error() - console.error('Done in', (end - start) / BigInt(1e6) + 'ms.') - }) - } - - let css = await (() => { - // Piping in data, let's drain the stdin - if (input === '-') { - return drainStdin() - } - - // Input file has been provided - if (input) { - return fs.readFileSync(path.resolve(input), 'utf8') - } - - // No input file provided, fallback to default atrules - return '@tailwind base; @tailwind components; @tailwind utilities' - })() - - return processCSS(css) - } - - let context = null - - async function startWatcher() { - let changedContent = [] - let configDependencies = [] - let contextDependencies = new Set() - let watcher = null - - function refreshConfig() { - env.DEBUG && console.time('Module dependencies') - for (let file of configDependencies) { - delete require.cache[require.resolve(file)] - } - - if (configPath) { - configDependencies = getModuleDependencies(configPath).map(({ file }) => file) - - for (let dependency of configDependencies) { - contextDependencies.add(dependency) - } - } - env.DEBUG && console.timeEnd('Module dependencies') - - return resolveConfig() - } - - let [beforePlugins, afterPlugins] = includePostCss - ? await loadPostCssPlugins() - : loadBuiltinPostcssPlugins() - - let plugins = [ - ...beforePlugins, - '__TAILWIND_PLUGIN_POSITION__', - !args['--minify'] && formatNodes, - ...afterPlugins, - !args['--no-autoprefixer'] && - (() => { - // Try to load a local `autoprefixer` version first - try { - return require('autoprefixer') - } catch {} - - return lazyAutoprefixer() - })(), - args['--minify'] && - (() => { - let options = { preset: ['default', { cssDeclarationSorter: false }] } - - // Try to load a local `cssnano` version first - try { - return require('cssnano') - } catch {} - - return lazyCssnano()(options) - })(), - ].filter(Boolean) - - async function rebuild(config) { - env.DEBUG && console.time('Finished in') - - let tailwindPlugin = () => { - return { - postcssPlugin: 'tailwindcss', - Once(root, { result }) { - env.DEBUG && console.time('Compiling CSS') - tailwind(({ createContext }) => { - console.error() - console.error('Rebuilding...') - - return () => { - if (context !== null) { - context.changedContent = changedContent.splice(0) - return context - } - - env.DEBUG && console.time('Creating context') - context = createContext(config, changedContent.splice(0)) - env.DEBUG && console.timeEnd('Creating context') - return context - } - })(root, result) - env.DEBUG && console.timeEnd('Compiling CSS') - }, - } - } - - tailwindPlugin.postcss = true - - let tailwindPluginIdx = plugins.indexOf('__TAILWIND_PLUGIN_POSITION__') - let copy = plugins.slice() - copy.splice(tailwindPluginIdx, 1, tailwindPlugin) - let postcss = loadPostcss() - let processor = postcss(copy) - - function processCSS(css) { - let start = process.hrtime.bigint() - return Promise.resolve() - .then(() => - output ? fs.promises.mkdir(path.dirname(output), { recursive: true }) : null - ) - .then(() => processor.process(css, { from: input, to: output })) - .then(async (result) => { - for (let message of result.messages) { - if (message.type === 'dependency') { - contextDependencies.add(message.file) - } - } - watcher.add([...contextDependencies]) - - if (!output) { - return process.stdout.write(result.css) - } - - return Promise.all( - [ - outputFile(output, result.css), - result.map && outputFile(output + '.map', result.map.toString()), - ].filter(Boolean) - ) - }) - .then(() => { - let end = process.hrtime.bigint() - console.error('Done in', (end - start) / BigInt(1e6) + 'ms.') - }) - .catch((err) => { - if (err.name === 'CssSyntaxError') { - console.error(err.toString()) - } else { - console.error(err) - } - }) - } - - let css = await (() => { - // Piping in data, let's drain the stdin - if (input === '-') { - return drainStdin() - } - - // Input file has been provided - if (input) { - return fs.readFileSync(path.resolve(input), 'utf8') - } - - // No input file provided, fallback to default atrules - return '@tailwind base; @tailwind components; @tailwind utilities' - })() - - let result = await processCSS(css) - env.DEBUG && console.timeEnd('Finished in') - return result - } - - let config = refreshConfig(configPath) - let contentPatterns = refreshContentPatterns(config) - - /** - * @param {import('../types/config.js').RequiredConfig} config - * @return {{all: string[], dynamic: string[], static: string[]}} - **/ - function refreshContentPatterns(config) { - let globs = extractFileGlobs(config) - let tasks = fastGlob.generateTasks(globs, { absolute: true }) - let dynamicPatterns = tasks.filter((task) => task.dynamic).flatMap((task) => task.patterns) - let staticPatterns = tasks.filter((task) => !task.dynamic).flatMap((task) => task.patterns) - - return { - all: [...staticPatterns, ...dynamicPatterns], - dynamic: dynamicPatterns, - } - } - - if (input) { - contextDependencies.add(path.resolve(input)) - } - - watcher = chokidar.watch([...contextDependencies, ...extractFileGlobs(config)], { - // Force checking for atomic writes in all situations - // This causes chokidar to wait up to 100ms for a file to re-added after it's been unlinked - // This only works when watching directories though - atomic: true, - - usePolling: shouldPoll, - interval: shouldPoll ? pollInterval : undefined, - ignoreInitial: true, - awaitWriteFinish: shouldCoalesceWriteEvents - ? { - stabilityThreshold: 50, - pollInterval: pollInterval, - } - : false, - }) - - let chain = Promise.resolve() - let pendingRebuilds = new Set() - - watcher.on('change', async (file) => { - if (contextDependencies.has(file)) { - env.DEBUG && console.time('Resolve config') - context = null - config = refreshConfig(configPath) - contentPatterns = refreshContentPatterns(config) - env.DEBUG && console.timeEnd('Resolve config') - - env.DEBUG && console.time('Watch new files') - let globs = extractFileGlobs(config) - watcher.add(configDependencies) - watcher.add(globs) - env.DEBUG && console.timeEnd('Watch new files') - - chain = chain.then(async () => { - changedContent.push(...getChangedContent(config)) - await rebuild(config) - }) - } else { - chain = chain.then(async () => { - changedContent.push({ - content: fs.readFileSync(path.resolve(file), 'utf8'), - extension: path.extname(file).slice(1), - }) - - await rebuild(config) - }) - } - }) - - /** - * When rapidly saving files atomically a couple of situations can happen: - * - The file is missing since the external program has deleted it by the time we've gotten around to reading it from the earlier save. - * - The file is being written to by the external program by the time we're going to read it and is thus treated as busy because a lock is held. - * - * To work around this we retry reading the file a handful of times with a delay between each attempt - * - * @param {string} path - * @param {number} tries - * @returns {string} - * @throws {Error} If the file is still missing or busy after the specified number of tries - */ - async function readFileWithRetries(path, tries = 5) { - for (let n = 0; n <= tries; n++) { - try { - return await fs.promises.readFile(path, 'utf8') - } catch (err) { - if (n !== tries) { - if (err.code === 'ENOENT' || err.code === 'EBUSY') { - await new Promise((resolve) => setTimeout(resolve, 10)) - - continue - } - } - - throw err - } - } - } - - // Restore watching any files that are "removed" - // This can happen when a file is pseudo-atomically replaced (a copy is created, overwritten, the old one is unlinked, and the new one is renamed) - // TODO: An an optimization we should allow removal when the config changes - watcher.on('unlink', (file) => { - file = normalizePath(file) - - // Only re-add the file if it's not covered by a dynamic pattern - if (!micromatch.some([file], contentPatterns.dynamic)) { - watcher.add(file) - } - }) - - // Some applications such as Visual Studio (but not VS Code) - // will only fire a rename event for atomic writes and not a change event - // This is very likely a chokidar bug but it's one we need to work around - // We treat this as a change event and rebuild the CSS - watcher.on('raw', (evt, filePath, meta) => { - if (evt !== 'rename') { - return - } - - let watchedPath = meta.watchedPath - - // Watched path might be the file itself - // Or the directory it is in - filePath = watchedPath.endsWith(filePath) ? watchedPath : path.join(watchedPath, filePath) - - // Skip this event since the files it is for does not match any of the registered content globs - if (!micromatch.some([filePath], contentPatterns.all)) { - return - } - - // Skip since we've already queued a rebuild for this file that hasn't happened yet - if (pendingRebuilds.has(filePath)) { - return - } - - pendingRebuilds.add(filePath) - - chain = chain.then(async () => { - let content - - try { - content = await readFileWithRetries(path.resolve(filePath)) - } finally { - pendingRebuilds.delete(filePath) - } - - changedContent.push({ - content, - extension: path.extname(filePath).slice(1), - }) - - await rebuild(config) - }) - }) - - watcher.on('add', async (file) => { - chain = chain.then(async () => { - changedContent.push({ - content: fs.readFileSync(path.resolve(file), 'utf8'), - extension: path.extname(file).slice(1), - }) - - await rebuild(config) - }) - }) - - chain = chain.then(() => { - changedContent.push(...getChangedContent(config)) - return rebuild(config) - }) - } - - if (shouldWatch) { - /* Abort the watcher if stdin is closed to avoid zombie processes */ - process.stdin.on('end', () => process.exit(0)) - process.stdin.resume() - startWatcher() - } else { - buildOnce() - } -} +run(args, configs) diff --git a/src/cli/build/deps.js b/src/cli/build/deps.js new file mode 100644 --- /dev/null +++ b/src/cli/build/deps.js @@ -0,0 +1,56 @@ +// @ts-check + +import { + // @ts-ignore + lazyPostcss, + + // @ts-ignore + lazyPostcssImport, + + // @ts-ignore + lazyCssnano, + + // @ts-ignore + lazyAutoprefixer, +} from '../../../peers/index.js' + +/** + * @returns {import('postcss')} + */ +export function loadPostcss() { + // Try to load a local `postcss` version first + try { + return require('postcss') + } catch {} + + return lazyPostcss() +} + +export function loadPostcssImport() { + // Try to load a local `postcss-import` version first + try { + return require('postcss-import') + } catch {} + + return lazyPostcssImport() +} + +export function loadCssNano() { + let options = { preset: ['default', { cssDeclarationSorter: false }] } + + // Try to load a local `cssnano` version first + try { + return require('cssnano') + } catch {} + + return lazyCssnano()(options) +} + +export function loadAutoprefixer() { + // Try to load a local `autoprefixer` version first + try { + return require('autoprefixer') + } catch {} + + return lazyAutoprefixer() +} diff --git a/src/cli/build/index.js b/src/cli/build/index.js new file mode 100644 --- /dev/null +++ b/src/cli/build/index.js @@ -0,0 +1,45 @@ +// @ts-check + +import fs from 'fs' +import path from 'path' +import { createProcessor } from './plugin.js' + +export async function build(args, configs) { + let input = args['--input'] + let shouldWatch = args['--watch'] + + // TODO: Deprecate this in future versions + if (!input && args['_'][1]) { + console.error('[deprecation] Running tailwindcss without -i, please provide an input file.') + input = args['--input'] = args['_'][1] + } + + if (input && input !== '-' && !fs.existsSync((input = path.resolve(input)))) { + console.error(`Specified input file ${args['--input']} does not exist.`) + process.exit(9) + } + + if (args['--config'] && !fs.existsSync((args['--config'] = path.resolve(args['--config'])))) { + console.error(`Specified config file ${args['--config']} does not exist.`) + process.exit(9) + } + + // TODO: Reference the @config path here if exists + let configPath = args['--config'] + ? args['--config'] + : ((defaultPath) => (fs.existsSync(defaultPath) ? defaultPath : null))( + path.resolve(`./${configs.tailwind}`) + ) + + let processor = await createProcessor(args, configPath) + + if (shouldWatch) { + /* Abort the watcher if stdin is closed to avoid zombie processes */ + process.stdin.on('end', () => process.exit(0)) + process.stdin.resume() + + await processor.watch() + } else { + await processor.build() + } +} diff --git a/src/cli/build/plugin.js b/src/cli/build/plugin.js new file mode 100644 --- /dev/null +++ b/src/cli/build/plugin.js @@ -0,0 +1,372 @@ +// @ts-check + +import path from 'path' +import fs from 'fs' +import postcssrc from 'postcss-load-config' +import { lilconfig } from 'lilconfig' +import loadPlugins from 'postcss-load-config/src/plugins' // Little bit scary, looking at private/internal API +import loadOptions from 'postcss-load-config/src/options' // Little bit scary, looking at private/internal API + +import tailwind from '../../processTailwindFeatures' +import { loadAutoprefixer, loadCssNano, loadPostcss, loadPostcssImport } from './deps' +import { formatNodes, drainStdin, outputFile } from './utils' +import { env } from '../shared' +import resolveConfig from '../../../resolveConfig.js' +import getModuleDependencies from '../../lib/getModuleDependencies.js' +import { parseCandidateFiles } from '../../lib/content.js' +import { createWatcher } from './watching.js' +import fastGlob from 'fast-glob' +import { findAtConfigPath } from '../../lib/findAtConfigPath.js' + +/** + * + * @param {string} [customPostCssPath ] + * @returns + */ +async function loadPostCssPlugins(customPostCssPath) { + let config = customPostCssPath + ? await (async () => { + let file = path.resolve(customPostCssPath) + + // Implementation, see: https://unpkg.com/browse/[email protected]/src/index.js + // @ts-ignore + let { config = {} } = await lilconfig('postcss').load(file) + if (typeof config === 'function') { + config = config() + } else { + config = Object.assign({}, config) + } + + if (!config.plugins) { + config.plugins = [] + } + + return { + file, + plugins: loadPlugins(config, file), + options: loadOptions(config, file), + } + })() + : await postcssrc() + + let configPlugins = config.plugins + + let configPluginTailwindIdx = configPlugins.findIndex((plugin) => { + if (typeof plugin === 'function' && plugin.name === 'tailwindcss') { + return true + } + + if (typeof plugin === 'object' && plugin !== null && plugin.postcssPlugin === 'tailwindcss') { + return true + } + + return false + }) + + let beforePlugins = + configPluginTailwindIdx === -1 ? [] : configPlugins.slice(0, configPluginTailwindIdx) + let afterPlugins = + configPluginTailwindIdx === -1 + ? configPlugins + : configPlugins.slice(configPluginTailwindIdx + 1) + + return [beforePlugins, afterPlugins, config.options] +} + +function loadBuiltinPostcssPlugins() { + let postcss = loadPostcss() + let IMPORT_COMMENT = '__TAILWIND_RESTORE_IMPORT__: ' + return [ + [ + (root) => { + root.walkAtRules('import', (rule) => { + if (rule.params.slice(1).startsWith('tailwindcss/')) { + rule.after(postcss.comment({ text: IMPORT_COMMENT + rule.params })) + rule.remove() + } + }) + }, + loadPostcssImport(), + (root) => { + root.walkComments((rule) => { + if (rule.text.startsWith(IMPORT_COMMENT)) { + rule.after( + postcss.atRule({ + name: 'import', + params: rule.text.replace(IMPORT_COMMENT, ''), + }) + ) + rule.remove() + } + }) + }, + ], + [], + {}, + ] +} + +let state = { + /** @type {any} */ + context: null, + + /** @type {ReturnType<typeof createWatcher> | null} */ + watcher: null, + + /** @type {{content: string, extension: string}[]} */ + changedContent: [], + + configDependencies: new Set(), + contextDependencies: new Set(), + + /** @type {import('../../lib/content.js').ContentPath[]} */ + contentPaths: [], + + refreshContentPaths() { + this.contentPaths = parseCandidateFiles(this.context, this.context?.tailwindConfig) + }, + + get config() { + return this.context.tailwindConfig + }, + + get contentPatterns() { + return { + all: this.contentPaths.map((contentPath) => contentPath.pattern), + dynamic: this.contentPaths + .filter((contentPath) => contentPath.glob !== undefined) + .map((contentPath) => contentPath.pattern), + } + }, + + loadConfig(configPath) { + if (this.watcher && configPath) { + this.refreshConfigDependencies(configPath) + } + + let config = configPath ? require(configPath) : {} + + // @ts-ignore + config = resolveConfig(config, { content: { files: [] } }) + + return config + }, + + refreshConfigDependencies(configPath) { + env.DEBUG && console.time('Module dependencies') + + for (let file of this.configDependencies) { + delete require.cache[require.resolve(file)] + } + + if (configPath) { + let deps = getModuleDependencies(configPath).map(({ file }) => file) + + for (let dependency of deps) { + this.configDependencies.add(dependency) + } + } + + env.DEBUG && console.timeEnd('Module dependencies') + }, + + readContentPaths() { + let content = [] + + // Resolve globs from the content config + // TODO: When we make the postcss plugin async-capable this can become async + let files = fastGlob.sync(this.contentPatterns.all) + + for (let file of files) { + content.push({ + content: fs.readFileSync(path.resolve(file), 'utf8'), + extension: path.extname(file).slice(1), + }) + } + + // Resolve raw content in the tailwind config + let rawContent = this.config.content.files.filter((file) => { + return file !== null && typeof file === 'object' + }) + + for (let { raw: content, extension = 'html' } of rawContent) { + content.push({ content, extension }) + } + + return content + }, + + getContext({ createContext, cliConfigPath, root, result }) { + if (this.context) { + this.context.changedContent = this.changedContent.splice(0) + + return this.context + } + + env.DEBUG && console.time('Searching for config') + let configPath = findAtConfigPath(root, result) ?? cliConfigPath + env.DEBUG && console.timeEnd('Searching for config') + + env.DEBUG && console.time('Loading config') + let config = this.loadConfig(configPath) + env.DEBUG && console.timeEnd('Loading config') + + env.DEBUG && console.time('Creating context') + this.context = createContext(config, []) + Object.assign(this.context, { + userConfigPath: configPath, + }) + env.DEBUG && console.timeEnd('Creating context') + + env.DEBUG && console.time('Resolving content paths') + this.refreshContentPaths() + env.DEBUG && console.timeEnd('Resolving content paths') + + if (this.watcher) { + env.DEBUG && console.time('Watch new files') + this.watcher.refreshWatchedFiles() + env.DEBUG && console.timeEnd('Watch new files') + } + + env.DEBUG && console.time('Reading content files') + for (let file of this.readContentPaths()) { + this.context.changedContent.push(file) + } + env.DEBUG && console.timeEnd('Reading content files') + + return this.context + }, +} + +export async function createProcessor(args, cliConfigPath) { + let postcss = loadPostcss() + + let input = args['--input'] + let output = args['--output'] + let includePostCss = args['--postcss'] + let customPostCssPath = typeof args['--postcss'] === 'string' ? args['--postcss'] : undefined + + let [beforePlugins, afterPlugins, postcssOptions] = includePostCss + ? await loadPostCssPlugins(customPostCssPath) + : loadBuiltinPostcssPlugins() + + let tailwindPlugin = () => { + return { + postcssPlugin: 'tailwindcss', + Once(root, { result }) { + env.DEBUG && console.time('Compiling CSS') + tailwind(({ createContext }) => { + console.error() + console.error('Rebuilding...') + + return () => { + return state.getContext({ createContext, cliConfigPath, root, result }) + } + })(root, result) + env.DEBUG && console.timeEnd('Compiling CSS') + }, + } + } + + tailwindPlugin.postcss = true + + let plugins = [ + ...beforePlugins, + tailwindPlugin, + !args['--minify'] && formatNodes, + ...afterPlugins, + !args['--no-autoprefixer'] && loadAutoprefixer(), + args['--minify'] && loadCssNano(), + ].filter(Boolean) + + /** @type {import('postcss').Processor} */ + // @ts-ignore + let processor = postcss(plugins) + + async function readInput() { + // Piping in data, let's drain the stdin + if (input === '-') { + return drainStdin() + } + + // Input file has been provided + if (input) { + return fs.promises.readFile(path.resolve(input), 'utf8') + } + + // No input file provided, fallback to default atrules + return '@tailwind base; @tailwind components; @tailwind utilities' + } + + async function build() { + let start = process.hrtime.bigint() + + return readInput() + .then((css) => processor.process(css, { ...postcssOptions, from: input, to: output })) + .then((result) => { + if (!output) { + process.stdout.write(result.css) + return + } + + return Promise.all([ + outputFile(output, result.css), + result.map && outputFile(output + '.map', result.map.toString()), + ]) + }) + .then(() => { + let end = process.hrtime.bigint() + console.error() + console.error('Done in', (end - start) / BigInt(1e6) + 'ms.') + }) + } + + /** + * @param {{file: string, content(): Promise<string>, extension: string}[]} changes + */ + async function parseChanges(changes) { + return Promise.all( + changes.map(async (change) => ({ + content: await change.content(), + extension: change.extension, + })) + ) + } + + if (input !== undefined && input !== '-') { + state.contextDependencies.add(path.resolve(input)) + } + + return { + build, + watch: async () => { + state.watcher = createWatcher(args, { + state, + + /** + * @param {{file: string, content(): Promise<string>, extension: string}[]} changes + */ + async rebuild(changes) { + let needsNewContext = changes.some((change) => { + return ( + state.configDependencies.has(change.file) || + state.contextDependencies.has(change.file) + ) + }) + + if (needsNewContext) { + state.context = null + } else { + for (let change of await parseChanges(changes)) { + state.changedContent.push(change) + } + } + + return build() + }, + }) + + await build() + }, + } +} diff --git a/src/cli/build/utils.js b/src/cli/build/utils.js new file mode 100644 --- /dev/null +++ b/src/cli/build/utils.js @@ -0,0 +1,76 @@ +// @ts-check + +import fs from 'fs' +import path from 'path' + +export function indentRecursive(node, indent = 0) { + node.each && + node.each((child, i) => { + if (!child.raws.before || !child.raws.before.trim() || child.raws.before.includes('\n')) { + child.raws.before = `\n${node.type !== 'rule' && i > 0 ? '\n' : ''}${' '.repeat(indent)}` + } + child.raws.after = `\n${' '.repeat(indent)}` + indentRecursive(child, indent + 1) + }) +} + +export function formatNodes(root) { + indentRecursive(root) + if (root.first) { + root.first.raws.before = '' + } +} + +/** + * When rapidly saving files atomically a couple of situations can happen: + * - The file is missing since the external program has deleted it by the time we've gotten around to reading it from the earlier save. + * - The file is being written to by the external program by the time we're going to read it and is thus treated as busy because a lock is held. + * + * To work around this we retry reading the file a handful of times with a delay between each attempt + * + * @param {string} path + * @param {number} tries + * @returns {Promise<string | undefined>} + * @throws {Error} If the file is still missing or busy after the specified number of tries + */ +export async function readFileWithRetries(path, tries = 5) { + for (let n = 0; n <= tries; n++) { + try { + return await fs.promises.readFile(path, 'utf8') + } catch (err) { + if (n !== tries) { + if (err.code === 'ENOENT' || err.code === 'EBUSY') { + await new Promise((resolve) => setTimeout(resolve, 10)) + + continue + } + } + + throw err + } + } +} + +export function drainStdin() { + return new Promise((resolve, reject) => { + let result = '' + process.stdin.on('data', (chunk) => { + result += chunk + }) + process.stdin.on('end', () => resolve(result)) + process.stdin.on('error', (err) => reject(err)) + }) +} + +export async function outputFile(file, newContents) { + try { + let currentContents = await fs.promises.readFile(file, 'utf8') + if (currentContents === newContents) { + return // Skip writing the file + } + } catch {} + + // Write the file + await fs.promises.mkdir(path.dirname(file), { recursive: true }) + await fs.promises.writeFile(file, newContents, 'utf8') +} diff --git a/src/cli/build/watching.js b/src/cli/build/watching.js new file mode 100644 --- /dev/null +++ b/src/cli/build/watching.js @@ -0,0 +1,134 @@ +// @ts-check + +import chokidar from 'chokidar' +import fs from 'fs' +import micromatch from 'micromatch' +import normalizePath from 'normalize-path' +import path from 'path' + +import { readFileWithRetries } from './utils.js' + +/** + * + * @param {*} args + * @param {{ state, rebuild(changedFiles: any[]): Promise<any> }} param1 + * @returns {{ + * fswatcher: import('chokidar').FSWatcher, + * refreshWatchedFiles(): void, + * }} + */ +export function createWatcher(args, { state, rebuild }) { + let shouldPoll = args['--poll'] + let shouldCoalesceWriteEvents = shouldPoll || process.platform === 'win32' + + // Polling interval in milliseconds + // Used only when polling or coalescing add/change events on Windows + let pollInterval = 10 + + let watcher = chokidar.watch([], { + // Force checking for atomic writes in all situations + // This causes chokidar to wait up to 100ms for a file to re-added after it's been unlinked + // This only works when watching directories though + atomic: true, + + usePolling: shouldPoll, + interval: shouldPoll ? pollInterval : undefined, + ignoreInitial: true, + awaitWriteFinish: shouldCoalesceWriteEvents + ? { + stabilityThreshold: 50, + pollInterval: pollInterval, + } + : false, + }) + + let chain = Promise.resolve() + let pendingRebuilds = new Set() + let changedContent = [] + + /** + * + * @param {*} file + * @param {(() => Promise<string>) | null} content + */ + function recordChangedFile(file, content = null) { + file = path.resolve(file) + + content = content ?? (async () => await fs.promises.readFile(file, 'utf8')) + + changedContent.push({ + file, + content, + extension: path.extname(file).slice(1), + }) + + chain = chain.then(() => rebuild(changedContent)) + + return chain + } + + watcher.on('change', (file) => recordChangedFile(file)) + watcher.on('add', (file) => recordChangedFile(file)) + + // Restore watching any files that are "removed" + // This can happen when a file is pseudo-atomically replaced (a copy is created, overwritten, the old one is unlinked, and the new one is renamed) + // TODO: An an optimization we should allow removal when the config changes + watcher.on('unlink', (file) => { + file = normalizePath(file) + + // Only re-add the file if it's not covered by a dynamic pattern + if (!micromatch.some([file], state.contentPatterns.dynamic)) { + watcher.add(file) + } + }) + + // Some applications such as Visual Studio (but not VS Code) + // will only fire a rename event for atomic writes and not a change event + // This is very likely a chokidar bug but it's one we need to work around + // We treat this as a change event and rebuild the CSS + watcher.on('raw', (evt, filePath, meta) => { + if (evt !== 'rename') { + return + } + + let watchedPath = meta.watchedPath + + // Watched path might be the file itself + // Or the directory it is in + filePath = watchedPath.endsWith(filePath) ? watchedPath : path.join(watchedPath, filePath) + + // Skip this event since the files it is for does not match any of the registered content globs + if (!micromatch.some([filePath], state.contentPatterns.all)) { + return + } + + // Skip since we've already queued a rebuild for this file that hasn't happened yet + if (pendingRebuilds.has(filePath)) { + return + } + + pendingRebuilds.add(filePath) + + chain = chain.then(async () => { + let content + + try { + content = await readFileWithRetries(path.resolve(filePath)) + } finally { + pendingRebuilds.delete(filePath) + } + + return recordChangedFile(filePath, () => content) + }) + }) + + return { + fswatcher: watcher, + + refreshWatchedFiles() { + watcher.add(Array.from(state.contextDependencies)) + watcher.add(Array.from(state.configDependencies)) + watcher.add(state.contentPatterns.all) + }, + } +} diff --git a/src/cli/help/index.js b/src/cli/help/index.js new file mode 100644 --- /dev/null +++ b/src/cli/help/index.js @@ -0,0 +1,70 @@ +// @ts-check +import packageJson from '../../../package.json' + +export function help({ message, usage, commands, options }) { + let indent = 2 + + // Render header + console.log() + console.log(`${packageJson.name} v${packageJson.version}`) + + // Render message + if (message) { + console.log() + for (let msg of message.split('\n')) { + console.log(msg) + } + } + + // Render usage + if (usage && usage.length > 0) { + console.log() + console.log('Usage:') + for (let example of usage) { + console.log(' '.repeat(indent), example) + } + } + + // Render commands + if (commands && commands.length > 0) { + console.log() + console.log('Commands:') + for (let command of commands) { + console.log(' '.repeat(indent), command) + } + } + + // Render options + if (options) { + let groupedOptions = {} + for (let [key, value] of Object.entries(options)) { + if (typeof value === 'object') { + groupedOptions[key] = { ...value, flags: [key] } + } else { + groupedOptions[value].flags.push(key) + } + } + + console.log() + console.log('Options:') + for (let { flags, description, deprecated } of Object.values(groupedOptions)) { + if (deprecated) continue + + if (flags.length === 1) { + console.log( + ' '.repeat(indent + 4 /* 4 = "-i, ".length */), + flags.slice().reverse().join(', ').padEnd(20, ' '), + description + ) + } else { + console.log( + ' '.repeat(indent), + flags.slice().reverse().join(', ').padEnd(24, ' '), + description + ) + } + } + } + + console.log() +} diff --git a/src/cli/index.js b/src/cli/index.js new file mode 100644 --- /dev/null +++ b/src/cli/index.js @@ -0,0 +1,3 @@ +export * from './build' +export * from './config' +export * from './content' diff --git a/src/cli/init/index.js b/src/cli/init/index.js new file mode 100644 --- /dev/null +++ b/src/cli/init/index.js @@ -0,0 +1,50 @@ +// @ts-check + +import fs from 'fs' +import path from 'path' + +export function init(args, configs) { + let messages = [] + + let tailwindConfigLocation = path.resolve(args['_'][1] ?? `./${configs.tailwind}`) + if (fs.existsSync(tailwindConfigLocation)) { + messages.push(`${path.basename(tailwindConfigLocation)} already exists.`) + } else { + let stubFile = fs.readFileSync( + args['--full'] + ? path.resolve(__dirname, '../../../stubs/defaultConfig.stub.js') + : path.resolve(__dirname, '../../../stubs/simpleConfig.stub.js'), + 'utf8' + ) + + // Change colors import + stubFile = stubFile.replace('../colors', 'tailwindcss/colors') + + fs.writeFileSync(tailwindConfigLocation, stubFile, 'utf8') + + messages.push(`Created Tailwind CSS config file: ${path.basename(tailwindConfigLocation)}`) + } + + if (args['--postcss']) { + let postcssConfigLocation = path.resolve(`./${configs.postcss}`) + if (fs.existsSync(postcssConfigLocation)) { + messages.push(`${path.basename(postcssConfigLocation)} already exists.`) + } else { + let stubFile = fs.readFileSync( + path.resolve(__dirname, '../../../stubs/defaultPostCssConfig.stub.js'), + 'utf8' + ) + + fs.writeFileSync(postcssConfigLocation, stubFile, 'utf8') + + messages.push(`Created PostCSS config file: ${path.basename(postcssConfigLocation)}`) + } + } + + if (messages.length > 0) { + console.log() + for (let message of messages) { + console.log(message) + } + } +} diff --git a/src/cli/shared.js b/src/cli/shared.js new file mode 100644 --- /dev/null +++ b/src/cli/shared.js @@ -0,0 +1,5 @@ +// @ts-check + +export const env = { + DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0', +} diff --git a/src/index.js b/src/index.js --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ import setupTrackingContext from './lib/setupTrackingContext' import processTailwindFeatures from './processTailwindFeatures' import { env } from './lib/sharedState' +import { findAtConfigPath } from './lib/findAtConfigPath' module.exports = function tailwindcss(configOrPath) { return { @@ -13,6 +14,10 @@ module.exports = function tailwindcss(configOrPath) { return root }, function (root, result) { + // Use the path for the `@config` directive if it exists, otherwise use the + // path for the file being processed + configOrPath = findAtConfigPath(root, result) ?? configOrPath + let context = setupTrackingContext(configOrPath) if (root.type === 'document') { diff --git a/src/lib/findAtConfigPath.js b/src/lib/findAtConfigPath.js new file mode 100644 --- /dev/null +++ b/src/lib/findAtConfigPath.js @@ -0,0 +1,50 @@ +import fs from 'fs' +import path from 'path' + +/** + * Find the @config at-rule in the given CSS AST and return the relative path to the config file + * + * @param {import('postcss').Root} root + * @param {import('postcss').Result} result + */ +export function findAtConfigPath(root, result) { + let configPath = null + let relativeTo = null + + root.walkAtRules('config', (rule) => { + relativeTo = rule.source?.input.file ?? result.opts.from ?? null + + if (relativeTo === null) { + throw rule.error( + 'The `@config` at-rule cannot be used without a `from` option being set on the PostCSS config.' + ) + } + + if (configPath) { + throw rule.error('Only `@config` at-rule is allowed per file.') + } + + let matches = rule.params.match(/(['"])(.*?)\1/) + if (!matches) { + throw rule.error( + 'The `@config` at-rule must be followed by a string containing the path to the config file.' + ) + } + + let inputPath = matches[2] + if (path.isAbsolute(inputPath)) { + throw rule.error('The `@config` at-rule cannot be used with an absolute path.') + } + + configPath = path.resolve(path.dirname(relativeTo), inputPath) + if (!fs.existsSync(configPath)) { + throw rule.error( + `The config file at "${inputPath}" does not exist. Make sure the path is correct and the file exists.` + ) + } + + rule.remove() + }) + + return configPath ? configPath : null +}
diff --git a/integrations/tailwindcss-cli/tests/integration.test.js b/integrations/tailwindcss-cli/tests/integration.test.js --- a/integrations/tailwindcss-cli/tests/integration.test.js +++ b/integrations/tailwindcss-cli/tests/integration.test.js @@ -1,3 +1,4 @@ +let fs = require('fs') let $ = require('../../execute') let { css, html, javascript } = require('../../syntax') @@ -88,6 +89,108 @@ describe('static build', () => { ` ) }) + + it('can read from a config file from an @config directive', async () => { + await writeInputFile('index.html', html`<div class="bg-yellow"></div>`) + await writeInputFile( + 'index.css', + css` + @config "./tailwind.config.js"; + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + ) + await writeInputFile( + 'tailwind.config.js', + javascript` + module.exports = { + content: { + relative: true, + files: ['./index.html'], + }, + theme: { + extend: { + colors: { + yellow: '#ff0', + } + }, + }, + corePlugins: { + preflight: false, + }, + } + ` + ) + + await $('node ../../lib/cli.js -i ./src/index.css -o ./dist/main.css', { + env: { NODE_ENV: 'production' }, + }) + + expect(await readOutputFile('main.css')).toIncludeCss( + css` + .bg-yellow { + --tw-bg-opacity: 1; + background-color: rgb(255 255 0 / var(--tw-bg-opacity)); + } + ` + ) + }) + + it('can read from a config file from an @config directive inside an @import from postcss-import', async () => { + await fs.promises.mkdir('./src/config', { recursive: true }) + + await writeInputFile('index.html', html`<div class="bg-yellow"></div>`) + await writeInputFile( + 'config/myconfig.css', + css` + @config "../tailwind.config.js"; + ` + ) + await writeInputFile( + 'index.css', + css` + @import './config/myconfig'; + @import 'tailwindcss/base'; + @import 'tailwindcss/components'; + @import 'tailwindcss/utilities'; + ` + ) + await writeInputFile( + 'tailwind.config.js', + javascript` + module.exports = { + content: { + relative: true, + files: ['./index.html'], + }, + theme: { + extend: { + colors: { + yellow: '#ff0', + } + }, + }, + corePlugins: { + preflight: false, + }, + } + ` + ) + + await $('node ../../lib/cli.js -i ./src/index.css -o ./dist/main.css', { + env: { NODE_ENV: 'production' }, + }) + + expect(await readOutputFile('main.css')).toIncludeCss( + css` + .bg-yellow { + --tw-bg-opacity: 1; + background-color: rgb(255 255 0 / var(--tw-bg-opacity)); + } + ` + ) + }) }) describe('watcher', () => { @@ -381,4 +484,125 @@ describe('watcher', () => { return runningProcess.stop() }) + + test('listens for changes to the @config directive', async () => { + await writeInputFile('index.html', html`<div class="bg-yellow"></div>`) + await writeInputFile( + 'index.css', + css` + @config "./tailwind.config.js"; + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + ) + await writeInputFile( + 'tailwind.config.js', + javascript` + module.exports = { + content: { + relative: true, + files: ['./index.html'], + }, + theme: { + extend: { + colors: { + yellow: '#ff0', + } + }, + }, + corePlugins: { + preflight: false, + }, + } + ` + ) + await writeInputFile( + 'tailwind.2.config.js', + javascript` + module.exports = { + content: { + relative: true, + files: ['./index.html'], + }, + theme: { + extend: { + colors: { + yellow: '#ff7', + } + }, + }, + corePlugins: { + preflight: false, + }, + } + ` + ) + + let runningProcess = $('node ../../lib/cli.js -i ./src/index.css -o ./dist/main.css -w') + await runningProcess.onStderr(ready) + + expect(await readOutputFile('main.css')).toIncludeCss( + css` + .bg-yellow { + --tw-bg-opacity: 1; + background-color: rgb(255 255 0 / var(--tw-bg-opacity)); + } + ` + ) + + await writeInputFile( + 'index.css', + css` + @config "./tailwind.2.config.js"; + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + ) + await runningProcess.onStderr(ready) + + expect(await readOutputFile('main.css')).toIncludeCss( + css` + .bg-yellow { + --tw-bg-opacity: 1; + background-color: rgb(255 255 119 / var(--tw-bg-opacity)); + } + ` + ) + + await writeInputFile( + 'tailwind.2.config.js', + javascript` + module.exports = { + content: { + relative: true, + files: ['./index.html'], + }, + theme: { + extend: { + colors: { + yellow: '#fff', + } + }, + }, + corePlugins: { + preflight: false, + }, + } + ` + ) + await runningProcess.onStderr(ready) + + expect(await readOutputFile('main.css')).toIncludeCss( + css` + .bg-yellow { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + } + ` + ) + + return runningProcess.stop() + }) })
Resolve config file relative to the file being transformed instead of cwd **What version of Tailwind CSS are you using?** v3.0.2 **What build tool (or framework if it abstracts the build tool) are you using?** Parcel 2 👋 **What version of Node.js are you using?** 16 **What operating system are you using?** macOS **Describe your issue** A "standard" PostCSS config like ```js const path = require("path"); module.exports = { plugins: [ require('tailwindcss') ] } ``` causes Tailwind to search for the config file relative to the current working directory because of this https://github.com/tailwindlabs/tailwindcss/blob/a7263a8f6faf989cb98553491d5c456d0b86de9b/src/util/resolveConfigPath.js#L46-L48 I think it should instead be relative to the file that's being processed. This way you could also have a single project with multiple config files for different parts. This might have performance downsides if you currently search just once for a config.
2022-09-23T17:12:38Z
3.1
tailwindlabs/tailwindcss
9,319
tailwindlabs__tailwindcss-9319
[ "9318" ]
527031d5f679a958a7d0de045a057a1e32db2985
diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -7,6 +7,7 @@ import buildMediaQuery from '../util/buildMediaQuery' import { toPath } from '../util/toPath' import { withAlphaValue } from '../util/withAlphaVariable' import { parseColorFormat } from '../util/pluginUtils' +import log from '../util/log' function isObject(input) { return typeof input === 'object' && input !== null @@ -196,7 +197,9 @@ function resolvePath(config, path, defaultValue) { return results.find((result) => result.isValid) ?? results[0] } -export default function ({ tailwindConfig: config }) { +export default function (context) { + let config = context.tailwindConfig + let functions = { theme: (node, path, ...defaultValue) => { let { isValid, value, error, alpha } = resolvePath( @@ -206,6 +209,24 @@ export default function ({ tailwindConfig: config }) { ) if (!isValid) { + let parentNode = node.parent + let candidate = parentNode?.raws.tailwind?.candidate + + if (parentNode && candidate !== undefined) { + // Remove this utility from any caches + context.markInvalidUtilityNode(parentNode) + + // Remove the CSS node from the markup + parentNode.remove() + + // Show a warning + log.warn('invalid-theme-key-in-class', [ + `The utility \`${candidate}\` contains an invalid theme value and was not generated.`, + ]) + + return + } + throw node.error(error) } diff --git a/src/lib/setupContextUtils.js b/src/lib/setupContextUtils.js --- a/src/lib/setupContextUtils.js +++ b/src/lib/setupContextUtils.js @@ -856,6 +856,52 @@ function registerPlugins(plugins, context) { } } +/** + * Mark as class as retroactively invalid + * + * + * @param {string} candidate + */ +function markInvalidUtilityCandidate(context, candidate) { + if (!context.classCache.has(candidate)) { + return + } + + // Mark this as not being a real utility + context.notClassCache.add(candidate) + + // Remove it from any candidate-specific caches + context.classCache.delete(candidate) + context.applyClassCache.delete(candidate) + context.candidateRuleMap.delete(candidate) + context.candidateRuleCache.delete(candidate) + + // Ensure the stylesheet gets rebuilt + context.stylesheetCache = null +} + +/** + * Mark as class as retroactively invalid + * + * @param {import('postcss').Node} node + */ +function markInvalidUtilityNode(context, node) { + let candidate = node.raws.tailwind.candidate + + if (!candidate) { + return + } + + for (const entry of context.ruleCache) { + if (entry[1].raws.tailwind.candidate === candidate) { + context.ruleCache.delete(entry) + // context.postCssNodeCache.delete(node) + } + } + + markInvalidUtilityCandidate(context, candidate) +} + export function createContext(tailwindConfig, changedContent = [], root = postcss.root()) { let context = { disposables: [], @@ -870,6 +916,9 @@ export function createContext(tailwindConfig, changedContent = [], root = postcs changedContent: changedContent, variantMap: new Map(), stylesheetCache: null, + + markInvalidUtilityCandidate: (candidate) => markInvalidUtilityCandidate(context, candidate), + markInvalidUtilityNode: (node) => markInvalidUtilityNode(context, node), } let resolvedPlugins = resolvePlugins(context, root)
diff --git a/tests/evaluateTailwindFunctions.test.js b/tests/evaluateTailwindFunctions.test.js --- a/tests/evaluateTailwindFunctions.test.js +++ b/tests/evaluateTailwindFunctions.test.js @@ -1,14 +1,18 @@ +import fs from 'fs' +import path from 'path' import postcss from 'postcss' import plugin from '../src/lib/evaluateTailwindFunctions' -import tailwind from '../src/index' -import { css } from './util/run' +import { run as runFull, css, html } from './util/run' function run(input, opts = {}) { - return postcss([plugin({ tailwindConfig: opts })]).process(input, { from: undefined }) -} - -function runFull(input, config) { - return postcss([tailwind(config)]).process(input, { from: undefined }) + return postcss([ + plugin({ + tailwindConfig: opts, + markInvalidUtilityNode() { + // no op + }, + }), + ]).process(input, { from: undefined }) } test('it looks up values in the theme using dot notation', () => { @@ -1222,3 +1226,62 @@ it('can find values with slashes in the theme key while still allowing for alpha `) }) }) + +describe('context dependent', () => { + let configPath = path.resolve(__dirname, './evaluate-tailwind-functions.tailwind.config.js') + let filePath = path.resolve(__dirname, './evaluate-tailwind-functions.test.html') + let config = { + content: [filePath], + corePlugins: { preflight: false }, + } + + // Rebuild the config file for each test + beforeEach(() => fs.promises.writeFile(configPath, `module.exports = ${JSON.stringify(config)};`)) + afterEach(() => fs.promises.unlink(configPath)) + + let warn + + beforeEach(() => { + warn = jest.spyOn(require('../src/util/log').default, 'warn') + }) + + afterEach(() => warn.mockClear()) + + it('should not generate when theme fn doesnt resolve', async () => { + await fs.promises.writeFile( + filePath, + html` + <div class="underline [--box-shadow:theme('boxShadow.doesnotexist')]"></div> + <div class="bg-[theme('boxShadow.doesnotexist')]"></div> + ` + ) + + // TODO: We need a way to reuse the context in our test suite without requiring writing to files + // It should be an explicit thing tho — like we create a context and pass it in or something + let result = await runFull('@tailwind utilities', configPath) + + // 1. On first run it should work because it's been removed from the class cache + expect(result.css).toMatchCss(css` + .underline { + text-decoration-line: underline; + } + `) + + // 2. But we get a warning in the console + expect(warn).toHaveBeenCalledTimes(1) + expect(warn.mock.calls.map((x) => x[0])).toEqual(['invalid-theme-key-in-class']) + + // 3. The second run should work fine because it's been removed from the class cache + result = await runFull('@tailwind utilities', configPath) + + expect(result.css).toMatchCss(css` + .underline { + text-decoration-line: underline; + } + `) + + // 4. But we've not received any further logs about it + expect(warn).toHaveBeenCalledTimes(1) + expect(warn.mock.calls.map((x) => x[0])).toEqual(['invalid-theme-key-in-class']) + }) +})
Tailwind compiler crashes when you try to `[--box-shadow:theme('boxShadow.doesNotExist')]` **What version of Tailwind CSS are you using?** v3.1.8 **What build tool (or framework if it abstracts the build tool) are you using?** vite 3.0.9, postcss 8.4.14 postcss-cli 8.3.1 **What version of Node.js are you using?** v16.0.0 **What browser are you using?** Chrome **What operating system are you using?** PopOS, Ubuntu **Reproduction URL** https://stackblitz.com/edit/vitejs-vite-zy2efk?file=src/App.jsx **Describe your issue** I was thinkering with tailwind to find ways of modifying css variables with classes. Came up with something like ```javascript <button className="[--box-shadow:theme('boxShadow.sm')] bg-white p-5"> Button </button> ``` But if I change the `theme` to something that will throw a runtime error: ```javascript <button className="[--box-shadow:theme('boxShadow.doesNotExist')] bg-white p-5"> Button </button> ``` Still crashes if I change it back to: ```javascript <button className="[--box-shadow:theme('boxShadow.sm')] bg-white p-5"> Button </button> ``` Well, maybe the Tailwind compiler crashes and can't recover? It's a bug, I think!?
2022-09-13T18:05:38Z
3.1
tailwindlabs/tailwindcss
9,208
tailwindlabs__tailwindcss-9208
[ "9205" ]
da850424dcdf011acda795b52c87cbd28628c943
diff --git a/src/lib/expandTailwindAtRules.js b/src/lib/expandTailwindAtRules.js --- a/src/lib/expandTailwindAtRules.js +++ b/src/lib/expandTailwindAtRules.js @@ -177,16 +177,12 @@ export default function expandTailwindAtRules(context) { let classCacheCount = context.classCache.size env.DEBUG && console.time('Generate rules') - let rules = generateRules(candidates, context) + generateRules(candidates, context) env.DEBUG && console.timeEnd('Generate rules') // We only ever add to the classCache, so if it didn't grow, there is nothing new. env.DEBUG && console.time('Build stylesheet') if (context.stylesheetCache === null || context.classCache.size !== classCacheCount) { - for (let rule of rules) { - context.ruleCache.add(rule) - } - context.stylesheetCache = buildStylesheet([...context.ruleCache], context) } env.DEBUG && console.timeEnd('Build stylesheet') diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -649,8 +649,37 @@ function inKeyframes(rule) { return rule.parent && rule.parent.type === 'atrule' && rule.parent.name === 'keyframes' } +function getImportantStrategy(important) { + if (important === true) { + return (rule) => { + if (inKeyframes(rule)) { + return + } + + rule.walkDecls((d) => { + if (d.parent.type === 'rule' && !inKeyframes(d.parent)) { + d.important = true + } + }) + } + } + + if (typeof important === 'string') { + return (rule) => { + if (inKeyframes(rule)) { + return + } + + rule.selectors = rule.selectors.map((selector) => { + return `${important} ${selector}` + }) + } + } +} + function generateRules(candidates, context) { let allRules = [] + let strategy = getImportantStrategy(context.tailwindConfig.important) for (let candidate of candidates) { if (context.notClassCache.has(candidate)) { @@ -658,7 +687,11 @@ function generateRules(candidates, context) { } if (context.classCache.has(candidate)) { - allRules.push(context.classCache.get(candidate)) + continue + } + + if (context.candidateRuleCache.has(candidate)) { + allRules = allRules.concat(Array.from(context.candidateRuleCache.get(candidate))) continue } @@ -670,47 +703,27 @@ function generateRules(candidates, context) { } context.classCache.set(candidate, matches) - allRules.push(matches) - } - // Strategy based on `tailwindConfig.important` - let strategy = ((important) => { - if (important === true) { - return (rule) => { - rule.walkDecls((d) => { - if (d.parent.type === 'rule' && !inKeyframes(d.parent)) { - d.important = true - } - }) - } - } + let rules = context.candidateRuleCache.get(candidate) ?? new Set() + context.candidateRuleCache.set(candidate, rules) - if (typeof important === 'string') { - return (rule) => { - rule.selectors = rule.selectors.map((selector) => { - return `${important} ${selector}` - }) - } - } - })(context.tailwindConfig.important) + for (const match of matches) { + let [{ sort, layer, options }, rule] = match - return allRules.flat(1).map(([{ sort, layer, options }, rule]) => { - if (options.respectImportant) { - if (strategy) { + if (options.respectImportant && strategy) { let container = postcss.root({ nodes: [rule.clone()] }) - container.walkRules((r) => { - if (inKeyframes(r)) { - return - } - - strategy(r) - }) + container.walkRules(strategy) rule = container.nodes[0] } + + let newEntry = [sort | context.layerOrder[layer], rule] + rules.add(newEntry) + context.ruleCache.add(newEntry) + allRules.push(newEntry) } + } - return [sort | context.layerOrder[layer], rule] - }) + return allRules } function isArbitraryValue(input) { diff --git a/src/lib/setupContextUtils.js b/src/lib/setupContextUtils.js --- a/src/lib/setupContextUtils.js +++ b/src/lib/setupContextUtils.js @@ -873,6 +873,7 @@ export function createContext(tailwindConfig, changedContent = [], root = postcs let context = { disposables: [], ruleCache: new Set(), + candidateRuleCache: new Map(), classCache: new Map(), applyClassCache: new Map(), notClassCache: new Set(),
diff --git a/tests/important-boolean.test.js b/tests/important-boolean.test.js --- a/tests/important-boolean.test.js +++ b/tests/important-boolean.test.js @@ -1,7 +1,8 @@ import fs from 'fs' import path from 'path' +import * as sharedState from '../src/lib/sharedState' -import { run, css } from './util/run' +import { run, css, html } from './util/run' test('important boolean', () => { let config = { @@ -63,3 +64,74 @@ test('important boolean', () => { expect(result.css).toMatchFormattedCss(expected) }) }) + +// This is in a describe block so we can use `afterEach` :) +describe('duplicate elision', () => { + let filePath = path.resolve(__dirname, './important-boolean-duplicates.test.html') + + afterEach(async () => await fs.promises.unlink(filePath)) + + test('important rules are not duplicated when rebuilding', async () => { + let config = { + important: true, + content: [filePath], + } + + await fs.promises.writeFile( + config.content[0], + html` + <div class="ml-2"></div> + <div class="ml-4"></div> + ` + ) + + let input = css` + @tailwind utilities; + ` + + let result = await run(input, config) + let allContexts = Array.from(sharedState.contextMap.values()) + + let context = allContexts[allContexts.length - 1] + + let ruleCacheSize1 = context.ruleCache.size + + expect(result.css).toMatchFormattedCss(css` + .ml-2 { + margin-left: 0.5rem !important; + } + .ml-4 { + margin-left: 1rem !important; + } + `) + + await fs.promises.writeFile( + config.content[0], + html` + <div class="ml-2"></div> + <div class="ml-6"></div> + ` + ) + + result = await run(input, config) + + let ruleCacheSize2 = context.ruleCache.size + + expect(result.css).toMatchFormattedCss(css` + .ml-2 { + margin-left: 0.5rem !important; + } + .ml-4 { + margin-left: 1rem !important; + } + .ml-6 { + margin-left: 1.5rem !important; + } + `) + + // The rule cache was effectively doubling in size previously + // because the rule cache was never de-duped + // This ensures this behavior doesn't return + expect(ruleCacheSize2 - ruleCacheSize1).toBeLessThan(10) + }) +})
Using important: true leads to duplicate rules in output This issue supersedes #9203 which was a bit of a false start. V3.1.18 Tailwind CLI Node v14.18.1 Chrome Window 10 (No Docker or WSL) Command line : npx tailwindcss --output twout.css --watch -i twbase.css Reproduction URL: https://github.com/willdean/TwRepro1 **Describe your issue** When the important option is set to true, modifications to the source file cause TW to emit duplicate rules into the output for each update. Repro steps: 1. Start the CLI, using the command line above (or tw.bat on Windows) 2. Observe that the output file `twout.css` contains just two rules (after the boilerplate): ``` .ml-2 { margin-left: 0.5rem !important } .ml-4 { margin-left: 1rem !important } ``` 3. Modify the index.html file so that the `ml-4` selector on the second div becomes `ml-6` and save the file 4. Verify that the CLI regenerates the output file `twout.css` The output file now contains ``` .ml-2 { margin-left: 0.5rem !important } .ml-4 { margin-left: 1rem !important } .ml-2 { margin-left: 0.5rem !important } .ml-6 { margin-left: 1.5rem !important } ``` i.e. the `.ml-2` rule has been duplicated. This will happen each time a modification to the source file is made - there will be an additional `.ml-2` rule generated. **Some commentary:** I have spent some time trying to understand this, and I think there may be two separate problems, though I'm not a JS developer by trade, and I don't really understand TW's architecture, so please forgive me if I'm completely wrong here. **Possible Issue 1** - Each time a file is modified, TW adds duplicates of all the rules related to that specific file to `context.stylesheetCache`. This is nothing to do with whether the `important` configuration option is set or not. However, this does not normally cause duplication in the output, because the code which later converts the list of rules into css code elides all the duplicates. This may however be a part of the slow-down/leak problem in #7449. **Possible Issue 2**- The code which converts the rules list into CSS (is this Postcss?) is apparently able to elide duplicate rules, and that normally deals with the duplicates which build-up in the cache. However, this elision features partly breaks (not completely - some rules get repeated 'n' times, whereas some only see one duplicate) when the `important` option is set. If issue 1 is dealt with then issue 2 possibly wouldn't matter. In #9203 I posted some very crude work-around code which stops the duplicates in the cache. Edit: This issue doesn't seem to repro in https://play.tailwindcss.com/
In case this raises questions about PostCSS: ``` >npm -g list postcss C:\Users\will\AppData\Roaming\npm `-- [email protected] +-- [email protected] | `-- [email protected] deduped +-- [email protected] | `-- [email protected] deduped +-- [email protected] | `-- [email protected] deduped +-- [email protected] | `-- [email protected] deduped `-- [email protected] ``` I don't think this is likely to be related to PostCSS. We do some internal cache clearing stuff on Tailwind Play. Since there's only a single content input source we have it set up to act essentially as if it were a fresh build. Thanks Jordan - I don't properly comprehend the flow of: `(List-Of-Rules-with-lots-of-duplicates) => [A miracle happens here] => (CSS file with fewer duplicates)` and thought that the miracle might be PostCSS. Anyway, the duplicates have been annoying us for months and months, so it was nice to get to *some* level of understanding. Yeah I'm not sure why the duplicates some time disappear and sometimes don't but I can absolutely reproduce it in the CLI so I'm taking a look. I've also been able to create a script that makes the rule cache grow significantly which reproduces the slowdown issue. That's a small but significantly helpful data point as well! The point at which the duplicate is created in the cache is `returnValue.utilities.add(rule);` in `buildStylesheet`. I wondered if there had originally been the intent that, being made from a `Set` object, the cache would inherently not hold duplicates. Of course, from the PoV of a `Set`, the duplicates are not the same, so that doesn't work. I wouldn’t be surprised if it did used to be the same rule instance but in fixing another bug we’ve introduced a regression (probably by cloning the rule somewhere) that is causing duplicates to appear. Candidates (like `ml-4`) should be pulling their corresponding rule from a cache if they have been generated already, so should have been the same rule instance originally I think.
2022-08-29T17:47:47Z
3.1
tailwindlabs/tailwindcss
8,773
tailwindlabs__tailwindcss-8773
[ "8626" ]
5191ec1c006dfd6ac911e53d30f12993fe4eb586
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -129,6 +129,7 @@ function applyVariant(variant, matches, context) { } let args + let isArbitraryVariant = false // Find partial arbitrary variants if (variant.endsWith(']') && !variant.startsWith('[')) { @@ -144,6 +145,8 @@ function applyVariant(variant, matches, context) { return [] } + isArbitraryVariant = true + let fn = parseVariant(selector) let sort = Array.from(context.variantOrder.values()).pop() << 1n @@ -300,6 +303,7 @@ function applyVariant(variant, matches, context) { ...meta, sort: variantSort | meta.sort, collectedFormats: (meta.collectedFormats ?? []).concat(collectedFormats), + isArbitraryVariant, }, clone.nodes[0], ] @@ -627,6 +631,7 @@ function* resolveMatches(candidate, context, original = candidate) { base: candidate .split(new RegExp(`\\${context?.tailwindConfig?.separator ?? ':'}(?![^[]*\\])`)) .pop(), + isArbitraryVariant: match[0].isArbitraryVariant, context, }) diff --git a/src/util/formatVariantSelector.js b/src/util/formatVariantSelector.js --- a/src/util/formatVariantSelector.js +++ b/src/util/formatVariantSelector.js @@ -35,6 +35,7 @@ export function finalizeSelector( selector, candidate, context, + isArbitraryVariant, // Split by the separator, but ignore the separator inside square brackets: // @@ -50,7 +51,8 @@ export function finalizeSelector( ) { let ast = selectorParser().astSync(selector) - if (context?.tailwindConfig?.prefix) { + // We explicitly DO NOT prefix classes in arbitrary variants + if (context?.tailwindConfig?.prefix && !isArbitraryVariant) { format = prefixSelector(context.tailwindConfig.prefix, format) }
diff --git a/tests/arbitrary-variants.test.js b/tests/arbitrary-variants.test.js --- a/tests/arbitrary-variants.test.js +++ b/tests/arbitrary-variants.test.js @@ -527,3 +527,42 @@ test('allows attribute variants with quotes', () => { `) }) }) + +test('classes in arbitrary variants should not be prefixed', () => { + let config = { + prefix: 'tw-', + content: [ + { + raw: ` + <div class="[.foo_&]:tw-text-red-400">should not be red</div> + <div class="foo"> + <div class="[.foo_&]:tw-text-red-400">should be red</div> + </div> + <div class="[&_.foo]:tw-text-red-400"> + <div>should not be red</div> + <div class="foo">should be red</div> + </div> + `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = ` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .foo .\[\.foo_\&\]\:tw-text-red-400 { + --tw-text-opacity: 1; + color: rgb(248 113 113 / var(--tw-text-opacity)); + } + + .\[\&_\.foo\]\:tw-text-red-400 .foo { + --tw-text-opacity: 1; + color: rgb(248 113 113 / var(--tw-text-opacity)); + } + `) + }) +})
Classes inside arbitrary variants are incorrectly being prefixed Classes inside arbitrary variants are prefixed when they shouldn't be as they're not tailwind utilities. The utility `[.foo_&]:tw-text-red-400` incorrectly generates a selector referencing `.tw-foo` instead of `.foo` See: https://github.com/tailwindlabs/tailwindcss/pull/8299#issuecomment-1154053957 Reproduction: https://play.tailwindcss.com/GCMzAzdKNY
I put \ in front of '.foo_&' and it is some how giving selector .foo https://play.tailwindcss.com/LWujxXokrG @thecrypticace I built upon your example and created an example to test classes, IDs, and attributes. It appears IDs work as expected, but both classes and attributes experience bugs when using prefixes, and when not using prefixes, only the attributes examples break: * **With prefix:** https://play.tailwindcss.com/kKJt04VYW2 (classes and attributes break) * **Without prefix:** https://play.tailwindcss.com/PF2YRSjHnL (only attributes break)
2022-07-04T18:43:56Z
3.1
tailwindlabs/tailwindcss
8,687
tailwindlabs__tailwindcss-8687
[ "8660" ]
77c248cabb38d085df9ce9ca32e4f865f07bcd27
diff --git a/src/lib/defaultExtractor.js b/src/lib/defaultExtractor.js --- a/src/lib/defaultExtractor.js +++ b/src/lib/defaultExtractor.js @@ -64,31 +64,41 @@ function* buildRegExps(context) { ]), ]) - yield regex.pattern([ - // Variants - '((?=((', - regex.any( - [ - regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/, separator]), - regex.pattern([/[^\s"'`\[\\]+/, separator]), - ], - true - ), - ')+))\\2)?', - - // Important (optional) - /!?/, - - variantGroupingEnabled - ? regex.any([ - // Or any of those things but grouped separated by commas - regex.pattern([/\(/, utility, regex.zeroOrMore([/,/, utility]), /\)/]), - - // Arbitrary properties, constrained utilities, arbitrary values, etc… - utility, - ]) - : utility, - ]) + let variantPatterns = [ + // Without quotes + regex.any([ + regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/, separator]), + regex.pattern([/[^\s"'`\[\\]+/, separator]), + ]), + + // With quotes allowed + regex.any([ + regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s`]+\]/, separator]), + regex.pattern([/[^\s`\[\\]+/, separator]), + ]), + ] + + for (const variantPattern of variantPatterns) { + yield regex.pattern([ + // Variants + '((?=((', + variantPattern, + ')+))\\2)?', + + // Important (optional) + /!?/, + + variantGroupingEnabled + ? regex.any([ + // Or any of those things but grouped separated by commas + regex.pattern([/\(/, utility, regex.zeroOrMore([/,/, utility]), /\)/]), + + // Arbitrary properties, constrained utilities, arbitrary values, etc… + utility, + ]) + : utility, + ]) + } // 5. Inner matches yield /[^<>"'`\s.(){}[\]#=%$]*[^<>"'`\s.(){}[\]#=%:$]/g
diff --git a/tests/arbitrary-variants.test.js b/tests/arbitrary-variants.test.js --- a/tests/arbitrary-variants.test.js +++ b/tests/arbitrary-variants.test.js @@ -493,3 +493,37 @@ test('keeps escaped underscores in arbitrary variants mixed with normal variants `) }) }) + +test('allows attribute variants with quotes', () => { + let config = { + content: [ + { + raw: ` + <div class="[&[data-test='2']]:underline"></div> + <div class='[&[data-test="2"]]:underline'></div> + `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = ` + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults} + + .\[\&\[data-test\=\'2\'\]\]\:underline[data-test="2"] { + text-decoration-line: underline; + } + + .\[\&\[data-test\=\"2\"\]\]\:underline[data-test='2'] { + text-decoration-line: underline; + } + `) + }) +})
no css output for inline classes which specify an attribute value in an arbitrary variant <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** 3.1.3 **What build tool (or framework if it abstracts the build tool) are you using?** https://play.tailwindcss.com **What version of Node.js are you using?** <https://play.tailwindcss.com>'s **What browser are you using?** Chrome 102.0.5005.115 **What operating system are you using?** macOS 12.4 **Reproduction URL** https://play.tailwindcss.com/zYyWNdDUB4 **Describe your issue** Arbitrary variants don't support specifying attribute values. Using the form `[&[my-attribute]]:` generates the expected CSS. Adding a value —`[&[my-attribute='val']]:` or `[&[my-attribute="val"]]:`— results in no CSS being generated for that class.
2022-06-20T13:46:39Z
3.1
tailwindlabs/tailwindcss
8,622
tailwindlabs__tailwindcss-8622
[ "8610" ]
22eaad17c33583b841d2086a9386dd5c1770061c
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -14,6 +14,7 @@ import { version as tailwindVersion } from '../package.json' import log from './util/log' import { normalizeScreens } from './util/normalizeScreens' import { formatBoxShadowValue, parseBoxShadowValue } from './util/parseBoxShadowValue' +import { removeAlphaVariables } from './util/removeAlphaVariables' import { flagEnabled } from './featureFlags' export let variantPlugins = { @@ -21,7 +22,19 @@ export let variantPlugins = { addVariant('first-letter', '&::first-letter') addVariant('first-line', '&::first-line') - addVariant('marker', ['& *::marker', '&::marker']) + addVariant('marker', [ + ({ container }) => { + removeAlphaVariables(container, ['--tw-text-opacity']) + + return '& *::marker' + }, + ({ container }) => { + removeAlphaVariables(container, ['--tw-text-opacity']) + + return '&::marker' + }, + ]) + addVariant('selection', ['& *::selection', '&::selection']) addVariant('file', '&::file-selector-button') @@ -77,21 +90,11 @@ export let variantPlugins = { [ 'visited', ({ container }) => { - let toRemove = ['--tw-text-opacity', '--tw-border-opacity', '--tw-bg-opacity'] - - container.walkDecls((decl) => { - if (toRemove.includes(decl.prop)) { - decl.remove() - - return - } - - for (const varName of toRemove) { - if (decl.value.includes(`/ var(${varName})`)) { - decl.value = decl.value.replace(`/ var(${varName})`, '') - } - } - }) + removeAlphaVariables(container, [ + '--tw-text-opacity', + '--tw-border-opacity', + '--tw-bg-opacity', + ]) return '&:visited' }, diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -163,15 +163,17 @@ function applyVariant(variant, matches, context) { let container = postcss.root({ nodes: [rule.clone()] }) - for (let [variantSort, variantFunction] of variantFunctionTuples) { - let clone = container.clone() + for (let [variantSort, variantFunction, containerFromArray] of variantFunctionTuples) { + let clone = containerFromArray ?? container.clone() let collectedFormats = [] - let originals = new Map() - function prepareBackup() { - if (originals.size > 0) return // Already prepared, chicken out - clone.walkRules((rule) => originals.set(rule, rule.selector)) + // Already prepared, chicken out + if (clone.raws.neededBackup) { + return + } + clone.raws.neededBackup = true + clone.walkRules((rule) => (rule.raws.originalSelector = rule.selector)) } function modifySelectors(modifierFunction) { @@ -231,6 +233,10 @@ function applyVariant(variant, matches, context) { // reserving additional X places for these 'unknown' variants in between. variantSort | BigInt(idx << ruleWithVariant.length), variantFunction, + + // If the clone has been modified we have to pass that back + // though so each rule can use the modified container + clone.clone(), ]) } continue @@ -244,13 +250,15 @@ function applyVariant(variant, matches, context) { continue } - // We filled the `originals`, therefore we assume that somebody touched + // We had to backup selectors, therefore we assume that somebody touched // `container` or `modifySelectors`. Let's see if they did, so that we // can restore the selectors, and collect the format strings. - if (originals.size > 0) { + if (clone.raws.neededBackup) { + delete clone.raws.neededBackup clone.walkRules((rule) => { - if (!originals.has(rule)) return - let before = originals.get(rule) + let before = rule.raws.originalSelector + if (!before) return + delete rule.raws.originalSelector if (before === rule.selector) return // No mutation happened let modified = rule.selector diff --git a/src/util/removeAlphaVariables.js b/src/util/removeAlphaVariables.js new file mode 100644 --- /dev/null +++ b/src/util/removeAlphaVariables.js @@ -0,0 +1,24 @@ +/** + * This function removes any uses of CSS variables used as an alpha channel + * + * This is required for selectors like `:visited` which do not allow + * changes in opacity or external control using CSS variables. + * + * @param {import('postcss').Container} container + * @param {string[]} toRemove + */ +export function removeAlphaVariables(container, toRemove) { + container.walkDecls((decl) => { + if (toRemove.includes(decl.prop)) { + decl.remove() + + return + } + + for (let varName of toRemove) { + if (decl.value.includes(`/ var(${varName})`)) { + decl.value = decl.value.replace(`/ var(${varName})`, '') + } + } + }) +}
diff --git a/tests/parallel-variants.test.js b/tests/parallel-variants.test.js --- a/tests/parallel-variants.test.js +++ b/tests/parallel-variants.test.js @@ -85,3 +85,52 @@ test('parallel variants can be generated using a function that returns parallel `) }) }) + +test('a function that returns parallel variants can modify the container', async () => { + let config = { + content: [ + { + raw: html`<div + class="hover:test:font-black test:font-bold test:font-medium font-normal" + ></div>`, + }, + ], + plugins: [ + function test({ addVariant }) { + addVariant('test', ({ container }) => { + container.walkDecls((decl) => { + decl.value = `calc(0 + ${decl.value})` + }) + + return ['& *::test', '&::test'] + }) + }, + ], + } + + return run('@tailwind utilities', config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .font-normal { + font-weight: 400; + } + .test\:font-bold *::test { + font-weight: calc(0 + 700); + } + .test\:font-medium *::test { + font-weight: calc(0 + 500); + } + .test\:font-bold::test { + font-weight: calc(0 + 700); + } + .test\:font-medium::test { + font-weight: calc(0 + 500); + } + .hover\:test\:font-black *:hover::test { + font-weight: calc(0 + 900); + } + .hover\:test\:font-black:hover::test { + font-weight: calc(0 + 900); + } + `) + }) +}) diff --git a/tests/variants.test.css b/tests/variants.test.css --- a/tests/variants.test.css +++ b/tests/variants.test.css @@ -112,16 +112,14 @@ line-height: 1.75rem; } .marker\:text-red-500 *::marker { - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68); } .marker\:text-lg::marker { font-size: 1.125rem; line-height: 1.75rem; } .marker\:text-red-500::marker { - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(239 68 68); } .selection\:bg-blue-500 *::selection { --tw-bg-opacity: 1; diff --git a/tests/variants.test.js b/tests/variants.test.js --- a/tests/variants.test.js +++ b/tests/variants.test.js @@ -485,8 +485,7 @@ test('returning non-strings and non-selectors in addVariant', () => { addVariant('peer-aria-expanded-2', ({ modifySelectors, separator }) => { let nodes = modifySelectors( - ({ className }) => - `.peer[aria-expanded="false"] ~ .${e(`peer-aria-expanded${separator}${className}`)}` + ({ className }) => `.${e(`peer-aria-expanded-2${separator}${className}`)}` ) return [
Safari ignores alpha channel in colors in `::marker`, which makes styling them with Tailwind impossible <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v3.1.2 **What build tool (or framework if it abstracts the build tool) are you using?** <details> <summary>`postcss`</summary> ```js module.exports = { plugins: { "postcss-import": {}, "tailwindcss": {}, "autoprefixer": {}, } } ``` </details> **What version of Node.js are you using?** v12.22.9 **What browser are you using?** Safari 15.5 on macOS 12.4 **Reproduction URL** https://play.tailwindcss.com/iea3Szbz1t **Describe your issue** On Safari, all of the following examples work correctly: ```css ::marker { color: red; } ::marker { color: #f00; } ::marker { color: rgb(255 0 0); } ``` But these are completely ignored: ```css ::marker { color: rgba(255 0 0 50); } ::marker { color: rgb(255 0 0 / 50); } ``` I discovered this while playing with arbitrary variants, trying to lighten the ordinals in an ordered list. When that didn't work, I thought, "that's fine, I can just use an arbitrary value!" but turns out that `[&::marker]:text-[#ff0000]` gets translated to ```css .\[\&\:\:marker\]\:text-\[\#ff0000\]::marker { --tw-text-opacity: 1; color: rgb(255 0 0 / var(--tw-text-opacity)); } ``` Which makes it impossible to use Tailwind to style marker colors. I realize this is more of a Safari bug than a Tailwind bug, but I'm curious as to why you're translating a hardcoded `[red]` into an RGBA value, and whether that's something that could be addressed to allow styling list markers with Tailwind 🤔
For anyone else that stumbles into this, the workaround I've found is to add this to my CSS file: ``` css ::marker { color: theme(colors.slate.500); } ``` But ideally this should be handled from the HTML to make it easier to manage together with the other styles. Looked at this quickly, it seems like the thing that breaks it is the variable, not the fact that there's an opacity value set: https://jsfiddle.net/oyv60qhd/1/ So you can work around this by disabling all of our color opacity utilities like this: ```js // tailwind.config.js module.exports = { // ... corePlugins: { textOpacity: false, backgroundOpacity: false, divideOpacity: false, borderOpacity: false, placeholderOpacity: false, }, } ``` Those will end up being disabled by default in v4. The whole reason we generate CSS like this: ```css .\[\&\:\:marker\]\:text-\[\#ff0000\]::marker { --tw-text-opacity: 1; color: rgb(255 0 0 / var(--tw-text-opacity)); } ``` ...is so you can combine the color with the corresponding opacity utility, for example: ```html <li class="marker:text-[red] marker:text-opacity-50"> ``` ...but generally we encourage the opacity modifier now, which doesn't require the variable but we still have to output it for backwards compatibility reasons (unless those opacity plugins are disabled). Will leave this open at least for now though so I remember to discuss it with the team in case there's an easy way to just make this work that isn't a breaking change. I've submitted a WebKit bug report for this: [WebKit Bug #241576](https://bugs.webkit.org/show_bug.cgi?id=241576) hah I already did that earlier today: https://bugs.webkit.org/show_bug.cgi?id=241566 — in any case appreciate it! The problem is that custom properties are not supported because allowed properties in `::marker` are whitelisted in webkit (correct): https://github.com/WebKit/WebKit/blob/fdc6c5fc1872fab62106b209c8a6a5aaa00730be/Source/WebCore/style/PropertyAllowlist.cpp but they don't include custom properties (incorrect). The spec doesn't mention them though so it's also possibly a CSS spec issue.
2022-06-13T18:13:17Z
3.1
tailwindlabs/tailwindcss
8,448
tailwindlabs__tailwindcss-8448
[ "7800" ]
c4e443acc093d8980bf476f14255b793c5065b9a
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1977,13 +1977,20 @@ export let corePlugins = { ) }, - ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme }) => { - let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5') - let ringColorDefault = withAlphaValue( - theme('ringColor')?.DEFAULT, - ringOpacityDefault, - `rgb(147 197 253 / ${ringOpacityDefault})` - ) + ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme, config }) => { + let ringColorDefault = (() => { + if (flagEnabled(config(), 'respectDefaultRingColorOpacity')) { + return theme('ringColor.DEFAULT') + } + + let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5') + + return withAlphaValue( + theme('ringColor')?.DEFAULT, + ringOpacityDefault, + `rgb(147 197 253 / ${ringOpacityDefault})` + ) + })() addDefaults('ring-width', { '--tw-ring-inset': ' ', diff --git a/src/featureFlags.js b/src/featureFlags.js --- a/src/featureFlags.js +++ b/src/featureFlags.js @@ -6,7 +6,7 @@ let defaults = { } let featureFlags = { - future: ['hoverOnlyWhenSupported'], + future: ['hoverOnlyWhenSupported', 'respectDefaultRingColorOpacity'], experimental: ['optimizeUniversalDefaults', 'variantGrouping'], } diff --git a/src/util/getAllConfigs.js b/src/util/getAllConfigs.js --- a/src/util/getAllConfigs.js +++ b/src/util/getAllConfigs.js @@ -9,6 +9,13 @@ export default function getAllConfigs(config) { const features = { // Add experimental configs here... + respectDefaultRingColorOpacity: { + theme: { + ringColor: { + DEFAULT: '#3b82f67f', + }, + }, + }, } const experimentals = Object.keys(features) diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -720,7 +720,7 @@ module.exports = { 8: '8px', }, ringColor: ({ theme }) => ({ - DEFAULT: theme('colors.blue.500', '#3b82f6'), + DEFAULT: theme(`colors.blue.500`, '#3b82f6'), ...theme('colors'), }), ringOffsetColor: ({ theme }) => theme('colors'),
diff --git a/tests/basic-usage.test.js b/tests/basic-usage.test.js --- a/tests/basic-usage.test.js +++ b/tests/basic-usage.test.js @@ -430,3 +430,237 @@ it('supports multiple backgrounds as arbitrary values even if only some are quot `) }) }) + +it('The "default" ring opacity is used by the default ring color when not using respectDefaultRingColorOpacity (1)', () => { + let config = { + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: 'rgb(59 130 246 / 0.5)' })} + .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); + } + `) + }) +}) + +it('The "default" ring opacity is used by the default ring color when not using respectDefaultRingColorOpacity (2)', () => { + let config = { + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + theme: { + ringOpacity: { + DEFAULT: 0.75, + }, + }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: 'rgb(59 130 246 / 0.75)' })} + .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); + } + `) + }) +}) + +it('Customizing the default ring color uses the "default" opacity when not using respectDefaultRingColorOpacity (1)', () => { + let config = { + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + theme: { + ringColor: { + DEFAULT: '#ff7f7f', + }, + }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: 'rgb(255 127 127 / 0.5)' })} + .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); + } + `) + }) +}) + +it('Customizing the default ring color uses the "default" opacity when not using respectDefaultRingColorOpacity (2)', () => { + let config = { + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + theme: { + ringColor: { + DEFAULT: '#ff7f7f00', + }, + }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: 'rgb(255 127 127 / 0.5)' })} + .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); + } + `) + }) +}) + +it('The "default" ring color ignores the default opacity when using respectDefaultRingColorOpacity (1)', () => { + let config = { + future: { respectDefaultRingColorOpacity: true }, + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: '#3b82f67f' })} + .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); + } + `) + }) +}) + +it('The "default" ring color ignores the default opacity when using respectDefaultRingColorOpacity (2)', () => { + let config = { + future: { respectDefaultRingColorOpacity: true }, + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + theme: { + ringOpacity: { + DEFAULT: 0.75, + }, + }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: '#3b82f67f' })} + .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); + } + `) + }) +}) + +it('Customizing the default ring color preserves its opacity when using respectDefaultRingColorOpacity (1)', () => { + let config = { + future: { respectDefaultRingColorOpacity: true }, + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + theme: { + ringColor: { + DEFAULT: '#ff7f7f', + }, + }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: '#ff7f7f' })} + .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); + } + `) + }) +}) + +it('Customizing the default ring color preserves its opacity when using respectDefaultRingColorOpacity (2)', () => { + let config = { + future: { respectDefaultRingColorOpacity: true }, + content: [{ raw: html`<div class="ring"></div>` }], + corePlugins: { preflight: false }, + theme: { + ringColor: { + DEFAULT: '#ff7f7f00', + }, + }, + } + + let input = css` + @tailwind base; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + ${defaults({ defaultRingColor: '#ff7f7f00' })} + .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); + } + `) + }) +})
Default ringColor has opacity baked into it <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** v3.0.22 **What build tool (or framework if it abstracts the build tool) are you using?** postcss 8.4.6, webpack 5.65.0 **What version of Node.js are you using?** For example: v17.5.0 **What browser are you using?** Edge (Chromium) **What operating system are you using?** macOS **Reproduction URL** https://play.tailwindcss.com/DXtIUnfIC0 **Describe your issue** When trying to set the default color for `ringColor`, it seems like an opacity of `0.5` is being applied regardless of the defined color. In my example I wanted to set the default ring color to be `#000`, but the output ends up becoming `--tw-ring-color: rgb(0 0 0 / 0.5);`. Ideally, I'd like to be able override that default opacity with a defined opacity of my own choosing, or have the color defined for `DEFAULT` just override whatever opacity is being applied.
Hey! This is because `ringOpacity` has a `DEFAULT` of `0.5`. If you override that as well you get the result you want: https://play.tailwindcss.com/CwV0YGg3LS?file=config The whole `ringOpacity` thing isn’t really documented anymore though because we are encouraging the opacity modifier as of v3, so going to leave this open just to prompt us to figure out how to document this or what to do about it. Ah, fantastic. Thank you. > encouraging the opacity modifier I see that intellisense in play.tailwind.com has class suggestions for `<div class="ring/` but they don't have associated styles. Are there plans to support the opacity modifier on the default, maybe `ring/100` or `ring ring/100`? Or is that a separate ring feature request and a separate intellisense bug? Just revisiting this, spent like 45 minutes talking through it with @thecrypticace and I think we _would_ like to change this so that the `ringOpacity.DEFAULT` value didn't inject itself into your custom `ringColor.DEFAULT` value but it would be a breaking change, since anyone who has currently customized `ringColor.DEFAULT` would now see a different color after updating. It feels a little _too_ breaking to just call it a bug fix to me unfortunately. I think what we're going to do is feature flag this fix so that anyone who runs into this problem and finds this issue can see that there's a flag to opt-in to the breaking change early, and then in v4 we can make that the default and mention it in the upgrade guide. Not sure when we will tackle this but leaving this as a note for myself anyways for when we look at this issue again 👍🏻 In the mean time, changing your `ringOpacity.DEFAULT` as explained earlier is the right way to solve this.
2022-05-26T23:36:32Z
3
tailwindlabs/tailwindcss
8,125
tailwindlabs__tailwindcss-8125
[ "7874" ]
e5ed08b5cbdd902dcbb7b25d7c32ad9b474ea1a8
diff --git a/src/lib/expandApplyAtRules.js b/src/lib/expandApplyAtRules.js --- a/src/lib/expandApplyAtRules.js +++ b/src/lib/expandApplyAtRules.js @@ -252,222 +252,228 @@ function processApply(root, context, localCache) { }) // Start the @apply process if we have rules with @apply in them - if (applies.length > 0) { - // Fill up some caches! - let applyClassCache = combineCaches([localCache, buildApplyCache(applyCandidates, context)]) - - /** - * When we have an apply like this: - * - * .abc { - * @apply hover:font-bold; - * } - * - * What we essentially will do is resolve to this: - * - * .abc { - * @apply .hover\:font-bold:hover { - * font-weight: 500; - * } - * } - * - * Notice that the to-be-applied class is `.hover\:font-bold:hover` and that the utility candidate was `hover:font-bold`. - * What happens in this function is that we prepend a `.` and escape the candidate. - * This will result in `.hover\:font-bold` - * Which means that we can replace `.hover\:font-bold` with `.abc` in `.hover\:font-bold:hover` resulting in `.abc:hover` - */ - // TODO: Should we use postcss-selector-parser for this instead? - function replaceSelector(selector, utilitySelectors, candidate) { - let needle = `.${escapeClassName(candidate)}` - let utilitySelectorsList = utilitySelectors.split(/\s*\,(?![^(]*\))\s*/g) - - return selector - .split(/\s*\,(?![^(]*\))\s*/g) - .map((s) => { - let replaced = [] - - for (let utilitySelector of utilitySelectorsList) { - let replacedSelector = utilitySelector.replace(needle, s) - if (replacedSelector === utilitySelector) { - continue - } - replaced.push(replacedSelector) - } - return replaced.join(', ') - }) - .join(', ') - } + if (applies.length === 0) { + return + } - let perParentApplies = new Map() + // Fill up some caches! + let applyClassCache = combineCaches([localCache, buildApplyCache(applyCandidates, context)]) + + /** + * When we have an apply like this: + * + * .abc { + * @apply hover:font-bold; + * } + * + * What we essentially will do is resolve to this: + * + * .abc { + * @apply .hover\:font-bold:hover { + * font-weight: 500; + * } + * } + * + * Notice that the to-be-applied class is `.hover\:font-bold:hover` and that the utility candidate was `hover:font-bold`. + * What happens in this function is that we prepend a `.` and escape the candidate. + * This will result in `.hover\:font-bold` + * Which means that we can replace `.hover\:font-bold` with `.abc` in `.hover\:font-bold:hover` resulting in `.abc:hover` + */ + // TODO: Should we use postcss-selector-parser for this instead? + function replaceSelector(selector, utilitySelectors, candidate) { + let needle = `.${escapeClassName(candidate)}` + let needles = [...new Set([needle, needle.replace(/\\2c /g, '\\,')])] + let utilitySelectorsList = utilitySelectors.split(/\s*(?<!\\)\,(?![^(]*\))\s*/g) + + return selector + .split(/\s*(?<!\\)\,(?![^(]*\))\s*/g) + .map((s) => { + let replaced = [] + + for (let utilitySelector of utilitySelectorsList) { + let replacedSelector = utilitySelector + for (const needle of needles) { + replacedSelector = replacedSelector.replace(needle, s) + } + if (replacedSelector === utilitySelector) { + continue + } + replaced.push(replacedSelector) + } + return replaced.join(', ') + }) + .join(', ') + } - // Collect all apply candidates and their rules - for (let apply of applies) { - let candidates = perParentApplies.get(apply.parent) || [] + let perParentApplies = new Map() - perParentApplies.set(apply.parent, [candidates, apply.source]) + // Collect all apply candidates and their rules + for (let apply of applies) { + let candidates = perParentApplies.get(apply.parent) || [] - let [applyCandidates, important] = extractApplyCandidates(apply.params) + perParentApplies.set(apply.parent, [candidates, apply.source]) - if (apply.parent.type === 'atrule') { - if (apply.parent.name === 'screen') { - const screenType = apply.parent.params + let [applyCandidates, important] = extractApplyCandidates(apply.params) - throw apply.error( - `@apply is not supported within nested at-rules like @screen. We suggest you write this as @apply ${applyCandidates - .map((c) => `${screenType}:${c}`) - .join(' ')} instead.` - ) - } + if (apply.parent.type === 'atrule') { + if (apply.parent.name === 'screen') { + const screenType = apply.parent.params throw apply.error( - `@apply is not supported within nested at-rules like @${apply.parent.name}. You can fix this by un-nesting @${apply.parent.name}.` + `@apply is not supported within nested at-rules like @screen. We suggest you write this as @apply ${applyCandidates + .map((c) => `${screenType}:${c}`) + .join(' ')} instead.` ) } - for (let applyCandidate of applyCandidates) { - if ([prefix(context, 'group'), prefix(context, 'peer')].includes(applyCandidate)) { - // TODO: Link to specific documentation page with error code. - throw apply.error(`@apply should not be used with the '${applyCandidate}' utility`) - } - - if (!applyClassCache.has(applyCandidate)) { - throw apply.error( - `The \`${applyCandidate}\` class does not exist. If \`${applyCandidate}\` is a custom class, make sure it is defined within a \`@layer\` directive.` - ) - } + throw apply.error( + `@apply is not supported within nested at-rules like @${apply.parent.name}. You can fix this by un-nesting @${apply.parent.name}.` + ) + } - let rules = applyClassCache.get(applyCandidate) + for (let applyCandidate of applyCandidates) { + if ([prefix(context, 'group'), prefix(context, 'peer')].includes(applyCandidate)) { + // TODO: Link to specific documentation page with error code. + throw apply.error(`@apply should not be used with the '${applyCandidate}' utility`) + } - candidates.push([applyCandidate, important, rules]) + if (!applyClassCache.has(applyCandidate)) { + throw apply.error( + `The \`${applyCandidate}\` class does not exist. If \`${applyCandidate}\` is a custom class, make sure it is defined within a \`@layer\` directive.` + ) } + + let rules = applyClassCache.get(applyCandidate) + + candidates.push([applyCandidate, important, rules]) } + } + + for (const [parent, [candidates, atApplySource]] of perParentApplies) { + let siblings = [] + + for (let [applyCandidate, important, rules] of candidates) { + for (let [meta, node] of rules) { + let parentClasses = extractClasses(parent) + let nodeClasses = extractClasses(node) + + // Add base utility classes from the @apply node to the list of + // classes to check whether it intersects and therefore results in a + // circular dependency or not. + // + // E.g.: + // .foo { + // @apply hover:a; // This applies "a" but with a modifier + // } + // + // We only have to do that with base classes of the `node`, not of the `parent` + // E.g.: + // .hover\:foo { + // @apply bar; + // } + // .bar { + // @apply foo; + // } + // + // This should not result in a circular dependency because we are + // just applying `.foo` and the rule above is `.hover\:foo` which is + // unrelated. However, if we were to apply `hover:foo` then we _did_ + // have to include this one. + nodeClasses = nodeClasses.concat( + extractBaseCandidates(nodeClasses, context.tailwindConfig.separator) + ) - for (const [parent, [candidates, atApplySource]] of perParentApplies) { - let siblings = [] - - for (let [applyCandidate, important, rules] of candidates) { - for (let [meta, node] of rules) { - let parentClasses = extractClasses(parent) - let nodeClasses = extractClasses(node) - - // Add base utility classes from the @apply node to the list of - // classes to check whether it intersects and therefore results in a - // circular dependency or not. - // - // E.g.: - // .foo { - // @apply hover:a; // This applies "a" but with a modifier - // } - // - // We only have to do that with base classes of the `node`, not of the `parent` - // E.g.: - // .hover\:foo { - // @apply bar; - // } - // .bar { - // @apply foo; - // } - // - // This should not result in a circular dependency because we are - // just applying `.foo` and the rule above is `.hover\:foo` which is - // unrelated. However, if we were to apply `hover:foo` then we _did_ - // have to include this one. - nodeClasses = nodeClasses.concat( - extractBaseCandidates(nodeClasses, context.tailwindConfig.separator) + let intersects = parentClasses.some((selector) => nodeClasses.includes(selector)) + if (intersects) { + throw node.error( + `You cannot \`@apply\` the \`${applyCandidate}\` utility here because it creates a circular dependency.` ) + } - let intersects = parentClasses.some((selector) => nodeClasses.includes(selector)) - if (intersects) { - throw node.error( - `You cannot \`@apply\` the \`${applyCandidate}\` utility here because it creates a circular dependency.` - ) - } + let root = postcss.root({ nodes: [node.clone()] }) - let root = postcss.root({ nodes: [node.clone()] }) + // Make sure every node in the entire tree points back at the @apply rule that generated it + root.walk((node) => { + node.source = atApplySource + }) - // Make sure every node in the entire tree points back at the @apply rule that generated it - root.walk((node) => { - node.source = atApplySource - }) + let canRewriteSelector = + node.type !== 'atrule' || (node.type === 'atrule' && node.name !== 'keyframes') + + if (canRewriteSelector) { + root.walkRules((rule) => { + // Let's imagine you have the following structure: + // + // .foo { + // @apply bar; + // } + // + // @supports (a: b) { + // .bar { + // color: blue + // } + // + // .something-unrelated {} + // } + // + // In this case we want to apply `.bar` but it happens to be in + // an atrule node. We clone that node instead of the nested one + // because we still want that @supports rule to be there once we + // applied everything. + // + // However it happens to be that the `.something-unrelated` is + // also in that same shared @supports atrule. This is not good, + // and this should not be there. The good part is that this is + // a clone already and it can be safely removed. The question is + // how do we know we can remove it. Basically what we can do is + // match it against the applyCandidate that you want to apply. If + // it doesn't match the we can safely delete it. + // + // If we didn't do this, then the `replaceSelector` function + // would have replaced this with something that didn't exist and + // therefore it removed the selector altogether. In this specific + // case it would result in `{}` instead of `.something-unrelated {}` + if (!extractClasses(rule).some((candidate) => candidate === applyCandidate)) { + rule.remove() + return + } - let canRewriteSelector = - node.type !== 'atrule' || (node.type === 'atrule' && node.name !== 'keyframes') - - if (canRewriteSelector) { - root.walkRules((rule) => { - // Let's imagine you have the following structure: - // - // .foo { - // @apply bar; - // } - // - // @supports (a: b) { - // .bar { - // color: blue - // } - // - // .something-unrelated {} - // } - // - // In this case we want to apply `.bar` but it happens to be in - // an atrule node. We clone that node instead of the nested one - // because we still want that @supports rule to be there once we - // applied everything. - // - // However it happens to be that the `.something-unrelated` is - // also in that same shared @supports atrule. This is not good, - // and this should not be there. The good part is that this is - // a clone already and it can be safely removed. The question is - // how do we know we can remove it. Basically what we can do is - // match it against the applyCandidate that you want to apply. If - // it doesn't match the we can safely delete it. - // - // If we didn't do this, then the `replaceSelector` function - // would have replaced this with something that didn't exist and - // therefore it removed the selector altogether. In this specific - // case it would result in `{}` instead of `.something-unrelated {}` - if (!extractClasses(rule).some((candidate) => candidate === applyCandidate)) { - rule.remove() - return - } - - rule.selector = replaceSelector(parent.selector, rule.selector, applyCandidate) - - rule.walkDecls((d) => { - d.important = meta.important || important - }) - }) - } + rule.selector = replaceSelector(parent.selector, rule.selector, applyCandidate) - // Insert it - siblings.push([ - // Ensure that when we are sorting, that we take the layer order into account - { ...meta, sort: meta.sort | context.layerOrder[meta.layer] }, - root.nodes[0], - ]) + rule.walkDecls((d) => { + d.important = meta.important || important + }) + }) } + + // Insert it + siblings.push([ + // Ensure that when we are sorting, that we take the layer order into account + { ...meta, sort: meta.sort | context.layerOrder[meta.layer] }, + root.nodes[0], + ]) } + } - // Inject the rules, sorted, correctly - let nodes = siblings.sort(([a], [z]) => bigSign(a.sort - z.sort)).map((s) => s[1]) + // Inject the rules, sorted, correctly + let nodes = siblings.sort(([a], [z]) => bigSign(a.sort - z.sort)).map((s) => s[1]) - // `parent` refers to the node at `.abc` in: .abc { @apply mt-2 } - parent.after(nodes) - } + // `parent` refers to the node at `.abc` in: .abc { @apply mt-2 } + parent.after(nodes) + } - for (let apply of applies) { - // If there are left-over declarations, just remove the @apply - if (apply.parent.nodes.length > 1) { - apply.remove() - } else { - // The node is empty, drop the full node - apply.parent.remove() - } + for (let apply of applies) { + // If there are left-over declarations, just remove the @apply + if (apply.parent.nodes.length > 1) { + apply.remove() + } else { + // The node is empty, drop the full node + apply.parent.remove() } - - // Do it again, in case we have other `@apply` rules - processApply(root, context, localCache) } + + // Do it again, in case we have other `@apply` rules + processApply(root, context, localCache) } export default function expandApplyAtRules(context) {
diff --git a/tests/prefix.test.js b/tests/prefix.test.js --- a/tests/prefix.test.js +++ b/tests/prefix.test.js @@ -374,3 +374,29 @@ it('prefix does not detect and generate unnecessary classes', async () => { expect(result.css).toMatchFormattedCss(css``) }) + +it('supports prefixed utilities using arbitrary values', async () => { + let config = { + prefix: 'tw-', + content: [{ raw: html`foo` }], + corePlugins: { preflight: false }, + } + + let input = css` + .foo { + @apply tw-text-[color:rgb(var(--button-background,var(--primary-button-background)))]; + @apply tw-ease-[cubic-bezier(0.77,0,0.175,1)]; + @apply tw-rounded-[min(4px,var(--input-border-radius))]; + } + ` + + const result = await run(input, config) + + expect(result.css).toMatchFormattedCss(css` + .foo { + color: rgb(var(--button-background, var(--primary-button-background))); + transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1); + border-radius: min(4px, var(--input-border-radius)); + } + `) +})
Prefix option does not work with custom properties **What version of Tailwind CSS are you using?** v3.0.23 Hi ! I am trying to use the prefix option, but I have found a problem that prevents it to work for more complex patterns. For instance, here is a simple code _without_ any prefix: ``` .button { @apply text-[color:rgb(var(--button-background,var(--primary-button-background)))]; } ``` This properly generates the following markup: ``` .button { color: rgb(var(--button-background,var(--primary-button-background))); } ``` When using a prefix (in my example "tw-"), if I change the apply: ``` .button { @apply tw-text-[color:rgb(var(--button-background,var(--primary-button-background)))]; } ``` Then the following incorrect CSS is generated (note the lack of selector): ``` { color: rgb(var(--button-background,var(--primary-button-background))); } ```
To complement this issue, here are a few other use cases where CSS generation fails with prefix: ``` .accordion-content { @apply tw-ease-[cubic-bezier(0.77,0,0.175,1)]; } ``` Generates this incorrect markup: ``` { transition-timing-function: cubic-bezier(0.77,0,0.175,1); } ``` While the same without the prefix configured generate the correct markup. Hi, Here are a few other cases where Tailwind generate incorrect CSS with prefix: ``` .foo { @apply tw-rounded-[min(4px,var(--input-border-radius))]; } ``` It generates the following incorrect code (notice the lack of selector): ``` { border-radius: min(4px,var(--input-border-radius)); } ``` I'd be in favor to, since Bootstrap can live beside other libraries (eg. Booster v4 includes jQuery TableSorter, speaking of table styles leaking) or custom code. [GarageBand For Android ](https://www.garagebandapp.org/)
2022-04-15T20:19:59Z
3
tailwindlabs/tailwindcss
7,789
tailwindlabs__tailwindcss-7789
[ "7771" ]
c6097d59fcd3b4a176188327adee488c562ecb8f
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -303,6 +303,19 @@ function looksLikeUri(declaration) { } } +function isParsableNode(node) { + let isParsable = true + + node.walkDecls((decl) => { + if (!isParsableCssValue(decl.name, decl.value)) { + isParsable = false + return false + } + }) + + return isParsable +} + function isParsableCssValue(property, value) { // We don't want to to treat [https://example.com] as a custom property // Even though, according to the CSS grammar, it's a totally valid CSS declaration @@ -456,60 +469,66 @@ function* resolveMatches(candidate, context) { } } - // Only keep the result of the very first plugin if we are dealing with - // arbitrary values, to protect against ambiguity. - if (isArbitraryValue(modifier) && matches.length > 1) { - let typesPerPlugin = matches.map((match) => new Set([...(typesByMatches.get(match) ?? [])])) + if (isArbitraryValue(modifier)) { + // When generated arbitrary values are ambiguous, we can't know + // which to pick so don't generate any utilities for them + if (matches.length > 1) { + let typesPerPlugin = matches.map((match) => new Set([...(typesByMatches.get(match) ?? [])])) - // Remove duplicates, so that we can detect proper unique types for each plugin. - for (let pluginTypes of typesPerPlugin) { - for (let type of pluginTypes) { - let removeFromOwnGroup = false + // Remove duplicates, so that we can detect proper unique types for each plugin. + for (let pluginTypes of typesPerPlugin) { + for (let type of pluginTypes) { + let removeFromOwnGroup = false - for (let otherGroup of typesPerPlugin) { - if (pluginTypes === otherGroup) continue + for (let otherGroup of typesPerPlugin) { + if (pluginTypes === otherGroup) continue - if (otherGroup.has(type)) { - otherGroup.delete(type) - removeFromOwnGroup = true + if (otherGroup.has(type)) { + otherGroup.delete(type) + removeFromOwnGroup = true + } } - } - if (removeFromOwnGroup) pluginTypes.delete(type) + if (removeFromOwnGroup) pluginTypes.delete(type) + } } - } - let messages = [] - - for (let [idx, group] of typesPerPlugin.entries()) { - for (let type of group) { - let rules = matches[idx] - .map(([, rule]) => rule) - .flat() - .map((rule) => - rule - .toString() - .split('\n') - .slice(1, -1) // Remove selector and closing '}' - .map((line) => line.trim()) - .map((x) => ` ${x}`) // Re-indent - .join('\n') + let messages = [] + + for (let [idx, group] of typesPerPlugin.entries()) { + for (let type of group) { + let rules = matches[idx] + .map(([, rule]) => rule) + .flat() + .map((rule) => + rule + .toString() + .split('\n') + .slice(1, -1) // Remove selector and closing '}' + .map((line) => line.trim()) + .map((x) => ` ${x}`) // Re-indent + .join('\n') + ) + .join('\n\n') + + messages.push( + ` Use \`${candidate.replace('[', `[${type}:`)}\` for \`${rules.trim()}\`` ) - .join('\n\n') - - messages.push(` Use \`${candidate.replace('[', `[${type}:`)}\` for \`${rules.trim()}\``) - break + break + } } + + log.warn([ + `The class \`${candidate}\` is ambiguous and matches multiple utilities.`, + ...messages, + `If this is content and not a class, replace it with \`${candidate + .replace('[', '&lsqb;') + .replace(']', '&rsqb;')}\` to silence this warning.`, + ]) + continue } - log.warn([ - `The class \`${candidate}\` is ambiguous and matches multiple utilities.`, - ...messages, - `If this is content and not a class, replace it with \`${candidate - .replace('[', '&lsqb;') - .replace(']', '&rsqb;')}\` to silence this warning.`, - ]) - continue + matches = matches.map((list) => list.filter((match) => isParsableNode(match[1]))) } matches = matches.flat()
diff --git a/tests/arbitrary-values.test.js b/tests/arbitrary-values.test.js --- a/tests/arbitrary-values.test.js +++ b/tests/arbitrary-values.test.js @@ -370,3 +370,17 @@ it('should be possible to read theme values in arbitrary values (with quotes) wh `) }) }) + +it('should not output unparsable arbitrary CSS values', () => { + let config = { + content: [ + { + raw: 'let classes = `w-[${sizes.width}]`', + }, + ], + } + + return run('@tailwind utilities', config).then((result) => { + return expect(result.css).toMatchFormattedCss(``) + }) +})
JIT analysis the comments code to add that classes instead of omit it <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** For example: v3.0.17 **What build tool (or framework if it abstracts the build tool) are you using?** For example: postcss 8.4.5, Next.js 12.1.0 **What version of Node.js are you using?** For example: v17.3.1 **What browser are you using?** For example: N/A **What operating system are you using?** macOS **Describe your issue** Storybook can't start because JIT parses code from comments <img width="563" alt="imagen" src="https://user-images.githubusercontent.com/13077343/157001625-06c4caa4-b6b8-4e9d-90f9-4dcfd1daa6ee.png">
Hey, this is covered in the docs: https://tailwindcss.com/docs/content-configuration#dynamic-class-names. Tailwind CSS does not interpret your source code so dynamic class names like this won't work. Ideally, we would just _not_ generate the CSS here since it's generating values that appear to result in a syntax error. Will see what we can do about this.
2022-03-08T17:17:23Z
3
tailwindlabs/tailwindcss
8,091
tailwindlabs__tailwindcss-8091
[ "8079" ]
1d4c5c78bd7b22f11753f216649bc12ce481d5e3
diff --git a/src/util/dataTypes.js b/src/util/dataTypes.js --- a/src/util/dataTypes.js +++ b/src/util/dataTypes.js @@ -42,10 +42,16 @@ export function normalize(value, isRoot = true) { // Add spaces around operators inside calc() that do not follow an operator // or '('. - return value.replace( - /(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, - '$1 $2 ' - ) + value = value.replace(/calc\(.+\)/g, (match) => { + return match.replace( + /(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, + '$1 $2 ' + ) + }) + + // Add spaces around some operators not inside calc() that do not follow an operator + // or '('. + return value.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([\/])/g, '$1 $2 ') } export function url(value) {
diff --git a/tests/normalize-data-types.test.js b/tests/normalize-data-types.test.js new file mode 100644 --- /dev/null +++ b/tests/normalize-data-types.test.js @@ -0,0 +1,42 @@ +import { normalize } from '../src/util/dataTypes' + +let table = [ + ['foo', 'foo'], + ['foo-bar', 'foo-bar'], + ['16/9', '16 / 9'], + + // '_'s are converted to spaces except when escaped + ['foo_bar', 'foo bar'], + ['foo__bar', 'foo bar'], + ['foo\\_bar', 'foo_bar'], + + // Urls are preserved as-is + [ + 'url("https://example.com/abc+def/some-path/2022-01-01-abc/some_underscoered_path")', + 'url("https://example.com/abc+def/some-path/2022-01-01-abc/some_underscoered_path")', + ], + + // var(…) is preserved as is + ['var(--foo)', 'var(--foo)'], + ['var(--headings-h1-size)', 'var(--headings-h1-size)'], + + // calc(…) get's spaces around operators + ['calc(1+2)', 'calc(1 + 2)'], + ['calc(100%+1rem)', 'calc(100% + 1rem)'], + ['calc(1+calc(100%-20px))', 'calc(1 + calc(100% - 20px))'], + ['calc(var(--headings-h1-size)*100)', 'calc(var(--headings-h1-size) * 100)'], + [ + 'calc(var(--headings-h1-size)*calc(100%+50%))', + 'calc(var(--headings-h1-size) * calc(100% + 50%))', + ], + ['var(--heading-h1-font-size)', 'var(--heading-h1-font-size)'], + ['var(--my-var-with-more-than-3-words)', 'var(--my-var-with-more-than-3-words)'], + ['var(--width, calc(100%+1rem))', 'var(--width, calc(100% + 1rem))'], + + // Misc + ['color(0_0_0/1.0)', 'color(0 0 0 / 1.0)'], +] + +it.each(table)('normalize data: %s', (input, output) => { + expect(normalize(input)).toBe(output) +})
Tailwind incorrect generate CSS variables as minus sign **What version of Tailwind CSS are you using?** 3.0.23 Hi, I am not sure if this issue is linked to the other problems I have reported in #7874 and #7884 as the output issue seems different. I am therefore opening a new issue. If I use the following CSS: ``` .prose h1 { @apply tw-text-[length:var(--heading-h1-font-size)]; } ``` Tailwind will generate the following code: ``` .prose h1 { font-size: var(--heading-h1 - font-size); } ``` For some reason the dash after the -h1 part is considered as a minus (maybe due to the number ?). In all cases this seems like a bug. Thanks :)
Definitely seems like a bug and I think you’re right it’s probably because of the number! Will try to look at this this week 👍🏻
2022-04-11T21:39:57Z
3
tailwindlabs/tailwindcss
7,565
tailwindlabs__tailwindcss-7565
[ "4896" ]
af64d7190c1e3b4ed765c7464f99b6aec5d5bac2
diff --git a/src/lib/collapseAdjacentRules.js b/src/lib/collapseAdjacentRules.js --- a/src/lib/collapseAdjacentRules.js +++ b/src/lib/collapseAdjacentRules.js @@ -5,7 +5,7 @@ let comparisonMap = { let types = new Set(Object.keys(comparisonMap)) export default function collapseAdjacentRules() { - return (root) => { + function collapseRulesIn(root) { let currentRule = null root.each((node) => { if (!types.has(node.type)) { @@ -35,5 +35,20 @@ export default function collapseAdjacentRules() { currentRule = node } }) + + // After we've collapsed adjacent rules & at-rules, we need to collapse + // adjacent rules & at-rules that are children of at-rules. + // We do not care about nesting rules because Tailwind CSS + // explicitly does not handle rule nesting on its own as + // the user is expected to use a nesting plugin + root.each((node) => { + if (node.type === 'atrule') { + collapseRulesIn(node) + } + }) + } + + return (root) => { + collapseRulesIn(root) } }
diff --git a/tests/apply.test.js b/tests/apply.test.js --- a/tests/apply.test.js +++ b/tests/apply.test.js @@ -1289,9 +1289,6 @@ it('apply partitioning works with media queries', async () => { body { --tw-text-opacity: 1; color: rgb(220 38 38 / var(--tw-text-opacity)); - } - html, - body { font-size: 2rem; } } diff --git a/tests/collapse-adjacent-rules.test.css b/tests/collapse-adjacent-rules.test.css --- a/tests/collapse-adjacent-rules.test.css +++ b/tests/collapse-adjacent-rules.test.css @@ -72,6 +72,29 @@ color: black; font-weight: 700; } +@supports (foo: bar) { + .some-apply-thing { + font-weight: 700; + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); + } +} +@media (min-width: 768px) { + .some-apply-thing { + font-weight: 700; + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); + } +} +@supports (foo: bar) { + @media (min-width: 768px) { + .some-apply-thing { + font-weight: 700; + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); + } + } +} @media (min-width: 640px) { .sm\:text-center { text-align: center; diff --git a/tests/collapse-adjacent-rules.test.html b/tests/collapse-adjacent-rules.test.html --- a/tests/collapse-adjacent-rules.test.html +++ b/tests/collapse-adjacent-rules.test.html @@ -19,5 +19,6 @@ <div class="md:text-center"></div> <div class="lg:font-bold"></div> <div class="lg:text-center"></div> + <div class="some-apply-thing"></div> </body> </html> diff --git a/tests/collapse-adjacent-rules.test.js b/tests/collapse-adjacent-rules.test.js --- a/tests/collapse-adjacent-rules.test.js +++ b/tests/collapse-adjacent-rules.test.js @@ -8,7 +8,11 @@ test('collapse adjacent rules', () => { content: [path.resolve(__dirname, './collapse-adjacent-rules.test.html')], corePlugins: { preflight: false }, theme: {}, - plugins: [], + plugins: [ + function ({ addVariant }) { + addVariant('foo-bar', '@supports (foo: bar)') + }, + ], } let input = css` @@ -45,6 +49,9 @@ test('collapse adjacent rules', () => { .bar { font-weight: 700; } + .some-apply-thing { + @apply foo-bar:md:text-black foo-bar:md:font-bold foo-bar:text-black foo-bar:font-bold md:font-bold md:text-black; + } ` return run(input, config).then((result) => { diff --git a/tests/kitchen-sink.test.css b/tests/kitchen-sink.test.css --- a/tests/kitchen-sink.test.css +++ b/tests/kitchen-sink.test.css @@ -498,8 +498,6 @@ div { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } - } - @media (prefers-reduced-motion: no-preference) { .dark .md\:dark\:motion-safe\:foo\:active\:custom-util:active { background: #abcdef !important; }
Duplicated CSS rules in @media output ### What version of Tailwind CSS are you using? 2.2.4 ### What build tool (or framework if it abstracts the build tool) are you using? Gulp and tailwindcss-cli ### What version of Node.js are you using? v14.17.2 ### What browser are you using? N/A ### What operating system are you using? Windows 10 ### Reproduction repository https://play.tailwindcss.com/6re84tZQjw?file=css ### Describe your issue Noticed this recently and just curious if this is the intended/expected behavior. In **JIT** mode, when using `@apply`, responsive variants (e.g. `md:`) are output as separate, duplicate CSS rules rather than combined into one (as is the case with non-responsive rules). _Note: This is the case whether one uses multiple `@apply` rules or combines all styles into one._ **Input:** _CONFIG_ ``` const colors = require('tailwindcss/colors') module.exports = { mode: 'jit', theme: { extend: {}, }, variants: {}, plugins: [], } ``` _HTML_ ``` <div class="nav-main"> <a href="#" class="nav-item">nav</a> </div> ``` _CSS_ ``` @tailwind base; @tailwind components; @tailwind utilities; .nav-main { @apply bg-gray-200 w-full; @apply md:w-1/2 md:px-5 md:bg-blue-200; } .nav-item { @apply uppercase text-sm tracking-wider font-semibold flex py-2 px-4 border-b-2 border-transparent; @apply md:text-blue-600 md:font-bold md:tracking-widest; } ``` _or_ ``` .nav-main { @apply bg-gray-200 w-full md:w-1/2 md:px-5 md:bg-blue-200; } .nav-item { @apply uppercase text-sm tracking-wider font-semibold flex py-2 px-4 border-b-2 border-transparent md:text-blue-600 md:font-bold md:tracking-widest; } ``` Output: ``` .nav-main { width: 100%; --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } @media (min-width: 768px) { .nav-main { width: 50%; } .nav-main { --tw-bg-opacity: 1; background-color: rgba(191, 219, 254, var(--tw-bg-opacity)); } .nav-main { padding-left: 1.25rem; padding-right: 1.25rem; } } .nav-item { display: flex; border-bottom-width: 2px; border-color: transparent; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 1rem; padding-right: 1rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; } @media (min-width: 768px) { .nav-item { font-weight: 700; } .nav-item { letter-spacing: 0.1em; } .nav-item { --tw-text-opacity: 1; color: rgba(37, 99, 235, var(--tw-text-opacity)); } } ``` Output **without** `mode: 'jit'` ``` .nav-main { width: 100%; --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } @media (min-width: 768px) { .nav-main { width: 50%; --tw-bg-opacity: 1; background-color: rgba(191, 219, 254, var(--tw-bg-opacity)); padding-left: 1.25rem; padding-right: 1.25rem; } } .nav-item { display: flex; border-bottom-width: 2px; border-color: transparent; padding-left: 1rem; padding-right: 1rem; padding-top: 0.5rem; padding-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; } @media (min-width: 768px) { .nav-item { font-weight: 700; letter-spacing: 0.1em; --tw-text-opacity: 1; color: rgba(37, 99, 235, var(--tw-text-opacity)); } } ``` https://play.tailwindcss.com/6re84tZQjw?file=css I'm a huge fan of tailwindcss and newly getting familiar with JIT so I appreciate any help or clarification that is offered!
Updating this issue with some additional observations from my local development. When running JIT watch mode (via `npx tailwindcss`), I get many duplicated CSS rules. Still trying to drilldown to what specific actions cause this, but it seems to be related to tailwind watching my content files (Blade views in this case). When a utility class is added to the Blade file, if that utility is not yet present in the base file, it is added (as expected) but many existing rules get duplicated in the process. I end up with a file that looks like this: ``` #app .pointer-events-none { pointer-events: none; pointer-events: none; pointer-events: none; pointer-events: none; pointer-events: none; pointer-events: none; } #app .absolute { position: absolute; position: absolute; position: absolute; position: absolute; position: absolute; position: absolute; } #app .relative { position: relative; position: relative; position: relative; position: relative; position: relative; position: relative; } #app .sticky { position: sticky; } #app .top-0 { top: 0px; } #app .left-0 { left: 0px; } #app .bottom-0 { bottom: 0px; } #app .top-4 { top: 1rem; } #app .top-0 { top: 0px; } #app .left-0 { left: 0px; } #app .bottom-0 { bottom: 0px; } #app .top-5 { top: 1.25rem; } #app .top-0 { top: 0px; } #app .left-0 { left: 0px; } #app .bottom-0 { bottom: 0px; } #app .top-7 { top: 1.75rem; } #app .top-0 { top: 0px; } #app .left-0 { left: 0px; } #app .bottom-0 { bottom: 0px; } #app .top-2 { top: 0.5rem; } #app .top-0 { top: 0px; } #app .left-0 { left: 0px; } #app .bottom-0 { bottom: 0px; } #app .top-2 { top: 0.5rem; } #app .top-0 { top: 0px; } #app .left-0 { left: 0px; } #app .bottom-0 { bottom: 0px; } #app .top-3 { top: 0.75rem; ``` Triggering a re-processing of the primary CSS file that contains the calls to `@tailwind base; @tailwind components; @tailwind utilities;` seems to fix the issue and remove the duplicates so the issue is avoided in final production builds. However, it can be an obstacle when developing because the flood of duplicate rules makes debugging styles via DevTools quite difficult. If I'm missing something here and inadvertently causing the issue, I'd welcome any insight! I'm a novice, but confirm your tailwind.config.js file's "purge" settings are complete and correct Just thought I'd note that I'm experiencing the same thing with duplicate CSS, and I happen to have all these things in common with the OP, though I'm not sure which of these are relevant just yet: - JIT mode enabled - templates are also Blade (with some straight PHP also included in the purge) - also happen to be using `#app` as an `important` qualifier in `tailwind.config.js` However, I'm using Laravel Mix + BrowserSync to watch files and recompile as needed. Duplicate rules seem to accumulate during a single BrowserSync session. If I restart my watch task, the duplicate rules get cleaned up. if you have already node js installed or after installing open node command prompt window by typing node( on windows machine) in start. [krogereschedule](https://www.krogereschedule.org/)
2022-02-21T16:58:26Z
3
tailwindlabs/tailwindcss
7,291
tailwindlabs__tailwindcss-7291
[ "7207" ]
cd8f109981ed64ec78fb70b3091153f45931ff27
diff --git a/src/index.js b/src/index.js --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,21 @@ module.exports = function tailwindcss(configOrPath) { return root }, function (root, result) { - processTailwindFeatures(setupTrackingContext(configOrPath))(root, result) + let context = setupTrackingContext(configOrPath) + + if (root.type === 'document') { + let roots = root.nodes.filter((node) => node.type === 'root') + + for (const root of roots) { + if (root.type === 'root') { + processTailwindFeatures(context)(root, result) + } + } + + return + } + + processTailwindFeatures(context)(root, result) }, env.DEBUG && function (root) {
diff --git a/tests/variants.test.js b/tests/variants.test.js --- a/tests/variants.test.js +++ b/tests/variants.test.js @@ -1,5 +1,6 @@ import fs from 'fs' import path from 'path' +import postcss from 'postcss' import { run, css, html, defaults } from './util/run' @@ -568,3 +569,37 @@ test('The visited variant removes opacity support', () => { `) }) }) + +it('appends variants to the correct place when using postcss documents', () => { + let config = { + content: [{ raw: html`<div class="underline sm:underline"></div>` }], + plugins: [], + corePlugins: { preflight: false }, + } + + const doc = postcss.document() + doc.append(postcss.parse(`a {}`)) + doc.append(postcss.parse(`@tailwind base`)) + doc.append(postcss.parse(`@tailwind utilities`)) + doc.append(postcss.parse(`b {}`)) + + const result = doc.toResult() + + return run(result, config).then((result) => { + return expect(result.css).toMatchFormattedCss(css` + a { + } + ${defaults} + .underline { + text-decoration-line: underline; + } + @media (min-width: 640px) { + .sm\:underline { + text-decoration-line: underline; + } + } + b { + } + `) + }) +})
Variant nodes are appended to the document rather than a root **What version of Tailwind CSS are you using?** 3.0.16 **What build tool (or framework if it abstracts the build tool) are you using?** postcss-cli 9.1.0 **What version of Node.js are you using?** 17.x **Reproduction URL** See the reproduction in 43081j/postcss-lit#26 --- postcss recently introduced the concept of a "document". This allows custom syntaxes to be written for it which represent their arbitrary AST as the `document`, containing one or more `Root` nodes which are the actual CSS from said document. For example, CSS in JS solutions would result in a `Document` representing the JS file, and one or more `Root` representing the contained stylesheets. When combined with tailwind, this works like so: - postcss executes the custom syntax against the file, resolving to a postcss-compatible AST - postcss executes tailwind on this AST (`Document { nodes: [Root, Root] }` at this point) Tailwind then executes code like this to replace the at-rules: https://github.com/tailwindlabs/tailwindcss/blob/490c9dcb29bfed72855d701c40a7e04f69b5633b/src/lib/expandTailwindAtRules.js#L206-L209 This works because `layerNode.base.parent` is one of the child `Root` nodes. So by calling `before`, we're prepending child nodes to the `Root`, _not_ the `Document` (GOOD). However, we can then reach this: https://github.com/tailwindlabs/tailwindcss/blob/490c9dcb29bfed72855d701c40a7e04f69b5633b/src/lib/expandTailwindAtRules.js#L239-L241 Which, as you see, will append explicitly to `root`: the `Document` in this case. This will result in an AST like so: ```ts Document { nodes: [ Root, Root, Rule, // BAD NODE! ] } ``` When a custom syntax then attempts to stringify the AST back to the original non-css document, this misplaced `Rule` will be thrown on the end... **causing a syntax error in the output**. ### Solution? I don't know tailwind's source well enough to suggest a solution here. Possibly, if any `layerNodes.*` exists, use its parent as the root. If none exist, fall back to what it does now? Or is there maybe an existing way to explicitly mark where those rules should exist? wherever `layerNodes.variants` comes from. Can we simply put some at-rule like `@tailwindvariants`? Until this is fixed, custom postcss syntaxes can't really work with "variant rules".
``` /** * Use this directive to control where Tailwind injects the hover, focus, * responsive, dark mode, and other variants of each class. * * If omitted, Tailwind will append these classes to the very end of * your stylesheet by default. */ @tailwind variants; ``` @ma-g-ma maybe this is it! and i've just been blind. can you give it a go? add `@tailwind variants` to your source CSS if it is, tailwind people: feel free to close this. we will just have to remember to always define the variants at-rule. i'll also update our syntax's docs @43081j Yep, it works! Both variants are correctly placed. Though it seems that they appear with an invalid pseudo selector e.g. ``` .focus\:ring-blue-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity)) } ``` IDE error messsage: > Unknown pseudo selector 'ring-blue-500' Of course, this might be unrelated. awesome. for tailwind maintainers: maybe its still worth warning in these situations? if someone tries to use one of your classes without specifying the at-rule, especially if they have a `Document` node, its probably not their intention to dump it on the end. In those cases it would be useful to have a warning somehow. If they don't have a `Document`, no warning would be needed. @ma-g-ma i'll track it in the other issue we have open and try look into it soon 👍 > @43081j Yep, it works! Both variants are correctly placed. > > Though it seems that they appear with an invalid pseudo selector e.g. > > ``` > .focus\:ring-blue-500:focus { > --tw-ring-opacity: 1; > --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity)) > } > ``` > > IDE error messsage: > > > Unknown pseudo selector 'ring-blue-500' > > Of course, this might be unrelated. Just commenting to say that the syntax you mentioned above is correct, as you can check through the W3C CSS Validator. Are you still having that issue? That was a bug in the syntax FYI, backslashes not being escaped in the stringified output (it's in a string so one backslash would be nothing). It has been fixed. I don't think there's necessarily a bug here in tailwind after all. But I do think the behaviour could be improved so the user gets warned when trying to use classes without the associated directive (only if they have a Document in their AST, implying it's a custom syntax).
2022-02-01T20:06:03Z
3
tailwindlabs/tailwindcss
7,163
tailwindlabs__tailwindcss-7163
[ "7149" ]
10103d8bafdb401da417fd13b19dd426f612340f
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -3,6 +3,7 @@ import * as path from 'path' import postcss from 'postcss' import createUtilityPlugin from './util/createUtilityPlugin' import buildMediaQuery from './util/buildMediaQuery' +import escapeClassName from './util/escapeClassName' import parseAnimationValue from './util/parseAnimationValue' import flattenColorPalette from './util/flattenColorPalette' import withAlphaVariable, { withAlphaValue } from './util/withAlphaVariable' @@ -612,8 +613,8 @@ export let corePlugins = { }) }, - animation: ({ matchUtilities, theme, prefix }) => { - let prefixName = (name) => prefix(`.${name}`).slice(1) + animation: ({ matchUtilities, theme, config }) => { + let prefixName = (name) => `${config('prefix')}${escapeClassName(name)}` let keyframes = Object.fromEntries( Object.entries(theme('keyframes') ?? {}).map(([key, value]) => { return [key, { [`@keyframes ${prefixName(key)}`]: value }]
diff --git a/tests/animations.test.js b/tests/animations.test.js --- a/tests/animations.test.js +++ b/tests/animations.test.js @@ -181,3 +181,96 @@ test('multiple custom', () => { `) }) }) + +test('with dots in the name', () => { + let config = { + content: [ + { + raw: html` + <div class="animate-zoom-.5"></div> + <div class="animate-zoom-1.5"></div> + `, + }, + ], + theme: { + extend: { + keyframes: { + 'zoom-.5': { to: { transform: 'scale(0.5)' } }, + 'zoom-1.5': { to: { transform: 'scale(1.5)' } }, + }, + animation: { + 'zoom-.5': 'zoom-.5 2s', + 'zoom-1.5': 'zoom-1.5 2s', + }, + }, + }, + } + + return run('@tailwind utilities', config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + @keyframes zoom-\.5 { + to { + transform: scale(0.5); + } + } + .animate-zoom-\.5 { + animation: zoom-\.5 2s; + } + @keyframes zoom-1\.5 { + to { + transform: scale(1.5); + } + } + .animate-zoom-1\.5 { + animation: zoom-1\.5 2s; + } + `) + }) +}) + +test('with dots in the name and prefix', () => { + let config = { + prefix: 'tw-', + content: [ + { + raw: html` + <div class="tw-animate-zoom-.5"></div> + <div class="tw-animate-zoom-1.5"></div> + `, + }, + ], + theme: { + extend: { + keyframes: { + 'zoom-.5': { to: { transform: 'scale(0.5)' } }, + 'zoom-1.5': { to: { transform: 'scale(1.5)' } }, + }, + animation: { + 'zoom-.5': 'zoom-.5 2s', + 'zoom-1.5': 'zoom-1.5 2s', + }, + }, + }, + } + + return run('@tailwind utilities', config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + @keyframes tw-zoom-\.5 { + to { + transform: scale(0.5); + } + } + .tw-animate-zoom-\.5 { + animation: tw-zoom-\.5 2s; + } + @keyframes tw-zoom-1\.5 { + to { + transform: scale(1.5); + } + } + .tw-animate-zoom-1\.5 { + animation: tw-zoom-1\.5 2s; + } + `) + }) +})
Wrong keyframe keys when generationg CSS classes with JS <!-- Please provide all of the information requested below. We're a small team and without all of this information it's not possible for us to help and your bug report will be closed. --> **What version of Tailwind CSS are you using?** For example: v3.0.15 **What build tool (or framework if it abstracts the build tool) are you using?** postcss-cli 9.1.0, vite 2.7.13 **What version of Node.js are you using?** 16.13.2 **What browser are you using?** Firefox **What operating system are you using?** Ubuntu 20.04 **Reproduction URL** https://github.com/Mastercuber/tailwindcss-minimal-example **Describe your issue** In the config file `tailwind.config.js` I'm generating some animations with floating point numbers in the class name like [this](https://github.com/Mastercuber/tailwindcss-minimal-example/blob/a7c9450525434893077c03cb91754295f4cbea83/tailwind.config.js#L14). The generated animation classes looks good, but the `@keyframe` directives have a different value than the animation classes itself, though the exact same key is used for both. The used class in the App is `animate-zoom-2.5` to actually see it in the output and the generated css is [here](https://github.com/Mastercuber/tailwindcss-minimal-example/blob/a7c9450525434893077c03cb91754295f4cbea83/test.css#L427) Now I just use another key for the keyframe name.
Hey, @Mastercuber. What you're seeing there isn't the "wrong key" per se. Tailwind is mistakenly trying to prefix the "." in your animation value and keyframe name when it should instead be escaping them and then prefixing. I will send the Tailwind team a PR to address this.
2022-01-22T01:00:18Z
3
tailwindlabs/tailwindcss
6,519
tailwindlabs__tailwindcss-6519
[ "6436" ]
fb545bc94de9e8baf33990b71d87df0c269dce22
diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -42,7 +42,7 @@ function validatePath(config, path, defaultValue) { ? pathToString(path) : path.replace(/^['"]+/g, '').replace(/['"]+$/g, '') const pathSegments = Array.isArray(path) ? path : toPath(pathString) - const value = dlv(config.theme, pathString, defaultValue) + const value = dlv(config.theme, pathSegments, defaultValue) if (value === undefined) { let error = `'${pathString}' does not exist in your theme config.` diff --git a/src/util/toPath.js b/src/util/toPath.js --- a/src/util/toPath.js +++ b/src/util/toPath.js @@ -1,4 +1,26 @@ +/** + * Parse a path string into an array of path segments. + * + * Square bracket notation `a[b]` may be used to "escape" dots that would otherwise be interpreted as path separators. + * + * Example: + * a -> ['a] + * a.b.c -> ['a', 'b', 'c'] + * a[b].c -> ['a', 'b', 'c'] + * a[b.c].e.f -> ['a', 'b.c', 'e', 'f'] + * a[b][c][d] -> ['a', 'b', 'c', 'd'] + * + * @param {string|string[]} path + **/ export function toPath(path) { if (Array.isArray(path)) return path - return path.split(/[\.\]\[]+/g) + + let openBrackets = path.split('[').length - 1 + let closedBrackets = path.split(']').length - 1 + + if (openBrackets !== closedBrackets) { + throw new Error(`Path is invalid. Has unbalanced brackets: ${path}`) + } + + return path.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean) }
diff --git a/tests/evaluateTailwindFunctions.test.js b/tests/evaluateTailwindFunctions.test.js --- a/tests/evaluateTailwindFunctions.test.js +++ b/tests/evaluateTailwindFunctions.test.js @@ -31,6 +31,111 @@ test('it looks up values in the theme using dot notation', () => { }) }) +test('it looks up values in the theme using bracket notation', () => { + let input = css` + .banana { + color: theme('colors[yellow]'); + } + ` + + let output = css` + .banana { + color: #f7cc50; + } + ` + + return run(input, { + theme: { + colors: { + yellow: '#f7cc50', + }, + }, + }).then((result) => { + expect(result.css).toEqual(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('it looks up values in the theme using consecutive bracket notation', () => { + let input = css` + .banana { + color: theme('colors[yellow][100]'); + } + ` + + let output = css` + .banana { + color: #f7cc50; + } + ` + + return run(input, { + theme: { + colors: { + yellow: { + 100: '#f7cc50', + }, + }, + }, + }).then((result) => { + expect(result.css).toEqual(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('it looks up values in the theme using bracket notation that have dots in them', () => { + let input = css` + .banana { + padding-top: theme('spacing[1.5]'); + } + ` + + let output = css` + .banana { + padding-top: 0.375rem; + } + ` + + return run(input, { + theme: { + spacing: { + '1.5': '0.375rem', + }, + }, + }).then((result) => { + expect(result.css).toEqual(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('theme with mismatched brackets throws an error ', async () => { + let config = { + theme: { + spacing: { + '1.5': '0.375rem', + }, + }, + } + + let input = (path) => css` + .banana { + padding-top: theme('${path}'); + } + ` + + await expect(run(input('spacing[1.5]]'), config)).rejects.toThrowError( + `Path is invalid. Has unbalanced brackets: spacing[1.5]]` + ) + + await expect(run(input('spacing[[1.5]'), config)).rejects.toThrowError( + `Path is invalid. Has unbalanced brackets: spacing[[1.5]` + ) + + await expect(run(input('spacing[a['), config)).rejects.toThrowError( + `Path is invalid. Has unbalanced brackets: spacing[a[` + ) +}) + test('color can be a function', () => { let input = css` .backgroundColor { diff --git a/tests/to-path.test.js b/tests/to-path.test.js --- a/tests/to-path.test.js +++ b/tests/to-path.test.js @@ -7,11 +7,12 @@ it('should keep an array as an array', () => { }) it.each` - input | output - ${'a.b.c'} | ${['a', 'b', 'c']} - ${'a[0].b.c'} | ${['a', '0', 'b', 'c']} - ${'.a'} | ${['', 'a']} - ${'[].a'} | ${['', 'a']} + input | output + ${'a.b.c'} | ${['a', 'b', 'c']} + ${'a[0].b.c'} | ${['a', '0', 'b', 'c']} + ${'.a'} | ${['a']} + ${'[].a'} | ${['a']} + ${'a[1.5][b][c]'} | ${['a', '1.5', 'b', 'c']} `('should convert "$input" to "$output"', ({ input, output }) => { expect(toPath(input)).toEqual(output) })
v2 to v3 theme() keys bug? **What version of Tailwind CSS are you using?** v3.0.1 **What build tool (or framework if it abstracts the build tool) are you using?** vue cli v5.x webpack v5.x **What version of Node.js are you using?** v16.5.0 **What browser are you using?** N/A **What operating system are you using?** macOS **Describe your issue** Develop or compile. This message always appears ``` does not exist in your theme config. 'spacing' has the following keys: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '14', '16', '18', '20', '24', '28', '32', '36', '40', '44', '48', '52', '56', '60', '64', '72', '80', '96', 'px', '0.5', '1.5', '2.5', '3.5', '4.5', '7.5' 17 | } 18 | .dialog.iOS .title { > 19 | font-size: theme("spacing['4.5']"); | ^ 20 | color: theme("colors.black"); 21 | } ``` But the following keys message contains the index There is no such error message in v2 tailwind.config.js ``` module.exports = { theme: { spacing: { ["4.5"]: "1.125rem" }, } } ```
I think it's wrong to use array in object definition, try with this. ``` module.exports = { theme: { spacing: { "4.5": "1.125rem" }, } } ``` By the way why are you using space in font size? and if you want to not override default spacing values you need to extend the theme this way ``` theme: { extend: { ``` @jheng-jie was just here to create a ticket for the same problem. we experience this as well, and it is a blocker for migration. @minimit it is not an [array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#computed_property_names) so it won't make a difference. Hey! Can you please provide a reproduction? @adamwathan [here is one](https://github.com/ardaerzin/tailwind3-spacing) in the `Test.module.css` file if you enable the commented out lines, you'll start seeing the errors. this was working fine in tailwind v2. also the regular classnames still work as you can see in the index page @adamwathan Sorry my project so big But it can be easily reappear ```shell # vite yarn create vite test && cd test # tailwindcss yarn add -D tailwindcss postcss autoprefixer npx tailwindcss init -p ``` tailwind.config.js ```javascript module.exports = { content: [ "./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}", ], theme: { extend: { spacing: { ["4.5"]: "0.125rem", ["4d5"]: "0.125rem", } }, }, plugins: [], } ``` src/App.vue ```vue <template> <div class="test">Test</div> <!-- is working --> <div class="p-4.5">Test</div> </template> <style> @tailwind base; @tailwind components; @tailwind utilities; .test { /* working */ padding: theme("spacing.4d5"); /* has the following keys: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '14', '16', '20', '24', '28', '32', '36', '40', '44', '48', '52', '56', '60', '64', '72', '80', '96', 'px', '0.5', '1.5', '2.5', '3.5', '4.5', '4d5' */ padding: theme("spacing['4.5']"); /* 'spacing[4.5]' does not exist in your theme config. 'spacing.4' is not an object. */ padding: theme("spacing[4.5]"); } </style> ``` The problem may occur in the "dot" naming I don't think it's related to the dot naming, looks like the `[]` don't work anymore. Smallest repro possible: https://play.tailwindcss.com/SvPNpftcow?file=config Switching to `v2.2.19` makes it work, switching to `v3.0.1` doesn't. I can confirm this. It happend with height[1.5] or a custom transitionProperty
2021-12-14T22:26:30Z
3
tailwindlabs/tailwindcss
6,469
tailwindlabs__tailwindcss-6469
[ "6395" ]
4b2482ff3550ec7ca74561f8ae84d4d826cca762
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -248,6 +248,21 @@ function parseRules(rule, cache, options = {}) { return [cache.get(rule), options] } +const IS_VALID_PROPERTY_NAME = /^[a-z_-]/ + +function isValidPropName(name) { + return IS_VALID_PROPERTY_NAME.test(name) +} + +function isParsableCssValue(property, value) { + try { + postcss.parse(`a{${property}:${value}}`).toResult() + return true + } catch (err) { + return false + } +} + function extractArbitraryProperty(classCandidate, context) { let [, property, value] = classCandidate.match(/^\[([a-zA-Z0-9-_]+):(\S+)\]$/) ?? [] @@ -255,9 +270,17 @@ function extractArbitraryProperty(classCandidate, context) { return null } + if (!isValidPropName(property)) { + return null + } + + if (!isValidArbitraryValue(value)) { + return null + } + let normalized = normalize(value) - if (!isValidArbitraryValue(normalized)) { + if (!isParsableCssValue(property, normalized)) { return null }
diff --git a/tests/arbitrary-properties.test.js b/tests/arbitrary-properties.test.js --- a/tests/arbitrary-properties.test.js +++ b/tests/arbitrary-properties.test.js @@ -231,3 +231,45 @@ test('invalid class', () => { expect(result.css).toMatchFormattedCss(css``) }) }) + +test('invalid arbitrary property', () => { + let config = { + content: [ + { + raw: html`<div class="[autoplay:\${autoplay}]"></div>`, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css``) + }) +}) + +test('invalid arbitrary property 2', () => { + let config = { + content: [ + { + raw: html`[0:02]`, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css``) + }) +})
Abnormal css ouput when some string in the code is wrapped in square brackets **What version of Tailwind CSS are you using?** v3.0.1 **What build tool (or framework if it abstracts the build tool) are you using?** Next.js 12.0.4, postcss 8.4.4 **What version of Node.js are you using?** v14.18.1 **What browser are you using?** Chrome **What operating system are you using?** macOS **Reproduction URL** https://github.com/DrShpongle/tailwindcss-3-issue-demo **Describe your issue** In case we use some text wrapped with square brackets we get abnormal css output: **Example 1:** Just an object with string field: https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/components/problem-01.js#L4-L5 ![problem-01 js — with-tailwindcss-app 2021-12-11 at 1 36 31 PM](https://user-images.githubusercontent.com/1519448/145675038-5633e78e-79ad-493a-b3ab-8d0245fa0831.jpg) and related output: https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/dist/output.css#L579-L581 ![output css — with-tailwindcss-app 2021-12-11 at 1 38 58 PM](https://user-images.githubusercontent.com/1519448/145675095-66ae8a3c-3e50-49f7-9948-2f3fa8802b86.jpg) **Example 2:** Just regular dumb component: https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/components/problem-02.tsx#L10 ![problem-02 tsx — with-tailwindcss-app 2021-12-11 at 1 42 50 PM](https://user-images.githubusercontent.com/1519448/145675212-7f46ff3e-6877-474f-9f70-3848f2140dc5.jpg) and related output: https://github.com/DrShpongle/tailwindcss-3-issue-demo/blob/main/dist/output.css#L583-L585 ![output css — with-tailwindcss-app 2021-12-11 at 1 44 09 PM](https://user-images.githubusercontent.com/1519448/145675245-51b3dea5-f9ce-43b4-8a2c-ba6e230d1ec6.jpg)
This is probably because of [arbitrary properties](https://tailwindcss.com/docs/adding-custom-styles#arbitrary-properties). you can just add an unnecessary escape: ```ts const ProblemComponent = () => { return ( <button nCanPlay={(event: any) => { console.debug(`player ready: [autoplay\:${autoplay}]`); }} ></button> ); }; ``` you can also use a function like this: ```ts const addBrackets = (str: string) => `[${str}]`; const ProblemComponent = () => { return ( <button nCanPlay={(event: any) => { console.debug(`player ready: ${addBrackets(`autoplay:${autoplay}`)}]`); }} ></button> ); }; ```
2021-12-13T17:36:20Z
3
tailwindlabs/tailwindcss
5,470
tailwindlabs__tailwindcss-5470
[ "5458" ]
30badadd211594ccc83c686e3f4c1f06a7e107c9
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1014,7 +1014,11 @@ export let divideColor = ({ matchUtilities, theme, corePlugins }) => { { divide: (value) => { if (!corePlugins('divideOpacity')) { - return { ['& > :not([hidden]) ~ :not([hidden])']: { 'border-color': value } } + return { + ['& > :not([hidden]) ~ :not([hidden])']: { + 'border-color': toColorValue(value), + }, + } } return { @@ -1174,9 +1178,10 @@ export let borderStyle = ({ addUtilities }) => { export let borderColor = ({ addBase, matchUtilities, theme, corePlugins }) => { if (!corePlugins('borderOpacity')) { + let value = theme('borderColor.DEFAULT', 'currentColor') addBase({ '@defaults border-width': { - 'border-color': theme('borderColor.DEFAULT', 'currentColor'), + 'border-color': toColorValue(value), }, }) } else { @@ -1193,7 +1198,9 @@ export let borderColor = ({ addBase, matchUtilities, theme, corePlugins }) => { { border: (value) => { if (!corePlugins('borderOpacity')) { - return { 'border-color': value } + return { + 'border-color': toColorValue(value), + } } return withAlphaVariable({ @@ -1213,7 +1220,9 @@ export let borderColor = ({ addBase, matchUtilities, theme, corePlugins }) => { { 'border-t': (value) => { if (!corePlugins('borderOpacity')) { - return { 'border-top-color': value } + return { + 'border-top-color': toColorValue(value), + } } return withAlphaVariable({ @@ -1224,7 +1233,9 @@ export let borderColor = ({ addBase, matchUtilities, theme, corePlugins }) => { }, 'border-r': (value) => { if (!corePlugins('borderOpacity')) { - return { 'border-right-color': value } + return { + 'border-right-color': toColorValue(value), + } } return withAlphaVariable({ @@ -1235,7 +1246,9 @@ export let borderColor = ({ addBase, matchUtilities, theme, corePlugins }) => { }, 'border-b': (value) => { if (!corePlugins('borderOpacity')) { - return { 'border-bottom-color': value } + return { + 'border-bottom-color': toColorValue(value), + } } return withAlphaVariable({ @@ -1246,7 +1259,9 @@ export let borderColor = ({ addBase, matchUtilities, theme, corePlugins }) => { }, 'border-l': (value) => { if (!corePlugins('borderOpacity')) { - return { 'border-left-color': value } + return { + 'border-left-color': toColorValue(value), + } } return withAlphaVariable({ @@ -1272,7 +1287,9 @@ export let backgroundColor = ({ matchUtilities, theme, corePlugins }) => { { bg: (value) => { if (!corePlugins('backgroundOpacity')) { - return { 'background-color': value } + return { + 'background-color': toColorValue(value), + } } return withAlphaVariable({ @@ -1539,7 +1556,7 @@ export let textColor = ({ matchUtilities, theme, corePlugins }) => { { text: (value) => { if (!corePlugins('textOpacity')) { - return { color: value } + return { color: toColorValue(value) } } return withAlphaVariable({ @@ -1583,7 +1600,11 @@ export let placeholderColor = ({ matchUtilities, theme, corePlugins }) => { { placeholder: (value) => { if (!corePlugins('placeholderOpacity')) { - return { '&::placeholder': { color: value } } + return { + '&::placeholder': { + color: toColorValue(value), + }, + } } return {
diff --git a/tests/opacity.test.css b/tests/opacity.test.css deleted file mode 100644 --- a/tests/opacity.test.css +++ /dev/null @@ -1,15 +0,0 @@ -.divide-black > :not([hidden]) ~ :not([hidden]) { - border-color: #000; -} -.border-black { - border-color: #000; -} -.bg-black { - background-color: #000; -} -.text-black { - color: #000; -} -.placeholder-black::placeholder { - color: #000; -} diff --git a/tests/opacity.test.html b/tests/opacity.test.html deleted file mode 100644 --- a/tests/opacity.test.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <link rel="icon" href="/favicon.ico" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>Title</title> - <link rel="stylesheet" href="./tailwind.css" /> - </head> - <body> - <div class="divide-black"></div> - <div class="border-black"></div> - <div class="bg-black"></div> - <div class="text-black"></div> - <div class="placeholder-black"></div> - </body> -</html> diff --git a/tests/opacity.test.js b/tests/opacity.test.js --- a/tests/opacity.test.js +++ b/tests/opacity.test.js @@ -1,12 +1,19 @@ -import fs from 'fs' -import path from 'path' - -import { run } from './util/run' +import { run, html, css } from './util/run' test('opacity', () => { let config = { darkMode: 'class', - content: [path.resolve(__dirname, './opacity.test.html')], + content: [ + { + raw: html` + <div class="divide-black"></div> + <div class="border-black"></div> + <div class="bg-black"></div> + <div class="text-black"></div> + <div class="placeholder-black"></div> + `, + }, + ], corePlugins: { backgroundOpacity: false, borderOpacity: false, @@ -17,9 +24,74 @@ test('opacity', () => { } return run('@tailwind utilities', config).then((result) => { - let expectedPath = path.resolve(__dirname, './opacity.test.css') - let expected = fs.readFileSync(expectedPath, 'utf8') + expect(result.css).toMatchCss(css` + .divide-black > :not([hidden]) ~ :not([hidden]) { + border-color: #000; + } + .border-black { + border-color: #000; + } + .bg-black { + background-color: #000; + } + .text-black { + color: #000; + } + .placeholder-black::placeholder { + color: #000; + } + `) + }) +}) + +test('colors defined as functions work when opacity plugins are disabled', () => { + let config = { + darkMode: 'class', + content: [ + { + raw: html` + <div class="divide-primary"></div> + <div class="border-primary"></div> + <div class="bg-primary"></div> + <div class="text-primary"></div> + <div class="placeholder-primary"></div> + `, + }, + ], + theme: { + colors: { + primary: ({ opacityValue }) => + opacityValue === undefined + ? 'rgb(var(--color-primary))' + : `rgb(var(--color-primary) / ${opacityValue})`, + }, + }, + corePlugins: { + backgroundOpacity: false, + borderOpacity: false, + divideOpacity: false, + placeholderOpacity: false, + textOpacity: false, + }, + } - expect(result.css).toMatchCss(expected) + return run('@tailwind utilities', config).then((result) => { + expect(result.css).toMatchCss(css` + .divide-primary > :not([hidden]) ~ :not([hidden]) { + border-color: rgb(var(--color-primary)); + } + .border-primary { + border-color: rgb(var(--color-primary)); + } + .bg-primary { + background-color: rgb(var(--color-primary)); + } + .text-primary { + color: rgb(var(--color-primary)); + } + .placeholder-primary::placeholder { + color: rgb(var(--color-primary)); + } + `) }) })
Disabling an opacity plugin breaks support for custom property colors ### What version of Tailwind CSS are you using? 2.2.7 ### What build tool (or framework if it abstracts the build tool) are you using? Tailwind Play ### What version of Node.js are you using? n/a ### What browser are you using? n/a ### What operating system are you using? n/a ### Reproduction repository https://play.tailwindcss.com/YVjDQE13bj ### Describe your issue Colors defined by a function as described in https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo break for plugins where the associated opacity plugin is disabled. This is caused by the plugins not calling `withAlphaVariable()` when opacity plugins are disabled: https://github.com/tailwindlabs/tailwindcss/blob/691ed02f6352da17048dd14f742f7c82919e1455/src/plugins/backgroundColor.js#L11. Since the function This behaviour makes it impossible to selectively disable opacity plugins when using colors defined via functions. Since the example repo shows how the function is expected to support the case where neither `opacityVariable` nor `opacityValue` are provided, I would expect it to work.
A workaround is to provide an empty theme instead of disabling the opacity plugin, for example `backgroundOpacity: {}`.
2021-09-10T13:28:31Z
2.2
tailwindlabs/tailwindcss
5,245
tailwindlabs__tailwindcss-5245
[ "5177" ]
d13b0e1085f2e526b8c5b49371b9e1b11d29b472
diff --git a/src/plugins/objectPosition.js b/src/plugins/objectPosition.js --- a/src/plugins/objectPosition.js +++ b/src/plugins/objectPosition.js @@ -1,5 +1,8 @@ import createUtilityPlugin from '../util/createUtilityPlugin' +import { asList } from '../util/pluginUtils' export default function () { - return createUtilityPlugin('objectPosition', [['object', ['object-position']]]) + return createUtilityPlugin('objectPosition', [['object', ['object-position']]], { + resolveArbitraryValue: asList, + }) }
diff --git a/tests/jit/arbitrary-values.test.css b/tests/jit/arbitrary-values.test.css --- a/tests/jit/arbitrary-values.test.css +++ b/tests/jit/arbitrary-values.test.css @@ -260,6 +260,12 @@ .stroke-\[\#da5b66\] { stroke: #da5b66; } +.object-\[50\%\2c 50\%\] { + object-position: 50% 50%; +} +.object-\[top\2c right\] { + object-position: top right; +} .object-\[var\(--position\)\] { object-position: var(--position); } diff --git a/tests/jit/arbitrary-values.test.html b/tests/jit/arbitrary-values.test.html --- a/tests/jit/arbitrary-values.test.html +++ b/tests/jit/arbitrary-values.test.html @@ -97,6 +97,8 @@ <div class="from-[var(--color)] via-[var(--color)] to-[var(--color)]"></div> <div class="fill-[#da5b66]"></div> <div class="fill-[var(--color)]"></div> + <div class="object-[50%,50%]"></div> + <div class="object-[top,right]"></div> <div class="object-[var(--position)]"></div> <div class="stroke-[#da5b66]"></div> <div class="leading-[var(--leading)]"></div>
Object Position in JIT mode ### What version of Tailwind CSS are you using? 2.2.4 ### What build tool (or framework if it abstracts the build tool) are you using? Vite (with SvelteKit) ### What version of Node.js are you using? v14.17.3 ### What browser are you using? Safari, Firefox ### What operating system are you using? macOS Big Sur ### Reproduction repository N/A ### Describe your issue Using dynamic values on Object Position (top, bottom etc.) doesn't work as expected. I want to do this: `object-top-[30%]` Seems to be a bug: `object-[30%]` works but `object-[0,30%]` should compile to `object-position: 0 30%` but right now it compiles to `object-position: 0,30%`.
2021-08-18T09:56:11Z
2.2
tailwindlabs/tailwindcss
4,852
tailwindlabs__tailwindcss-4852
[ "4849" ]
b417e336387bfbc005294c57fd780d893ff87639
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1,14 +1,23 @@ import * as plugins from './plugins/index.js' import configurePlugins from './util/configurePlugins' -function move(items, item, before) { - if (items.indexOf(item) === -1) { +function move(items, item, befores) { + let lowestBefore = -1 + + for (let before of befores) { + let index = items.indexOf(before) + if (index >= 0 && (index < lowestBefore || lowestBefore === -1)) { + lowestBefore = index + } + } + + if (items.indexOf(item) === -1 || lowestBefore === -1) { return items } items = [...items] let fromIndex = items.indexOf(item) - let toIndex = items.indexOf(before) + let toIndex = lowestBefore items.splice(fromIndex, 1) items.splice(toIndex, 0, item) return items @@ -18,9 +27,29 @@ export default function ({ corePlugins: corePluginConfig }) { let pluginOrder = Object.keys(plugins) pluginOrder = configurePlugins(corePluginConfig, pluginOrder) - pluginOrder = move(pluginOrder, 'transform', 'transformOrigin') - pluginOrder = move(pluginOrder, 'filter', 'blur') - pluginOrder = move(pluginOrder, 'backdropFilter', 'backdropBlur') + pluginOrder = move(pluginOrder, 'transform', ['translate', 'rotate', 'skew', 'scale']) + pluginOrder = move(pluginOrder, 'filter', [ + 'blur', + 'brightness', + 'contrast', + 'dropShadow', + 'grayscale', + 'hueRotate', + 'invert', + 'saturate', + 'sepia', + ]) + pluginOrder = move(pluginOrder, 'backdropFilter', [ + 'backdropBlur', + 'backdropBrightness', + 'backdropContrast', + 'backdropGrayscale', + 'backdropHueRotate', + 'backdropInvert', + 'backdropOpacity', + 'backdropSaturate', + 'backdropSepia', + ]) return pluginOrder.map((pluginName) => { return plugins[pluginName]()
diff --git a/tests/fixtures/tailwind-output-flagged.css b/tests/fixtures/tailwind-output-flagged.css --- a/tests/fixtures/tailwind-output-flagged.css +++ b/tests/fixtures/tailwind-output-flagged.css @@ -6941,32 +6941,6 @@ video { border-collapse: separate; } -.transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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 { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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; -} - .origin-center { transform-origin: center; } @@ -7003,6 +6977,32 @@ video { transform-origin: top left; } +.transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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 { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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; +} + .translate-x-0 { --tw-translate-x: 0px; } @@ -36207,32 +36207,6 @@ video { border-collapse: separate; } - .sm\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .sm\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .sm\:transform-none { - transform: none; - } - .sm\:origin-center { transform-origin: center; } @@ -36269,6 +36243,32 @@ video { transform-origin: top left; } + .sm\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .sm\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .sm\:transform-none { + transform: none; + } + .sm\:translate-x-0 { --tw-translate-x: 0px; } @@ -65370,32 +65370,6 @@ video { border-collapse: separate; } - .md\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .md\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .md\:transform-none { - transform: none; - } - .md\:origin-center { transform-origin: center; } @@ -65432,6 +65406,32 @@ video { transform-origin: top left; } + .md\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .md\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .md\:transform-none { + transform: none; + } + .md\:translate-x-0 { --tw-translate-x: 0px; } @@ -94533,32 +94533,6 @@ video { border-collapse: separate; } - .lg\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .lg\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .lg\:transform-none { - transform: none; - } - .lg\:origin-center { transform-origin: center; } @@ -94595,6 +94569,32 @@ video { transform-origin: top left; } + .lg\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .lg\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .lg\:transform-none { + transform: none; + } + .lg\:translate-x-0 { --tw-translate-x: 0px; } @@ -123696,32 +123696,6 @@ video { border-collapse: separate; } - .xl\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .xl\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .xl\:transform-none { - transform: none; - } - .xl\:origin-center { transform-origin: center; } @@ -123758,6 +123732,32 @@ video { transform-origin: top left; } + .xl\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .xl\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .xl\:transform-none { + transform: none; + } + .xl\:translate-x-0 { --tw-translate-x: 0px; } @@ -152859,32 +152859,6 @@ video { border-collapse: separate; } - .\32xl\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .\32xl\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .\32xl\:transform-none { - transform: none; - } - .\32xl\:origin-center { transform-origin: center; } @@ -152921,6 +152895,32 @@ video { transform-origin: top left; } + .\32xl\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .\32xl\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .\32xl\:transform-none { + transform: none; + } + .\32xl\:translate-x-0 { --tw-translate-x: 0px; } diff --git a/tests/fixtures/tailwind-output-important.css b/tests/fixtures/tailwind-output-important.css --- a/tests/fixtures/tailwind-output-important.css +++ b/tests/fixtures/tailwind-output-important.css @@ -6941,32 +6941,6 @@ video { border-collapse: separate !important; } -.transform { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - transform: translateX(var(--tw-translate-x)) translateY(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-gpu { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - 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)) !important; -} - -.transform-none { - transform: none !important; -} - .origin-center { transform-origin: center !important; } @@ -7003,6 +6977,32 @@ video { transform-origin: top left !important; } +.transform { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + transform: translateX(var(--tw-translate-x)) translateY(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-gpu { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + 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)) !important; +} + +.transform-none { + transform: none !important; +} + .translate-x-0 { --tw-translate-x: 0px !important; } @@ -36207,32 +36207,6 @@ video { border-collapse: separate !important; } - .sm\:transform { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - transform: translateX(var(--tw-translate-x)) translateY(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; - } - - .sm\:transform-gpu { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - 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)) !important; - } - - .sm\:transform-none { - transform: none !important; - } - .sm\:origin-center { transform-origin: center !important; } @@ -36269,6 +36243,32 @@ video { transform-origin: top left !important; } + .sm\:transform { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + transform: translateX(var(--tw-translate-x)) translateY(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; + } + + .sm\:transform-gpu { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + 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)) !important; + } + + .sm\:transform-none { + transform: none !important; + } + .sm\:translate-x-0 { --tw-translate-x: 0px !important; } @@ -65370,32 +65370,6 @@ video { border-collapse: separate !important; } - .md\:transform { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - transform: translateX(var(--tw-translate-x)) translateY(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; - } - - .md\:transform-gpu { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - 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)) !important; - } - - .md\:transform-none { - transform: none !important; - } - .md\:origin-center { transform-origin: center !important; } @@ -65432,6 +65406,32 @@ video { transform-origin: top left !important; } + .md\:transform { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + transform: translateX(var(--tw-translate-x)) translateY(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; + } + + .md\:transform-gpu { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + 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)) !important; + } + + .md\:transform-none { + transform: none !important; + } + .md\:translate-x-0 { --tw-translate-x: 0px !important; } @@ -94533,32 +94533,6 @@ video { border-collapse: separate !important; } - .lg\:transform { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - transform: translateX(var(--tw-translate-x)) translateY(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; - } - - .lg\:transform-gpu { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - 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)) !important; - } - - .lg\:transform-none { - transform: none !important; - } - .lg\:origin-center { transform-origin: center !important; } @@ -94595,6 +94569,32 @@ video { transform-origin: top left !important; } + .lg\:transform { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + transform: translateX(var(--tw-translate-x)) translateY(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; + } + + .lg\:transform-gpu { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + 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)) !important; + } + + .lg\:transform-none { + transform: none !important; + } + .lg\:translate-x-0 { --tw-translate-x: 0px !important; } @@ -123696,32 +123696,6 @@ video { border-collapse: separate !important; } - .xl\:transform { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - transform: translateX(var(--tw-translate-x)) translateY(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; - } - - .xl\:transform-gpu { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - 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)) !important; - } - - .xl\:transform-none { - transform: none !important; - } - .xl\:origin-center { transform-origin: center !important; } @@ -123758,6 +123732,32 @@ video { transform-origin: top left !important; } + .xl\:transform { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + transform: translateX(var(--tw-translate-x)) translateY(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; + } + + .xl\:transform-gpu { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + 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)) !important; + } + + .xl\:transform-none { + transform: none !important; + } + .xl\:translate-x-0 { --tw-translate-x: 0px !important; } @@ -152859,32 +152859,6 @@ video { border-collapse: separate !important; } - .\32xl\:transform { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - transform: translateX(var(--tw-translate-x)) translateY(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; - } - - .\32xl\:transform-gpu { - --tw-translate-x: 0 !important; - --tw-translate-y: 0 !important; - --tw-rotate: 0 !important; - --tw-skew-x: 0 !important; - --tw-skew-y: 0 !important; - --tw-scale-x: 1 !important; - --tw-scale-y: 1 !important; - 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)) !important; - } - - .\32xl\:transform-none { - transform: none !important; - } - .\32xl\:origin-center { transform-origin: center !important; } @@ -152921,6 +152895,32 @@ video { transform-origin: top left !important; } + .\32xl\:transform { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + transform: translateX(var(--tw-translate-x)) translateY(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; + } + + .\32xl\:transform-gpu { + --tw-translate-x: 0 !important; + --tw-translate-y: 0 !important; + --tw-rotate: 0 !important; + --tw-skew-x: 0 !important; + --tw-skew-y: 0 !important; + --tw-scale-x: 1 !important; + --tw-scale-y: 1 !important; + 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)) !important; + } + + .\32xl\:transform-none { + transform: none !important; + } + .\32xl\:translate-x-0 { --tw-translate-x: 0px !important; } diff --git a/tests/fixtures/tailwind-output-no-color-opacity.css b/tests/fixtures/tailwind-output-no-color-opacity.css --- a/tests/fixtures/tailwind-output-no-color-opacity.css +++ b/tests/fixtures/tailwind-output-no-color-opacity.css @@ -6940,32 +6940,6 @@ video { border-collapse: separate; } -.transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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 { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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; -} - .origin-center { transform-origin: center; } @@ -7002,6 +6976,32 @@ video { transform-origin: top left; } +.transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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 { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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; +} + .translate-x-0 { --tw-translate-x: 0px; } @@ -33650,32 +33650,6 @@ video { border-collapse: separate; } - .sm\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .sm\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .sm\:transform-none { - transform: none; - } - .sm\:origin-center { transform-origin: center; } @@ -33712,6 +33686,32 @@ video { transform-origin: top left; } + .sm\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .sm\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .sm\:transform-none { + transform: none; + } + .sm\:translate-x-0 { --tw-translate-x: 0px; } @@ -60257,32 +60257,6 @@ video { border-collapse: separate; } - .md\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .md\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .md\:transform-none { - transform: none; - } - .md\:origin-center { transform-origin: center; } @@ -60319,6 +60293,32 @@ video { transform-origin: top left; } + .md\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .md\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .md\:transform-none { + transform: none; + } + .md\:translate-x-0 { --tw-translate-x: 0px; } @@ -86864,32 +86864,6 @@ video { border-collapse: separate; } - .lg\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .lg\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .lg\:transform-none { - transform: none; - } - .lg\:origin-center { transform-origin: center; } @@ -86926,6 +86900,32 @@ video { transform-origin: top left; } + .lg\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .lg\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .lg\:transform-none { + transform: none; + } + .lg\:translate-x-0 { --tw-translate-x: 0px; } @@ -113471,32 +113471,6 @@ video { border-collapse: separate; } - .xl\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .xl\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .xl\:transform-none { - transform: none; - } - .xl\:origin-center { transform-origin: center; } @@ -113533,6 +113507,32 @@ video { transform-origin: top left; } + .xl\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .xl\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .xl\:transform-none { + transform: none; + } + .xl\:translate-x-0 { --tw-translate-x: 0px; } @@ -140078,32 +140078,6 @@ video { border-collapse: separate; } - .\32xl\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .\32xl\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .\32xl\:transform-none { - transform: none; - } - .\32xl\:origin-center { transform-origin: center; } @@ -140140,6 +140114,32 @@ video { transform-origin: top left; } + .\32xl\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .\32xl\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .\32xl\:transform-none { + transform: none; + } + .\32xl\:translate-x-0 { --tw-translate-x: 0px; } diff --git a/tests/fixtures/tailwind-output.css b/tests/fixtures/tailwind-output.css --- a/tests/fixtures/tailwind-output.css +++ b/tests/fixtures/tailwind-output.css @@ -6941,32 +6941,6 @@ video { border-collapse: separate; } -.transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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 { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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; -} - .origin-center { transform-origin: center; } @@ -7003,6 +6977,32 @@ video { transform-origin: top left; } +.transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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 { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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; +} + .translate-x-0 { --tw-translate-x: 0px; } @@ -36207,32 +36207,6 @@ video { border-collapse: separate; } - .sm\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .sm\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .sm\:transform-none { - transform: none; - } - .sm\:origin-center { transform-origin: center; } @@ -36269,6 +36243,32 @@ video { transform-origin: top left; } + .sm\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .sm\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .sm\:transform-none { + transform: none; + } + .sm\:translate-x-0 { --tw-translate-x: 0px; } @@ -65370,32 +65370,6 @@ video { border-collapse: separate; } - .md\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .md\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .md\:transform-none { - transform: none; - } - .md\:origin-center { transform-origin: center; } @@ -65432,6 +65406,32 @@ video { transform-origin: top left; } + .md\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .md\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .md\:transform-none { + transform: none; + } + .md\:translate-x-0 { --tw-translate-x: 0px; } @@ -94533,32 +94533,6 @@ video { border-collapse: separate; } - .lg\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .lg\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .lg\:transform-none { - transform: none; - } - .lg\:origin-center { transform-origin: center; } @@ -94595,6 +94569,32 @@ video { transform-origin: top left; } + .lg\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .lg\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .lg\:transform-none { + transform: none; + } + .lg\:translate-x-0 { --tw-translate-x: 0px; } @@ -123696,32 +123696,6 @@ video { border-collapse: separate; } - .xl\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .xl\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .xl\:transform-none { - transform: none; - } - .xl\:origin-center { transform-origin: center; } @@ -123758,6 +123732,32 @@ video { transform-origin: top left; } + .xl\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .xl\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .xl\:transform-none { + transform: none; + } + .xl\:translate-x-0 { --tw-translate-x: 0px; } @@ -152859,32 +152859,6 @@ video { border-collapse: separate; } - .\32xl\:transform { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translateX(var(--tw-translate-x)) translateY(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)); - } - - .\32xl\:transform-gpu { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - 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)); - } - - .\32xl\:transform-none { - transform: none; - } - .\32xl\:origin-center { transform-origin: center; } @@ -152921,6 +152895,32 @@ video { transform-origin: top left; } + .\32xl\:transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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)); + } + + .\32xl\:transform-gpu { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + } + + .\32xl\:transform-none { + transform: none; + } + .\32xl\:translate-x-0 { --tw-translate-x: 0px; }
Wrong rules order for filter utility with only one filter enabled ### What version of Tailwind CSS are you using? v2.2.4 ### What build tool (or framework if it abstracts the build tool) are you using? webpack 4.46.0 ### What version of Node.js are you using? v14.1.0 ### What browser are you using? Chrome ### What operating system are you using? macOS Mojave ### Reproduction repository none ### Describe your issue In an attempt to ship only plugins I need, I disabled every filter but one in my config file, so I set every filter to `false` in `corePlugins` section, except for `filter` and `invert` (for example). The issue is the `.filter {}` rule is printed AFTER the one for `.invert {}`. It's always be as long as you enabled only one filter at a time. As soon as you enabled at least twice, the order is fine, the `.filter {}` rule is printed first. And it's a problem because the `.filter {}` rule reset all CSS variables for filters…
2021-07-01T09:51:32Z
2.2
tailwindlabs/tailwindcss
4,471
tailwindlabs__tailwindcss-4471
[ "4400" ]
89b9e3406f32dcc35da889a57ac852f3a3be88f2
diff --git a/src/jit/index.js b/src/jit/index.js --- a/src/jit/index.js +++ b/src/jit/index.js @@ -1,16 +1,8 @@ -import postcss from 'postcss' - -import evaluateTailwindFunctions from '../lib/evaluateTailwindFunctions' -import substituteScreenAtRules from '../lib/substituteScreenAtRules' - import normalizeTailwindDirectives from './lib/normalizeTailwindDirectives' -import setupContext from './lib/setupContext' -import removeLayerAtRules from './lib/removeLayerAtRules' -import expandTailwindAtRules from './lib/expandTailwindAtRules' -import expandApplyAtRules from './lib/expandApplyAtRules' -import collapseAdjacentRules from './lib/collapseAdjacentRules' - +import setupTrackingContext from './lib/setupTrackingContext' +import setupWatchingContext from './lib/setupWatchingContext' import { env } from './lib/sharedState' +import processTailwindFeatures from './processTailwindFeatures' export default function (configOrPath = {}) { return [ @@ -32,22 +24,11 @@ export default function (configOrPath = {}) { let tailwindDirectives = normalizeTailwindDirectives(root) - let context = setupContext(configOrPath, tailwindDirectives)(result, root) - - if (!env.TAILWIND_DISABLE_TOUCH) { - if (context.configPath !== null) { - registerDependency(context.configPath) - } - } + let context = env.TAILWIND_DISABLE_TOUCH + ? setupTrackingContext(configOrPath, tailwindDirectives, registerDependency)(result, root) + : setupWatchingContext(configOrPath, tailwindDirectives, registerDependency)(result, root) - return postcss([ - removeLayerAtRules(context, tailwindDirectives), - expandTailwindAtRules(context, registerDependency, tailwindDirectives), - expandApplyAtRules(context), - evaluateTailwindFunctions(context.tailwindConfig), - substituteScreenAtRules(context.tailwindConfig), - collapseAdjacentRules(context), - ]).process(root, { from: undefined }) + processTailwindFeatures(context)(root, result) }, env.DEBUG && function (root) { diff --git a/src/jit/lib/expandTailwindAtRules.js b/src/jit/lib/expandTailwindAtRules.js --- a/src/jit/lib/expandTailwindAtRules.js +++ b/src/jit/lib/expandTailwindAtRules.js @@ -1,7 +1,3 @@ -import fs from 'fs' -import path from 'path' -import fastGlob from 'fast-glob' -import parseGlob from 'parse-glob' import * as sharedState from './sharedState' import { generateRules } from './generateRules' import bigSign from '../../util/bigSign' @@ -13,38 +9,63 @@ let contentMatchCache = sharedState.contentMatchCache const BROAD_MATCH_GLOBAL_REGEXP = /[^<>"'`\s]*[^<>"'`\s:]/g const INNER_MATCH_GLOBAL_REGEXP = /[^<>"'`\s.(){}[\]#=%]*[^<>"'`\s.(){}[\]#=%:]/g -function getDefaultExtractor(fileExtension) { - return function (content) { - if (fileExtension === 'svelte') { - content = content.replace(/(?:^|\s)class:/g, ' ') - } +const builtInExtractors = { + DEFAULT: (content) => { let broadMatches = content.match(BROAD_MATCH_GLOBAL_REGEXP) || [] let innerMatches = content.match(INNER_MATCH_GLOBAL_REGEXP) || [] return [...broadMatches, ...innerMatches] - } + }, +} + +const builtInTransformers = { + DEFAULT: (content) => content, + svelte: (content) => content.replace(/(?:^|\s)class:/g, ' '), } function getExtractor(tailwindConfig, fileExtension) { - const purgeOptions = tailwindConfig && tailwindConfig.purge && tailwindConfig.purge.options + let extractors = (tailwindConfig && tailwindConfig.purge && tailwindConfig.purge.extract) || {} + const purgeOptions = + (tailwindConfig && tailwindConfig.purge && tailwindConfig.purge.options) || {} - if (!fileExtension) { - return (purgeOptions && purgeOptions.defaultExtractor) || getDefaultExtractor() + if (typeof extractors === 'function') { + extractors = { + DEFAULT: extractors, + } } - - if (!purgeOptions) { - return getDefaultExtractor(fileExtension) + if (purgeOptions.defaultExtractor) { + extractors.DEFAULT = purgeOptions.defaultExtractor + } + for (let { extensions, extractor } of purgeOptions.extractors || []) { + for (let extension of extensions) { + extractors[extension] = extractor + } } - const fileSpecificExtractor = (purgeOptions.extractors || []).find((extractor) => - extractor.extensions.includes(fileExtension) + return ( + extractors[fileExtension] || + extractors.DEFAULT || + builtInExtractors[fileExtension] || + builtInExtractors.DEFAULT ) +} + +function getTransformer(tailwindConfig, fileExtension) { + let transformers = + (tailwindConfig && tailwindConfig.purge && tailwindConfig.purge.transform) || {} - if (fileSpecificExtractor) { - return fileSpecificExtractor.extractor + if (typeof transformers === 'function') { + transformers = { + DEFAULT: transformers, + } } - return purgeOptions.defaultExtractor || getDefaultExtractor(fileExtension) + return ( + transformers[fileExtension] || + transformers.DEFAULT || + builtInTransformers[fileExtension] || + builtInTransformers.DEFAULT + ) } // Scans template contents for possible classes. This is a hot path on initial build but @@ -111,12 +132,8 @@ function buildStylesheet(rules, context) { return returnValue } -export default function expandTailwindAtRules(context, registerDependency, tailwindDirectives) { +export default function expandTailwindAtRules(context) { return (root) => { - if (tailwindDirectives.size === 0) { - return root - } - let layerNodes = { base: null, components: null, @@ -129,76 +146,13 @@ export default function expandTailwindAtRules(context, registerDependency, tailw // file as a dependency since the output of this CSS does not depend on // the source of any templates. Think Vue <style> blocks for example. root.walkAtRules('tailwind', (rule) => { - if (rule.params === 'base') { - layerNodes.base = rule - } - - if (rule.params === 'components') { - layerNodes.components = rule - } - - if (rule.params === 'utilities') { - layerNodes.utilities = rule - } - - if (rule.params === 'variants') { - layerNodes.variants = rule + if (Object.keys(layerNodes).includes(rule.params)) { + layerNodes[rule.params] = rule } }) - // --- - - if (sharedState.env.TAILWIND_DISABLE_TOUCH) { - for (let maybeGlob of context.candidateFiles) { - let { - is: { glob: isGlob }, - base, - } = parseGlob(maybeGlob) - - if (isGlob) { - // rollup-plugin-postcss does not support dir-dependency messages - // but directories can be watched in the same way as files - registerDependency( - path.resolve(base), - process.env.ROLLUP_WATCH === 'true' ? 'dependency' : 'dir-dependency' - ) - } else { - registerDependency(path.resolve(maybeGlob)) - } - } - - env.DEBUG && console.time('Finding changed files') - let files = fastGlob.sync(context.candidateFiles) - for (let file of files) { - let prevModified = context.fileModifiedMap.has(file) - ? context.fileModifiedMap.get(file) - : -Infinity - let modified = fs.statSync(file).mtimeMs - - if (!context.scannedContent || modified > prevModified) { - context.changedFiles.add(file) - context.fileModifiedMap.set(file, modified) - } - } - context.scannedContent = true - env.DEBUG && console.timeEnd('Finding changed files') - } else { - // Register our temp file as a dependency — we write to this file - // to trigger rebuilds. - if (context.touchFile) { - registerDependency(context.touchFile) - } - - // If we're not set up and watching files ourselves, we need to do - // the work of grabbing all of the template files for candidate - // detection. - if (!context.scannedContent) { - let files = fastGlob.sync(context.candidateFiles) - for (let file of files) { - context.changedFiles.add(file) - } - context.scannedContent = true - } + if (Object.values(layerNodes).every((n) => n === null)) { + return root } // --- @@ -208,16 +162,11 @@ export default function expandTailwindAtRules(context, registerDependency, tailw let seen = new Set() env.DEBUG && console.time('Reading changed files') - for (let file of context.changedFiles) { - let content = fs.readFileSync(file, 'utf8') - let extractor = getExtractor(context.tailwindConfig, path.extname(file).slice(1)) - getClassCandidates(content, extractor, contentMatchCache, candidates, seen) - } - env.DEBUG && console.timeEnd('Reading changed files') - for (let { content, extension } of context.rawContent) { + for (let { content, extension } of context.changedContent) { + let transformer = getTransformer(context.tailwindConfig, extension) let extractor = getExtractor(context.tailwindConfig, extension) - getClassCandidates(content, extractor, contentMatchCache, candidates, seen) + getClassCandidates(transformer(content), extractor, contentMatchCache, candidates, seen) } // --- @@ -276,13 +225,12 @@ export default function expandTailwindAtRules(context, registerDependency, tailw // --- if (env.DEBUG) { - console.log('Changed files: ', context.changedFiles.size) console.log('Potential classes: ', candidates.size) console.log('Active contexts: ', sharedState.contextSourcesMap.size) console.log('Content match entries', contentMatchCache.size) } // Clear the cache for the changed files - context.changedFiles.clear() + context.changedContent = [] } } diff --git a/src/jit/lib/normalizeTailwindDirectives.js b/src/jit/lib/normalizeTailwindDirectives.js --- a/src/jit/lib/normalizeTailwindDirectives.js +++ b/src/jit/lib/normalizeTailwindDirectives.js @@ -1,39 +1,70 @@ export default function normalizeTailwindDirectives(root) { - root.walkAtRules('import', (atRule) => { - if (atRule.params === '"tailwindcss/base"' || atRule.params === "'tailwindcss/base'") { - atRule.name = 'tailwind' - atRule.params = 'base' - } else if ( - atRule.params === '"tailwindcss/components"' || - atRule.params === "'tailwindcss/components'" - ) { - atRule.name = 'tailwind' - atRule.params = 'components' - } else if ( - atRule.params === '"tailwindcss/utilities"' || - atRule.params === "'tailwindcss/utilities'" - ) { - atRule.name = 'tailwind' - atRule.params = 'utilities' - } else if ( - atRule.params === '"tailwindcss/screens"' || - atRule.params === "'tailwindcss/screens'" || - atRule.params === '"tailwindcss/variants"' || - atRule.params === "'tailwindcss/variants'" - ) { - atRule.name = 'tailwind' - atRule.params = 'variants' + let tailwindDirectives = new Set() + let layerDirectives = new Set() + + root.walkAtRules((atRule) => { + if (atRule.name === 'import') { + if (atRule.params === '"tailwindcss/base"' || atRule.params === "'tailwindcss/base'") { + atRule.name = 'tailwind' + atRule.params = 'base' + } else if ( + atRule.params === '"tailwindcss/components"' || + atRule.params === "'tailwindcss/components'" + ) { + atRule.name = 'tailwind' + atRule.params = 'components' + } else if ( + atRule.params === '"tailwindcss/utilities"' || + atRule.params === "'tailwindcss/utilities'" + ) { + atRule.name = 'tailwind' + atRule.params = 'utilities' + } else if ( + atRule.params === '"tailwindcss/screens"' || + atRule.params === "'tailwindcss/screens'" || + atRule.params === '"tailwindcss/variants"' || + atRule.params === "'tailwindcss/variants'" + ) { + atRule.name = 'tailwind' + atRule.params = 'variants' + } } - }) - let tailwindDirectives = new Set() + if (atRule.name === 'tailwind') { + if (atRule.params === 'screens') { + atRule.params = 'variants' + } + tailwindDirectives.add(atRule.params) + } - root.walkAtRules('tailwind', (rule) => { - if (rule.params === 'screens') { - rule.params = 'variants' + if (['layer', 'responsive', 'variants'].includes(atRule.name)) { + layerDirectives.add(atRule) } - tailwindDirectives.add(rule.params) }) + if ( + !tailwindDirectives.has('base') || + !tailwindDirectives.has('components') || + !tailwindDirectives.has('utilities') + ) { + for (let rule of layerDirectives) { + if (rule.name === 'layer' && ['base', 'components', 'utilities'].includes(rule.params)) { + if (!tailwindDirectives.has(rule.params)) { + throw rule.error( + `\`@layer ${rule.params}\` is used but no matching \`@tailwind ${rule.params}\` directive is present.` + ) + } + } else if (rule.name === 'responsive') { + if (!tailwindDirectives.has('utilities')) { + throw rule.error('`@responsive` is used but `@tailwind utilities` is missing.') + } + } else if (rule.name === 'variants') { + if (!tailwindDirectives.has('utilities')) { + throw rule.error('`@variants` is used but `@tailwind utilities` is missing.') + } + } + } + } + return tailwindDirectives } diff --git a/src/jit/lib/rebootWatcher.js b/src/jit/lib/rebootWatcher.js new file mode 100644 --- /dev/null +++ b/src/jit/lib/rebootWatcher.js @@ -0,0 +1,124 @@ +// @ts-check + +import chokidar from 'chokidar' +import crypto from 'crypto' +import fs from 'fs' +import os from 'os' +import path from 'path' +import log from '../../util/log' +import { env } from './sharedState' + +// Earmarks a directory for our touch files. +// If the directory already exists we delete any existing touch files, +// invalidating any caches associated with them. +let touchDir = + env.TAILWIND_TOUCH_DIR || path.join(os.homedir() || os.tmpdir(), '.tailwindcss', 'touch') + +if (!env.TAILWIND_DISABLE_TOUCH) { + if (fs.existsSync(touchDir)) { + for (let file of fs.readdirSync(touchDir)) { + try { + fs.unlinkSync(path.join(touchDir, file)) + } catch (_err) {} + } + } else { + fs.mkdirSync(touchDir, { recursive: true }) + } +} + +// This is used to trigger rebuilds. Just updating the timestamp +// is significantly faster than actually writing to the file (10x). + +function touch(filename) { + let time = new Date() + + try { + fs.utimesSync(filename, time, time) + } catch (err) { + fs.closeSync(fs.openSync(filename, 'w')) + } +} + +export function rebootWatcher(context) { + if (context.touchFile === null) { + context.touchFile = generateTouchFileName() + touch(context.touchFile) + } + + if (env.TAILWIND_MODE === 'build') { + return + } + + if ( + env.TAILWIND_MODE === 'watch' || + (env.TAILWIND_MODE === undefined && env.NODE_ENV === 'development') + ) { + Promise.resolve(context.watcher ? context.watcher.close() : null).then(() => { + log.info([ + 'Tailwind CSS is watching for changes...', + 'https://tailwindcss.com/docs/just-in-time-mode#watch-mode-and-one-off-builds', + ]) + + context.watcher = chokidar.watch([...context.candidateFiles, ...context.configDependencies], { + ignoreInitial: true, + }) + + context.watcher.on('add', (file) => { + let changedFile = path.resolve('.', file) + let content = fs.readFileSync(changedFile, 'utf8') + let extension = path.extname(changedFile).slice(1) + context.changedContent.push({ content, extension }) + touch(context.touchFile) + }) + + context.watcher.on('change', (file) => { + // If it was a config dependency, touch the config file to trigger a new context. + // This is not really that clean of a solution but it's the fastest, because we + // can do a very quick check on each build to see if the config has changed instead + // of having to get all of the module dependencies and check every timestamp each + // time. + if (context.configDependencies.has(file)) { + for (let dependency of context.configDependencies) { + delete require.cache[require.resolve(dependency)] + } + touch(context.configPath) + } else { + let changedFile = path.resolve('.', file) + let content = fs.readFileSync(changedFile, 'utf8') + let extension = path.extname(changedFile).slice(1) + context.changedContent.push({ content, extension }) + touch(context.touchFile) + } + }) + + context.watcher.on('unlink', (file) => { + // Touch the config file if any of the dependencies are deleted. + if (context.configDependencies.has(file)) { + for (let dependency of context.configDependencies) { + delete require.cache[require.resolve(dependency)] + } + touch(context.configPath) + } + }) + }) + } +} + +function generateTouchFileName() { + let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' + let randomChars = '' + let randomCharsLength = 12 + let bytes = null + + try { + bytes = crypto.randomBytes(randomCharsLength) + } catch (_error) { + bytes = crypto.pseudoRandomBytes(randomCharsLength) + } + + for (let i = 0; i < randomCharsLength; i++) { + randomChars += chars[bytes[i] % chars.length] + } + + return path.join(touchDir, `touch-${process.pid}-${randomChars}`) +} diff --git a/src/jit/lib/removeLayerAtRules.js b/src/jit/lib/removeLayerAtRules.js deleted file mode 100644 --- a/src/jit/lib/removeLayerAtRules.js +++ /dev/null @@ -1,24 +0,0 @@ -export default function removeLayerAtRules(_context, tailwindDirectives) { - return (root) => { - root.walkAtRules((rule) => { - if (rule.name === 'layer' && ['base', 'components', 'utilities'].includes(rule.params)) { - if (!tailwindDirectives.has(rule.params)) { - throw rule.error( - `\`@layer ${rule.params}\` is used but no matching \`@tailwind ${rule.params}\` directive is present.` - ) - } - rule.remove() - } else if (rule.name === 'responsive') { - if (!tailwindDirectives.has('utilities')) { - throw rule.error('`@responsive` is used but `@tailwind utilities` is missing.') - } - rule.remove() - } else if (rule.name === 'variants') { - if (!tailwindDirectives.has('utilities')) { - throw rule.error('`@variants` is used but `@tailwind utilities` is missing.') - } - rule.remove() - } - }) - } -} diff --git a/src/jit/lib/setupContext.js b/src/jit/lib/setupContext.js deleted file mode 100644 --- a/src/jit/lib/setupContext.js +++ /dev/null @@ -1,869 +0,0 @@ -import fs from 'fs' -import url from 'url' -import os from 'os' -import path from 'path' -import crypto from 'crypto' -import chokidar from 'chokidar' -import postcss from 'postcss' -import dlv from 'dlv' -import selectorParser from 'postcss-selector-parser' -import LRU from 'quick-lru' -import normalizePath from 'normalize-path' - -import hash from '../../util/hashConfig' -import transformThemeValue from '../../util/transformThemeValue' -import parseObjectStyles from '../../util/parseObjectStyles' -import getModuleDependencies from '../../lib/getModuleDependencies' -import prefixSelector from '../../util/prefixSelector' - -import resolveConfig from '../../../resolveConfig' - -import corePlugins from '../corePlugins' -import isPlainObject from '../../util/isPlainObject' -import escapeClassName from '../../util/escapeClassName' -import log from '../../util/log' - -import nameClass from '../../util/nameClass' -import { coerceValue } from '../../util/pluginUtils' - -import * as sharedState from './sharedState' - -let contextMap = sharedState.contextMap -let configContextMap = sharedState.configContextMap -let contextSourcesMap = sharedState.contextSourcesMap -let env = sharedState.env - -// Earmarks a directory for our touch files. -// If the directory already exists we delete any existing touch files, -// invalidating any caches associated with them. -const touchDir = - env.TAILWIND_TOUCH_DIR || path.join(os.homedir() || os.tmpdir(), '.tailwindcss', 'touch') - -if (!sharedState.env.TAILWIND_DISABLE_TOUCH) { - if (fs.existsSync(touchDir)) { - for (let file of fs.readdirSync(touchDir)) { - try { - fs.unlinkSync(path.join(touchDir, file)) - } catch (_err) {} - } - } else { - fs.mkdirSync(touchDir, { recursive: true }) - } -} - -// This is used to trigger rebuilds. Just updating the timestamp -// is significantly faster than actually writing to the file (10x). - -function touch(filename) { - let time = new Date() - - try { - fs.utimesSync(filename, time, time) - } catch (err) { - fs.closeSync(fs.openSync(filename, 'w')) - } -} - -function isObject(value) { - return typeof value === 'object' && value !== null -} - -function isEmpty(obj) { - return Object.keys(obj).length === 0 -} - -function isString(value) { - return typeof value === 'string' || value instanceof String -} - -function toPath(value) { - if (Array.isArray(value)) { - return value - } - - let inBrackets = false - let parts = [] - let chunk = '' - - for (let i = 0; i < value.length; i++) { - let char = value[i] - if (char === '[') { - inBrackets = true - parts.push(chunk) - chunk = '' - continue - } - if (char === ']' && inBrackets) { - inBrackets = false - parts.push(chunk) - chunk = '' - continue - } - if (char === '.' && !inBrackets && chunk.length > 0) { - parts.push(chunk) - chunk = '' - continue - } - chunk = chunk + char - } - - if (chunk.length > 0) { - parts.push(chunk) - } - - return parts -} - -function resolveConfigPath(pathOrConfig) { - // require('tailwindcss')({ theme: ..., variants: ... }) - if (isObject(pathOrConfig) && pathOrConfig.config === undefined && !isEmpty(pathOrConfig)) { - return null - } - - // require('tailwindcss')({ config: 'custom-config.js' }) - if ( - isObject(pathOrConfig) && - pathOrConfig.config !== undefined && - isString(pathOrConfig.config) - ) { - return path.resolve(pathOrConfig.config) - } - - // require('tailwindcss')({ config: { theme: ..., variants: ... } }) - if ( - isObject(pathOrConfig) && - pathOrConfig.config !== undefined && - isObject(pathOrConfig.config) - ) { - return null - } - - // require('tailwindcss')('custom-config.js') - if (isString(pathOrConfig)) { - return path.resolve(pathOrConfig) - } - - // require('tailwindcss') - for (const configFile of ['./tailwind.config.js', './tailwind.config.cjs']) { - try { - const configPath = path.resolve(configFile) - fs.accessSync(configPath) - return configPath - } catch (err) {} - } - - return null -} - -let configPathCache = new LRU({ maxSize: 100 }) - -// Get the config object based on a path -function getTailwindConfig(configOrPath) { - let userConfigPath = resolveConfigPath(configOrPath) - - if (sharedState.env.TAILWIND_DISABLE_TOUCH) { - if (userConfigPath !== null) { - let [prevConfig, prevConfigHash, prevDeps, prevModified] = - configPathCache.get(userConfigPath) || [] - - let newDeps = getModuleDependencies(userConfigPath).map((dep) => dep.file) - - let modified = false - let newModified = new Map() - for (let file of newDeps) { - let time = fs.statSync(file).mtimeMs - newModified.set(file, time) - if (!prevModified || !prevModified.has(file) || time > prevModified.get(file)) { - modified = true - } - } - - // It hasn't changed (based on timestamps) - if (!modified) { - return [prevConfig, userConfigPath, prevConfigHash, prevDeps] - } - - // It has changed (based on timestamps), or first run - for (let file of newDeps) { - delete require.cache[file] - } - let newConfig = resolveConfig(require(userConfigPath)) - let newHash = hash(newConfig) - configPathCache.set(userConfigPath, [newConfig, newHash, newDeps, newModified]) - return [newConfig, userConfigPath, newHash, newDeps] - } - - // It's a plain object, not a path - let newConfig = resolveConfig( - configOrPath.config === undefined ? configOrPath : configOrPath.config - ) - - return [newConfig, null, hash(newConfig), []] - } - - if (userConfigPath !== null) { - let [prevConfig, prevModified = -Infinity, prevConfigHash] = - configPathCache.get(userConfigPath) || [] - let modified = fs.statSync(userConfigPath).mtimeMs - - // It hasn't changed (based on timestamp) - if (modified <= prevModified) { - return [prevConfig, userConfigPath, prevConfigHash] - } - - // It has changed (based on timestamp), or first run - delete require.cache[userConfigPath] - let newConfig = resolveConfig(require(userConfigPath)) - let newHash = hash(newConfig) - configPathCache.set(userConfigPath, [newConfig, modified, newHash]) - return [newConfig, userConfigPath, newHash] - } - - // It's a plain object, not a path - let newConfig = resolveConfig( - configOrPath.config === undefined ? configOrPath : configOrPath.config - ) - - return [newConfig, null, hash(newConfig)] -} - -let fileModifiedMap = new Map() - -function trackModified(files) { - let changed = false - - for (let file of files) { - if (!file) continue - - let parsed = url.parse(file) - let pathname = parsed.href.replace(parsed.hash, '').replace(parsed.search, '') - let newModified = fs.statSync(decodeURIComponent(pathname)).mtimeMs - - if (!fileModifiedMap.has(file) || newModified > fileModifiedMap.get(file)) { - changed = true - } - - fileModifiedMap.set(file, newModified) - } - - return changed -} - -function generateTouchFileName() { - let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' - let randomChars = '' - let randomCharsLength = 12 - let bytes = null - - try { - bytes = crypto.randomBytes(randomCharsLength) - } catch (_error) { - bytes = crypto.pseudoRandomBytes(randomCharsLength) - } - - for (let i = 0; i < randomCharsLength; i++) { - randomChars += chars[bytes[i] % chars.length] - } - - return path.join(touchDir, `touch-${process.pid}-${randomChars}`) -} - -function rebootWatcher(context) { - if (env.TAILWIND_DISABLE_TOUCH) { - return - } - - if (context.touchFile === null) { - context.touchFile = generateTouchFileName() - touch(context.touchFile) - } - - if (env.TAILWIND_MODE === 'build') { - return - } - - if ( - env.TAILWIND_MODE === 'watch' || - (env.TAILWIND_MODE === undefined && env.NODE_ENV === 'development') - ) { - Promise.resolve(context.watcher ? context.watcher.close() : null).then(() => { - log.info([ - 'Tailwind CSS is watching for changes...', - 'https://tailwindcss.com/docs/just-in-time-mode#watch-mode-and-one-off-builds', - ]) - - context.watcher = chokidar.watch([...context.candidateFiles, ...context.configDependencies], { - ignoreInitial: true, - }) - - context.watcher.on('add', (file) => { - context.changedFiles.add(path.resolve('.', file)) - touch(context.touchFile) - }) - - context.watcher.on('change', (file) => { - // If it was a config dependency, touch the config file to trigger a new context. - // This is not really that clean of a solution but it's the fastest, because we - // can do a very quick check on each build to see if the config has changed instead - // of having to get all of the module dependencies and check every timestamp each - // time. - if (context.configDependencies.has(file)) { - for (let dependency of context.configDependencies) { - delete require.cache[require.resolve(dependency)] - } - touch(context.configPath) - } else { - context.changedFiles.add(path.resolve('.', file)) - touch(context.touchFile) - } - }) - - context.watcher.on('unlink', (file) => { - // Touch the config file if any of the dependencies are deleted. - if (context.configDependencies.has(file)) { - for (let dependency of context.configDependencies) { - delete require.cache[require.resolve(dependency)] - } - touch(context.configPath) - } - }) - }) - } -} - -function insertInto(list, value, { before = [] } = {}) { - before = [].concat(before) - - if (before.length <= 0) { - list.push(value) - return - } - - let idx = list.length - 1 - for (let other of before) { - let iidx = list.indexOf(other) - if (iidx === -1) continue - idx = Math.min(idx, iidx) - } - - list.splice(idx, 0, value) -} - -function parseStyles(styles) { - if (!Array.isArray(styles)) { - return parseStyles([styles]) - } - - return styles.flatMap((style) => { - let isNode = !Array.isArray(style) && !isPlainObject(style) - return isNode ? style : parseObjectStyles(style) - }) -} - -function getClasses(selector) { - let parser = selectorParser((selectors) => { - let allClasses = [] - selectors.walkClasses((classNode) => { - allClasses.push(classNode.value) - }) - return allClasses - }) - return parser.transformSync(selector) -} - -function extractCandidates(node) { - let classes = node.type === 'rule' ? getClasses(node.selector) : [] - - if (node.type === 'atrule') { - node.walkRules((rule) => { - classes = [...classes, ...getClasses(rule.selector)] - }) - } - - return classes -} - -function withIdentifiers(styles) { - return parseStyles(styles).flatMap((node) => { - let nodeMap = new Map() - let candidates = extractCandidates(node) - - // If this isn't "on-demandable", assign it a universal candidate. - if (candidates.length === 0) { - return [['*', node]] - } - - return candidates.map((c) => { - if (!nodeMap.has(node)) { - nodeMap.set(node, node) - } - return [c, nodeMap.get(node)] - }) - }) -} - -function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offsets }) { - function getConfigValue(path, defaultValue) { - return path ? dlv(tailwindConfig, path, defaultValue) : tailwindConfig - } - - function applyConfiguredPrefix(selector) { - return prefixSelector(tailwindConfig.prefix, selector) - } - - function prefixIdentifier(identifier, options) { - if (identifier === '*') { - return '*' - } - - if (!options.respectPrefix) { - return identifier - } - - if (typeof context.tailwindConfig.prefix === 'function') { - return prefixSelector(context.tailwindConfig.prefix, `.${identifier}`).substr(1) - } - - return context.tailwindConfig.prefix + identifier - } - - return { - addVariant(variantName, applyThisVariant, options = {}) { - insertInto(variantList, variantName, options) - variantMap.set(variantName, applyThisVariant) - }, - postcss, - prefix: applyConfiguredPrefix, - e: escapeClassName, - config: getConfigValue, - theme(path, defaultValue) { - const [pathRoot, ...subPaths] = toPath(path) - const value = getConfigValue(['theme', pathRoot, ...subPaths], defaultValue) - return transformThemeValue(pathRoot)(value) - }, - corePlugins: (path) => { - if (Array.isArray(tailwindConfig.corePlugins)) { - return tailwindConfig.corePlugins.includes(path) - } - - return getConfigValue(['corePlugins', path], true) - }, - variants: (path, defaultValue) => { - if (Array.isArray(tailwindConfig.variants)) { - return tailwindConfig.variants - } - - return getConfigValue(['variants', path], defaultValue) - }, - addBase(base) { - for (let [identifier, rule] of withIdentifiers(base)) { - let prefixedIdentifier = prefixIdentifier(identifier, {}) - let offset = offsets.base++ - - if (!context.candidateRuleMap.has(prefixedIdentifier)) { - context.candidateRuleMap.set(prefixedIdentifier, []) - } - - context.candidateRuleMap - .get(prefixedIdentifier) - .push([{ sort: offset, layer: 'base' }, rule]) - } - }, - addComponents(components, options) { - let defaultOptions = { - variants: [], - respectPrefix: true, - respectImportant: false, - respectVariants: true, - } - - options = Object.assign( - {}, - defaultOptions, - Array.isArray(options) ? { variants: options } : options - ) - - for (let [identifier, rule] of withIdentifiers(components)) { - let prefixedIdentifier = prefixIdentifier(identifier, options) - let offset = offsets.components++ - - if (!context.candidateRuleMap.has(prefixedIdentifier)) { - context.candidateRuleMap.set(prefixedIdentifier, []) - } - - context.candidateRuleMap - .get(prefixedIdentifier) - .push([{ sort: offset, layer: 'components', options }, rule]) - } - }, - addUtilities(utilities, options) { - let defaultOptions = { - variants: [], - respectPrefix: true, - respectImportant: true, - respectVariants: true, - } - - options = Object.assign( - {}, - defaultOptions, - Array.isArray(options) ? { variants: options } : options - ) - - for (let [identifier, rule] of withIdentifiers(utilities)) { - let prefixedIdentifier = prefixIdentifier(identifier, options) - let offset = offsets.utilities++ - - if (!context.candidateRuleMap.has(prefixedIdentifier)) { - context.candidateRuleMap.set(prefixedIdentifier, []) - } - - context.candidateRuleMap - .get(prefixedIdentifier) - .push([{ sort: offset, layer: 'utilities', options }, rule]) - } - }, - matchUtilities: function (utilities, options) { - let defaultOptions = { - variants: [], - respectPrefix: true, - respectImportant: true, - respectVariants: true, - } - - options = { ...defaultOptions, ...options } - - let offset = offsets.utilities++ - - for (let identifier in utilities) { - let prefixedIdentifier = prefixIdentifier(identifier, options) - let rule = utilities[identifier] - - function wrapped(modifier) { - let { type = 'any' } = options - type = [].concat(type) - let [value, coercedType] = coerceValue(type, modifier, options.values, tailwindConfig) - - if (!type.includes(coercedType) || value === undefined) { - return [] - } - - let includedRules = [] - let ruleSets = [] - .concat( - rule(value, { - includeRules(rules) { - includedRules.push(...rules) - }, - }) - ) - .filter(Boolean) - .map((declaration) => ({ - [nameClass(identifier, modifier)]: declaration, - })) - - return [...includedRules, ...ruleSets] - } - - let withOffsets = [{ sort: offset, layer: 'utilities', options }, wrapped] - - if (!context.candidateRuleMap.has(prefixedIdentifier)) { - context.candidateRuleMap.set(prefixedIdentifier, []) - } - - context.candidateRuleMap.get(prefixedIdentifier).push(withOffsets) - } - }, - } -} - -function extractVariantAtRules(node) { - node.walkAtRules((atRule) => { - if (['responsive', 'variants'].includes(atRule.name)) { - extractVariantAtRules(atRule) - atRule.before(atRule.nodes) - atRule.remove() - } - }) -} - -function collectLayerPlugins(root) { - let layerPlugins = [] - - root.each((node) => { - if (node.type === 'atrule' && ['responsive', 'variants'].includes(node.name)) { - node.name = 'layer' - node.params = 'utilities' - } - }) - - // Walk @layer rules and treat them like plugins - root.walkAtRules('layer', (layerNode) => { - extractVariantAtRules(layerNode) - - if (layerNode.params === 'base') { - for (let node of layerNode.nodes) { - layerPlugins.push(function ({ addBase }) { - addBase(node, { respectPrefix: false }) - }) - } - } else if (layerNode.params === 'components') { - for (let node of layerNode.nodes) { - layerPlugins.push(function ({ addComponents }) { - addComponents(node, { respectPrefix: false }) - }) - } - } else if (layerNode.params === 'utilities') { - for (let node of layerNode.nodes) { - layerPlugins.push(function ({ addUtilities }) { - addUtilities(node, { respectPrefix: false }) - }) - } - } - }) - - return layerPlugins -} - -function registerPlugins(tailwindConfig, plugins, context) { - let variantList = [] - let variantMap = new Map() - let offsets = { - base: 0n, - components: 0n, - utilities: 0n, - } - - let pluginApi = buildPluginApi(tailwindConfig, context, { - variantList, - variantMap, - offsets, - }) - - for (let plugin of plugins) { - if (Array.isArray(plugin)) { - for (let pluginItem of plugin) { - pluginItem(pluginApi) - } - } else { - plugin(pluginApi) - } - } - - let highestOffset = ((args) => args.reduce((m, e) => (e > m ? e : m)))([ - offsets.base, - offsets.components, - offsets.utilities, - ]) - let reservedBits = BigInt(highestOffset.toString(2).length) - - context.layerOrder = { - base: (1n << reservedBits) << 0n, - components: (1n << reservedBits) << 1n, - utilities: (1n << reservedBits) << 2n, - } - - reservedBits += 3n - context.variantOrder = variantList.reduce( - (map, variant, i) => map.set(variant, (1n << BigInt(i)) << reservedBits), - new Map() - ) - - context.minimumScreen = [...context.variantOrder.values()].shift() - - // Build variantMap - for (let [variantName, variantFunction] of variantMap.entries()) { - let sort = context.variantOrder.get(variantName) - context.variantMap.set(variantName, [sort, variantFunction]) - } -} - -function cleanupContext(context) { - if (context.watcher) { - context.watcher.close() - } -} - -// Retrieve an existing context from cache if possible (since contexts are unique per -// source path), or set up a new one (including setting up watchers and registering -// plugins) then return it -export default function setupContext(configOrPath, tailwindDirectives) { - return (result, root) => { - let sourcePath = result.opts.from - let [tailwindConfig, userConfigPath, tailwindConfigHash, configDependencies] = - getTailwindConfig(configOrPath) - let isConfigFile = userConfigPath !== null - - let contextDependencies = new Set( - sharedState.env.TAILWIND_DISABLE_TOUCH ? configDependencies : [] - ) - - // If there are no @tailwind rules, we don't consider this CSS file or it's dependencies - // to be dependencies of the context. Can reuse the context even if they change. - // We may want to think about `@layer` being part of this trigger too, but it's tough - // because it's impossible for a layer in one file to end up in the actual @tailwind rule - // in another file since independent sources are effectively isolated. - if (tailwindDirectives.size > 0) { - contextDependencies.add(sourcePath) - for (let message of result.messages) { - if (message.type === 'dependency') { - contextDependencies.add(message.file) - } - } - } - - if (sharedState.env.TAILWIND_DISABLE_TOUCH) { - for (let file of configDependencies) { - result.messages.push({ - type: 'dependency', - plugin: 'tailwindcss-jit', - parent: result.opts.from, - file, - }) - } - } else { - if (isConfigFile) { - contextDependencies.add(userConfigPath) - } - } - - let contextDependenciesChanged = trackModified([...contextDependencies]) - - process.env.DEBUG && console.log('Source path:', sourcePath) - - if (!contextDependenciesChanged) { - // If this file already has a context in the cache and we don't need to - // reset the context, return the cached context. - if (isConfigFile && contextMap.has(sourcePath)) { - return contextMap.get(sourcePath) - } - - // If the config used already exists in the cache, return that. - if (configContextMap.has(tailwindConfigHash)) { - let context = configContextMap.get(tailwindConfigHash) - contextSourcesMap.get(context).add(sourcePath) - contextMap.set(sourcePath, context) - return context - } - } - - // If this source is in the context map, get the old context. - // Remove this source from the context sources for the old context, - // and clean up that context if no one else is using it. This can be - // called by many processes in rapid succession, so we check for presence - // first because the first process to run this code will wipe it out first. - if (contextMap.has(sourcePath)) { - let oldContext = contextMap.get(sourcePath) - if (contextSourcesMap.has(oldContext)) { - contextSourcesMap.get(oldContext).delete(sourcePath) - if (contextSourcesMap.get(oldContext).size === 0) { - contextSourcesMap.delete(oldContext) - cleanupContext(oldContext) - } - } - } - - process.env.DEBUG && console.log('Setting up new context...') - - let purgeContent = Array.isArray(tailwindConfig.purge) - ? tailwindConfig.purge - : tailwindConfig.purge.content - - let context = { - changedFiles: new Set(), - ruleCache: new Set(), - watcher: null, - scannedContent: false, - touchFile: null, - classCache: new Map(), - applyClassCache: new Map(), - notClassCache: new Set(), - postCssNodeCache: new Map(), - candidateRuleMap: new Map(), - configPath: userConfigPath, - tailwindConfig: tailwindConfig, - configDependencies: new Set(), - candidateFiles: purgeContent - .filter((item) => typeof item === 'string') - .map((purgePath) => - normalizePath( - path.resolve( - userConfigPath === null ? process.cwd() : path.dirname(userConfigPath), - purgePath - ) - ) - ), - rawContent: purgeContent - .filter((item) => typeof item.raw === 'string') - .map(({ raw, extension }) => ({ content: raw, extension })), - variantMap: new Map(), - stylesheetCache: null, - fileModifiedMap: new Map(), - } - - // --- - - // Update all context tracking state - - configContextMap.set(tailwindConfigHash, context) - contextMap.set(sourcePath, context) - - if (!contextSourcesMap.has(context)) { - contextSourcesMap.set(context, new Set()) - } - - contextSourcesMap.get(context).add(sourcePath) - - // --- - - if (isConfigFile && !sharedState.env.TAILWIND_DISABLE_TOUCH) { - for (let dependency of getModuleDependencies(userConfigPath)) { - if (dependency.file === userConfigPath) { - continue - } - - context.configDependencies.add(dependency.file) - } - } - - rebootWatcher(context) - - let corePluginList = Object.entries(corePlugins) - .map(([name, plugin]) => { - if (!tailwindConfig.corePlugins.includes(name)) { - return null - } - - return plugin - }) - .filter(Boolean) - - let userPlugins = tailwindConfig.plugins.map((plugin) => { - if (plugin.__isOptionsFunction) { - plugin = plugin() - } - - return typeof plugin === 'function' ? plugin : plugin.handler - }) - - let layerPlugins = collectLayerPlugins(root) - - // TODO: This is a workaround for backwards compatibility, since custom variants - // were historically sorted before screen/stackable variants. - let beforeVariants = [corePlugins['pseudoClassVariants']] - let afterVariants = [ - corePlugins['directionVariants'], - corePlugins['reducedMotionVariants'], - corePlugins['darkVariants'], - corePlugins['screenVariants'], - ] - - registerPlugins( - context.tailwindConfig, - [...corePluginList, ...beforeVariants, ...userPlugins, ...afterVariants, ...layerPlugins], - context - ) - - return context - } -} diff --git a/src/jit/lib/setupContextUtils.js b/src/jit/lib/setupContextUtils.js new file mode 100644 --- /dev/null +++ b/src/jit/lib/setupContextUtils.js @@ -0,0 +1,606 @@ +import fs from 'fs' +import url from 'url' +import path from 'path' +import postcss from 'postcss' +import dlv from 'dlv' +import selectorParser from 'postcss-selector-parser' +import normalizePath from 'normalize-path' + +import transformThemeValue from '../../util/transformThemeValue' +import parseObjectStyles from '../../util/parseObjectStyles' +import prefixSelector from '../../util/prefixSelector' +import isPlainObject from '../../util/isPlainObject' +import escapeClassName from '../../util/escapeClassName' +import nameClass from '../../util/nameClass' +import { coerceValue } from '../../util/pluginUtils' +import corePlugins from '../corePlugins' +import * as sharedState from './sharedState' +import { env } from './sharedState' + +function toPath(value) { + if (Array.isArray(value)) { + return value + } + + let inBrackets = false + let parts = [] + let chunk = '' + + for (let i = 0; i < value.length; i++) { + let char = value[i] + if (char === '[') { + inBrackets = true + parts.push(chunk) + chunk = '' + continue + } + if (char === ']' && inBrackets) { + inBrackets = false + parts.push(chunk) + chunk = '' + continue + } + if (char === '.' && !inBrackets && chunk.length > 0) { + parts.push(chunk) + chunk = '' + continue + } + chunk = chunk + char + } + + if (chunk.length > 0) { + parts.push(chunk) + } + + return parts +} + +function insertInto(list, value, { before = [] } = {}) { + before = [].concat(before) + + if (before.length <= 0) { + list.push(value) + return + } + + let idx = list.length - 1 + for (let other of before) { + let iidx = list.indexOf(other) + if (iidx === -1) continue + idx = Math.min(idx, iidx) + } + + list.splice(idx, 0, value) +} + +function parseStyles(styles) { + if (!Array.isArray(styles)) { + return parseStyles([styles]) + } + + return styles.flatMap((style) => { + let isNode = !Array.isArray(style) && !isPlainObject(style) + return isNode ? style : parseObjectStyles(style) + }) +} + +function getClasses(selector) { + let parser = selectorParser((selectors) => { + let allClasses = [] + selectors.walkClasses((classNode) => { + allClasses.push(classNode.value) + }) + return allClasses + }) + return parser.transformSync(selector) +} + +function extractCandidates(node) { + let classes = node.type === 'rule' ? getClasses(node.selector) : [] + + if (node.type === 'atrule') { + node.walkRules((rule) => { + classes = [...classes, ...getClasses(rule.selector)] + }) + } + + return classes +} + +function withIdentifiers(styles) { + return parseStyles(styles).flatMap((node) => { + let nodeMap = new Map() + let candidates = extractCandidates(node) + + // If this isn't "on-demandable", assign it a universal candidate. + if (candidates.length === 0) { + return [['*', node]] + } + + return candidates.map((c) => { + if (!nodeMap.has(node)) { + nodeMap.set(node, node) + } + return [c, nodeMap.get(node)] + }) + }) +} + +function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offsets }) { + function getConfigValue(path, defaultValue) { + return path ? dlv(tailwindConfig, path, defaultValue) : tailwindConfig + } + + function applyConfiguredPrefix(selector) { + return prefixSelector(tailwindConfig.prefix, selector) + } + + function prefixIdentifier(identifier, options) { + if (identifier === '*') { + return '*' + } + + if (!options.respectPrefix) { + return identifier + } + + if (typeof context.tailwindConfig.prefix === 'function') { + return prefixSelector(context.tailwindConfig.prefix, `.${identifier}`).substr(1) + } + + return context.tailwindConfig.prefix + identifier + } + + return { + addVariant(variantName, applyThisVariant, options = {}) { + insertInto(variantList, variantName, options) + variantMap.set(variantName, applyThisVariant) + }, + postcss, + prefix: applyConfiguredPrefix, + e: escapeClassName, + config: getConfigValue, + theme(path, defaultValue) { + const [pathRoot, ...subPaths] = toPath(path) + const value = getConfigValue(['theme', pathRoot, ...subPaths], defaultValue) + return transformThemeValue(pathRoot)(value) + }, + corePlugins: (path) => { + if (Array.isArray(tailwindConfig.corePlugins)) { + return tailwindConfig.corePlugins.includes(path) + } + + return getConfigValue(['corePlugins', path], true) + }, + variants: (path, defaultValue) => { + if (Array.isArray(tailwindConfig.variants)) { + return tailwindConfig.variants + } + + return getConfigValue(['variants', path], defaultValue) + }, + addBase(base) { + for (let [identifier, rule] of withIdentifiers(base)) { + let prefixedIdentifier = prefixIdentifier(identifier, {}) + let offset = offsets.base++ + + if (!context.candidateRuleMap.has(prefixedIdentifier)) { + context.candidateRuleMap.set(prefixedIdentifier, []) + } + + context.candidateRuleMap + .get(prefixedIdentifier) + .push([{ sort: offset, layer: 'base' }, rule]) + } + }, + addComponents(components, options) { + let defaultOptions = { + variants: [], + respectPrefix: true, + respectImportant: false, + respectVariants: true, + } + + options = Object.assign( + {}, + defaultOptions, + Array.isArray(options) ? { variants: options } : options + ) + + for (let [identifier, rule] of withIdentifiers(components)) { + let prefixedIdentifier = prefixIdentifier(identifier, options) + let offset = offsets.components++ + + if (!context.candidateRuleMap.has(prefixedIdentifier)) { + context.candidateRuleMap.set(prefixedIdentifier, []) + } + + context.candidateRuleMap + .get(prefixedIdentifier) + .push([{ sort: offset, layer: 'components', options }, rule]) + } + }, + addUtilities(utilities, options) { + let defaultOptions = { + variants: [], + respectPrefix: true, + respectImportant: true, + respectVariants: true, + } + + options = Object.assign( + {}, + defaultOptions, + Array.isArray(options) ? { variants: options } : options + ) + + for (let [identifier, rule] of withIdentifiers(utilities)) { + let prefixedIdentifier = prefixIdentifier(identifier, options) + let offset = offsets.utilities++ + + if (!context.candidateRuleMap.has(prefixedIdentifier)) { + context.candidateRuleMap.set(prefixedIdentifier, []) + } + + context.candidateRuleMap + .get(prefixedIdentifier) + .push([{ sort: offset, layer: 'utilities', options }, rule]) + } + }, + matchUtilities: function (utilities, options) { + let defaultOptions = { + variants: [], + respectPrefix: true, + respectImportant: true, + respectVariants: true, + } + + options = { ...defaultOptions, ...options } + + let offset = offsets.utilities++ + + for (let identifier in utilities) { + let prefixedIdentifier = prefixIdentifier(identifier, options) + let rule = utilities[identifier] + + function wrapped(modifier) { + let { type = 'any' } = options + type = [].concat(type) + let [value, coercedType] = coerceValue(type, modifier, options.values, tailwindConfig) + + if (!type.includes(coercedType) || value === undefined) { + return [] + } + + let includedRules = [] + let ruleSets = [] + .concat( + rule(value, { + includeRules(rules) { + includedRules.push(...rules) + }, + }) + ) + .filter(Boolean) + .map((declaration) => ({ + [nameClass(identifier, modifier)]: declaration, + })) + + return [...includedRules, ...ruleSets] + } + + let withOffsets = [{ sort: offset, layer: 'utilities', options }, wrapped] + + if (!context.candidateRuleMap.has(prefixedIdentifier)) { + context.candidateRuleMap.set(prefixedIdentifier, []) + } + + context.candidateRuleMap.get(prefixedIdentifier).push(withOffsets) + } + }, + } +} + +function trackModified(files, context) { + let changed = false + + for (let file of files) { + if (!file) continue + + let parsed = url.parse(file) + let pathname = parsed.href.replace(parsed.hash, '').replace(parsed.search, '') + let newModified = fs.statSync(decodeURIComponent(pathname)).mtimeMs + + if (!context.fileModifiedMap.has(file) || newModified > context.fileModifiedMap.get(file)) { + changed = true + } + + context.fileModifiedMap.set(file, newModified) + } + + return changed +} + +function extractVariantAtRules(node) { + node.walkAtRules((atRule) => { + if (['responsive', 'variants'].includes(atRule.name)) { + extractVariantAtRules(atRule) + atRule.before(atRule.nodes) + atRule.remove() + } + }) +} + +function collectLayerPlugins(root) { + let layerPlugins = [] + + root.each((node) => { + if (node.type === 'atrule' && ['responsive', 'variants'].includes(node.name)) { + node.name = 'layer' + node.params = 'utilities' + } + }) + + // Walk @layer rules and treat them like plugins + root.walkAtRules('layer', (layerRule) => { + extractVariantAtRules(layerRule) + + if (layerRule.params === 'base') { + for (let node of layerRule.nodes) { + layerPlugins.push(function ({ addBase }) { + addBase(node, { respectPrefix: false }) + }) + } + layerRule.remove() + } else if (layerRule.params === 'components') { + for (let node of layerRule.nodes) { + layerPlugins.push(function ({ addComponents }) { + addComponents(node, { respectPrefix: false }) + }) + } + layerRule.remove() + } else if (layerRule.params === 'utilities') { + for (let node of layerRule.nodes) { + layerPlugins.push(function ({ addUtilities }) { + addUtilities(node, { respectPrefix: false }) + }) + } + layerRule.remove() + } + }) + + return layerPlugins +} + +function resolvePlugins(context, tailwindDirectives, root) { + let corePluginList = Object.entries(corePlugins) + .map(([name, plugin]) => { + if (!context.tailwindConfig.corePlugins.includes(name)) { + return null + } + + return plugin + }) + .filter(Boolean) + + let userPlugins = context.tailwindConfig.plugins.map((plugin) => { + if (plugin.__isOptionsFunction) { + plugin = plugin() + } + + return typeof plugin === 'function' ? plugin : plugin.handler + }) + + let layerPlugins = collectLayerPlugins(root, tailwindDirectives) + + // TODO: This is a workaround for backwards compatibility, since custom variants + // were historically sorted before screen/stackable variants. + let beforeVariants = [corePlugins['pseudoClassVariants']] + let afterVariants = [ + corePlugins['directionVariants'], + corePlugins['reducedMotionVariants'], + corePlugins['darkVariants'], + corePlugins['screenVariants'], + ] + + return [...corePluginList, ...beforeVariants, ...userPlugins, ...afterVariants, ...layerPlugins] +} + +function registerPlugins(plugins, context) { + let variantList = [] + let variantMap = new Map() + let offsets = { + base: 0n, + components: 0n, + utilities: 0n, + } + + let pluginApi = buildPluginApi(context.tailwindConfig, context, { + variantList, + variantMap, + offsets, + }) + + for (let plugin of plugins) { + if (Array.isArray(plugin)) { + for (let pluginItem of plugin) { + pluginItem(pluginApi) + } + } else { + plugin(pluginApi) + } + } + + let highestOffset = ((args) => args.reduce((m, e) => (e > m ? e : m)))([ + offsets.base, + offsets.components, + offsets.utilities, + ]) + let reservedBits = BigInt(highestOffset.toString(2).length) + + context.layerOrder = { + base: (1n << reservedBits) << 0n, + components: (1n << reservedBits) << 1n, + utilities: (1n << reservedBits) << 2n, + } + + reservedBits += 3n + context.variantOrder = variantList.reduce( + (map, variant, i) => map.set(variant, (1n << BigInt(i)) << reservedBits), + new Map() + ) + + context.minimumScreen = [...context.variantOrder.values()].shift() + + // Build variantMap + for (let [variantName, variantFunction] of variantMap.entries()) { + let sort = context.variantOrder.get(variantName) + context.variantMap.set(variantName, [sort, variantFunction]) + } +} + +let contextMap = sharedState.contextMap +let configContextMap = sharedState.configContextMap +let contextSourcesMap = sharedState.contextSourcesMap + +function cleanupContext(context) { + if (context.watcher) { + context.watcher.close() + } +} + +export function getContext( + configOrPath, + tailwindDirectives, + registerDependency, + root, + result, + getTailwindConfig +) { + let sourcePath = result.opts.from + let [tailwindConfig, userConfigPath, tailwindConfigHash, configDependencies] = + getTailwindConfig(configOrPath) + let isConfigFile = userConfigPath !== null + + let contextDependencies = new Set(configDependencies) + + // If there are no @tailwind rules, we don't consider this CSS file or it's dependencies + // to be dependencies of the context. Can reuse the context even if they change. + // We may want to think about `@layer` being part of this trigger too, but it's tough + // because it's impossible for a layer in one file to end up in the actual @tailwind rule + // in another file since independent sources are effectively isolated. + if (tailwindDirectives.size > 0) { + // Add current css file as a context dependencies. + contextDependencies.add(sourcePath) + + // Add all css @import dependencies as context dependencies. + for (let message of result.messages) { + if (message.type === 'dependency') { + contextDependencies.add(message.file) + } + } + } + + for (let file of configDependencies) { + registerDependency(file) + } + + env.DEBUG && console.log('Source path:', sourcePath) + + let existingContext + + if (isConfigFile && contextMap.has(sourcePath)) { + existingContext = contextMap.get(sourcePath) + } else if (configContextMap.has(tailwindConfigHash)) { + let context = configContextMap.get(tailwindConfigHash) + contextSourcesMap.get(context).add(sourcePath) + contextMap.set(sourcePath, context) + + existingContext = context + } + + // If there's already a context in the cache and we don't need to + // reset the context, return the cached context. + if (existingContext) { + let contextDependenciesChanged = trackModified([...contextDependencies], existingContext) + if (!contextDependenciesChanged) { + return [existingContext, false] + } + } + + // If this source is in the context map, get the old context. + // Remove this source from the context sources for the old context, + // and clean up that context if no one else is using it. This can be + // called by many processes in rapid succession, so we check for presence + // first because the first process to run this code will wipe it out first. + if (contextMap.has(sourcePath)) { + let oldContext = contextMap.get(sourcePath) + if (contextSourcesMap.has(oldContext)) { + contextSourcesMap.get(oldContext).delete(sourcePath) + if (contextSourcesMap.get(oldContext).size === 0) { + contextSourcesMap.delete(oldContext) + cleanupContext(oldContext) + } + } + } + + env.DEBUG && console.log('Setting up new context...') + + let purgeContent = Array.isArray(tailwindConfig.purge) + ? tailwindConfig.purge + : tailwindConfig.purge.content + + let context = { + watcher: null, + touchFile: null, + configPath: userConfigPath, + configDependencies: new Set(), + candidateFiles: purgeContent + .filter((item) => typeof item === 'string') + .map((purgePath) => + normalizePath( + path.resolve( + userConfigPath === null ? process.cwd() : path.dirname(userConfigPath), + purgePath + ) + ) + ), + // Carry over the existing modified map if we have one. + fileModifiedMap: new Map(existingContext ? existingContext.fileModifiedMap : undefined), + // --- + ruleCache: new Set(), // Hit + classCache: new Map(), // Hit + applyClassCache: new Map(), // Hit + notClassCache: new Set(), // Hit + postCssNodeCache: new Map(), // Hit + candidateRuleMap: new Map(), // Hit + tailwindConfig: tailwindConfig, // Hit + changedContent: purgeContent // Hit + .filter((item) => typeof item.raw === 'string') + .map(({ raw, extension }) => ({ content: raw, extension })), + variantMap: new Map(), // Hit + stylesheetCache: null, // Hit + } + + if (!existingContext) { + // If we didn't have an existing modified map then populate it now. + trackModified([...contextDependencies], context) + } + + // --- + + // Update all context tracking state + + configContextMap.set(tailwindConfigHash, context) + contextMap.set(sourcePath, context) + + if (!contextSourcesMap.has(context)) { + contextSourcesMap.set(context, new Set()) + } + + contextSourcesMap.get(context).add(sourcePath) + + registerPlugins(resolvePlugins(context, tailwindDirectives, root), context) + + return [context, true] +} diff --git a/src/jit/lib/setupTrackingContext.js b/src/jit/lib/setupTrackingContext.js new file mode 100644 --- /dev/null +++ b/src/jit/lib/setupTrackingContext.js @@ -0,0 +1,129 @@ +import fs from 'fs' +import path from 'path' + +import fastGlob from 'fast-glob' +import isGlob from 'is-glob' +import globParent from 'glob-parent' +import LRU from 'quick-lru' + +import hash from '../../util/hashConfig' +import getModuleDependencies from '../../lib/getModuleDependencies' + +import resolveConfig from '../../../resolveConfig' + +import resolveConfigPath from '../../util/resolveConfigPath' + +import { env } from './sharedState' + +import { getContext } from './setupContextUtils' + +let configPathCache = new LRU({ maxSize: 100 }) + +// Get the config object based on a path +function getTailwindConfig(configOrPath) { + let userConfigPath = resolveConfigPath(configOrPath) + + if (userConfigPath !== null) { + let [prevConfig, prevConfigHash, prevDeps, prevModified] = + configPathCache.get(userConfigPath) || [] + + let newDeps = getModuleDependencies(userConfigPath).map((dep) => dep.file) + + let modified = false + let newModified = new Map() + for (let file of newDeps) { + let time = fs.statSync(file).mtimeMs + newModified.set(file, time) + if (!prevModified || !prevModified.has(file) || time > prevModified.get(file)) { + modified = true + } + } + + // It hasn't changed (based on timestamps) + if (!modified) { + return [prevConfig, userConfigPath, prevConfigHash, prevDeps] + } + + // It has changed (based on timestamps), or first run + for (let file of newDeps) { + delete require.cache[file] + } + let newConfig = resolveConfig(require(userConfigPath)) + let newHash = hash(newConfig) + configPathCache.set(userConfigPath, [newConfig, newHash, newDeps, newModified]) + return [newConfig, userConfigPath, newHash, newDeps] + } + + // It's a plain object, not a path + let newConfig = resolveConfig( + configOrPath.config === undefined ? configOrPath : configOrPath.config + ) + + return [newConfig, null, hash(newConfig), []] +} + +function resolveChangedFiles(context) { + let changedFiles = new Set() + env.DEBUG && console.time('Finding changed files') + let files = fastGlob.sync(context.candidateFiles) + for (let file of files) { + let prevModified = context.fileModifiedMap.has(file) + ? context.fileModifiedMap.get(file) + : -Infinity + let modified = fs.statSync(file).mtimeMs + + if (modified > prevModified) { + changedFiles.add(file) + context.fileModifiedMap.set(file, modified) + } + } + env.DEBUG && console.timeEnd('Finding changed files') + return changedFiles +} + +// DISABLE_TOUCH = TRUE + +// Retrieve an existing context from cache if possible (since contexts are unique per +// source path), or set up a new one (including setting up watchers and registering +// plugins) then return it +export default function setupTrackingContext(configOrPath, tailwindDirectives, registerDependency) { + return (result, root) => { + let [context] = getContext( + configOrPath, + tailwindDirectives, + registerDependency, + root, + result, + getTailwindConfig + ) + + // If there are no @tailwind rules, we don't consider this CSS file or it's dependencies + // to be dependencies of the context. Can reuse the context even if they change. + // We may want to think about `@layer` being part of this trigger too, but it's tough + // because it's impossible for a layer in one file to end up in the actual @tailwind rule + // in another file since independent sources are effectively isolated. + if (tailwindDirectives.size > 0) { + // Add template paths as postcss dependencies. + for (let maybeGlob of context.candidateFiles) { + if (isGlob(maybeGlob)) { + // rollup-plugin-postcss does not support dir-dependency messages + // but directories can be watched in the same way as files + registerDependency( + path.resolve(globParent(maybeGlob)), + env.ROLLUP_WATCH === 'true' ? 'dependency' : 'dir-dependency' + ) + } else { + registerDependency(path.resolve(maybeGlob)) + } + } + + for (let changedFile of resolveChangedFiles(context)) { + let content = fs.readFileSync(changedFile, 'utf8') + let extension = path.extname(changedFile).slice(1) + context.changedContent.push({ content, extension }) + } + } + + return context + } +} diff --git a/src/jit/lib/setupWatchingContext.js b/src/jit/lib/setupWatchingContext.js new file mode 100644 --- /dev/null +++ b/src/jit/lib/setupWatchingContext.js @@ -0,0 +1,112 @@ +import fs from 'fs' +import path from 'path' + +import fastGlob from 'fast-glob' +import LRU from 'quick-lru' + +import hash from '../../util/hashConfig' +import getModuleDependencies from '../../lib/getModuleDependencies' + +import resolveConfig from '../../../resolveConfig' + +import resolveConfigPath from '../../util/resolveConfigPath' + +import { rebootWatcher } from './rebootWatcher' +import { getContext } from './setupContextUtils' + +let configPathCache = new LRU({ maxSize: 100 }) + +// Get the config object based on a path +function getTailwindConfig(configOrPath) { + let userConfigPath = resolveConfigPath(configOrPath) + + if (userConfigPath !== null) { + let [prevConfig, prevModified = -Infinity, prevConfigHash] = + configPathCache.get(userConfigPath) || [] + let modified = fs.statSync(userConfigPath).mtimeMs + + // It hasn't changed (based on timestamp) + if (modified <= prevModified) { + return [prevConfig, userConfigPath, prevConfigHash, [userConfigPath]] + } + + // It has changed (based on timestamp), or first run + delete require.cache[userConfigPath] + let newConfig = resolveConfig(require(userConfigPath)) + let newHash = hash(newConfig) + configPathCache.set(userConfigPath, [newConfig, modified, newHash]) + return [newConfig, userConfigPath, newHash, [userConfigPath]] + } + + // It's a plain object, not a path + let newConfig = resolveConfig( + configOrPath.config === undefined ? configOrPath : configOrPath.config + ) + + return [newConfig, null, hash(newConfig), [userConfigPath]] +} + +function resolveChangedFiles(context) { + let changedFiles = new Set() + + // If we're not set up and watching files ourselves, we need to do + // the work of grabbing all of the template files for candidate + // detection. + if (!context.scannedContent) { + let files = fastGlob.sync(context.candidateFiles) + for (let file of files) { + changedFiles.add(file) + } + context.scannedContent = true + } + + return changedFiles +} + +// DISABLE_TOUCH = FALSE + +// Retrieve an existing context from cache if possible (since contexts are unique per +// source path), or set up a new one (including setting up watchers and registering +// plugins) then return it +export default function setupWatchingContext(configOrPath, tailwindDirectives, registerDependency) { + return (result, root) => { + let [context, newContext] = getContext( + configOrPath, + tailwindDirectives, + registerDependency, + root, + result, + getTailwindConfig + ) + + if (context.configPath !== null) { + for (let dependency of getModuleDependencies(context.configPath)) { + if (dependency.file === context.configPath) { + continue + } + + context.configDependencies.add(dependency.file) + } + } + + if (newContext) { + rebootWatcher(context) + } + + // Register our temp file as a dependency ‚Äî we write to this file + // to trigger rebuilds. + if (context.touchFile) { + registerDependency(context.touchFile) + } + + if (tailwindDirectives.size > 0) { + for (let changedFile of resolveChangedFiles(context)) { + let content = fs.readFileSync(changedFile, 'utf8') + let extension = path.extname(changedFile).slice(1) + context.changedContent.push({ content, extension }) + } + } + + return context + } +} diff --git a/src/jit/processTailwindFeatures.js b/src/jit/processTailwindFeatures.js new file mode 100644 --- /dev/null +++ b/src/jit/processTailwindFeatures.js @@ -0,0 +1,15 @@ +import expandTailwindAtRules from './lib/expandTailwindAtRules' +import expandApplyAtRules from './lib/expandApplyAtRules' +import evaluateTailwindFunctions from '../lib/evaluateTailwindFunctions' +import substituteScreenAtRules from '../lib/substituteScreenAtRules' +import collapseAdjacentRules from './lib/collapseAdjacentRules' + +export default function processTailwindFeatures(context) { + return function (root, result) { + expandTailwindAtRules(context)(root, result) + expandApplyAtRules(context)(root, result) + evaluateTailwindFunctions(context)(root, result) + substituteScreenAtRules(context)(root, result) + collapseAdjacentRules(context)(root, result) + } +} diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -149,7 +149,7 @@ let nodeTypePropertyMap = { decl: 'value', } -export default function (config) { +export default function ({ tailwindConfig: config }) { let functions = { theme: (node, path, ...defaultValue) => { const { isValid, value, error } = validatePath( diff --git a/src/lib/purgeUnusedStyles.js b/src/lib/purgeUnusedStyles.js --- a/src/lib/purgeUnusedStyles.js +++ b/src/lib/purgeUnusedStyles.js @@ -34,6 +34,18 @@ export function tailwindExtractor(content) { return broadMatches.concat(broadMatchesWithoutTrailingSlash).concat(innerMatches) } +function getTransformer(config, fileExtension) { + let transformers = (config.purge && config.purge.transform) || {} + + if (typeof transformers === 'function') { + transformers = { + DEFAULT: transformers, + } + } + + return transformers[fileExtension] || transformers.DEFAULT || ((content) => content) +} + export default function purgeUnusedUtilities(config, configChanged, resolvedConfigPath) { const purgeEnabled = _.get( config, @@ -58,7 +70,50 @@ export default function purgeUnusedUtilities(config, configChanged, resolvedConf return removeTailwindMarkers } - const { defaultExtractor, ...purgeOptions } = config.purge.options || {} + const extractors = config.purge.extract || {} + const transformers = config.purge.transform || {} + let { defaultExtractor: originalDefaultExtractor, ...purgeOptions } = config.purge.options || {} + + if (!originalDefaultExtractor) { + originalDefaultExtractor = + typeof extractors === 'function' ? extractors : extractors.DEFAULT || tailwindExtractor + } + + const defaultExtractor = (content) => { + const preserved = originalDefaultExtractor(content) + + if (_.get(config, 'purge.preserveHtmlElements', true)) { + preserved.push(...htmlTags) + } + + return preserved + } + + // If `extractors` is a function then we don't have any file-specific extractors, + // only a default one. + let fileSpecificExtractors = typeof extractors === 'function' ? {} : extractors + + // PurgeCSS doesn't support "transformers," so we implement those using extractors. + // If we have a custom transformer for an extension, but not a matching extractor, + // then we need to create an extractor that we can augment later. + if (typeof transformers !== 'function') { + for (let [extension] of Object.entries(transformers)) { + if (!fileSpecificExtractors[extension]) { + fileSpecificExtractors[extension] = defaultExtractor + } + } + } + + // Augment file-specific extractors by running the transformer before we extract classes. + fileSpecificExtractors = Object.entries(fileSpecificExtractors).map(([extension, extractor]) => { + return { + extensions: [extension], + extractor: (content) => { + const transformer = getTransformer(config, extension) + return extractor(transformer(content)) + }, + } + }) return postcss([ function (css) { @@ -106,15 +161,10 @@ export default function purgeUnusedUtilities(config, configChanged, resolvedConf removeTailwindMarkers, purgecss({ defaultExtractor: (content) => { - const extractor = defaultExtractor || tailwindExtractor - const preserved = [...extractor(content)] - - if (_.get(config, 'purge.preserveHtmlElements', true)) { - preserved.push(...htmlTags) - } - - return preserved + const transformer = getTransformer(config) + return defaultExtractor(transformer(content)) }, + extractors: fileSpecificExtractors, ...purgeOptions, content: (Array.isArray(config.purge) ? config.purge diff --git a/src/lib/substituteClassApplyAtRules.js b/src/lib/substituteClassApplyAtRules.js --- a/src/lib/substituteClassApplyAtRules.js +++ b/src/lib/substituteClassApplyAtRules.js @@ -386,11 +386,11 @@ export default function substituteClassApplyAtRules(config, getProcessedPlugins, ? () => { return postcss([ substituteTailwindAtRules(config, getProcessedPlugins()), - evaluateTailwindFunctions(config), + evaluateTailwindFunctions({ tailwindConfig: config }), substituteVariantsAtRules(config, getProcessedPlugins()), substituteResponsiveAtRules(config), convertLayerAtRulesToControlComments(config), - substituteScreenAtRules(config), + substituteScreenAtRules({ tailwindConfig: config }), ]) .process(requiredTailwindAtRules.map((rule) => `@tailwind ${rule};`).join('\n'), { from: __filename, diff --git a/src/lib/substituteScreenAtRules.js b/src/lib/substituteScreenAtRules.js --- a/src/lib/substituteScreenAtRules.js +++ b/src/lib/substituteScreenAtRules.js @@ -1,7 +1,7 @@ import _ from 'lodash' import buildMediaQuery from '../util/buildMediaQuery' -export default function ({ theme }) { +export default function ({ tailwindConfig: { theme } }) { return function (css) { css.walkAtRules('screen', (atRule) => { const screen = atRule.params diff --git a/src/processTailwindFeatures.js b/src/processTailwindFeatures.js --- a/src/processTailwindFeatures.js +++ b/src/processTailwindFeatures.js @@ -58,11 +58,11 @@ export default function (getConfig, resolvedConfigPath) { return postcss([ substituteTailwindAtRules(config, getProcessedPlugins()), - evaluateTailwindFunctions(config), + evaluateTailwindFunctions({ tailwindConfig: config }), substituteVariantsAtRules(config, getProcessedPlugins()), substituteResponsiveAtRules(config), convertLayerAtRulesToControlComments(config), - substituteScreenAtRules(config), + substituteScreenAtRules({ tailwindConfig: config }), substituteClassApplyAtRules(config, getProcessedPlugins, configChanged), applyImportantConfiguration(config), purgeUnusedStyles(config, configChanged, resolvedConfigPath), diff --git a/src/util/resolveConfigPath.js b/src/util/resolveConfigPath.js new file mode 100644 --- /dev/null +++ b/src/util/resolveConfigPath.js @@ -0,0 +1,57 @@ +import fs from 'fs' +import path from 'path' + +function isObject(value) { + return typeof value === 'object' && value !== null +} + +function isEmpty(obj) { + return Object.keys(obj).length === 0 +} + +function isString(value) { + return typeof value === 'string' || value instanceof String +} + +export default function resolveConfigPath(pathOrConfig) { + // require('tailwindcss')({ theme: ..., variants: ... }) + if (isObject(pathOrConfig) && pathOrConfig.config === undefined && !isEmpty(pathOrConfig)) { + return null + } + + // require('tailwindcss')({ config: 'custom-config.js' }) + if ( + isObject(pathOrConfig) && + pathOrConfig.config !== undefined && + isString(pathOrConfig.config) + ) { + return path.resolve(pathOrConfig.config) + } + + // require('tailwindcss')({ config: { theme: ..., variants: ... } }) + if ( + isObject(pathOrConfig) && + pathOrConfig.config !== undefined && + isObject(pathOrConfig.config) + ) { + return null + } + + // require('tailwindcss')('custom-config.js') + if (isString(pathOrConfig)) { + return path.resolve(pathOrConfig) + } + + // require('tailwindcss') + for (const configFile of ['./tailwind.config.js', './tailwind.config.cjs']) { + try { + const configPath = path.resolve(configFile) + fs.accessSync(configPath) + return configPath + } catch (err) { + console.log(err) + } + } + + return null +}
diff --git a/integrations/parcel/tests/integration.test.js b/integrations/parcel/tests/integration.test.js --- a/integrations/parcel/tests/integration.test.js +++ b/integrations/parcel/tests/integration.test.js @@ -33,7 +33,7 @@ describe('static build', () => { }) }) -describe('watcher', () => { +describe.skip('watcher', () => { test('classes are generated when the html file changes', async () => { await writeInputFile( 'index.html', diff --git a/integrations/rollup/tests/integration.test.js b/integrations/rollup/tests/integration.test.js --- a/integrations/rollup/tests/integration.test.js +++ b/integrations/rollup/tests/integration.test.js @@ -27,13 +27,14 @@ describe('static build', () => { }) }) -describe('watcher', () => { - test('classes are generated when the html file changes', async () => { +describe.each([ + { TAILWIND_MODE: 'watch' }, + { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, +])('watcher %p', (env) => { + test(`classes are generated when the html file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold"></div>`) - let runningProcess = $('rollup -c --watch', { - env: { TAILWIND_MODE: 'watch' }, - }) + let runningProcess = $('rollup -c --watch', { env }) await waitForOutputFileCreation('index.css') @@ -82,12 +83,10 @@ describe('watcher', () => { return runningProcess.stop() }) - test('classes are generated when the tailwind.config.js file changes', async () => { + test(`classes are generated when the tailwind.config.js file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`) - let runningProcess = $('rollup -c --watch', { - env: { TAILWIND_MODE: 'watch' }, - }) + let runningProcess = $('rollup -c --watch', { env }) await waitForOutputFileCreation('index.css') @@ -150,12 +149,10 @@ describe('watcher', () => { return runningProcess.stop() }) - test('classes are generated when the index.css file changes', async () => { + test(`classes are generated when the index.css file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold btn"></div>`) - let runningProcess = $('rollup -c --watch', { - env: { TAILWIND_MODE: 'watch' }, - }) + let runningProcess = $('rollup -c --watch', { env }) await waitForOutputFileCreation('index.css') diff --git a/integrations/webpack-4/tests/integration.test.js b/integrations/webpack-4/tests/integration.test.js --- a/integrations/webpack-4/tests/integration.test.js +++ b/integrations/webpack-4/tests/integration.test.js @@ -25,13 +25,14 @@ describe('static build', () => { }) }) -describe('watcher', () => { - test('classes are generated when the html file changes', async () => { +describe.each([ + { TAILWIND_MODE: 'watch' }, + { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, +])('watcher %p', (env) => { + test(`classes are generated when the html file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold"></div>`) - let runningProcess = $('webpack --mode=development --watch', { - env: { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, - }) + let runningProcess = $('webpack --mode=development --watch', { env }) await waitForOutputFileCreation('main.css') @@ -80,12 +81,10 @@ describe('watcher', () => { return runningProcess.stop() }) - test('classes are generated when the tailwind.config.js file changes', async () => { + test(`classes are generated when the tailwind.config.js file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`) - let runningProcess = $('webpack --mode=development --watch', { - env: { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, - }) + let runningProcess = $('webpack --mode=development --watch', { env }) await waitForOutputFileCreation('main.css') @@ -148,12 +147,10 @@ describe('watcher', () => { return runningProcess.stop() }) - test('classes are generated when the index.css file changes', async () => { + test(`classes are generated when the index.css file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold btn"></div>`) - let runningProcess = $('webpack --mode=development --watch', { - env: { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, - }) + let runningProcess = $('webpack --mode=development --watch', { env }) await waitForOutputFileCreation('main.css') diff --git a/integrations/webpack-5/tests/integration.test.js b/integrations/webpack-5/tests/integration.test.js --- a/integrations/webpack-5/tests/integration.test.js +++ b/integrations/webpack-5/tests/integration.test.js @@ -25,13 +25,14 @@ describe('static build', () => { }) }) -describe('watcher', () => { - test('classes are generated when the html file changes', async () => { +describe.each([ + { TAILWIND_MODE: 'watch' }, + { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, +])('watcher %p', (env) => { + test(`classes are generated when the html file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold"></div>`) - let runningProcess = $('webpack --mode=development --watch', { - env: { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, - }) + let runningProcess = $('webpack --mode=development --watch', { env }) await waitForOutputFileCreation('main.css') @@ -80,12 +81,10 @@ describe('watcher', () => { return runningProcess.stop() }) - test('classes are generated when the tailwind.config.js file changes', async () => { + test(`classes are generated when the tailwind.config.js file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`) - let runningProcess = $('webpack --mode=development --watch', { - env: { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, - }) + let runningProcess = $('webpack --mode=development --watch', { env }) await waitForOutputFileCreation('main.css') @@ -148,12 +147,10 @@ describe('watcher', () => { return runningProcess.stop() }) - test('classes are generated when the index.css file changes', async () => { + test(`classes are generated when the index.css file changes`, async () => { await writeInputFile('index.html', html`<div class="font-bold btn"></div>`) - let runningProcess = $('webpack --mode=development --watch', { - env: { TAILWIND_MODE: 'watch', TAILWIND_DISABLE_TOUCH: true }, - }) + let runningProcess = $('webpack --mode=development --watch', { env }) await waitForOutputFileCreation('main.css') diff --git a/tests/evaluateTailwindFunctions.test.js b/tests/evaluateTailwindFunctions.test.js --- a/tests/evaluateTailwindFunctions.test.js +++ b/tests/evaluateTailwindFunctions.test.js @@ -2,7 +2,7 @@ import postcss from 'postcss' import plugin from '../src/lib/evaluateTailwindFunctions' function run(input, opts = {}) { - return postcss([plugin(opts)]).process(input, { from: undefined }) + return postcss([plugin({ tailwindConfig: opts })]).process(input, { from: undefined }) } test('it looks up values in the theme using dot notation', () => { diff --git a/tests/jit/custom-extractors.test.js b/tests/jit/custom-extractors.test.js --- a/tests/jit/custom-extractors.test.js +++ b/tests/jit/custom-extractors.test.js @@ -65,3 +65,58 @@ test('extractors array', () => { expect(result.css).toMatchFormattedCss(expected) }) }) + +test('extract function', () => { + let config = { + mode: 'jit', + purge: { + content: [path.resolve(__dirname, './custom-extractors.test.html')], + extract: customExtractor, + }, + corePlugins: { preflight: false }, + theme: {}, + plugins: [], + } + + return run(css, config).then((result) => { + expect(result.css).toMatchFormattedCss(expected) + }) +}) + +test('extract.DEFAULT', () => { + let config = { + mode: 'jit', + purge: { + content: [path.resolve(__dirname, './custom-extractors.test.html')], + extract: { + DEFAULT: customExtractor, + }, + }, + corePlugins: { preflight: false }, + theme: {}, + plugins: [], + } + + return run(css, config).then((result) => { + expect(result.css).toMatchFormattedCss(expected) + }) +}) + +test('extract.{extension}', () => { + let config = { + purge: { + content: [path.resolve(__dirname, './custom-extractors.test.html')], + extract: { + html: customExtractor, + }, + }, + mode: 'jit', + corePlugins: { preflight: false }, + theme: {}, + plugins: [], + } + + return run(css, config).then((result) => { + expect(result.css).toMatchFormattedCss(expected) + }) +}) diff --git a/tests/jit/custom-transformers.test.js b/tests/jit/custom-transformers.test.js new file mode 100644 --- /dev/null +++ b/tests/jit/custom-transformers.test.js @@ -0,0 +1,93 @@ +import postcss from 'postcss' +import path from 'path' + +function run(input, config = {}) { + jest.resetModules() + const tailwind = require('../../src/jit/index.js').default + return postcss(tailwind(config)).process(input, { + from: path.resolve(__filename), + }) +} + +function customTransformer(content) { + return content.replace(/uppercase/g, 'lowercase') +} + +const css = ` + @tailwind base; + @tailwind components; + @tailwind utilities; +` + +test('transform function', () => { + let config = { + mode: 'jit', + purge: { + content: [{ raw: '<div class="uppercase"></div>' }], + transform: customTransformer, + }, + corePlugins: { preflight: false, borderColor: false, ringWidth: false, boxShadow: false }, + theme: {}, + plugins: [], + } + + return run(css, config).then((result) => { + expect(result.css).toMatchFormattedCss(` + .lowercase { + text-transform: lowercase; + } + `) + }) +}) + +test('transform.DEFAULT', () => { + let config = { + mode: 'jit', + purge: { + content: [{ raw: '<div class="uppercase"></div>' }], + transform: { + DEFAULT: customTransformer, + }, + }, + corePlugins: { preflight: false, borderColor: false, ringWidth: false, boxShadow: false }, + theme: {}, + plugins: [], + } + + return run(css, config).then((result) => { + expect(result.css).toMatchFormattedCss(` + .lowercase { + text-transform: lowercase; + } + `) + }) +}) + +test('transform.{extension}', () => { + let config = { + mode: 'jit', + purge: { + content: [ + { raw: '<div class="uppercase"></div>', extension: 'html' }, + { raw: '<div class="uppercase"></div>', extension: 'php' }, + ], + transform: { + html: customTransformer, + }, + }, + corePlugins: { preflight: false, borderColor: false, ringWidth: false, boxShadow: false }, + theme: {}, + plugins: [], + } + + return run(css, config).then((result) => { + expect(result.css).toMatchFormattedCss(` + .uppercase { + text-transform: uppercase; + } + .lowercase { + text-transform: lowercase; + } + `) + }) +}) diff --git a/tests/purgeUnusedStyles.test.js b/tests/purgeUnusedStyles.test.js --- a/tests/purgeUnusedStyles.test.js +++ b/tests/purgeUnusedStyles.test.js @@ -663,6 +663,187 @@ test('element selectors are preserved by default', () => { ) }) +test('custom default extractor', () => { + return inProduction( + suppressConsoleLogs(() => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([ + tailwind({ + ...config, + corePlugins: { preflight: false, ringWidth: false, boxShadow: false, borderColor: false }, + purge: { + content: [ + path.resolve(`${__dirname}/fixtures/**/*.html`), + { raw: '<div class="uppercase"></div>', extension: 'php' }, + ], + extract: () => [], + mode: 'all', + preserveHtmlElements: false, + options: { + keyframes: true, + }, + }, + }), + ]) + .process(input, { from: withTestName(inputPath) }) + .then((result) => { + expect(result.css).toMatchFormattedCss('') + }) + }) + ) +}) + +test('custom extension-specific extractor', () => { + return inProduction( + suppressConsoleLogs(() => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([ + tailwind({ + ...config, + corePlugins: { preflight: false, ringWidth: false, boxShadow: false, borderColor: false }, + purge: { + content: [ + path.resolve(`${__dirname}/fixtures/**/*.html`), + { raw: '<div class="lowercase"></div>', extension: 'html' }, + { raw: '<div class="uppercase"></div>', extension: 'php' }, + ], + extract: { + html: () => [], + }, + mode: 'all', + preserveHtmlElements: false, + options: { + keyframes: true, + }, + }, + }), + ]) + .process(input, { from: withTestName(inputPath) }) + .then((result) => { + expect(result.css).toMatchFormattedCss(` + .uppercase { + text-transform: uppercase; + } + `) + }) + }) + ) +}) + +test('custom default transformer', () => { + return inProduction( + suppressConsoleLogs(() => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([ + tailwind({ + ...config, + corePlugins: { preflight: false, ringWidth: false, boxShadow: false, borderColor: false }, + purge: { + content: [{ raw: '<div class="uppercase"></div>', extension: 'html' }], + transform: (content) => content.replace(/uppercase/g, 'lowercase'), + mode: 'all', + preserveHtmlElements: false, + options: { + keyframes: true, + }, + }, + }), + ]) + .process(input, { from: withTestName(inputPath) }) + .then((result) => { + expect(result.css).toMatchFormattedCss(` + .lowercase { + text-transform: lowercase; + } + `) + }) + }) + ) +}) + +test('custom explicit default transformer', () => { + return inProduction( + suppressConsoleLogs(() => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([ + tailwind({ + ...config, + corePlugins: { preflight: false, ringWidth: false, boxShadow: false, borderColor: false }, + purge: { + content: [{ raw: '<div class="uppercase"></div>', extension: 'html' }], + transform: { + DEFAULT: (content) => content.replace(/uppercase/g, 'lowercase'), + }, + mode: 'all', + preserveHtmlElements: false, + options: { + keyframes: true, + }, + }, + }), + ]) + .process(input, { from: withTestName(inputPath) }) + .then((result) => { + expect(result.css).toMatchFormattedCss(` + .lowercase { + text-transform: lowercase; + } + `) + }) + }) + ) +}) + +test('custom extension-specific transformer', () => { + return inProduction( + suppressConsoleLogs(() => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([ + tailwind({ + ...config, + corePlugins: { preflight: false, ringWidth: false, boxShadow: false, borderColor: false }, + purge: { + content: [ + { raw: '<div class="uppercase"></div>', extension: 'html' }, + { raw: '<div class="uppercase"></div>', extension: 'php' }, + ], + transform: { + html: (content) => content.replace(/uppercase/g, 'lowercase'), + }, + mode: 'all', + preserveHtmlElements: false, + options: { + keyframes: true, + }, + }, + }), + ]) + .process(input, { from: withTestName(inputPath) }) + .then((result) => { + expect(result.css).toMatchFormattedCss(` + .uppercase { + text-transform: uppercase; + } + + .lowercase { + text-transform: lowercase; + } + `) + }) + }) + ) +}) + test('element selectors are preserved even when defaultExtractor is overridden', () => { return inProduction( suppressConsoleLogs(() => { diff --git a/tests/screenAtRule.test.js b/tests/screenAtRule.test.js --- a/tests/screenAtRule.test.js +++ b/tests/screenAtRule.test.js @@ -3,7 +3,7 @@ import plugin from '../src/lib/substituteScreenAtRules' import config from '../stubs/defaultConfig.stub.js' function run(input, opts = config) { - return postcss([plugin(opts)]).process(input, { from: undefined }) + return postcss([plugin({ tailwindConfig: opts })]).process(input, { from: undefined }) } test('it can generate media queries from configured screen sizes', () => {
[Bug]: JIT doesn't work as expected with multiple entry points importing CSS in Webpack ### What version of Tailwind CSS are you using? v2.1.2 ### What build tool (or framework if it abstracts the build tool) are you using? Webpack 5.27.2 ### What version of Node.js are you using? 14.16.0 ### What browser are you using? all ### What operating system are you using? macOS ### Reproduction repository https://github.com/leobauza/tw-jit-bug ### Describe your issue ## The Problem: When there are multiple entry points that import css in Webpack, JIT does not behave as expected. ## Context: I ran into this problem trying to set up a Craft CMS site where we have a need for multiple entry points, each with their own CSS. After a lot of trial and error we noticed that whenever we have multiple entry points JIT seems to not update the css file until we hit save on a `.css` file. That's a ok workaround, but I am wondering if I am doing something wrong or if this is a bug in Tailwind JIT. Removing JIT also works, but I like the JIT experience too much so saving a `.css` file is my workaround. ## To reproduce the problem in the reproduction repository: 1. Start dev server with `yarn start` 2. Open `tailwind.config.js` 3. Change the value of `spacing[150]` 4. There will be no change until the `src/css/styles.css` file is saved 5. Open `./src/js/second.js` 6. Comment out the line: `import '../css/second.css'` 7. Doing step 2 and 3 results in a normal HMR update Thanks! Love the JIT improvements! ## A video of all of the above in action: https://user-images.githubusercontent.com/1823027/118910693-ee078a00-b8f2-11eb-834e-447d1c1ac0cf.mov
2021-05-26T13:29:46Z
2.1
tailwindlabs/tailwindcss
4,263
tailwindlabs__tailwindcss-4263
[ "4096" ]
76c670fc2913eb03a340a015d30d3db53cca9c22
diff --git a/src/jit/lib/generateRules.js b/src/jit/lib/generateRules.js --- a/src/jit/lib/generateRules.js +++ b/src/jit/lib/generateRules.js @@ -192,9 +192,13 @@ function* resolveMatchedPlugins(classCandidate, context) { } } +function splitWithSeparator(input, separator) { + return input.split(new RegExp(`\\${separator}(?![^[]*\\])`, 'g')) +} + function* resolveMatches(candidate, context) { let separator = context.tailwindConfig.separator - let [classCandidate, ...variants] = candidate.split(separator).reverse() + let [classCandidate, ...variants] = splitWithSeparator(candidate, separator).reverse() let important = false if (classCandidate.startsWith('!')) { diff --git a/src/jit/lib/setupContext.js b/src/jit/lib/setupContext.js --- a/src/jit/lib/setupContext.js +++ b/src/jit/lib/setupContext.js @@ -534,9 +534,9 @@ function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offs function wrapped(modifier) { let { type = 'any' } = options - let value = coerceValue(type, modifier, options.values) + let [value, coercedType] = coerceValue(type, modifier, options.values) - if (value === undefined) { + if (type !== coercedType || value === undefined) { return [] } diff --git a/src/util/pluginUtils.js b/src/util/pluginUtils.js --- a/src/util/pluginUtils.js +++ b/src/util/pluginUtils.js @@ -204,6 +204,18 @@ let typeMap = { lookup: asLookupValue, } +function splitAtFirst(input, delim) { + return (([first, ...rest]) => [first, rest.join(delim)])(input.split(delim)) +} + export function coerceValue(type, modifier, values) { - return typeMap[type](modifier, values) + if (modifier.startsWith('[') && modifier.endsWith(']')) { + let [explicitType, value] = splitAtFirst(modifier.slice(1, -1), ':') + + if (value.length > 0 && Object.keys(typeMap).includes(explicitType)) { + return [asValue(`[${value}]`, values), explicitType] + } + } + + return [typeMap[type](modifier, values), type] }
diff --git a/tests/jit/arbitrary-values.test.css b/tests/jit/arbitrary-values.test.css --- a/tests/jit/arbitrary-values.test.css +++ b/tests/jit/arbitrary-values.test.css @@ -269,12 +269,18 @@ .text-\[2\.23rem\] { font-size: 2.23rem; } +.text-\[length\:var\(--font-size\)\] { + font-size: var(--font-size); +} .leading-\[var\(--leading\)\] { line-height: var(--leading); } .tracking-\[var\(--tracking\)\] { letter-spacing: var(--tracking); } +.text-\[color\:var\(--color\)\] { + color: var(--color); +} .placeholder-\[var\(--placeholder\)\]::placeholder { color: var(--placeholder); } diff --git a/tests/jit/arbitrary-values.test.html b/tests/jit/arbitrary-values.test.html --- a/tests/jit/arbitrary-values.test.html +++ b/tests/jit/arbitrary-values.test.html @@ -54,6 +54,9 @@ <div class="skew-x-[3px]"></div> <div class="skew-y-[3px]"></div> <div class="text-[2.23rem]"></div> + <div class="text-[length:var(--font-size)]"></div> + <div class="text-[color:var(--color)]"></div> + <div class="text-[angle:var(--angle)]"></div> <div class="duration-[2s]"></div> <div class="m-[7px]"></div> <div class="mx-[7px]"></div>
[JIT] font/text size does not support css variables ### What version of Tailwind CSS are you using? 2.1.0 ### What build tool (or framework if it abstracts the build tool) are you using? postcss8 ### What version of Node.js are you using? 15.14.0 ### What browser are you using? Firefox ### What operating system are you using? Arch Linux ### Reproduction repository See comment ### Describe your issue Hey guys! I try to implement fluid font sizes according to https://www.smashingmagazine.com/2021/04/designing-developing-fluid-type-space-scales/ I have [generated the following pattern](https://utopia.fyi/type/calculator): ```css /* @link https://utopia.fyi/type/calculator?c=320,21,1.2,1140,24,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l */ :root { --step--2: clamp(0.91rem, 0.89rem + 0.10vw, 0.96rem); --step--1: clamp(1.09rem, 1.05rem + 0.21vw, 1.20rem); --step-0: clamp(1.31rem, 1.24rem + 0.37vw, 1.50rem); --step-1: clamp(1.58rem, 1.46rem + 0.59vw, 1.88rem); --step-2: clamp(1.89rem, 1.71rem + 0.89vw, 2.34rem); --step-3: clamp(2.27rem, 2.01rem + 1.29vw, 2.93rem); --step-4: clamp(2.72rem, 2.36rem + 1.83vw, 3.66rem); --step-5: clamp(3.27rem, 2.75rem + 2.56vw, 4.58rem); } ``` But the syntax `text-[var(--step-5)]` does not work. Using a fixed pixel size works, and using the style inline also works. ```html <div class="text-[var(--step-5)]">test1</div> <div class="text-[50px]">test2</div> <div style="font-size: var(--step-5);">test3</div> ```
Yeah this is tough because of naming conflicts. Tailwind has classes like `text-sm` but also `text-black`, so when you say `text-[var(--foo)]` we don't know if that is a color or a font-size. I think one way we could solve this is having a dedicated plugin for handling arbitrary text values that generates this: ```css .text-\[var\(--foo\)\] { font-size: var(--foo); color: var(--foo); } ``` ...and making sure those styles are inserted before regular font size and text color utilities, so you could still override them. Will leave this open until have a chance to explore that and see if it's a viable solution. As an alternative, adding fluid text sizes would also work for me. That does not address the fact, that variables will still not work, but will fix my root cause. Did you consider adding fluid designs to tailwind yet? I really like the idea, but you have more experience in css than me: https://www.smashingmagazine.com/2021/04/designing-developing-fluid-type-space-scales/
2021-05-06T19:34:43Z
2.1
tailwindlabs/tailwindcss
4,214
tailwindlabs__tailwindcss-4214
[ "3948" ]
e764df5055b7e4a1f2edb72d38b76b338d0e2f13
diff --git a/src/index.js b/src/index.js --- a/src/index.js +++ b/src/index.js @@ -97,7 +97,7 @@ module.exports = function (config) { return { postcssPlugin: 'tailwindcss', - plugins: [...plugins, processTailwindFeatures(getConfig), formatCSS], + plugins: [...plugins, processTailwindFeatures(getConfig, resolvedConfigPath), formatCSS], } } diff --git a/src/jit/lib/setupContext.js b/src/jit/lib/setupContext.js --- a/src/jit/lib/setupContext.js +++ b/src/jit/lib/setupContext.js @@ -787,7 +787,14 @@ export default function setupContext(configOrPath) { configDependencies: new Set(), candidateFiles: purgeContent .filter((item) => typeof item === 'string') - .map((path) => normalizePath(path)), + .map((purgePath) => + normalizePath( + path.resolve( + userConfigPath === null ? process.cwd() : path.dirname(userConfigPath), + purgePath + ) + ) + ), rawContent: purgeContent .filter((item) => typeof item.raw === 'string') .map(({ raw, extension }) => ({ content: raw, extension })), diff --git a/src/lib/purgeUnusedStyles.js b/src/lib/purgeUnusedStyles.js --- a/src/lib/purgeUnusedStyles.js +++ b/src/lib/purgeUnusedStyles.js @@ -3,6 +3,7 @@ import postcss from 'postcss' import purgecss from '@fullhuman/postcss-purgecss' import log from '../util/log' import htmlTags from 'html-tags' +import path from 'path' function removeTailwindMarkers(css) { css.walkAtRules('tailwind', (rule) => rule.remove()) @@ -33,7 +34,7 @@ export function tailwindExtractor(content) { return broadMatches.concat(broadMatchesWithoutTrailingSlash).concat(innerMatches) } -export default function purgeUnusedUtilities(config, configChanged) { +export default function purgeUnusedUtilities(config, configChanged, resolvedConfigPath) { const purgeEnabled = _.get( config, 'purge.enabled', @@ -104,7 +105,6 @@ export default function purgeUnusedUtilities(config, configChanged) { }, removeTailwindMarkers, purgecss({ - content: Array.isArray(config.purge) ? config.purge : config.purge.content, defaultExtractor: (content) => { const extractor = defaultExtractor || tailwindExtractor const preserved = [...extractor(content)] @@ -116,6 +116,18 @@ export default function purgeUnusedUtilities(config, configChanged) { return preserved }, ...purgeOptions, + content: (Array.isArray(config.purge) + ? config.purge + : config.purge.content || purgeOptions.content || [] + ).map((item) => { + if (typeof item === 'string') { + return path.resolve( + resolvedConfigPath ? path.dirname(resolvedConfigPath) : process.cwd(), + item + ) + } + return item + }), }), ]) } diff --git a/src/processTailwindFeatures.js b/src/processTailwindFeatures.js --- a/src/processTailwindFeatures.js +++ b/src/processTailwindFeatures.js @@ -24,7 +24,7 @@ let previousConfig = null let processedPlugins = null let getProcessedPlugins = null -export default function (getConfig) { +export default function (getConfig, resolvedConfigPath) { return function (css) { const config = getConfig() const configChanged = hash(previousConfig) !== hash(config) @@ -65,7 +65,7 @@ export default function (getConfig) { substituteScreenAtRules(config), substituteClassApplyAtRules(config, getProcessedPlugins, configChanged), applyImportantConfiguration(config), - purgeUnusedStyles(config, configChanged), + purgeUnusedStyles(config, configChanged, resolvedConfigPath), ]).process(css, { from: _.get(css, 'source.input.file') }) } }
diff --git a/tests/fixtures/custom-purge-config.js b/tests/fixtures/custom-purge-config.js new file mode 100644 --- /dev/null +++ b/tests/fixtures/custom-purge-config.js @@ -0,0 +1,20 @@ +module.exports = { + purge: ['./*.html'], + theme: { + extend: { + colors: { + 'black!': '#000', + }, + spacing: { + 1.5: '0.375rem', + '(1/2+8)': 'calc(50% + 2rem)', + }, + minHeight: { + '(screen-4)': 'calc(100vh - 1rem)', + }, + fontFamily: { + '%#$@': 'Comic Sans', + }, + }, + }, +} diff --git a/tests/jit/relative-purge-paths.config.js b/tests/jit/relative-purge-paths.config.js new file mode 100644 --- /dev/null +++ b/tests/jit/relative-purge-paths.config.js @@ -0,0 +1,7 @@ +module.exports = { + mode: 'jit', + purge: ['./relative-purge-paths.test.html'], + corePlugins: { preflight: false }, + theme: {}, + plugins: [], +} diff --git a/tests/jit/relative-purge-paths.test.css b/tests/jit/relative-purge-paths.test.css new file mode 100644 --- /dev/null +++ b/tests/jit/relative-purge-paths.test.css @@ -0,0 +1,757 @@ +* { + --tw-shadow: 0 0 #0000; + --tw-ring-inset: var(--tw-empty, /*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgba(59, 130, 246, 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; +} +.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; +} +.pointer-events-none { + pointer-events: none; +} +.invisible { + visibility: hidden; +} +.absolute { + position: absolute; +} +.inset-0 { + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; +} +.inset-y-4 { + top: 1rem; + bottom: 1rem; +} +.inset-x-2 { + left: 0.5rem; + right: 0.5rem; +} +.top-6 { + top: 1.5rem; +} +.right-8 { + right: 2rem; +} +.bottom-12 { + bottom: 3rem; +} +.left-16 { + left: 4rem; +} +.isolate { + isolation: isolate; +} +.isolation-auto { + isolation: auto; +} +.z-30 { + z-index: 30; +} +.order-last { + order: 9999; +} +.order-2 { + order: 2; +} +.col-span-3 { + grid-column: span 3 / span 3; +} +.col-start-1 { + grid-column-start: 1; +} +.col-end-4 { + grid-column-end: 4; +} +.row-span-2 { + grid-row: span 2 / span 2; +} +.row-start-3 { + grid-row-start: 3; +} +.row-end-5 { + grid-row-end: 5; +} +.float-right { + float: right; +} +.clear-left { + clear: left; +} +.m-4 { + margin: 1rem; +} +.my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} +.mx-auto { + margin-left: auto; + margin-right: auto; +} +.mt-0 { + margin-top: 0px; +} +.mr-1 { + margin-right: 0.25rem; +} +.mb-3 { + margin-bottom: 0.75rem; +} +.ml-4 { + margin-left: 1rem; +} +.box-border { + box-sizing: border-box; +} +.inline-grid { + display: inline-grid; +} +.hidden { + display: none; +} +.h-16 { + height: 4rem; +} +.max-h-screen { + max-height: 100vh; +} +.min-h-0 { + min-height: 0px; +} +.w-12 { + width: 3rem; +} +.min-w-min { + min-width: min-content; +} +.max-w-full { + max-width: 100%; +} +.flex-1 { + flex: 1 1 0%; +} +.flex-shrink { + flex-shrink: 1; +} +.flex-shrink-0 { + flex-shrink: 0; +} +.flex-grow { + flex-grow: 1; +} +.flex-grow-0 { + flex-grow: 0; +} +.table-fixed { + table-layout: fixed; +} +.border-collapse { + border-collapse: collapse; +} +.transform { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translateX(var(--tw-translate-x)) translateY(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 { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); +} +.origin-top-right { + transform-origin: top right; +} +.translate-x-5 { + --tw-translate-x: 1.25rem; +} +.-translate-x-4 { + --tw-translate-x: -1rem; +} +.translate-y-6 { + --tw-translate-y: 1.5rem; +} +.-translate-x-3 { + --tw-translate-x: -0.75rem; +} +.rotate-3 { + --tw-rotate: 3deg; +} +.skew-y-12 { + --tw-skew-y: 12deg; +} +.skew-x-12 { + --tw-skew-x: 12deg; +} +.scale-95 { + --tw-scale-x: 0.95; + --tw-scale-y: 0.95; +} +.animate-none { + animation: none; +} +@keyframes spin { + to { + transform: rotate(360deg); + } +} +.animate-spin { + animation: spin 1s linear infinite; +} +.cursor-pointer { + cursor: pointer; +} +.select-none { + user-select: none; +} +.resize-none { + resize: none; +} +.list-inside { + list-style-position: inside; +} +.list-disc { + list-style-type: disc; +} +.appearance-none { + appearance: none; +} +.auto-cols-min { + grid-auto-columns: min-content; +} +.grid-flow-row { + grid-auto-flow: row; +} +.auto-rows-max { + grid-auto-rows: max-content; +} +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} +.grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); +} +.flex-row-reverse { + flex-direction: row-reverse; +} +.flex-wrap { + flex-wrap: wrap; +} +.place-content-start { + place-content: start; +} +.place-items-end { + place-items: end; +} +.content-center { + align-content: center; +} +.items-start { + align-items: flex-start; +} +.justify-center { + justify-content: center; +} +.justify-items-end { + justify-items: end; +} +.gap-4 { + gap: 1rem; +} +.gap-x-2 { + column-gap: 0.5rem; +} +.gap-y-3 { + row-gap: 0.75rem; +} +.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-y-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-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-2 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(2px * var(--tw-divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--tw-divide-x-reverse))); +} +.divide-y-4 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-y-reverse: 0; + border-top-width: calc(4px * calc(1 - var(--tw-divide-y-reverse))); + border-bottom-width: calc(4px * var(--tw-divide-y-reverse)); +} +.divide-x-0 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(0px * var(--tw-divide-x-reverse)); + border-left-width: calc(0px * calc(1 - var(--tw-divide-x-reverse))); +} +.divide-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-y-reverse: 0; + border-top-width: calc(0px * calc(1 - var(--tw-divide-y-reverse))); + border-bottom-width: calc(0px * var(--tw-divide-y-reverse)); +} +.divide-dotted > :not([hidden]) ~ :not([hidden]) { + border-style: dotted; +} +.divide-gray-200 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgba(229, 231, 235, var(--tw-divide-opacity)); +} +.divide-opacity-50 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 0.5; +} +.place-self-center { + place-self: center; +} +.self-end { + align-self: flex-end; +} +.justify-self-start { + justify-self: start; +} +.overflow-hidden { + overflow: hidden; +} +.overscroll-contain { + overscroll-behavior: contain; +} +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.overflow-ellipsis { + text-overflow: ellipsis; +} +.whitespace-nowrap { + white-space: nowrap; +} +.break-words { + overflow-wrap: break-word; +} +.rounded-md { + border-radius: 0.375rem; +} +.border { + border-width: 1px; +} +.border-2 { + border-width: 2px; +} +.border-solid { + border-style: solid; +} +.border-black { + --tw-border-opacity: 1; + border-color: rgba(0, 0, 0, var(--tw-border-opacity)); +} +.border-opacity-10 { + --tw-border-opacity: 0.1; +} +.bg-green-500 { + --tw-bg-opacity: 1; + background-color: rgba(16, 185, 129, var(--tw-bg-opacity)); +} +.bg-opacity-20 { + --tw-bg-opacity: 0.2; +} +.bg-gradient-to-r { + background-image: linear-gradient(to right, var(--tw-gradient-stops)); +} +.from-red-300 { + --tw-gradient-from: #fca5a5; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(252, 165, 165, 0)); +} +.via-purple-200 { + --tw-gradient-stops: var(--tw-gradient-from), #ddd6fe, + var(--tw-gradient-to, rgba(221, 214, 254, 0)); +} +.to-blue-400 { + --tw-gradient-to: #60a5fa; +} +.decoration-slice { + box-decoration-break: slice; +} +.decoration-clone { + box-decoration-break: clone; +} +.bg-cover { + background-size: cover; +} +.bg-local { + background-attachment: local; +} +.bg-clip-border { + background-clip: border-box; +} +.bg-top { + background-position: top; +} +.bg-no-repeat { + background-repeat: no-repeat; +} +.bg-origin-border { + background-origin: border-box; +} +.bg-origin-padding { + background-origin: padding-box; +} +.bg-origin-content { + background-origin: content-box; +} +.fill-current { + fill: currentColor; +} +.stroke-current { + stroke: currentColor; +} +.stroke-2 { + stroke-width: 2; +} +.object-cover { + object-fit: cover; +} +.object-bottom { + object-position: bottom; +} +.p-4 { + padding: 1rem; +} +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} +.pt-1 { + padding-top: 0.25rem; +} +.pr-2 { + padding-right: 0.5rem; +} +.pb-3 { + padding-bottom: 0.75rem; +} +.pl-4 { + padding-left: 1rem; +} +.text-center { + text-align: center; +} +.align-middle { + vertical-align: middle; +} +.font-sans { + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; +} +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} +.font-medium { + font-weight: 500; +} +.uppercase { + text-transform: uppercase; +} +.not-italic { + font-style: normal; +} +.ordinal, +.slashed-zero, +.lining-nums, +.oldstyle-nums, +.proportional-nums, +.tabular-nums, +.diagonal-fractions, +.stacked-fractions { + --tw-ordinal: var(--tw-empty, /*!*/ /*!*/); + --tw-slashed-zero: var(--tw-empty, /*!*/ /*!*/); + --tw-numeric-figure: var(--tw-empty, /*!*/ /*!*/); + --tw-numeric-spacing: var(--tw-empty, /*!*/ /*!*/); + --tw-numeric-fraction: var(--tw-empty, /*!*/ /*!*/); + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) + var(--tw-numeric-spacing) var(--tw-numeric-fraction); +} +.ordinal { + --tw-ordinal: ordinal; +} +.tabular-nums { + --tw-numeric-spacing: tabular-nums; +} +.diagonal-fractions { + --tw-numeric-fraction: diagonal-fractions; +} +.leading-relaxed { + line-height: 1.625; +} +.leading-5 { + line-height: 1.25rem; +} +.tracking-tight { + letter-spacing: -0.025em; +} +.text-indigo-500 { + --tw-text-opacity: 1; + color: rgba(99, 102, 241, var(--tw-text-opacity)); +} +.text-opacity-10 { + --tw-text-opacity: 0.1; +} +.underline { + text-decoration: underline; +} +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.placeholder-green-300::placeholder { + --tw-placeholder-opacity: 1; + color: rgba(110, 231, 183, var(--tw-placeholder-opacity)); +} +.placeholder-opacity-60::placeholder { + --tw-placeholder-opacity: 0.6; +} +.opacity-90 { + opacity: 0.9; +} +.bg-blend-darken { + background-blend-mode: darken; +} +.bg-blend-difference { + background-blend-mode: difference; +} +.mix-blend-multiply { + mix-blend-mode: multiply; +} +.mix-blend-saturation { + mix-blend-mode: saturation; +} +.shadow { + --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} +.shadow-md { + --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} +.shadow-lg { + --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + 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-black { + outline: 2px dotted black; + outline-offset: 2px; +} +.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-4 { + --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(4px + 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-white { + --tw-ring-opacity: 1; + --tw-ring-color: rgba(255, 255, 255, var(--tw-ring-opacity)); +} +.ring-opacity-40 { + --tw-ring-opacity: 0.4; +} +.ring-offset-2 { + --tw-ring-offset-width: 2px; +} +.ring-offset-blue-300 { + --tw-ring-offset-color: #93c5fd; +} +.filter { + --tw-blur: var(--tw-empty, /*!*/ /*!*/); + --tw-brightness: var(--tw-empty, /*!*/ /*!*/); + --tw-contrast: var(--tw-empty, /*!*/ /*!*/); + --tw-grayscale: var(--tw-empty, /*!*/ /*!*/); + --tw-hue-rotate: var(--tw-empty, /*!*/ /*!*/); + --tw-invert: var(--tw-empty, /*!*/ /*!*/); + --tw-saturate: var(--tw-empty, /*!*/ /*!*/); + --tw-sepia: var(--tw-empty, /*!*/ /*!*/); + --tw-drop-shadow: var(--tw-empty, /*!*/ /*!*/); + 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; +} +.blur-md { + --tw-blur: blur(12px); +} +.brightness-150 { + --tw-brightness: brightness(1.5); +} +.contrast-50 { + --tw-contrast: contrast(0.5); +} +.drop-shadow-md { + --tw-drop-shadow: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07)) + drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06)); +} +.grayscale { + --tw-grayscale: grayscale(100%); +} +.hue-rotate-60 { + --tw-hue-rotate: hue-rotate(60deg); +} +.invert { + --tw-invert: invert(100%); +} +.saturate-200 { + --tw-saturate: saturate(2); +} +.sepia { + --tw-sepia: sepia(100%); +} +.backdrop-filter { + --tw-backdrop-blur: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-brightness: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-contrast: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-grayscale: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-hue-rotate: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-invert: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-opacity: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-saturate: var(--tw-empty, /*!*/ /*!*/); + --tw-backdrop-sepia: var(--tw-empty, /*!*/ /*!*/); + 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 { + backdrop-filter: none; +} +.backdrop-blur-lg { + --tw-backdrop-blur: blur(16px); +} +.backdrop-brightness-50 { + --tw-backdrop-brightness: brightness(0.5); +} +.backdrop-contrast-0 { + --tw-backdrop-contrast: contrast(0); +} +.backdrop-grayscale { + --tw-backdrop-grayscale: grayscale(100%); +} +.backdrop-hue-rotate-90 { + --tw-backdrop-hue-rotate: hue-rotate(90deg); +} +.backdrop-invert { + --tw-backdrop-invert: invert(100%); +} +.backdrop-opacity-75 { + --tw-backdrop-opacity: opacity(0.75); +} +.backdrop-saturate-150 { + --tw-backdrop-saturate: saturate(1.5); +} +.backdrop-sepia { + --tw-backdrop-sepia: sepia(100%); +} +.transition { + transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, + transform, filter, backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.delay-300 { + transition-delay: 300ms; +} +.duration-200 { + transition-duration: 200ms; +} +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} diff --git a/tests/jit/relative-purge-paths.test.html b/tests/jit/relative-purge-paths.test.html new file mode 100644 --- /dev/null +++ b/tests/jit/relative-purge-paths.test.html @@ -0,0 +1,147 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <link rel="icon" href="/favicon.ico" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Title</title> + <link rel="stylesheet" href="./tailwind.css" /> + </head> + <body> + <div class="sr-only"></div> + <div class="content-center"></div> + <div class="items-start"></div> + <div class="self-end"></div> + <div class="animate-none"></div> + <div class="animate-spin"></div> + <div class="appearance-none"></div> + <div class="bg-local"></div> + <div class="bg-clip-border"></div> + <div class="bg-green-500"></div> + <div class="bg-gradient-to-r"></div> + <div class="bg-opacity-20"></div> + <div class="bg-top"></div> + <div class="bg-no-repeat"></div> + <div class="bg-cover"></div> + <div class="bg-origin-border bg-origin-padding bg-origin-content"></div> + <div class="border-collapse"></div> + <div class="border-black"></div> + <div class="border-opacity-10"></div> + <div class="rounded-md"></div> + <div class="border-solid"></div> + <div class="border"></div> + <div class="border-2"></div> + <div class="shadow"></div> + <div class="shadow-md"></div> + <div class="shadow-lg"></div> + <div class="decoration-clone decoration-slice"></div> + <div class="box-border"></div> + <div class="clear-left"></div> + <div class="container"></div> + <div class="cursor-pointer"></div> + <div class="hidden inline-grid"></div> + <div class="divide-gray-200"></div> + <div class="divide-opacity-50"></div> + <div class="divide-dotted"></div> + <div class="divide-x-2 divide-y-4 divide-x-0 divide-y-0"></div> + <div class="fill-current"></div> + <div class="flex-1"></div> + <div class="flex-row-reverse"></div> + <div class="flex-grow"></div> + <div class="flex-grow-0"></div> + <div class="flex-shrink"></div> + <div class="flex-shrink-0"></div> + <div class="flex-wrap"></div> + <div class="float-right"></div> + <div class="font-sans"></div> + <div class="text-2xl"></div> + <div class="antialiased"></div> + <div class="not-italic"></div> + <div class="tabular-nums ordinal diagonal-fractions"></div> + <div class="font-medium"></div> + <div class="gap-x-2 gap-y-3 gap-4"></div> + <div class="from-red-300 via-purple-200 to-blue-400"></div> + <div class="auto-cols-min"></div> + <div class="grid-flow-row"></div> + <div class="auto-rows-max"></div> + <div class="col-span-3"></div> + <div class="col-start-1"></div> + <div class="col-end-4"></div> + <div class="row-span-2"></div> + <div class="row-start-3"></div> + <div class="row-end-5"></div> + <div class="grid-cols-4"></div> + <div class="grid-rows-3"></div> + <div class="h-16"></div> + <div class="inset-0 inset-y-4 inset-x-2 top-6 right-8 bottom-12 left-16"></div> + <div class="isolate isolation-auto"></div> + <div class="justify-center"></div> + <div class="justify-items-end"></div> + <div class="justify-self-start"></div> + <div class="tracking-tight"></div> + <div class="leading-relaxed leading-5"></div> + <div class="list-inside"></div> + <div class="list-disc"></div> + <div class="m-4 my-2 mx-auto mt-0 mr-1 mb-3 ml-4"></div> + <div class="max-h-screen"></div> + <div class="max-w-full"></div> + <div class="min-h-0"></div> + <div class="min-w-min"></div> + <div class="object-cover"></div> + <div class="object-bottom"></div> + <div class="opacity-90"></div> + <div class="bg-blend-darken bg-blend-difference"></div> + <div class="mix-blend-multiply mix-blend-saturation"></div> + <div class="order-last order-2"></div> + <div class="outline-none outline-black"></div> + <div class="overflow-hidden"></div> + <div class="overscroll-contain"></div> + <div class="p-4 py-2 px-3 pt-1 pr-2 pb-3 pl-4"></div> + <div class="place-content-start"></div> + <div class="placeholder-green-300"></div> + <div class="placeholder-opacity-60"></div> + <div class="place-items-end"></div> + <div class="place-self-center"></div> + <div class="pointer-events-none"></div> + <div class="absolute"></div> + <div class="resize-none"></div> + <div class="ring-white"></div> + <div class="ring-offset-blue-300"></div> + <div class="ring-offset-2"></div> + <div class="ring-opacity-40"></div> + <div class="ring ring-4"></div> + <div + class="filter filter-none blur-md brightness-150 contrast-50 drop-shadow-md grayscale hue-rotate-60 invert saturate-200 sepia" + ></div> + <div + class="backdrop-filter backdrop-filter-none backdrop-blur-lg backdrop-brightness-50 backdrop-contrast-0 backdrop-grayscale backdrop-hue-rotate-90 backdrop-invert backdrop-opacity-75 backdrop-saturate-150 backdrop-sepia" + ></div> + <div class="rotate-3"></div> + <div class="scale-95"></div> + <div class="skew-y-12 skew-x-12"></div> + <div class="space-x-4 space-y-3 space-x-reverse space-y-reverse"></div> + <div class="stroke-current"></div> + <div class="stroke-2"></div> + <div class="table-fixed"></div> + <div class="text-center"></div> + <div class="text-indigo-500"></div> + <div class="underline"></div> + <div class="text-opacity-10"></div> + <div class="overflow-ellipsis truncate"></div> + <div class="uppercase"></div> + <div class="transform transform-gpu"></div> + <div class="origin-top-right"></div> + <div class="delay-300"></div> + <div class="duration-200"></div> + <div class="transition transition-all"></div> + <div class="ease-in-out"></div> + <div class="translate-x-5 -translate-x-4 translate-y-6 -translate-x-3"></div> + <div class="select-none"></div> + <div class="align-middle"></div> + <div class="invisible"></div> + <div class="whitespace-nowrap"></div> + <div class="w-12"></div> + <div class="break-words"></div> + <div class="z-30"></div> + </body> +</html> diff --git a/tests/jit/relative-purge-paths.test.js b/tests/jit/relative-purge-paths.test.js new file mode 100644 --- /dev/null +++ b/tests/jit/relative-purge-paths.test.js @@ -0,0 +1,25 @@ +import postcss from 'postcss' +import fs from 'fs' +import path from 'path' +import tailwind from '../../src/jit/index.js' + +function run(input, config = {}) { + return postcss(tailwind(config)).process(input, { + from: path.resolve(__filename), + }) +} + +test('relative purge paths', () => { + let css = ` + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + + return run(css, path.resolve(__dirname, './relative-purge-paths.config.js')).then((result) => { + let expectedPath = path.resolve(__dirname, './relative-purge-paths.test.css') + let expected = fs.readFileSync(expectedPath, 'utf8') + + expect(result.css).toMatchFormattedCss(expected) + }) +}) diff --git a/tests/purgeUnusedStyles.test.js b/tests/purgeUnusedStyles.test.js --- a/tests/purgeUnusedStyles.test.js +++ b/tests/purgeUnusedStyles.test.js @@ -4,6 +4,7 @@ import postcss from 'postcss' import tailwind from '../src/index' import { tailwindExtractor } from '../src/lib/purgeUnusedStyles' import defaultConfig from '../stubs/defaultConfig.stub.js' +import customConfig from './fixtures/custom-purge-config.js' function suppressConsoleLogs(cb, type = 'warn') { return () => { @@ -38,25 +39,13 @@ async function inProduction(callback) { return result } +function withTestName(path) { + return `${path}?test=${expect.getState().currentTestName}` +} + const config = { ...defaultConfig, - theme: { - extend: { - colors: { - 'black!': '#000', - }, - spacing: { - 1.5: '0.375rem', - '(1/2+8)': 'calc(50% + 2rem)', - }, - minHeight: { - '(screen-4)': 'calc(100vh - 1rem)', - }, - fontFamily: { - '%#$@': 'Comic Sans', - }, - }, - }, + ...customConfig, } delete config.presets @@ -108,7 +97,22 @@ test('purges unused classes', () => { purge: [path.resolve(`${__dirname}/fixtures/**/*.html`)], }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) + .then((result) => { + assertPurged(result) + }) + }) + ) +}) + +test('purge patterns are resolved relative to the config file', () => { + return inProduction( + suppressConsoleLogs(() => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([tailwind(path.resolve(`${__dirname}/fixtures/custom-purge-config.js`))]) + .process(input, { from: withTestName(inputPath) }) .then((result) => { assertPurged(result) }) @@ -275,7 +279,7 @@ test('purges unused classes with important string', () => { purge: [path.resolve(`${__dirname}/fixtures/**/*.html`)], }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { assertPurged(result) }) @@ -298,7 +302,7 @@ test('mode must be a valid value', () => { content: [path.resolve(`${__dirname}/fixtures/**/*.html`)], }, }), - ]).process(input, { from: inputPath }) + ]).process(input, { from: withTestName(inputPath) }) ).rejects.toThrow() }) ) @@ -319,7 +323,7 @@ test('components are purged by default in layers mode', () => { purge: [path.resolve(`${__dirname}/fixtures/**/*.html`)], }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { expect(result.css).not.toContain('.container') assertPurged(result) @@ -347,7 +351,7 @@ test('you can specify which layers to purge', () => { }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const rules = extractRules(result.root) expect(rules).toContain('optgroup') @@ -377,7 +381,7 @@ test('you can purge just base and component layers (but why)', () => { }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const rules = extractRules(result.root) expect(rules).not.toContain('[type="checkbox"]') @@ -439,7 +443,7 @@ test( purge: [path.resolve(`${__dirname}/fixtures/**/*.html`)], }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const expected = fs.readFileSync( path.resolve(`${__dirname}/fixtures/tailwind-output.css`), @@ -465,7 +469,7 @@ test('does not purge if the array is empty', () => { purge: [], }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { process.env.NODE_ENV = OLD_NODE_ENV const expected = fs.readFileSync( @@ -491,7 +495,7 @@ test('does not purge if explicitly disabled', () => { purge: { enabled: false }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const expected = fs.readFileSync( path.resolve(`${__dirname}/fixtures/tailwind-output.css`), @@ -516,7 +520,7 @@ test('does not purge if purge is simply false', () => { purge: false, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const expected = fs.readFileSync( path.resolve(`${__dirname}/fixtures/tailwind-output.css`), @@ -541,7 +545,7 @@ test('purges outside of production if explicitly enabled', () => { purge: { enabled: true, content: [path.resolve(`${__dirname}/fixtures/**/*.html`)] }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { assertPurged(result) }) @@ -567,7 +571,7 @@ test( }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { expect(result.css).toContain('.md\\:bg-green-500') assertPurged(result) @@ -596,7 +600,7 @@ test( css.walkComments((c) => c.remove()) }, ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { expect(result.css).toContain('html') expect(result.css).toContain('body') @@ -624,7 +628,7 @@ test('element selectors are preserved by default', () => { }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const rules = extractRules(result.root) ;[ @@ -678,7 +682,7 @@ test('element selectors are preserved even when defaultExtractor is overridden', }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const rules = extractRules(result.root) ;[ @@ -729,7 +733,7 @@ test('preserving element selectors can be disabled', () => { }, }), ]) - .process(input, { from: inputPath }) + .process(input, { from: withTestName(inputPath) }) .then((result) => { const rules = extractRules(result.root)
Not all classes are being pulled in from Blade files, some only after re-saving the files. ### What version of @tailwindcss/jit are you using? 0.1.3 ### What version of Node.js are you using? v14.16.0 ### What browser are you using? Chrome ### What operating system are you using? macOS ### Reproduction repository https://github.com/foof/tailwind-jit-test The linked repo is a fresh Laravel install but where all the build configs are located in `resources/myfolder/` instead of the root folder. Reproduction steps: 1. Clone repo 2. `cd resources/myfolder` 3. `npm install` 4. `npm run watch` The purge option is configured to look at blade files in the `resources/views/myfolder` directory. Classes from `resources/views/myfolder/welcome.blade.php` are not being put into the generated CSS file. If I simply re-save the blade file while watch is running, then some of the classes gets added, but not all. For example `sm:p-6` is never included in the generated css.
> You don't have package.json or package-lock.json in your repo. `npm install` won't work. Perhaps it was unclear, but those files are also located in the subfolder `resources/myfolder`. In our project we have multiple frontends which means we have multiple package.json etc that are located in other subfolders like `resources/myfolder`, `resources/myfolder2`, `resources/myfolder3` etc. Hey! Thank you for your bug report! Much appreciated! 🙏 The reason `sm:p-6` never gets included is because you removed all the screens in your config, which results in the fact that you can't use `responsive` utilities: ```js module.exports = { purge: [ "./**/*.{js,vue}", "./../views/myfolder/**/*.php", // Classes from these files are only included after re-saving the files when watcher is running ], theme: { screens: {}, extend: {}, }, plugins: [], }; ``` You can fix that by dropping that reset: ```diff module.exports = { purge: [ "./**/*.{js,vue}", "./../views/myfolder/**/*.php", // Classes from these files are only included after re-saving the files when watcher is running ], theme: { - screens: {}, extend: {}, }, plugins: [], }; ``` In addition, the classes for `dark` mode are not included either, this is because you didn't enable dark mode. You can do so by choosing the `class` or `media` option. https://tailwindcss.com/docs/dark-mode ```diff module.exports = { + darkMode: "class", purge: [ "./**/*.{js,vue}", "./../views/myfolder/**/*.php", // Classes from these files are only included after re-saving the files when watcher is running ], theme: { - screens: {}, extend: {}, }, plugins: [], }; ``` The last class that is missing is the `items-top` one, this is because it doesn't exist in default Tailwind: https://tailwindcss.com/docs/align-items Class | Properties -- | -- 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; @RobinMalfait That explains some of the classes :) However `w-96` is not included when I first start `npm run watch` after making your suggested changes. But if I simply go into the blade file and hit Cmd+S without changing anything it then recompiles and `w-96` is included Very odd, I am going to re-open this issue. It seems that when you drop the `"./**/*.{js,vue}"` line it does create the `w-96` consistently on the first run. I do have to mention that I see multiple "runs" in the webpack output. When you include that line, initially the `w-96` does not get created. The good part is that I can reproduce it consistently. Once I find the solution / actual issue I'll update this issue! Thanks for opening the issue! I also get multiple runs which I forgot to mention and I wasn't sure if it was intended or not. Normally we also build JS but I removed all non-CSS stuff from the repo for simplicity's sake. If it helps, an interesting thing I found is that if I copy the entire `views` directory into `resources/myfolder` and change the purge config to `'./views/myfolder/**/*.php'`, then it works as expected. (Although still with multiple runs) I'll open another issue but I just want to add that I'm running into the same thing, specifically multiple compilations and classes from Blade files missing after the first save. I'm using a pretty standard Laravel Mix setup, and with JIT _every_ Webpack compilation runs twice now. It may be because both Mix and JIT are watching a bunch of the same files, but I need them to since I have Tailwind classes in my Vue components. With some Blade files I'm now noticing the above issue too, with dynamic classes like `hover:text-[#3b5998]`. After saving, Webpack recompiles (twice) and the generated class isn't present in my CSS, then after saving again, and Webpack recompiling twice again, it is. Okay, inexplicably, it's now working fine. I set `DEBUG=true` to see the JIT output, everything suddenly worked normally, and I removed it again and it now works as expected, even the double builds are gone. Gonna leave my comment in case it helps someone else, but sorry to muddy the waters! I was having this problem after I added the `TAILWIND_MODE=watch` variable, not sure why but after I removed it the classes get generated normally. I'm not having exactly this problem, but related. I have a `purge` config that looks at changes to certain markdown files and yaml files that are outside of the directory structure (found using `../../`) and this worked up until recently: ```js module.exports = { mode: 'jit', purge: [ '../../config/**/*.yaml', '../../pages/**/*.md', './blueprints/**/*.yaml', './js/**/*.js', './templates/**/*.twig', './typhoon.yaml', './typhoon.php', './available-classes.md', ], ... ``` However, now with JIT, the `../../` paths are not being picked up and recognized. This means that all the classes defined in those files are not being found, so not included in the CSS. Makes no difference if i save the file, restart the `--watch` command, those first two paths are never included. This worked prior to JIT. Having the same issue as above, doesn't seem to be able to pick up folders above the tailwind config. Same level folders or deeper work fine but going above no longer seems to work.
2021-04-30T17:33:03Z
2.1
tailwindlabs/tailwindcss
2,951
tailwindlabs__tailwindcss-2951
[ "2911", "2911" ]
ba753cf1721af9314e2a41fdf932a121cd6add95
diff --git a/src/plugins/ringOffsetColor.js b/src/plugins/ringOffsetColor.js --- a/src/plugins/ringOffsetColor.js +++ b/src/plugins/ringOffsetColor.js @@ -7,7 +7,7 @@ export default function () { return function ({ addUtilities, theme, variants }) { const colors = flattenColorPalette(theme('ringOffsetColor')) const utilities = _.fromPairs( - _.map(colors, (value, modifier) => { + _.map(_.omit(colors, 'DEFAULT'), (value, modifier) => { return [ nameClass('ring-offset', modifier), { diff --git a/src/plugins/ringOffsetWidth.js b/src/plugins/ringOffsetWidth.js --- a/src/plugins/ringOffsetWidth.js +++ b/src/plugins/ringOffsetWidth.js @@ -4,7 +4,7 @@ import nameClass from '../util/nameClass' export default function () { return function ({ addUtilities, theme, variants }) { const utilities = _.fromPairs( - _.map(theme('ringOffsetWidth'), (value, modifier) => { + _.map(_.omit(theme('ringOffsetWidth'), 'DEFAULT'), (value, modifier) => { return [ nameClass('ring-offset', modifier), { diff --git a/src/plugins/ringWidth.js b/src/plugins/ringWidth.js --- a/src/plugins/ringWidth.js +++ b/src/plugins/ringWidth.js @@ -20,8 +20,8 @@ export default function () { { '*': { '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', - '--tw-ring-offset-width': '0px', - '--tw-ring-offset-color': '#fff', + '--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'), + '--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'), '--tw-ring-color': ringColorDefault, '--tw-ring-offset-shadow': '0 0 #0000', '--tw-ring-shadow': '0 0 #0000',
diff --git a/__tests__/plugins/ringWidth.test.js b/__tests__/plugins/ringWidth.test.js new file mode 100644 --- /dev/null +++ b/__tests__/plugins/ringWidth.test.js @@ -0,0 +1,104 @@ +import invokePlugin from '../util/invokePlugin' +import plugin from '../../src/plugins/ringWidth' + +test('ring widths', () => { + const config = { + theme: { + ringWidth: { + 4: '4px', + }, + ringOffsetWidth: { + 4: '4px', + }, + ringColor: { + black: '#000', + }, + ringOffsetColor: { + white: '#fff', + }, + ringOpacity: { + 50: '.5', + }, + }, + variants: { + ringColor: [], + }, + } + + const { utilities } = invokePlugin(plugin(), config) + expect(utilities).toEqual([ + [ + { + '*': { + '--tw-ring-color': 'rgba(147, 197, 253, 0.5)', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-color': '#fff', + '--tw-ring-offset-shadow': '0 0 #0000', + '--tw-ring-offset-width': '0px', + '--tw-ring-shadow': '0 0 #0000', + }, + }, + { + respectImportant: false, + }, + ], + [ + { + '.ring-4': { + '--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(4px + 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', + }, + }, + undefined, + ], + ]) +}) + +test('ring widths with defaults', () => { + const config = { + theme: { + ringWidth: {}, + ringOffsetWidth: { + DEFAULT: '2px', + }, + ringOffsetColor: { + DEFAULT: 'pink', + }, + }, + variants: { + ringColor: [], + }, + } + + const { utilities } = invokePlugin(plugin(), config) + expect(utilities).toEqual([ + [ + { + '*': { + '--tw-ring-color': 'rgba(147, 197, 253, 0.5)', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-color': 'pink', + '--tw-ring-offset-shadow': '0 0 #0000', + '--tw-ring-offset-width': '2px', + '--tw-ring-shadow': '0 0 #0000', + }, + }, + { respectImportant: false }, + ], + [ + { + '.ring-inset': { + '--tw-ring-inset': 'inset', + }, + }, + undefined, + ], + ]) +})
Missing DEFAULT option for ringOffsetWidth and ringOffsetColor ### Describe the problem: Trying to set a default ring with offset doesn't work. ### Link to a minimal reproduction: https://play.tailwindcss.com/hNYXW0Qzj9 Missing DEFAULT option for ringOffsetWidth and ringOffsetColor ### Describe the problem: Trying to set a default ring with offset doesn't work. ### Link to a minimal reproduction: https://play.tailwindcss.com/hNYXW0Qzj9
Hey! 👋 There is no offset specified in your Play example, only the `ring` itself (defaulting to 3px). The actual "default" for ring-offset is no offset. We make the assumption that there should be no offset, unless explicitly specified. The default color for ring offset is white. 👍 If you add a `ring-offset-2` for example, the ring will be offset by 2 pixels, as expected: https://play.tailwindcss.com/W4SSmpZj4h I'm aware of that, is it normal to use 4 classes for a ring? I thought we could setup defaults for the 4 elements of ring and use a single ``focus:ring`` class, otherwise the classes are gonna be huge, e.g. ``focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:ring-offset-gray-800``. Nothing that can't be solved with ``@apply``, just thought it would be a nice thing to have. This is a valid request, will play with this more at some point soon and see if it makes sense to make it work this way 👍🏻 Thanks for bringing it up! Hey! 👋 There is no offset specified in your Play example, only the `ring` itself (defaulting to 3px). The actual "default" for ring-offset is no offset. We make the assumption that there should be no offset, unless explicitly specified. The default color for ring offset is white. 👍 If you add a `ring-offset-2` for example, the ring will be offset by 2 pixels, as expected: https://play.tailwindcss.com/W4SSmpZj4h I'm aware of that, is it normal to use 4 classes for a ring? I thought we could setup defaults for the 4 elements of ring and use a single ``focus:ring`` class, otherwise the classes are gonna be huge, e.g. ``focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:ring-offset-gray-800``. Nothing that can't be solved with ``@apply``, just thought it would be a nice thing to have. This is a valid request, will play with this more at some point soon and see if it makes sense to make it work this way 👍🏻 Thanks for bringing it up!
2020-11-30T14:41:41Z
2
tailwindlabs/tailwindcss
2,331
tailwindlabs__tailwindcss-2331
[ "2258" ]
6a39e3650d65bfcbada7acc95bd865c5babb543e
diff --git a/src/lib/purgeUnusedStyles.js b/src/lib/purgeUnusedStyles.js --- a/src/lib/purgeUnusedStyles.js +++ b/src/lib/purgeUnusedStyles.js @@ -77,10 +77,18 @@ export default function purgeUnusedUtilities(config, configChanged) { ? ['utilities'] : _.get(config, 'purge.layers', ['base', 'components', 'utilities']) - css.prepend(postcss.comment({ text: 'purgecss start ignore' })) - css.append(postcss.comment({ text: 'purgecss end ignore' })) - css.walkComments(comment => { + switch (comment.text.trim()) { + case `purgecss start ignore`: + comment.before(postcss.comment({ text: 'purgecss end ignore' })) + break + case `purgecss end ignore`: + comment.before(postcss.comment({ text: 'purgecss end ignore' })) + comment.text = 'purgecss start ignore' + break + default: + break + } layers.forEach(layer => { switch (comment.text.trim()) { case `tailwind start ${layer}`: @@ -94,6 +102,9 @@ export default function purgeUnusedUtilities(config, configChanged) { } }) }) + + css.prepend(postcss.comment({ text: 'purgecss start ignore' })) + css.append(postcss.comment({ text: 'purgecss end ignore' })) }, removeTailwindMarkers, purgecss({
diff --git a/__tests__/purgeUnusedStyles.test.js b/__tests__/purgeUnusedStyles.test.js --- a/__tests__/purgeUnusedStyles.test.js +++ b/__tests__/purgeUnusedStyles.test.js @@ -195,19 +195,19 @@ test('custom css in a layer is purged by default when using layers mode', () => ]) .process( ` - @tailwind base; + @tailwind base; - @tailwind components; + @tailwind components; - @layer components { - .example { - @apply font-bold; - color: theme('colors.red.500'); + @layer components { + .example { + @apply font-bold; + color: theme('colors.red.500'); + } } - } - @tailwind utilities; - `, + @tailwind utilities; + `, { from: null } ) .then(result => { @@ -411,6 +411,43 @@ test('does not purge components when mode is conservative', () => { ) }) +test('extra purgecss control comments can be added manually', () => { + return inProduction( + suppressConsoleLogs(() => { + const input = ` + @tailwind base; + + /* purgecss start ignore */ + .btn { + background: red; + } + /* purgecss end ignore */ + + @tailwind components; + @tailwind utilities; + ` + + return postcss([ + tailwind({ + ...config, + purge: { + layers: ['utilities'], + content: [path.resolve(`${__dirname}/fixtures/**/*.html`)], + }, + }), + ]) + .process(input, { from: null }) + .then(result => { + const rules = extractRules(result.root) + + expect(rules).toContain('.btn') + expect(rules).toContain('.container') + assertPurged(result) + }) + }) + ) +}) + test( 'does not purge except in production', suppressConsoleLogs(() => {
PurgeCSS remove first components class when using whitelist comment Hi tailwindlabs team, I noticed the following point with the building PurgeCSS. If I import a CSS file before `@tailwind components;` and use PurgeCSS whitelist comment: `.container` classes are remove but not responsive container classes. My Sass file ``` @tailwind base; /* purgecss start ignore */ @import "button"; /* purgecss end ignore */ @tailwind components; @tailwind utilities; ``` I make different test using exclamation mark in comment, ... same result I use last tailwindcss 1.7.5, sass, csso. My `tailwind.config.js` ``` module.exports = { purge: [ 'path/to/templates', ], future: { removeDeprecatedGapUtilities: true, }, experimental: { applyComplexClasses: true, uniformColorPalette: true, extendedSpacingScale: true, defaultLineHeights: true, extendedFontSizeScale: true, }, } ```
I can use `mode: all` + PurgeCSS comment as a work around. Can you create a simple project that reproduces the issue? We got a lot of issues that require me to manually recreate someone's project from scratch and I unfortunately just don't have time for that so things end up going unfixed. If you can provide something I can clone and start troubleshooting with right away it's much easier for me to find time to diagnose and fix the issue. Was able to reproduce this but realizing it sort of doesn't make sense to configure things this way. Using your config, your custom button styles are already protected from purging, because only the `@tailwind utilities` block gets purged, so the comments are redundant. I agree this shouldn't break the way it is and we should handle it more gracefully or fail with a clear error, but in the mean time just delete those comments and you're good 👍
2020-09-06T03:30:01Z
1.8
tailwindlabs/tailwindcss
2,322
tailwindlabs__tailwindcss-2322
[ "2319" ]
8e49e484df0ae1bfba3c92c812481c7d54941c35
diff --git a/src/index.js b/src/index.js --- a/src/index.js +++ b/src/index.js @@ -17,9 +17,9 @@ import uniformColorPalette from './flagged/uniformColorPalette.js' import extendedSpacingScale from './flagged/extendedSpacingScale.js' import defaultLineHeights from './flagged/defaultLineHeights.js' import extendedFontSizeScale from './flagged/extendedFontSizeScale.js' -import darkModeVariant from './flagged/darkModeVariant' +import darkModeVariant from './flagged/darkModeVariant.js' -function getDefaultConfigs(config) { +function getAllConfigs(config) { const configs = [defaultConfig] if (flagEnabled(config, 'uniformColorPalette')) { @@ -40,9 +40,12 @@ function getDefaultConfigs(config) { if (flagEnabled(config, 'darkModeVariant')) { configs.unshift(darkModeVariant) + if (Array.isArray(config.plugins)) { + config.plugins = [...darkModeVariant.plugins, ...config.plugins] + } } - return configs + return [config, ...configs] } function resolveConfigPath(filePath) { @@ -78,7 +81,7 @@ function resolveConfigPath(filePath) { const getConfigFunction = config => () => { if (_.isUndefined(config) && !_.isObject(config)) { - return resolveConfig([...getDefaultConfigs(defaultConfig)]) + return resolveConfig([...getAllConfigs(defaultConfig)]) } // Skip this if Jest is running: https://github.com/facebook/jest/pull/9841#issuecomment-621417584 @@ -92,7 +95,7 @@ const getConfigFunction = config => () => { const configObject = _.isObject(config) ? _.get(config, 'config', config) : require(config) - return resolveConfig([configObject, ...getDefaultConfigs(configObject)]) + return resolveConfig([...getAllConfigs(configObject)]) } const plugin = postcss.plugin('tailwind', config => {
diff --git a/__tests__/darkMode.test.js b/__tests__/darkMode.test.js --- a/__tests__/darkMode.test.js +++ b/__tests__/darkMode.test.js @@ -49,6 +49,34 @@ test('generating dark mode variants uses the media strategy by default', () => { }) }) +test('dark mode variants can be generated even when the user has their own plugins array', () => { + const input = ` + @variants dark { + .text-red { + color: red; + } + } + ` + + const expected = ` + .text-red { + color: red; + } + @media (prefers-color-scheme: dark) { + .dark\\:text-red { + color: red; + } + } + ` + + expect.assertions(2) + + return run(input, { plugins: [] }).then(result => { + expect(result.css).toMatchCss(expected) + expect(result.warnings().length).toBe(0) + }) +}) + test('dark mode variants can be generated using the class strategy', () => { const input = ` @variants dark {
Tailwindcss v1.8 dark mode (experimental) issue ### Describe the problem: 🚫 Error: Your config mentions the "dark" variant, but "dark" doesn't appear to be a variant. Did you forget or misconfigure a plugin that supplies that variant? <!-- Explain the behavior you're seeing that you think is a bug, and explain how you think things should behave instead. --> ### Link to a minimal reproduction: ```javascript // tailwind.config.js 'use strict'; module.exports = { dark: 'class', experimental: 'all', future: { purgeLayersByDefault: true, removeDeprecatedGapUtilities: true, }, purge: { content: [ './public/**/*.html', './src/**/*.js', ], }, theme: { extend: { colors: { 'dark-gray': '#121212', gray: { '100': '#f5f5f5', '200': '#eeeeee', '300': '#e0e0e0', '400': '#bdbdbd', '500': '#9e9e9e', '600': '#757575', '700': '#616161', '800': '#424242', '900': '#212121', }, }, cursor: { 'zoom-in': 'zoom-in', 'zoom-out': 'zoom-out', }, }, }, variants: {}, plugins: [], }; ``` When run build command `npx tailwindcss build -o src/index.css`, getting the above error. <!-- Please provide a link to a GitHub repository that reliably reproduces the issue with the least amount of extraneous code possible. -->
Having the same issue. ``` module.exports = { ... dark: 'media' experimental: { darkModeVariant: true, }, } ``` We're looking into it!
2020-09-04T23:54:51Z
1.8
tailwindlabs/tailwindcss
2,271
tailwindlabs__tailwindcss-2271
[ "2192" ]
0b48b4cd8c79cbe8b0505ffc727c398a298857db
diff --git a/src/flagged/applyComplexClasses.js b/src/flagged/applyComplexClasses.js --- a/src/flagged/applyComplexClasses.js +++ b/src/flagged/applyComplexClasses.js @@ -95,7 +95,7 @@ function buildUtilityMap(css, lookupTree) { let index = 0 const utilityMap = {} - lookupTree.walkRules(rule => { + function handle(rule) { const utilityNames = extractUtilityNames(rule.selector) utilityNames.forEach((utilityName, i) => { @@ -113,27 +113,10 @@ function buildUtilityMap(css, lookupTree) { }) index++ }) - }) - - css.walkRules(rule => { - const utilityNames = extractUtilityNames(rule.selector) - - utilityNames.forEach((utilityName, i) => { - if (utilityMap[utilityName] === undefined) { - utilityMap[utilityName] = [] - } + } - utilityMap[utilityName].push({ - index, - utilityName, - classPosition: i, - get rule() { - return cloneRuleWithParent(rule) - }, - }) - index++ - }) - }) + lookupTree.walkRules(handle) + css.walkRules(handle) return utilityMap } @@ -203,68 +186,75 @@ function makeExtractUtilityRules(css, lookupTree, config) { } } +function findParent(rule, predicate) { + let parent = rule.parent + while (parent) { + if (predicate(parent)) { + return parent + } + + parent = parent.parent + } + + throw new Error('No parent could be found') +} + function processApplyAtRules(css, lookupTree, config) { const extractUtilityRules = makeExtractUtilityRules(css, lookupTree, config) do { - css.walkRules(rule => { - const applyRules = [] + css.walkAtRules('apply', applyRule => { + const parent = applyRule.parent // Direct parent + const nearestParentRule = findParent(applyRule, r => r.type === 'rule') + const currentUtilityNames = extractUtilityNames(nearestParentRule.selector) + + const [ + importantEntries, + applyUtilityNames, + important = importantEntries.length > 0, + ] = _.partition(applyRule.params.split(/[\s\t\n]+/g), n => n === '!important') + + if (_.intersection(applyUtilityNames, currentUtilityNames).length > 0) { + const currentUtilityName = _.intersection(applyUtilityNames, currentUtilityNames)[0] + throw parent.error( + `You cannot \`@apply\` the \`${currentUtilityName}\` utility here because it creates a circular dependency.` + ) + } - // Only walk direct children to avoid issues with nesting plugins - rule.each(child => { - if (child.type === 'atrule' && child.name === 'apply') { - applyRules.unshift(child) - } - }) + // Extract any post-apply declarations and re-insert them after apply rules + const afterRule = parent.clone({ raws: {} }) + afterRule.nodes = afterRule.nodes.slice(parent.index(applyRule) + 1) + parent.nodes = parent.nodes.slice(0, parent.index(applyRule) + 1) - applyRules.forEach(applyRule => { - const [ - importantEntries, - applyUtilityNames, - important = importantEntries.length > 0, - ] = _.partition(applyRule.params.split(/[\s\t\n]+/g), n => n === '!important') + // Sort applys to match CSS source order + const applys = extractUtilityRules(applyUtilityNames, applyRule) - const currentUtilityNames = extractUtilityNames(rule.selector) + // Get new rules with the utility portion of the selector replaced with the new selector + const rulesToInsert = [] - if (_.intersection(applyUtilityNames, currentUtilityNames).length > 0) { - const currentUtilityName = _.intersection(applyUtilityNames, currentUtilityNames)[0] - throw rule.error( - `You cannot \`@apply\` the \`${currentUtilityName}\` utility here because it creates a circular dependency.` - ) - } + applys.forEach( + nearestParentRule === parent + ? util => rulesToInsert.push(generateRulesFromApply(util, parent.selectors)) + : util => util.rule.nodes.forEach(n => afterRule.append(n.clone())) + ) - // Extract any post-apply declarations and re-insert them after apply rules - const afterRule = rule.clone({ raws: {} }) - afterRule.nodes = afterRule.nodes.slice(rule.index(applyRule) + 1) - rule.nodes = rule.nodes.slice(0, rule.index(applyRule) + 1) - - // Sort applys to match CSS source order - const applys = extractUtilityRules(applyUtilityNames, applyRule) - - // Get new rules with the utility portion of the selector replaced with the new selector - const rulesToInsert = [ - ...applys.map(applyUtility => { - return generateRulesFromApply(applyUtility, rule.selectors) - }), - afterRule, - ] - - const { nodes } = _.tap(postcss.root({ nodes: rulesToInsert }), root => - root.walkDecls(d => { - d.important = important - }) - ) + rulesToInsert.push(afterRule) - const mergedRules = mergeAdjacentRules(rule, nodes) + const { nodes } = _.tap(postcss.root({ nodes: rulesToInsert }), root => + root.walkDecls(d => { + d.important = important + }) + ) - applyRule.remove() - rule.after(mergedRules) - }) + const mergedRules = mergeAdjacentRules(nearestParentRule, nodes) + + applyRule.remove() + parent.after(mergedRules) // If the base rule has nothing in it (all applys were pseudo or responsive variants), // remove the rule fuggit. - if (rule.nodes.length === 0) { - rule.remove() + if (parent.nodes.length === 0) { + parent.remove() } })
diff --git a/__tests__/applyComplexClasses.test.js b/__tests__/applyComplexClasses.test.js --- a/__tests__/applyComplexClasses.test.js +++ b/__tests__/applyComplexClasses.test.js @@ -996,3 +996,101 @@ test('you can apply classes to a rule with multiple selectors', () => { expect(result.warnings().length).toBe(0) }) }) + +test('you can apply classes in a nested rule', () => { + const input = ` + .selector { + &:hover { + @apply text-white; + } + } + ` + + const expected = ` + .selector { + &:hover { + --text-opacity: 1; + color: #fff; + color: rgba(255, 255, 255, var(--text-opacity)); + } + } + ` + + return run(input).then(result => { + expect(result.css).toMatchCss(expected) + expect(result.warnings().length).toBe(0) + }) +}) + +test('you can apply classes in a nested @atrule', () => { + const input = ` + .selector { + @media (min-width: 200px) { + @apply overflow-hidden; + } + } + ` + + const expected = ` + .selector { + @media (min-width: 200px) { + overflow: hidden; + } + } + ` + + return run(input).then(result => { + expect(result.css).toMatchCss(expected) + expect(result.warnings().length).toBe(0) + }) +}) + +test('you can apply classes in a custom nested @atrule', () => { + const input = ` + .selector { + @screen md { + @apply w-2/6; + } + } + ` + + const expected = ` + .selector { + @media (min-width: 768px) { + width: 33.333333%; + } + } + ` + + return run(input).then(result => { + expect(result.css).toMatchCss(expected) + expect(result.warnings().length).toBe(0) + }) +}) + +test('you can deeply apply classes in a custom nested @atrule', () => { + const input = ` + .selector { + .subselector { + @screen md { + @apply w-2/6; + } + } + } + ` + + const expected = ` + .selector { + .subselector { + @media (min-width: 768px) { + width: 33.333333% + } + } + } + ` + + return run(input).then(result => { + expect(result.css).toMatchCss(expected) + expect(result.warnings().length).toBe(0) + }) +})
applyComplexClasses compiler stuck with @apply inside media queries or variants ### Describe the problem: With the new applyComplexClasses if you put `@apply` **the old way**: inside a `@screen` (media query) or a `&:hover` (variant), the complier gets stuck (using postcss loader in webpack). ### Link to a minimal reproduction: This css makes the compiler gets stuck (apply content can be anything): ``` .selector { @screen md { @apply w-2/6; } } ``` ``` .selector { &:hover { @apply text-white; } } ``` I know the I should use the new way to `@apply md:w-2/6` and `@apply hover:text-white`, but for backward compatibility could be good fixing this bug, or at least give an error in the compiler, right now it just gets stuck compiling.
This should be fixed mainly because it bugs also when you apply custom selectors where you don't have variants in the `@apply`: ``` .selector { @screen lg { @apply overflow-sub; } } ``` Where `@apply lg:overflow-sub` is not possible when you don't want to set up apply variants for this selector. This is a tough one to fix but I'm sure we can sort it out. In the mean time I would move your nesting plugin _before_ Tailwind so that there is no nested CSS left once the CSS is processed by Tailwind. @adamwathan I moved **postcss-nested** _before_ Tailwind plugin, but still my build stuck ``` plugins: { 'postcss-import': {}, 'postcss-nested': {}, tailwindcss: {}, 'postcss-hexrgba': {}, 'postcss-custom-properties': { importFrom: [{customProperties}] }, autoprefixer: {} } ``` @AndrewBogdanovTSS Can you share a repository that reproduces the issue? Way too hard to troubleshoot without unfortunately. Edit: removed because not relevant to this issue Please for the love of god someone just make a GitHub repository so I don't have to make one from scratch and I can probably fix it in 5 minutes between dad duty, but if I have to do it all myself it'll be days before I have a chance to play with it. @adamwathan Created one for you: https://github.com/thecrypticace/at-apply-stuck I'll note that it seems to get stuck with or without `postcss-nested`. The bubble option in `postcss-nested` seems to just do nothing currently which is a problem. Need to configure it to bubble `screen` rules like this: ```js module.exports = { plugins: { 'postcss-nested': { bubble: ['screen'], }, tailwindcss: {}, }, } ``` But it's not bubbling them :/ Actually nevermind the problem is the reproduction is setup incorrectly, it has a postcss.config.js file but it's using `tailwind` to build the CSS instead of PostCSS, so the config isn't being read. I've set it up correctly and verified it's a bug in postcss-nested that prevents this from working currently unfortunately. One fix I can think of is to write a separate PostCSS plugin that converts screen rules to media queries and switch to `postcss-nesting`, because nesting media queries with postcss-nested while using `apply` seems broken right now, even without Tailwind in the build process at all. It just doesn't produce the expected CSS to feed into Tailwind. Here's my repo which shows the current bug: https://github.com/adamwathan/at-apply-stuck This is the bug we'd need to fix to have this working sensibly: https://github.com/postcss/postcss-nested/issues/81 Best solution currently is just to not nest screen rules if you need to use apply, write them at the root level like regular CSS instead for now. Ah whoops, sorry about that. Since it still gets stuck w/o postcss-nested should tailwind still detect that and handle it gracefully (at least not seeming get stuck in a loop)? It should probably just actually work so if we are going to make any changes to Tailwind making it work is the change I'd want to make. Just trying to offer some workaround in the mean time while I'm at some adventure farm with my 2 year old. > It should probably just actually work so if we are going to make any changes to Tailwind making it work is the change I'd want to make. Just trying to offer some workaround in the mean time while I'm at some adventure farm with my 2 year old. You're awesome, next time I'll make a github with the problem sorry for my slack Making this _work_ work is going to be a bit challenging but necessary anyways since there is a real CSS nesting spec and it's gonna probably exist for real one day. Just a note for myself, I think the correct algorithm for applying styles in these situations is to generate the "applyable" selector (with the __TAILWIND-APPLY-PLACEHOLDER__ attribute selector), and split it on the placeholder, then stick the first half on the beginning of the _first_ selector in the tree, and the last half at the end of the _last_ selector in the tree. Example: ```css .foo { .bar { .baz { @apply group-hover:opacity-50 hover:font-bold; // Applyable rules here are: // .group\:hover [__TAILWIND-APPLY-PLACEHOLDER__] // [__TAILWIND-APPLY-PLACEHOLDER__]:hover } } } ``` Output should be: ```css .group\:hover .foo { .bar { .baz { opacity: .5; } } } .foo { .bar { .baz:hover { font-weight: 700; } } } ``` Haven't thought through this bit in too much detail yet but another note for myself, think through what happens when people use `&` at the end of a nested selector because that could be dark.
2020-08-28T15:24:50Z
1.8
tailwindlabs/tailwindcss
2,211
tailwindlabs__tailwindcss-2211
[ "2190" ]
2903811767fa03f559e644b5732f0ec3af32f3fd
diff --git a/src/flagged/applyComplexClasses.js b/src/flagged/applyComplexClasses.js --- a/src/flagged/applyComplexClasses.js +++ b/src/flagged/applyComplexClasses.js @@ -39,7 +39,7 @@ const tailwindApplyPlaceholder = selectorParser.attribute({ attribute: '__TAILWIND-APPLY-PLACEHOLDER__', }) -function generateRulesFromApply({ rule, utilityName: className, classPosition }, replaceWith) { +function generateRulesFromApply({ rule, utilityName: className, classPosition }, replaceWiths) { const parser = selectorParser(selectors => { let i = 0 selectors.walkClasses(c => { @@ -49,11 +49,13 @@ function generateRulesFromApply({ rule, utilityName: className, classPosition }, }) }) - const processedSelectors = rule.selectors.map(selector => { + const processedSelectors = _.flatMap(rule.selectors, selector => { // You could argue we should make this replacement at the AST level, but if we believe // the placeholder string is safe from collisions then it is safe to do this is a simple // string replacement, and much, much faster. - return parser.processSync(selector).replace('[__TAILWIND-APPLY-PLACEHOLDER__]', replaceWith) + return replaceWiths.map(replaceWith => + parser.processSync(selector).replace('[__TAILWIND-APPLY-PLACEHOLDER__]', replaceWith) + ) }) const cloned = rule.clone() @@ -242,7 +244,7 @@ function processApplyAtRules(css, lookupTree, config) { // Get new rules with the utility portion of the selector replaced with the new selector const rulesToInsert = [ ...applys.map(applyUtility => { - return generateRulesFromApply(applyUtility, rule.selector) + return generateRulesFromApply(applyUtility, rule.selectors) }), afterRule, ]
diff --git a/__tests__/applyComplexClasses.test.js b/__tests__/applyComplexClasses.test.js --- a/__tests__/applyComplexClasses.test.js +++ b/__tests__/applyComplexClasses.test.js @@ -848,3 +848,35 @@ test('you can apply utility classes when a selector is used for the important op expect(result.warnings().length).toBe(0) }) }) + +test('you can apply classes to a rule with multiple selectors', () => { + const input = ` + @supports (display: grid) { + .foo, h1 > .bar * { + @apply float-left opacity-50 hover:opacity-100 md:float-right; + } + } + ` + + const expected = ` + @supports (display: grid) { + .foo, h1 > .bar * { + float: left; + opacity: 0.5; + } + .foo:hover, h1 > .bar *:hover { + opacity: 1; + } + @media (min-width: 768px) { + .foo, h1 > .bar * { + float: right; + } + } + } + ` + + return run(input).then(result => { + expect(result.css).toMatchCss(expected) + expect(result.warnings().length).toBe(0) + }) +})
Using @apply with variants doesn't work properly with group selectors Loving the new features in 1.7 so far, thank you! Came across what seems to be an issue with the new `applyComplexClasses` feature, in that when a variant class (e.g. `hover:bg-red-400`) is applied to a rule for a group selector, the variant modifier only works for the last selector in the group. For example, if we have the following in the CSS: ```css .class1, .class2 { @apply hover:bg-red-400; } ``` Then I would expect the following output: ```css .class1:hover, .class2:hover { --bg-opacity: 1; background-color: #f98080; background-color: rgba(249, 128, 128, var(--bg-opacity)); } ``` But this is what I am actually getting (note that the `:hover` modifier is only applied to `.class2`): <img width="411" alt="Screenshot 2020-08-19 at 15 37 02@2x" src="https://user-images.githubusercontent.com/4648467/90597037-a1900080-e233-11ea-990a-ce2bbf6f71d1.png"> For reference I am using v.1.7.1
Same issue here. ![image](https://user-images.githubusercontent.com/12186284/90762103-bd9faa80-e2e4-11ea-8bd9-f11dee3ad1d5.png) A related issue I think is this strange behavior when applying a selector when chaining selectors: ``` .foo, .selector { color: red; } .custom { @apply selector; } ``` `@apply selector;` doesn't seems to produce anything. Instead this ``` .foo, .selector { color: red; } .custom { @apply foo; } ``` results in another strange result: ``` .custom, .selector { color: red; } ```
2020-08-20T20:29:32Z
1.7
tailwindlabs/tailwindcss
2,108
tailwindlabs__tailwindcss-2108
[ "2103" ]
f8d7f245d5e49af84c0d9f12448781e64ab4e66d
diff --git a/src/plugins/animation.js b/src/plugins/animation.js --- a/src/plugins/animation.js +++ b/src/plugins/animation.js @@ -1,14 +1,14 @@ import _ from 'lodash' export default function() { - return function({ addBase, addUtilities, e, theme, variants }) { + return function({ addUtilities, e, theme, variants }) { const keyframesConfig = theme('keyframes') const keyframesStyles = _.fromPairs( _.toPairs(keyframesConfig).map(([name, keyframes]) => { return [`@keyframes ${name}`, keyframes] }) ) - addBase(keyframesStyles) + addUtilities(keyframesStyles) const animationConfig = theme('animation') const utilities = _.fromPairs(
diff --git a/__tests__/fixtures/tailwind-output-ie11.css b/__tests__/fixtures/tailwind-output-ie11.css --- a/__tests__/fixtures/tailwind-output-ie11.css +++ b/__tests__/fixtures/tailwind-output-ie11.css @@ -577,50 +577,6 @@ video { height: auto; } -@keyframes spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } -} - -@keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - - 75%, 100% { - transform: scale(2); - opacity: 0; - } -} - -@keyframes pulse { - 0%, 100% { - opacity: 1; - } - - 50% { - opacity: .5; - } -} - -@keyframes bounce { - 0%, 100% { - transform: translateY(-25%); - animation-timing-function: cubic-bezier(0.8,0,1,1); - } - - 50% { - transform: translateY(0); - animation-timing-function: cubic-bezier(0,0,0.2,1); - } -} - .container { width: 100%; } @@ -10994,6 +10950,50 @@ video { transition-delay: 1000ms; } +@keyframes spin { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +@keyframes ping { + 0% { + transform: scale(1); + opacity: 1; + } + + 75%, 100% { + transform: scale(2); + opacity: 0; + } +} + +@keyframes pulse { + 0%, 100% { + opacity: 1; + } + + 50% { + opacity: .5; + } +} + +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8,0,1,1); + } + + 50% { + transform: translateY(0); + animation-timing-function: cubic-bezier(0,0,0.2,1); + } +} + .animate-none { animation: none; } diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -577,50 +577,6 @@ video { height: auto; } -@keyframes spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } -} - -@keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - - 75%, 100% { - transform: scale(2); - opacity: 0; - } -} - -@keyframes pulse { - 0%, 100% { - opacity: 1; - } - - 50% { - opacity: .5; - } -} - -@keyframes bounce { - 0%, 100% { - transform: translateY(-25%); - animation-timing-function: cubic-bezier(0.8,0,1,1); - } - - 50% { - transform: translateY(0); - animation-timing-function: cubic-bezier(0,0,0.2,1); - } -} - .container { width: 100%; } @@ -14416,6 +14372,50 @@ video { transition-delay: 1000ms !important; } +@keyframes spin { + from { + transform: rotate(0deg) !important; + } + + to { + transform: rotate(360deg) !important; + } +} + +@keyframes ping { + 0% { + transform: scale(1) !important; + opacity: 1 !important; + } + + 75%, 100% { + transform: scale(2) !important; + opacity: 0 !important; + } +} + +@keyframes pulse { + 0%, 100% { + opacity: 1 !important; + } + + 50% { + opacity: .5 !important; + } +} + +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%) !important; + animation-timing-function: cubic-bezier(0.8,0,1,1) !important; + } + + 50% { + transform: translateY(0) !important; + animation-timing-function: cubic-bezier(0,0,0.2,1) !important; + } +} + .animate-none { animation: none !important; } diff --git a/__tests__/fixtures/tailwind-output-no-color-opacity.css b/__tests__/fixtures/tailwind-output-no-color-opacity.css --- a/__tests__/fixtures/tailwind-output-no-color-opacity.css +++ b/__tests__/fixtures/tailwind-output-no-color-opacity.css @@ -577,50 +577,6 @@ video { height: auto; } -@keyframes spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } -} - -@keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - - 75%, 100% { - transform: scale(2); - opacity: 0; - } -} - -@keyframes pulse { - 0%, 100% { - opacity: 1; - } - - 50% { - opacity: .5; - } -} - -@keyframes bounce { - 0%, 100% { - transform: translateY(-25%); - animation-timing-function: cubic-bezier(0.8,0,1,1); - } - - 50% { - transform: translateY(0); - animation-timing-function: cubic-bezier(0,0,0.2,1); - } -} - .container { width: 100%; } @@ -11968,6 +11924,50 @@ video { transition-delay: 1000ms; } +@keyframes spin { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +@keyframes ping { + 0% { + transform: scale(1); + opacity: 1; + } + + 75%, 100% { + transform: scale(2); + opacity: 0; + } +} + +@keyframes pulse { + 0%, 100% { + opacity: 1; + } + + 50% { + opacity: .5; + } +} + +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8,0,1,1); + } + + 50% { + transform: translateY(0); + animation-timing-function: cubic-bezier(0,0,0.2,1); + } +} + .animate-none { animation: none; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -577,50 +577,6 @@ video { height: auto; } -@keyframes spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } -} - -@keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - - 75%, 100% { - transform: scale(2); - opacity: 0; - } -} - -@keyframes pulse { - 0%, 100% { - opacity: 1; - } - - 50% { - opacity: .5; - } -} - -@keyframes bounce { - 0%, 100% { - transform: translateY(-25%); - animation-timing-function: cubic-bezier(0.8,0,1,1); - } - - 50% { - transform: translateY(0); - animation-timing-function: cubic-bezier(0,0,0.2,1); - } -} - .container { width: 100%; } @@ -14416,6 +14372,50 @@ video { transition-delay: 1000ms; } +@keyframes spin { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +@keyframes ping { + 0% { + transform: scale(1); + opacity: 1; + } + + 75%, 100% { + transform: scale(2); + opacity: 0; + } +} + +@keyframes pulse { + 0%, 100% { + opacity: 1; + } + + 50% { + opacity: .5; + } +} + +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8,0,1,1); + } + + 50% { + transform: translateY(0); + animation-timing-function: cubic-bezier(0,0,0.2,1); + } +} + .animate-none { animation: none; }
missing Keyframe css for animations if @tailwind base is missing Just upgraded to 1.6.0 and the animation css is generated but not the matching keyframe css - this is for the default animations and any custom ones I create. This is the case with a blank config file. I have used everything else fine with no @tailwind base; instead using my own smaller reset css.
2020-08-02T12:02:53Z
1.6
tailwindlabs/tailwindcss
2,075
tailwindlabs__tailwindcss-2075
[ "1957" ]
4ee53f315adde5e8471162e7b8a814faafef95dd
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -46,6 +46,7 @@ import objectPosition from './plugins/objectPosition' import opacity from './plugins/opacity' import outline from './plugins/outline' import overflow from './plugins/overflow' +import overscroll from './plugins/overscroll' import padding from './plugins/padding' import placeholderColor from './plugins/placeholderColor' import pointerEvents from './plugins/pointerEvents' @@ -154,6 +155,7 @@ export default function({ corePlugins: corePluginConfig }) { opacity, outline, overflow, + overscroll, padding, placeholderColor, placeholderOpacity, diff --git a/src/plugins/overscroll.js b/src/plugins/overscroll.js new file mode 100644 --- /dev/null +++ b/src/plugins/overscroll.js @@ -0,0 +1,18 @@ +export default function() { + return function({ addUtilities, variants }) { + addUtilities( + { + '.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' }, + }, + variants('overscroll') + ) + } +}
diff --git a/__tests__/fixtures/tailwind-output-ie11.css b/__tests__/fixtures/tailwind-output-ie11.css --- a/__tests__/fixtures/tailwind-output-ie11.css +++ b/__tests__/fixtures/tailwind-output-ie11.css @@ -6089,6 +6089,42 @@ video { -webkit-overflow-scrolling: auto; } +.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; +} + .p-0 { padding: 0; } diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -7769,6 +7769,42 @@ video { -webkit-overflow-scrolling: auto !important; } +.overscroll-auto { + overscroll-behavior: auto !important; +} + +.overscroll-contain { + overscroll-behavior: contain !important; +} + +.overscroll-none { + overscroll-behavior: none !important; +} + +.overscroll-y-auto { + overscroll-behavior-y: auto !important; +} + +.overscroll-y-contain { + overscroll-behavior-y: contain !important; +} + +.overscroll-y-none { + overscroll-behavior-y: none !important; +} + +.overscroll-x-auto { + overscroll-behavior-x: auto !important; +} + +.overscroll-x-contain { + overscroll-behavior-x: contain !important; +} + +.overscroll-x-none { + overscroll-behavior-x: none !important; +} + .p-0 { padding: 0 !important; } diff --git a/__tests__/fixtures/tailwind-output-no-color-opacity.css b/__tests__/fixtures/tailwind-output-no-color-opacity.css --- a/__tests__/fixtures/tailwind-output-no-color-opacity.css +++ b/__tests__/fixtures/tailwind-output-no-color-opacity.css @@ -6341,6 +6341,42 @@ video { -webkit-overflow-scrolling: auto; } +.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; +} + .p-0 { padding: 0; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -7769,6 +7769,42 @@ video { -webkit-overflow-scrolling: auto; } +.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; +} + .p-0 { padding: 0; }
[Feature request] Add overscroll options On mobile UIs, you can have something called [`overscroll-behaviour`](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) which can help on removing 'pull to refresh' when scrolling. It is also useful for chat boxes or other contained UI elements - see [this MDN example](https://mdn.github.io/css-examples/overscroll-behavior/). It would be really handy to add this to Tailwind! ### Values - `auto` - The default scroll overflow behavior occurs as normal. - `contain` - Default scroll overflow behavior is observed inside the element this value is set on (e.g. "bounce" effects or refreshes), but no scroll chaining occurs to neighbouring scrolling areas, e.g. underlying elements will not scroll. - `none` - No scroll chaining occurs to neighbouring scrolling areas, and default scroll overflow behavior is prevented. There is `overscroll-behaviour`, `overscroll-behaviour-y` and `overscroll-behaviour-x`. ### Proposed API Add the following class definitions: ```css .overscroll-auto { overscroll-behaviour: auto; } .overscroll-contain { overscroll-behaviour: contain; } .overscroll-none { overscroll-behaviour: none; } .overscroll-y-auto { overscroll-behaviour-y: auto; } .overscroll-y-contain { overscroll-behaviour-y: contain; } .overscroll-y-none { overscroll-behaviour-y: none; } .overscroll-x-auto { overscroll-behaviour-x: auto; } .overscroll-x-contain { overscroll-behaviour-x: contain; } .overscroll-x-none { overscroll-behaviour-x: none; } ```
This can easily be added as a plugin in the short term: ```js const plugin = require('tailwindcss/plugin'); module.exports = { plugins: [ plugin(function ({ addUtilities }) { const newUtilities = { '.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', }, }; addUtilities(newUtilities); }), ], }; ``` @leevigraham That's fantastic! I wasn't sure how to structure the plugin personally. Thanks @leevigraham. Fyi, for anyone trying to get this to work, the CSS property is `behavior` rather than `behaviour`. > Thanks @leevigraham. Fyi, for anyone trying to get this to work, the CSS property is behavior rather than behaviour. Woops… updated my comment :) Would this be accepted as a PR? Seems within the scope and style of Tailwind. @wadefletch Go ahead and make one!
2020-07-25T19:33:32Z
1.5
tailwindlabs/tailwindcss
1,083
tailwindlabs__tailwindcss-1083
[ "1082" ]
c2dcecfff6753805cec7ad4610de56ebc71d86e3
diff --git a/src/plugins/justifyContent.js b/src/plugins/justifyContent.js --- a/src/plugins/justifyContent.js +++ b/src/plugins/justifyContent.js @@ -17,6 +17,9 @@ export default function() { '.justify-around': { 'justify-content': 'space-around', }, + '.justify-evenly': { + 'justify-content': 'space-evenly', + }, }, variants('justifyContent') )
diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -3456,6 +3456,10 @@ video { justify-content: space-around !important; } +.justify-evenly { + justify-content: space-evenly !important; +} + .content-center { align-content: center !important; } @@ -11191,6 +11195,10 @@ video { justify-content: space-around !important; } + .sm\:justify-evenly { + justify-content: space-evenly !important; + } + .sm\:content-center { align-content: center !important; } @@ -18927,6 +18935,10 @@ video { justify-content: space-around !important; } + .md\:justify-evenly { + justify-content: space-evenly !important; + } + .md\:content-center { align-content: center !important; } @@ -26663,6 +26675,10 @@ video { justify-content: space-around !important; } + .lg\:justify-evenly { + justify-content: space-evenly !important; + } + .lg\:content-center { align-content: center !important; } @@ -34399,6 +34415,10 @@ video { justify-content: space-around !important; } + .xl\:justify-evenly { + justify-content: space-evenly !important; + } + .xl\:content-center { align-content: center !important; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -3456,6 +3456,10 @@ video { justify-content: space-around; } +.justify-evenly { + justify-content: space-evenly; +} + .content-center { align-content: center; } @@ -11191,6 +11195,10 @@ video { justify-content: space-around; } + .sm\:justify-evenly { + justify-content: space-evenly; + } + .sm\:content-center { align-content: center; } @@ -18927,6 +18935,10 @@ video { justify-content: space-around; } + .md\:justify-evenly { + justify-content: space-evenly; + } + .md\:content-center { align-content: center; } @@ -26663,6 +26675,10 @@ video { justify-content: space-around; } + .lg\:justify-evenly { + justify-content: space-evenly; + } + .lg\:content-center { align-content: center; } @@ -34399,6 +34415,10 @@ video { justify-content: space-around; } + .xl\:justify-evenly { + justify-content: space-evenly; + } + .xl\:content-center { align-content: center; }
[Feature Proposal] justify-content: space-evenly Hey all, this is a feature request (and PR) to add a utility for `justify-content: space evenly`, named `justify-evenly`. MDN describes the functionality as: > The items are evenly distributed within the alignment container along the main axis. The spacing between each pair of adjacent items, the main-start edge and the first item, and the main-end edge and the last item, are all exactly the same. Support for that value is present in all major browser except Edge and IE ([source](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content#Support_in_Flex_layout)).
2019-08-18T07:44:46Z
1.1
tailwindlabs/tailwindcss
1,680
tailwindlabs__tailwindcss-1680
[ "1670" ]
52aab172db0df48883368b243b7073759b05e402
diff --git a/scripts/rebuildFixtures.js b/scripts/rebuildFixtures.js --- a/scripts/rebuildFixtures.js +++ b/scripts/rebuildFixtures.js @@ -44,6 +44,19 @@ Promise.all([ to: '__tests__/fixtures/tailwind-output-ie11.css', config: { target: 'ie11' }, }), + build({ + from: '__tests__/fixtures/tailwind-input.css', + to: '__tests__/fixtures/tailwind-output-no-color-opacity.css', + config: { + corePlugins: { + textOpacity: false, + backgroundOpacity: false, + borderOpacity: false, + placeholderOpacity: false, + divideOpacity: false, + }, + }, + }), ]).then(() => { console.log('\nFinished rebuilding fixtures.') console.log( diff --git a/src/plugins/backgroundColor.js b/src/plugins/backgroundColor.js --- a/src/plugins/backgroundColor.js +++ b/src/plugins/backgroundColor.js @@ -3,7 +3,7 @@ import flattenColorPalette from '../util/flattenColorPalette' import withAlphaVariable from '../util/withAlphaVariable' export default function() { - return function({ addUtilities, e, theme, variants, target }) { + return function({ addUtilities, e, theme, variants, target, corePlugins }) { if (target('backgroundColor') === 'ie11') { const utilities = _.fromPairs( _.map(flattenColorPalette(theme('backgroundColor')), (value, modifier) => { @@ -20,11 +20,13 @@ export default function() { _.map(flattenColorPalette(theme('backgroundColor')), (value, modifier) => { return [ `.${e(`bg-${modifier}`)}`, - withAlphaVariable({ - color: value, - property: 'background-color', - variable: '--bg-opacity', - }), + corePlugins('backgroundOpacity') + ? withAlphaVariable({ + color: value, + property: 'background-color', + variable: '--bg-opacity', + }) + : { 'background-color': value }, ] }) ) diff --git a/src/plugins/borderColor.js b/src/plugins/borderColor.js --- a/src/plugins/borderColor.js +++ b/src/plugins/borderColor.js @@ -3,7 +3,7 @@ import flattenColorPalette from '../util/flattenColorPalette' import withAlphaVariable from '../util/withAlphaVariable' export default function() { - return function({ addUtilities, e, theme, variants, target }) { + return function({ addUtilities, e, theme, variants, target, corePlugins }) { if (target('borderColor') === 'ie11') { const colors = flattenColorPalette(theme('borderColor')) @@ -24,11 +24,13 @@ export default function() { _.map(_.omit(colors, 'default'), (value, modifier) => { return [ `.${e(`border-${modifier}`)}`, - withAlphaVariable({ - color: value, - property: 'border-color', - variable: '--border-opacity', - }), + corePlugins('borderOpacity') + ? withAlphaVariable({ + color: value, + property: 'border-color', + variable: '--border-opacity', + }) + : { 'border-color': value }, ] }) ) diff --git a/src/plugins/divideColor.js b/src/plugins/divideColor.js --- a/src/plugins/divideColor.js +++ b/src/plugins/divideColor.js @@ -3,7 +3,7 @@ import flattenColorPalette from '../util/flattenColorPalette' import withAlphaVariable from '../util/withAlphaVariable' export default function() { - return function({ addUtilities, e, theme, variants, target }) { + return function({ addUtilities, e, theme, variants, target, corePlugins }) { const colors = flattenColorPalette(theme('divideColor')) if (target('divideColor') === 'ie11') { @@ -25,11 +25,13 @@ export default function() { _.map(_.omit(colors, 'default'), (value, modifier) => { return [ `.${e(`divide-${modifier}`)} > :not(template) ~ :not(template)`, - withAlphaVariable({ - color: value, - property: 'border-color', - variable: '--divide-opacity', - }), + corePlugins('divideOpacity') + ? withAlphaVariable({ + color: value, + property: 'border-color', + variable: '--divide-opacity', + }) + : { 'border-color': value }, ] }) ) diff --git a/src/plugins/placeholderColor.js b/src/plugins/placeholderColor.js --- a/src/plugins/placeholderColor.js +++ b/src/plugins/placeholderColor.js @@ -3,7 +3,7 @@ import flattenColorPalette from '../util/flattenColorPalette' import withAlphaVariable from '../util/withAlphaVariable' export default function() { - return function({ addUtilities, e, theme, variants, target }) { + return function({ addUtilities, e, theme, variants, target, corePlugins }) { if (target('placeholderColor') === 'ie11') { const utilities = _.fromPairs( _.map(flattenColorPalette(theme('placeholderColor')), (value, modifier) => { @@ -20,7 +20,13 @@ export default function() { _.map(flattenColorPalette(theme('placeholderColor')), (value, modifier) => { return [ `.${e(`placeholder-${modifier}`)}::placeholder`, - withAlphaVariable({ color: value, property: 'color', variable: '--placeholder-opacity' }), + corePlugins('placeholderOpacity') + ? withAlphaVariable({ + color: value, + property: 'color', + variable: '--placeholder-opacity', + }) + : { color: value }, ] }) ) diff --git a/src/plugins/textColor.js b/src/plugins/textColor.js --- a/src/plugins/textColor.js +++ b/src/plugins/textColor.js @@ -3,7 +3,7 @@ import flattenColorPalette from '../util/flattenColorPalette' import withAlphaVariable from '../util/withAlphaVariable' export default function() { - return function({ addUtilities, e, theme, variants, target }) { + return function({ addUtilities, e, theme, variants, target, corePlugins }) { if (target('textColor') === 'ie11') { const utilities = _.fromPairs( _.map(flattenColorPalette(theme('textColor')), (value, modifier) => { @@ -20,7 +20,9 @@ export default function() { _.map(flattenColorPalette(theme('textColor')), (value, modifier) => { return [ `.${e(`text-${modifier}`)}`, - withAlphaVariable({ color: value, property: 'color', variable: '--text-opacity' }), + corePlugins('textOpacity') + ? withAlphaVariable({ color: value, property: 'color', variable: '--text-opacity' }) + : { color: value }, ] }) )
diff --git a/__tests__/fixtures/tailwind-output-no-color-opacity.css b/__tests__/fixtures/tailwind-output-no-color-opacity.css new file mode 100644 --- /dev/null +++ b/__tests__/fixtures/tailwind-output-no-color-opacity.css @@ -0,0 +1,57055 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} + +/** + * Manually forked from SUIT CSS Base: https://github.com/suitcss/base + * A thin layer on top of normalize.css that provides a starting point more + * suitable for web applications. + */ + +/** + * Removes the default spacing and border for appropriate elements. + */ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +button { + background-color: transparent; + background-image: none; + padding: 0; +} + +/** + * Work around a Firefox/IE bug where the transparent `button` background + * results in a loss of the default `button` focus styles. + */ + +button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} + +fieldset { + margin: 0; + padding: 0; +} + +ol, +ul { + list-style: none; + margin: 0; + padding: 0; +} + +/** + * Tailwind custom reset styles + */ + +/** + * 1. Use the user's configured `sans` font-family (with Tailwind's default + * sans-serif font stack as a fallback) as a sane default. + * 2. Use Tailwind's default "normal" line-height so the user isn't forced + * to override it to ensure consistency even when using the default theme. + */ + +html { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */ + line-height: 1.5; /* 2 */ +} + +/** + * 1. Prevent padding and border from affecting element width. + * + * We used to set this in the html element and inherit from + * the parent element for everything else. This caused issues + * in shadow-dom-enhanced elements like <details> where the content + * is wrapped by a div with box-sizing set to `content-box`. + * + * https://github.com/mozdevs/cssremedy/issues/4 + * + * + * 2. Allow adding a border to an element by just adding a border-width. + * + * By default, the way the browser specifies that an element should have no + * border is by setting it's border-style to `none` in the user-agent + * stylesheet. + * + * In order to easily add borders to elements by just setting the `border-width` + * property, we change the default border-style for all elements to `solid`, and + * use border-width to hide them instead. This way our `border` utilities only + * need to set the `border-width` property instead of the entire `border` + * shorthand, making our border utilities much more straightforward to compose. + * + * https://github.com/tailwindcss/tailwindcss/pull/116 + */ + +*, +::before, +::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: #e2e8f0; /* 2 */ +} + +/* + * Ensure horizontal rules are visible by default + */ + +hr { + border-top-width: 1px; +} + +/** + * Undo the `border-style: none` reset that Normalize applies to images so that + * our `border-{width}` utilities have the expected effect. + * + * The Normalize reset is unnecessary for us since we default the border-width + * to 0 on all elements. + * + * https://github.com/tailwindcss/tailwindcss/issues/362 + */ + +img { + border-style: solid; +} + +textarea { + resize: vertical; +} + +input::placeholder, +textarea::placeholder { + color: #a0aec0; +} + +button, +[role="button"] { + cursor: pointer; +} + +table { + border-collapse: collapse; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/** + * Reset links to optimize for opt-in styling instead of + * opt-out. + */ + +a { + color: inherit; + text-decoration: inherit; +} + +/** + * Reset form element properties that are easy to forget to + * style explicitly so you don't inadvertently introduce + * styles that deviate from your design system. These styles + * supplement a partial reset that is already applied by + * normalize.css. + */ + +button, +input, +optgroup, +select, +textarea { + padding: 0; + line-height: inherit; + color: inherit; +} + +/** + * Use the configured 'mono' font family for elements that + * are expected to be rendered with a monospace font, falling + * back to the system monospace stack if there is no configured + * 'mono' font family. + */ + +pre, +code, +kbd, +samp { + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +/** + * Make replaced elements `display: block` by default as that's + * the behavior you want almost all of the time. Inspired by + * CSS Remedy, with `svg` added as well. + * + * https://github.com/mozdevs/cssremedy/issues/14 + */ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + vertical-align: middle; +} + +/** + * Constrain images and videos to the parent width and preserve + * their instrinsic aspect ratio. + * + * https://github.com/mozdevs/cssremedy/issues/14 + */ + +img, +video { + max-width: 100%; + height: auto; +} + +.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; + } +} + +.space-y-0 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0px * var(--space-y-reverse)); +} + +.space-x-0 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0px * var(--space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--space-x-reverse))); +} + +.space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.25rem * var(--space-y-reverse)); +} + +.space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.25rem * var(--space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.5rem * var(--space-y-reverse)); +} + +.space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.5rem * var(--space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.75rem * var(--space-y-reverse)); +} + +.space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.75rem * var(--space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1rem * var(--space-y-reverse)); +} + +.space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1rem * var(--space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.25rem * var(--space-y-reverse)); +} + +.space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.25rem * var(--space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.5rem * var(--space-y-reverse)); +} + +.space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.5rem * var(--space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2rem * var(--space-y-reverse)); +} + +.space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2rem * var(--space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2.5rem * var(--space-y-reverse)); +} + +.space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2.5rem * var(--space-x-reverse)); + margin-left: calc(2.5rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(3rem * var(--space-y-reverse)); +} + +.space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(3rem * var(--space-x-reverse)); + margin-left: calc(3rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(4rem * var(--space-y-reverse)); +} + +.space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(4rem * var(--space-x-reverse)); + margin-left: calc(4rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(5rem * var(--space-y-reverse)); +} + +.space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(5rem * var(--space-x-reverse)); + margin-left: calc(5rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(6rem * var(--space-y-reverse)); +} + +.space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(6rem * var(--space-x-reverse)); + margin-left: calc(6rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(8rem * var(--space-y-reverse)); +} + +.space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(8rem * var(--space-x-reverse)); + margin-left: calc(8rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(10rem * var(--space-y-reverse)); +} + +.space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(10rem * var(--space-x-reverse)); + margin-left: calc(10rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(12rem * var(--space-y-reverse)); +} + +.space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(12rem * var(--space-x-reverse)); + margin-left: calc(12rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(14rem * var(--space-y-reverse)); +} + +.space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(14rem * var(--space-x-reverse)); + margin-left: calc(14rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(16rem * var(--space-y-reverse)); +} + +.space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(16rem * var(--space-x-reverse)); + margin-left: calc(16rem * calc(1 - var(--space-x-reverse))); +} + +.space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1px * var(--space-y-reverse)); +} + +.space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1px * var(--space-x-reverse)); + margin-left: calc(1px * calc(1 - var(--space-x-reverse))); +} + +.-space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.25rem * var(--space-y-reverse)); +} + +.-space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.25rem * var(--space-x-reverse)); + margin-left: calc(-0.25rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.5rem * var(--space-y-reverse)); +} + +.-space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.5rem * var(--space-x-reverse)); + margin-left: calc(-0.5rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.75rem * var(--space-y-reverse)); +} + +.-space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1rem * var(--space-y-reverse)); +} + +.-space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1rem * var(--space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.25rem * var(--space-y-reverse)); +} + +.-space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.25rem * var(--space-x-reverse)); + margin-left: calc(-1.25rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.5rem * var(--space-y-reverse)); +} + +.-space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.5rem * var(--space-x-reverse)); + margin-left: calc(-1.5rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2rem * var(--space-y-reverse)); +} + +.-space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2rem * var(--space-x-reverse)); + margin-left: calc(-2rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2.5rem * var(--space-y-reverse)); +} + +.-space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2.5rem * var(--space-x-reverse)); + margin-left: calc(-2.5rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-3rem * var(--space-y-reverse)); +} + +.-space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-3rem * var(--space-x-reverse)); + margin-left: calc(-3rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-4rem * var(--space-y-reverse)); +} + +.-space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-4rem * var(--space-x-reverse)); + margin-left: calc(-4rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-5rem * var(--space-y-reverse)); +} + +.-space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-5rem * var(--space-x-reverse)); + margin-left: calc(-5rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-6rem * var(--space-y-reverse)); +} + +.-space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-6rem * var(--space-x-reverse)); + margin-left: calc(-6rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-8rem * var(--space-y-reverse)); +} + +.-space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-8rem * var(--space-x-reverse)); + margin-left: calc(-8rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-10rem * var(--space-y-reverse)); +} + +.-space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-10rem * var(--space-x-reverse)); + margin-left: calc(-10rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-12rem * var(--space-y-reverse)); +} + +.-space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-12rem * var(--space-x-reverse)); + margin-left: calc(-12rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-14rem * var(--space-y-reverse)); +} + +.-space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-14rem * var(--space-x-reverse)); + margin-left: calc(-14rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-16rem * var(--space-y-reverse)); +} + +.-space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-16rem * var(--space-x-reverse)); + margin-left: calc(-16rem * calc(1 - var(--space-x-reverse))); +} + +.-space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1px * var(--space-y-reverse)); +} + +.-space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1px * var(--space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--space-x-reverse))); +} + +.space-y-reverse > :not(template) ~ :not(template) { + --space-y-reverse: 1; +} + +.space-x-reverse > :not(template) ~ :not(template) { + --space-x-reverse: 1; +} + +.divide-y-0 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(0px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(0px * var(--divide-y-reverse)); +} + +.divide-x-0 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(0px * var(--divide-x-reverse)); + border-left-width: calc(0px * calc(1 - var(--divide-x-reverse))); +} + +.divide-y-2 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(2px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(2px * var(--divide-y-reverse)); +} + +.divide-x-2 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(2px * var(--divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--divide-x-reverse))); +} + +.divide-y-4 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(4px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(4px * var(--divide-y-reverse)); +} + +.divide-x-4 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(4px * var(--divide-x-reverse)); + border-left-width: calc(4px * calc(1 - var(--divide-x-reverse))); +} + +.divide-y-8 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(8px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(8px * var(--divide-y-reverse)); +} + +.divide-x-8 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(8px * var(--divide-x-reverse)); + border-left-width: calc(8px * calc(1 - var(--divide-x-reverse))); +} + +.divide-y > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(1px * var(--divide-y-reverse)); +} + +.divide-x > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(1px * var(--divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--divide-x-reverse))); +} + +.divide-y-reverse > :not(template) ~ :not(template) { + --divide-y-reverse: 1; +} + +.divide-x-reverse > :not(template) ~ :not(template) { + --divide-x-reverse: 1; +} + +.divide-transparent > :not(template) ~ :not(template) { + border-color: transparent; +} + +.divide-current > :not(template) ~ :not(template) { + border-color: currentColor; +} + +.divide-black > :not(template) ~ :not(template) { + border-color: #000; +} + +.divide-white > :not(template) ~ :not(template) { + border-color: #fff; +} + +.divide-gray-100 > :not(template) ~ :not(template) { + border-color: #f7fafc; +} + +.divide-gray-200 > :not(template) ~ :not(template) { + border-color: #edf2f7; +} + +.divide-gray-300 > :not(template) ~ :not(template) { + border-color: #e2e8f0; +} + +.divide-gray-400 > :not(template) ~ :not(template) { + border-color: #cbd5e0; +} + +.divide-gray-500 > :not(template) ~ :not(template) { + border-color: #a0aec0; +} + +.divide-gray-600 > :not(template) ~ :not(template) { + border-color: #718096; +} + +.divide-gray-700 > :not(template) ~ :not(template) { + border-color: #4a5568; +} + +.divide-gray-800 > :not(template) ~ :not(template) { + border-color: #2d3748; +} + +.divide-gray-900 > :not(template) ~ :not(template) { + border-color: #1a202c; +} + +.divide-red-100 > :not(template) ~ :not(template) { + border-color: #fff5f5; +} + +.divide-red-200 > :not(template) ~ :not(template) { + border-color: #fed7d7; +} + +.divide-red-300 > :not(template) ~ :not(template) { + border-color: #feb2b2; +} + +.divide-red-400 > :not(template) ~ :not(template) { + border-color: #fc8181; +} + +.divide-red-500 > :not(template) ~ :not(template) { + border-color: #f56565; +} + +.divide-red-600 > :not(template) ~ :not(template) { + border-color: #e53e3e; +} + +.divide-red-700 > :not(template) ~ :not(template) { + border-color: #c53030; +} + +.divide-red-800 > :not(template) ~ :not(template) { + border-color: #9b2c2c; +} + +.divide-red-900 > :not(template) ~ :not(template) { + border-color: #742a2a; +} + +.divide-orange-100 > :not(template) ~ :not(template) { + border-color: #fffaf0; +} + +.divide-orange-200 > :not(template) ~ :not(template) { + border-color: #feebc8; +} + +.divide-orange-300 > :not(template) ~ :not(template) { + border-color: #fbd38d; +} + +.divide-orange-400 > :not(template) ~ :not(template) { + border-color: #f6ad55; +} + +.divide-orange-500 > :not(template) ~ :not(template) { + border-color: #ed8936; +} + +.divide-orange-600 > :not(template) ~ :not(template) { + border-color: #dd6b20; +} + +.divide-orange-700 > :not(template) ~ :not(template) { + border-color: #c05621; +} + +.divide-orange-800 > :not(template) ~ :not(template) { + border-color: #9c4221; +} + +.divide-orange-900 > :not(template) ~ :not(template) { + border-color: #7b341e; +} + +.divide-yellow-100 > :not(template) ~ :not(template) { + border-color: #fffff0; +} + +.divide-yellow-200 > :not(template) ~ :not(template) { + border-color: #fefcbf; +} + +.divide-yellow-300 > :not(template) ~ :not(template) { + border-color: #faf089; +} + +.divide-yellow-400 > :not(template) ~ :not(template) { + border-color: #f6e05e; +} + +.divide-yellow-500 > :not(template) ~ :not(template) { + border-color: #ecc94b; +} + +.divide-yellow-600 > :not(template) ~ :not(template) { + border-color: #d69e2e; +} + +.divide-yellow-700 > :not(template) ~ :not(template) { + border-color: #b7791f; +} + +.divide-yellow-800 > :not(template) ~ :not(template) { + border-color: #975a16; +} + +.divide-yellow-900 > :not(template) ~ :not(template) { + border-color: #744210; +} + +.divide-green-100 > :not(template) ~ :not(template) { + border-color: #f0fff4; +} + +.divide-green-200 > :not(template) ~ :not(template) { + border-color: #c6f6d5; +} + +.divide-green-300 > :not(template) ~ :not(template) { + border-color: #9ae6b4; +} + +.divide-green-400 > :not(template) ~ :not(template) { + border-color: #68d391; +} + +.divide-green-500 > :not(template) ~ :not(template) { + border-color: #48bb78; +} + +.divide-green-600 > :not(template) ~ :not(template) { + border-color: #38a169; +} + +.divide-green-700 > :not(template) ~ :not(template) { + border-color: #2f855a; +} + +.divide-green-800 > :not(template) ~ :not(template) { + border-color: #276749; +} + +.divide-green-900 > :not(template) ~ :not(template) { + border-color: #22543d; +} + +.divide-teal-100 > :not(template) ~ :not(template) { + border-color: #e6fffa; +} + +.divide-teal-200 > :not(template) ~ :not(template) { + border-color: #b2f5ea; +} + +.divide-teal-300 > :not(template) ~ :not(template) { + border-color: #81e6d9; +} + +.divide-teal-400 > :not(template) ~ :not(template) { + border-color: #4fd1c5; +} + +.divide-teal-500 > :not(template) ~ :not(template) { + border-color: #38b2ac; +} + +.divide-teal-600 > :not(template) ~ :not(template) { + border-color: #319795; +} + +.divide-teal-700 > :not(template) ~ :not(template) { + border-color: #2c7a7b; +} + +.divide-teal-800 > :not(template) ~ :not(template) { + border-color: #285e61; +} + +.divide-teal-900 > :not(template) ~ :not(template) { + border-color: #234e52; +} + +.divide-blue-100 > :not(template) ~ :not(template) { + border-color: #ebf8ff; +} + +.divide-blue-200 > :not(template) ~ :not(template) { + border-color: #bee3f8; +} + +.divide-blue-300 > :not(template) ~ :not(template) { + border-color: #90cdf4; +} + +.divide-blue-400 > :not(template) ~ :not(template) { + border-color: #63b3ed; +} + +.divide-blue-500 > :not(template) ~ :not(template) { + border-color: #4299e1; +} + +.divide-blue-600 > :not(template) ~ :not(template) { + border-color: #3182ce; +} + +.divide-blue-700 > :not(template) ~ :not(template) { + border-color: #2b6cb0; +} + +.divide-blue-800 > :not(template) ~ :not(template) { + border-color: #2c5282; +} + +.divide-blue-900 > :not(template) ~ :not(template) { + border-color: #2a4365; +} + +.divide-indigo-100 > :not(template) ~ :not(template) { + border-color: #ebf4ff; +} + +.divide-indigo-200 > :not(template) ~ :not(template) { + border-color: #c3dafe; +} + +.divide-indigo-300 > :not(template) ~ :not(template) { + border-color: #a3bffa; +} + +.divide-indigo-400 > :not(template) ~ :not(template) { + border-color: #7f9cf5; +} + +.divide-indigo-500 > :not(template) ~ :not(template) { + border-color: #667eea; +} + +.divide-indigo-600 > :not(template) ~ :not(template) { + border-color: #5a67d8; +} + +.divide-indigo-700 > :not(template) ~ :not(template) { + border-color: #4c51bf; +} + +.divide-indigo-800 > :not(template) ~ :not(template) { + border-color: #434190; +} + +.divide-indigo-900 > :not(template) ~ :not(template) { + border-color: #3c366b; +} + +.divide-purple-100 > :not(template) ~ :not(template) { + border-color: #faf5ff; +} + +.divide-purple-200 > :not(template) ~ :not(template) { + border-color: #e9d8fd; +} + +.divide-purple-300 > :not(template) ~ :not(template) { + border-color: #d6bcfa; +} + +.divide-purple-400 > :not(template) ~ :not(template) { + border-color: #b794f4; +} + +.divide-purple-500 > :not(template) ~ :not(template) { + border-color: #9f7aea; +} + +.divide-purple-600 > :not(template) ~ :not(template) { + border-color: #805ad5; +} + +.divide-purple-700 > :not(template) ~ :not(template) { + border-color: #6b46c1; +} + +.divide-purple-800 > :not(template) ~ :not(template) { + border-color: #553c9a; +} + +.divide-purple-900 > :not(template) ~ :not(template) { + border-color: #44337a; +} + +.divide-pink-100 > :not(template) ~ :not(template) { + border-color: #fff5f7; +} + +.divide-pink-200 > :not(template) ~ :not(template) { + border-color: #fed7e2; +} + +.divide-pink-300 > :not(template) ~ :not(template) { + border-color: #fbb6ce; +} + +.divide-pink-400 > :not(template) ~ :not(template) { + border-color: #f687b3; +} + +.divide-pink-500 > :not(template) ~ :not(template) { + border-color: #ed64a6; +} + +.divide-pink-600 > :not(template) ~ :not(template) { + border-color: #d53f8c; +} + +.divide-pink-700 > :not(template) ~ :not(template) { + border-color: #b83280; +} + +.divide-pink-800 > :not(template) ~ :not(template) { + border-color: #97266d; +} + +.divide-pink-900 > :not(template) ~ :not(template) { + border-color: #702459; +} + +.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; +} + +.focus\:sr-only:focus { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.focus\:not-sr-only:focus { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; +} + +.appearance-none { + appearance: none; +} + +.bg-fixed { + background-attachment: fixed; +} + +.bg-local { + background-attachment: local; +} + +.bg-scroll { + background-attachment: scroll; +} + +.bg-transparent { + background-color: transparent; +} + +.bg-current { + background-color: currentColor; +} + +.bg-black { + background-color: #000; +} + +.bg-white { + background-color: #fff; +} + +.bg-gray-100 { + background-color: #f7fafc; +} + +.bg-gray-200 { + background-color: #edf2f7; +} + +.bg-gray-300 { + background-color: #e2e8f0; +} + +.bg-gray-400 { + background-color: #cbd5e0; +} + +.bg-gray-500 { + background-color: #a0aec0; +} + +.bg-gray-600 { + background-color: #718096; +} + +.bg-gray-700 { + background-color: #4a5568; +} + +.bg-gray-800 { + background-color: #2d3748; +} + +.bg-gray-900 { + background-color: #1a202c; +} + +.bg-red-100 { + background-color: #fff5f5; +} + +.bg-red-200 { + background-color: #fed7d7; +} + +.bg-red-300 { + background-color: #feb2b2; +} + +.bg-red-400 { + background-color: #fc8181; +} + +.bg-red-500 { + background-color: #f56565; +} + +.bg-red-600 { + background-color: #e53e3e; +} + +.bg-red-700 { + background-color: #c53030; +} + +.bg-red-800 { + background-color: #9b2c2c; +} + +.bg-red-900 { + background-color: #742a2a; +} + +.bg-orange-100 { + background-color: #fffaf0; +} + +.bg-orange-200 { + background-color: #feebc8; +} + +.bg-orange-300 { + background-color: #fbd38d; +} + +.bg-orange-400 { + background-color: #f6ad55; +} + +.bg-orange-500 { + background-color: #ed8936; +} + +.bg-orange-600 { + background-color: #dd6b20; +} + +.bg-orange-700 { + background-color: #c05621; +} + +.bg-orange-800 { + background-color: #9c4221; +} + +.bg-orange-900 { + background-color: #7b341e; +} + +.bg-yellow-100 { + background-color: #fffff0; +} + +.bg-yellow-200 { + background-color: #fefcbf; +} + +.bg-yellow-300 { + background-color: #faf089; +} + +.bg-yellow-400 { + background-color: #f6e05e; +} + +.bg-yellow-500 { + background-color: #ecc94b; +} + +.bg-yellow-600 { + background-color: #d69e2e; +} + +.bg-yellow-700 { + background-color: #b7791f; +} + +.bg-yellow-800 { + background-color: #975a16; +} + +.bg-yellow-900 { + background-color: #744210; +} + +.bg-green-100 { + background-color: #f0fff4; +} + +.bg-green-200 { + background-color: #c6f6d5; +} + +.bg-green-300 { + background-color: #9ae6b4; +} + +.bg-green-400 { + background-color: #68d391; +} + +.bg-green-500 { + background-color: #48bb78; +} + +.bg-green-600 { + background-color: #38a169; +} + +.bg-green-700 { + background-color: #2f855a; +} + +.bg-green-800 { + background-color: #276749; +} + +.bg-green-900 { + background-color: #22543d; +} + +.bg-teal-100 { + background-color: #e6fffa; +} + +.bg-teal-200 { + background-color: #b2f5ea; +} + +.bg-teal-300 { + background-color: #81e6d9; +} + +.bg-teal-400 { + background-color: #4fd1c5; +} + +.bg-teal-500 { + background-color: #38b2ac; +} + +.bg-teal-600 { + background-color: #319795; +} + +.bg-teal-700 { + background-color: #2c7a7b; +} + +.bg-teal-800 { + background-color: #285e61; +} + +.bg-teal-900 { + background-color: #234e52; +} + +.bg-blue-100 { + background-color: #ebf8ff; +} + +.bg-blue-200 { + background-color: #bee3f8; +} + +.bg-blue-300 { + background-color: #90cdf4; +} + +.bg-blue-400 { + background-color: #63b3ed; +} + +.bg-blue-500 { + background-color: #4299e1; +} + +.bg-blue-600 { + background-color: #3182ce; +} + +.bg-blue-700 { + background-color: #2b6cb0; +} + +.bg-blue-800 { + background-color: #2c5282; +} + +.bg-blue-900 { + background-color: #2a4365; +} + +.bg-indigo-100 { + background-color: #ebf4ff; +} + +.bg-indigo-200 { + background-color: #c3dafe; +} + +.bg-indigo-300 { + background-color: #a3bffa; +} + +.bg-indigo-400 { + background-color: #7f9cf5; +} + +.bg-indigo-500 { + background-color: #667eea; +} + +.bg-indigo-600 { + background-color: #5a67d8; +} + +.bg-indigo-700 { + background-color: #4c51bf; +} + +.bg-indigo-800 { + background-color: #434190; +} + +.bg-indigo-900 { + background-color: #3c366b; +} + +.bg-purple-100 { + background-color: #faf5ff; +} + +.bg-purple-200 { + background-color: #e9d8fd; +} + +.bg-purple-300 { + background-color: #d6bcfa; +} + +.bg-purple-400 { + background-color: #b794f4; +} + +.bg-purple-500 { + background-color: #9f7aea; +} + +.bg-purple-600 { + background-color: #805ad5; +} + +.bg-purple-700 { + background-color: #6b46c1; +} + +.bg-purple-800 { + background-color: #553c9a; +} + +.bg-purple-900 { + background-color: #44337a; +} + +.bg-pink-100 { + background-color: #fff5f7; +} + +.bg-pink-200 { + background-color: #fed7e2; +} + +.bg-pink-300 { + background-color: #fbb6ce; +} + +.bg-pink-400 { + background-color: #f687b3; +} + +.bg-pink-500 { + background-color: #ed64a6; +} + +.bg-pink-600 { + background-color: #d53f8c; +} + +.bg-pink-700 { + background-color: #b83280; +} + +.bg-pink-800 { + background-color: #97266d; +} + +.bg-pink-900 { + background-color: #702459; +} + +.hover\:bg-transparent:hover { + background-color: transparent; +} + +.hover\:bg-current:hover { + background-color: currentColor; +} + +.hover\:bg-black:hover { + background-color: #000; +} + +.hover\:bg-white:hover { + background-color: #fff; +} + +.hover\:bg-gray-100:hover { + background-color: #f7fafc; +} + +.hover\:bg-gray-200:hover { + background-color: #edf2f7; +} + +.hover\:bg-gray-300:hover { + background-color: #e2e8f0; +} + +.hover\:bg-gray-400:hover { + background-color: #cbd5e0; +} + +.hover\:bg-gray-500:hover { + background-color: #a0aec0; +} + +.hover\:bg-gray-600:hover { + background-color: #718096; +} + +.hover\:bg-gray-700:hover { + background-color: #4a5568; +} + +.hover\:bg-gray-800:hover { + background-color: #2d3748; +} + +.hover\:bg-gray-900:hover { + background-color: #1a202c; +} + +.hover\:bg-red-100:hover { + background-color: #fff5f5; +} + +.hover\:bg-red-200:hover { + background-color: #fed7d7; +} + +.hover\:bg-red-300:hover { + background-color: #feb2b2; +} + +.hover\:bg-red-400:hover { + background-color: #fc8181; +} + +.hover\:bg-red-500:hover { + background-color: #f56565; +} + +.hover\:bg-red-600:hover { + background-color: #e53e3e; +} + +.hover\:bg-red-700:hover { + background-color: #c53030; +} + +.hover\:bg-red-800:hover { + background-color: #9b2c2c; +} + +.hover\:bg-red-900:hover { + background-color: #742a2a; +} + +.hover\:bg-orange-100:hover { + background-color: #fffaf0; +} + +.hover\:bg-orange-200:hover { + background-color: #feebc8; +} + +.hover\:bg-orange-300:hover { + background-color: #fbd38d; +} + +.hover\:bg-orange-400:hover { + background-color: #f6ad55; +} + +.hover\:bg-orange-500:hover { + background-color: #ed8936; +} + +.hover\:bg-orange-600:hover { + background-color: #dd6b20; +} + +.hover\:bg-orange-700:hover { + background-color: #c05621; +} + +.hover\:bg-orange-800:hover { + background-color: #9c4221; +} + +.hover\:bg-orange-900:hover { + background-color: #7b341e; +} + +.hover\:bg-yellow-100:hover { + background-color: #fffff0; +} + +.hover\:bg-yellow-200:hover { + background-color: #fefcbf; +} + +.hover\:bg-yellow-300:hover { + background-color: #faf089; +} + +.hover\:bg-yellow-400:hover { + background-color: #f6e05e; +} + +.hover\:bg-yellow-500:hover { + background-color: #ecc94b; +} + +.hover\:bg-yellow-600:hover { + background-color: #d69e2e; +} + +.hover\:bg-yellow-700:hover { + background-color: #b7791f; +} + +.hover\:bg-yellow-800:hover { + background-color: #975a16; +} + +.hover\:bg-yellow-900:hover { + background-color: #744210; +} + +.hover\:bg-green-100:hover { + background-color: #f0fff4; +} + +.hover\:bg-green-200:hover { + background-color: #c6f6d5; +} + +.hover\:bg-green-300:hover { + background-color: #9ae6b4; +} + +.hover\:bg-green-400:hover { + background-color: #68d391; +} + +.hover\:bg-green-500:hover { + background-color: #48bb78; +} + +.hover\:bg-green-600:hover { + background-color: #38a169; +} + +.hover\:bg-green-700:hover { + background-color: #2f855a; +} + +.hover\:bg-green-800:hover { + background-color: #276749; +} + +.hover\:bg-green-900:hover { + background-color: #22543d; +} + +.hover\:bg-teal-100:hover { + background-color: #e6fffa; +} + +.hover\:bg-teal-200:hover { + background-color: #b2f5ea; +} + +.hover\:bg-teal-300:hover { + background-color: #81e6d9; +} + +.hover\:bg-teal-400:hover { + background-color: #4fd1c5; +} + +.hover\:bg-teal-500:hover { + background-color: #38b2ac; +} + +.hover\:bg-teal-600:hover { + background-color: #319795; +} + +.hover\:bg-teal-700:hover { + background-color: #2c7a7b; +} + +.hover\:bg-teal-800:hover { + background-color: #285e61; +} + +.hover\:bg-teal-900:hover { + background-color: #234e52; +} + +.hover\:bg-blue-100:hover { + background-color: #ebf8ff; +} + +.hover\:bg-blue-200:hover { + background-color: #bee3f8; +} + +.hover\:bg-blue-300:hover { + background-color: #90cdf4; +} + +.hover\:bg-blue-400:hover { + background-color: #63b3ed; +} + +.hover\:bg-blue-500:hover { + background-color: #4299e1; +} + +.hover\:bg-blue-600:hover { + background-color: #3182ce; +} + +.hover\:bg-blue-700:hover { + background-color: #2b6cb0; +} + +.hover\:bg-blue-800:hover { + background-color: #2c5282; +} + +.hover\:bg-blue-900:hover { + background-color: #2a4365; +} + +.hover\:bg-indigo-100:hover { + background-color: #ebf4ff; +} + +.hover\:bg-indigo-200:hover { + background-color: #c3dafe; +} + +.hover\:bg-indigo-300:hover { + background-color: #a3bffa; +} + +.hover\:bg-indigo-400:hover { + background-color: #7f9cf5; +} + +.hover\:bg-indigo-500:hover { + background-color: #667eea; +} + +.hover\:bg-indigo-600:hover { + background-color: #5a67d8; +} + +.hover\:bg-indigo-700:hover { + background-color: #4c51bf; +} + +.hover\:bg-indigo-800:hover { + background-color: #434190; +} + +.hover\:bg-indigo-900:hover { + background-color: #3c366b; +} + +.hover\:bg-purple-100:hover { + background-color: #faf5ff; +} + +.hover\:bg-purple-200:hover { + background-color: #e9d8fd; +} + +.hover\:bg-purple-300:hover { + background-color: #d6bcfa; +} + +.hover\:bg-purple-400:hover { + background-color: #b794f4; +} + +.hover\:bg-purple-500:hover { + background-color: #9f7aea; +} + +.hover\:bg-purple-600:hover { + background-color: #805ad5; +} + +.hover\:bg-purple-700:hover { + background-color: #6b46c1; +} + +.hover\:bg-purple-800:hover { + background-color: #553c9a; +} + +.hover\:bg-purple-900:hover { + background-color: #44337a; +} + +.hover\:bg-pink-100:hover { + background-color: #fff5f7; +} + +.hover\:bg-pink-200:hover { + background-color: #fed7e2; +} + +.hover\:bg-pink-300:hover { + background-color: #fbb6ce; +} + +.hover\:bg-pink-400:hover { + background-color: #f687b3; +} + +.hover\:bg-pink-500:hover { + background-color: #ed64a6; +} + +.hover\:bg-pink-600:hover { + background-color: #d53f8c; +} + +.hover\:bg-pink-700:hover { + background-color: #b83280; +} + +.hover\:bg-pink-800:hover { + background-color: #97266d; +} + +.hover\:bg-pink-900:hover { + background-color: #702459; +} + +.focus\:bg-transparent:focus { + background-color: transparent; +} + +.focus\:bg-current:focus { + background-color: currentColor; +} + +.focus\:bg-black:focus { + background-color: #000; +} + +.focus\:bg-white:focus { + background-color: #fff; +} + +.focus\:bg-gray-100:focus { + background-color: #f7fafc; +} + +.focus\:bg-gray-200:focus { + background-color: #edf2f7; +} + +.focus\:bg-gray-300:focus { + background-color: #e2e8f0; +} + +.focus\:bg-gray-400:focus { + background-color: #cbd5e0; +} + +.focus\:bg-gray-500:focus { + background-color: #a0aec0; +} + +.focus\:bg-gray-600:focus { + background-color: #718096; +} + +.focus\:bg-gray-700:focus { + background-color: #4a5568; +} + +.focus\:bg-gray-800:focus { + background-color: #2d3748; +} + +.focus\:bg-gray-900:focus { + background-color: #1a202c; +} + +.focus\:bg-red-100:focus { + background-color: #fff5f5; +} + +.focus\:bg-red-200:focus { + background-color: #fed7d7; +} + +.focus\:bg-red-300:focus { + background-color: #feb2b2; +} + +.focus\:bg-red-400:focus { + background-color: #fc8181; +} + +.focus\:bg-red-500:focus { + background-color: #f56565; +} + +.focus\:bg-red-600:focus { + background-color: #e53e3e; +} + +.focus\:bg-red-700:focus { + background-color: #c53030; +} + +.focus\:bg-red-800:focus { + background-color: #9b2c2c; +} + +.focus\:bg-red-900:focus { + background-color: #742a2a; +} + +.focus\:bg-orange-100:focus { + background-color: #fffaf0; +} + +.focus\:bg-orange-200:focus { + background-color: #feebc8; +} + +.focus\:bg-orange-300:focus { + background-color: #fbd38d; +} + +.focus\:bg-orange-400:focus { + background-color: #f6ad55; +} + +.focus\:bg-orange-500:focus { + background-color: #ed8936; +} + +.focus\:bg-orange-600:focus { + background-color: #dd6b20; +} + +.focus\:bg-orange-700:focus { + background-color: #c05621; +} + +.focus\:bg-orange-800:focus { + background-color: #9c4221; +} + +.focus\:bg-orange-900:focus { + background-color: #7b341e; +} + +.focus\:bg-yellow-100:focus { + background-color: #fffff0; +} + +.focus\:bg-yellow-200:focus { + background-color: #fefcbf; +} + +.focus\:bg-yellow-300:focus { + background-color: #faf089; +} + +.focus\:bg-yellow-400:focus { + background-color: #f6e05e; +} + +.focus\:bg-yellow-500:focus { + background-color: #ecc94b; +} + +.focus\:bg-yellow-600:focus { + background-color: #d69e2e; +} + +.focus\:bg-yellow-700:focus { + background-color: #b7791f; +} + +.focus\:bg-yellow-800:focus { + background-color: #975a16; +} + +.focus\:bg-yellow-900:focus { + background-color: #744210; +} + +.focus\:bg-green-100:focus { + background-color: #f0fff4; +} + +.focus\:bg-green-200:focus { + background-color: #c6f6d5; +} + +.focus\:bg-green-300:focus { + background-color: #9ae6b4; +} + +.focus\:bg-green-400:focus { + background-color: #68d391; +} + +.focus\:bg-green-500:focus { + background-color: #48bb78; +} + +.focus\:bg-green-600:focus { + background-color: #38a169; +} + +.focus\:bg-green-700:focus { + background-color: #2f855a; +} + +.focus\:bg-green-800:focus { + background-color: #276749; +} + +.focus\:bg-green-900:focus { + background-color: #22543d; +} + +.focus\:bg-teal-100:focus { + background-color: #e6fffa; +} + +.focus\:bg-teal-200:focus { + background-color: #b2f5ea; +} + +.focus\:bg-teal-300:focus { + background-color: #81e6d9; +} + +.focus\:bg-teal-400:focus { + background-color: #4fd1c5; +} + +.focus\:bg-teal-500:focus { + background-color: #38b2ac; +} + +.focus\:bg-teal-600:focus { + background-color: #319795; +} + +.focus\:bg-teal-700:focus { + background-color: #2c7a7b; +} + +.focus\:bg-teal-800:focus { + background-color: #285e61; +} + +.focus\:bg-teal-900:focus { + background-color: #234e52; +} + +.focus\:bg-blue-100:focus { + background-color: #ebf8ff; +} + +.focus\:bg-blue-200:focus { + background-color: #bee3f8; +} + +.focus\:bg-blue-300:focus { + background-color: #90cdf4; +} + +.focus\:bg-blue-400:focus { + background-color: #63b3ed; +} + +.focus\:bg-blue-500:focus { + background-color: #4299e1; +} + +.focus\:bg-blue-600:focus { + background-color: #3182ce; +} + +.focus\:bg-blue-700:focus { + background-color: #2b6cb0; +} + +.focus\:bg-blue-800:focus { + background-color: #2c5282; +} + +.focus\:bg-blue-900:focus { + background-color: #2a4365; +} + +.focus\:bg-indigo-100:focus { + background-color: #ebf4ff; +} + +.focus\:bg-indigo-200:focus { + background-color: #c3dafe; +} + +.focus\:bg-indigo-300:focus { + background-color: #a3bffa; +} + +.focus\:bg-indigo-400:focus { + background-color: #7f9cf5; +} + +.focus\:bg-indigo-500:focus { + background-color: #667eea; +} + +.focus\:bg-indigo-600:focus { + background-color: #5a67d8; +} + +.focus\:bg-indigo-700:focus { + background-color: #4c51bf; +} + +.focus\:bg-indigo-800:focus { + background-color: #434190; +} + +.focus\:bg-indigo-900:focus { + background-color: #3c366b; +} + +.focus\:bg-purple-100:focus { + background-color: #faf5ff; +} + +.focus\:bg-purple-200:focus { + background-color: #e9d8fd; +} + +.focus\:bg-purple-300:focus { + background-color: #d6bcfa; +} + +.focus\:bg-purple-400:focus { + background-color: #b794f4; +} + +.focus\:bg-purple-500:focus { + background-color: #9f7aea; +} + +.focus\:bg-purple-600:focus { + background-color: #805ad5; +} + +.focus\:bg-purple-700:focus { + background-color: #6b46c1; +} + +.focus\:bg-purple-800:focus { + background-color: #553c9a; +} + +.focus\:bg-purple-900:focus { + background-color: #44337a; +} + +.focus\:bg-pink-100:focus { + background-color: #fff5f7; +} + +.focus\:bg-pink-200:focus { + background-color: #fed7e2; +} + +.focus\:bg-pink-300:focus { + background-color: #fbb6ce; +} + +.focus\:bg-pink-400:focus { + background-color: #f687b3; +} + +.focus\:bg-pink-500:focus { + background-color: #ed64a6; +} + +.focus\:bg-pink-600:focus { + background-color: #d53f8c; +} + +.focus\:bg-pink-700:focus { + background-color: #b83280; +} + +.focus\:bg-pink-800:focus { + background-color: #97266d; +} + +.focus\:bg-pink-900:focus { + background-color: #702459; +} + +.bg-bottom { + background-position: bottom; +} + +.bg-center { + background-position: center; +} + +.bg-left { + background-position: left; +} + +.bg-left-bottom { + background-position: left bottom; +} + +.bg-left-top { + background-position: left top; +} + +.bg-right { + background-position: right; +} + +.bg-right-bottom { + background-position: right bottom; +} + +.bg-right-top { + background-position: right top; +} + +.bg-top { + background-position: top; +} + +.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-auto { + background-size: auto; +} + +.bg-cover { + background-size: cover; +} + +.bg-contain { + background-size: contain; +} + +.border-collapse { + border-collapse: collapse; +} + +.border-separate { + border-collapse: separate; +} + +.border-transparent { + border-color: transparent; +} + +.border-current { + border-color: currentColor; +} + +.border-black { + border-color: #000; +} + +.border-white { + border-color: #fff; +} + +.border-gray-100 { + border-color: #f7fafc; +} + +.border-gray-200 { + border-color: #edf2f7; +} + +.border-gray-300 { + border-color: #e2e8f0; +} + +.border-gray-400 { + border-color: #cbd5e0; +} + +.border-gray-500 { + border-color: #a0aec0; +} + +.border-gray-600 { + border-color: #718096; +} + +.border-gray-700 { + border-color: #4a5568; +} + +.border-gray-800 { + border-color: #2d3748; +} + +.border-gray-900 { + border-color: #1a202c; +} + +.border-red-100 { + border-color: #fff5f5; +} + +.border-red-200 { + border-color: #fed7d7; +} + +.border-red-300 { + border-color: #feb2b2; +} + +.border-red-400 { + border-color: #fc8181; +} + +.border-red-500 { + border-color: #f56565; +} + +.border-red-600 { + border-color: #e53e3e; +} + +.border-red-700 { + border-color: #c53030; +} + +.border-red-800 { + border-color: #9b2c2c; +} + +.border-red-900 { + border-color: #742a2a; +} + +.border-orange-100 { + border-color: #fffaf0; +} + +.border-orange-200 { + border-color: #feebc8; +} + +.border-orange-300 { + border-color: #fbd38d; +} + +.border-orange-400 { + border-color: #f6ad55; +} + +.border-orange-500 { + border-color: #ed8936; +} + +.border-orange-600 { + border-color: #dd6b20; +} + +.border-orange-700 { + border-color: #c05621; +} + +.border-orange-800 { + border-color: #9c4221; +} + +.border-orange-900 { + border-color: #7b341e; +} + +.border-yellow-100 { + border-color: #fffff0; +} + +.border-yellow-200 { + border-color: #fefcbf; +} + +.border-yellow-300 { + border-color: #faf089; +} + +.border-yellow-400 { + border-color: #f6e05e; +} + +.border-yellow-500 { + border-color: #ecc94b; +} + +.border-yellow-600 { + border-color: #d69e2e; +} + +.border-yellow-700 { + border-color: #b7791f; +} + +.border-yellow-800 { + border-color: #975a16; +} + +.border-yellow-900 { + border-color: #744210; +} + +.border-green-100 { + border-color: #f0fff4; +} + +.border-green-200 { + border-color: #c6f6d5; +} + +.border-green-300 { + border-color: #9ae6b4; +} + +.border-green-400 { + border-color: #68d391; +} + +.border-green-500 { + border-color: #48bb78; +} + +.border-green-600 { + border-color: #38a169; +} + +.border-green-700 { + border-color: #2f855a; +} + +.border-green-800 { + border-color: #276749; +} + +.border-green-900 { + border-color: #22543d; +} + +.border-teal-100 { + border-color: #e6fffa; +} + +.border-teal-200 { + border-color: #b2f5ea; +} + +.border-teal-300 { + border-color: #81e6d9; +} + +.border-teal-400 { + border-color: #4fd1c5; +} + +.border-teal-500 { + border-color: #38b2ac; +} + +.border-teal-600 { + border-color: #319795; +} + +.border-teal-700 { + border-color: #2c7a7b; +} + +.border-teal-800 { + border-color: #285e61; +} + +.border-teal-900 { + border-color: #234e52; +} + +.border-blue-100 { + border-color: #ebf8ff; +} + +.border-blue-200 { + border-color: #bee3f8; +} + +.border-blue-300 { + border-color: #90cdf4; +} + +.border-blue-400 { + border-color: #63b3ed; +} + +.border-blue-500 { + border-color: #4299e1; +} + +.border-blue-600 { + border-color: #3182ce; +} + +.border-blue-700 { + border-color: #2b6cb0; +} + +.border-blue-800 { + border-color: #2c5282; +} + +.border-blue-900 { + border-color: #2a4365; +} + +.border-indigo-100 { + border-color: #ebf4ff; +} + +.border-indigo-200 { + border-color: #c3dafe; +} + +.border-indigo-300 { + border-color: #a3bffa; +} + +.border-indigo-400 { + border-color: #7f9cf5; +} + +.border-indigo-500 { + border-color: #667eea; +} + +.border-indigo-600 { + border-color: #5a67d8; +} + +.border-indigo-700 { + border-color: #4c51bf; +} + +.border-indigo-800 { + border-color: #434190; +} + +.border-indigo-900 { + border-color: #3c366b; +} + +.border-purple-100 { + border-color: #faf5ff; +} + +.border-purple-200 { + border-color: #e9d8fd; +} + +.border-purple-300 { + border-color: #d6bcfa; +} + +.border-purple-400 { + border-color: #b794f4; +} + +.border-purple-500 { + border-color: #9f7aea; +} + +.border-purple-600 { + border-color: #805ad5; +} + +.border-purple-700 { + border-color: #6b46c1; +} + +.border-purple-800 { + border-color: #553c9a; +} + +.border-purple-900 { + border-color: #44337a; +} + +.border-pink-100 { + border-color: #fff5f7; +} + +.border-pink-200 { + border-color: #fed7e2; +} + +.border-pink-300 { + border-color: #fbb6ce; +} + +.border-pink-400 { + border-color: #f687b3; +} + +.border-pink-500 { + border-color: #ed64a6; +} + +.border-pink-600 { + border-color: #d53f8c; +} + +.border-pink-700 { + border-color: #b83280; +} + +.border-pink-800 { + border-color: #97266d; +} + +.border-pink-900 { + border-color: #702459; +} + +.hover\:border-transparent:hover { + border-color: transparent; +} + +.hover\:border-current:hover { + border-color: currentColor; +} + +.hover\:border-black:hover { + border-color: #000; +} + +.hover\:border-white:hover { + border-color: #fff; +} + +.hover\:border-gray-100:hover { + border-color: #f7fafc; +} + +.hover\:border-gray-200:hover { + border-color: #edf2f7; +} + +.hover\:border-gray-300:hover { + border-color: #e2e8f0; +} + +.hover\:border-gray-400:hover { + border-color: #cbd5e0; +} + +.hover\:border-gray-500:hover { + border-color: #a0aec0; +} + +.hover\:border-gray-600:hover { + border-color: #718096; +} + +.hover\:border-gray-700:hover { + border-color: #4a5568; +} + +.hover\:border-gray-800:hover { + border-color: #2d3748; +} + +.hover\:border-gray-900:hover { + border-color: #1a202c; +} + +.hover\:border-red-100:hover { + border-color: #fff5f5; +} + +.hover\:border-red-200:hover { + border-color: #fed7d7; +} + +.hover\:border-red-300:hover { + border-color: #feb2b2; +} + +.hover\:border-red-400:hover { + border-color: #fc8181; +} + +.hover\:border-red-500:hover { + border-color: #f56565; +} + +.hover\:border-red-600:hover { + border-color: #e53e3e; +} + +.hover\:border-red-700:hover { + border-color: #c53030; +} + +.hover\:border-red-800:hover { + border-color: #9b2c2c; +} + +.hover\:border-red-900:hover { + border-color: #742a2a; +} + +.hover\:border-orange-100:hover { + border-color: #fffaf0; +} + +.hover\:border-orange-200:hover { + border-color: #feebc8; +} + +.hover\:border-orange-300:hover { + border-color: #fbd38d; +} + +.hover\:border-orange-400:hover { + border-color: #f6ad55; +} + +.hover\:border-orange-500:hover { + border-color: #ed8936; +} + +.hover\:border-orange-600:hover { + border-color: #dd6b20; +} + +.hover\:border-orange-700:hover { + border-color: #c05621; +} + +.hover\:border-orange-800:hover { + border-color: #9c4221; +} + +.hover\:border-orange-900:hover { + border-color: #7b341e; +} + +.hover\:border-yellow-100:hover { + border-color: #fffff0; +} + +.hover\:border-yellow-200:hover { + border-color: #fefcbf; +} + +.hover\:border-yellow-300:hover { + border-color: #faf089; +} + +.hover\:border-yellow-400:hover { + border-color: #f6e05e; +} + +.hover\:border-yellow-500:hover { + border-color: #ecc94b; +} + +.hover\:border-yellow-600:hover { + border-color: #d69e2e; +} + +.hover\:border-yellow-700:hover { + border-color: #b7791f; +} + +.hover\:border-yellow-800:hover { + border-color: #975a16; +} + +.hover\:border-yellow-900:hover { + border-color: #744210; +} + +.hover\:border-green-100:hover { + border-color: #f0fff4; +} + +.hover\:border-green-200:hover { + border-color: #c6f6d5; +} + +.hover\:border-green-300:hover { + border-color: #9ae6b4; +} + +.hover\:border-green-400:hover { + border-color: #68d391; +} + +.hover\:border-green-500:hover { + border-color: #48bb78; +} + +.hover\:border-green-600:hover { + border-color: #38a169; +} + +.hover\:border-green-700:hover { + border-color: #2f855a; +} + +.hover\:border-green-800:hover { + border-color: #276749; +} + +.hover\:border-green-900:hover { + border-color: #22543d; +} + +.hover\:border-teal-100:hover { + border-color: #e6fffa; +} + +.hover\:border-teal-200:hover { + border-color: #b2f5ea; +} + +.hover\:border-teal-300:hover { + border-color: #81e6d9; +} + +.hover\:border-teal-400:hover { + border-color: #4fd1c5; +} + +.hover\:border-teal-500:hover { + border-color: #38b2ac; +} + +.hover\:border-teal-600:hover { + border-color: #319795; +} + +.hover\:border-teal-700:hover { + border-color: #2c7a7b; +} + +.hover\:border-teal-800:hover { + border-color: #285e61; +} + +.hover\:border-teal-900:hover { + border-color: #234e52; +} + +.hover\:border-blue-100:hover { + border-color: #ebf8ff; +} + +.hover\:border-blue-200:hover { + border-color: #bee3f8; +} + +.hover\:border-blue-300:hover { + border-color: #90cdf4; +} + +.hover\:border-blue-400:hover { + border-color: #63b3ed; +} + +.hover\:border-blue-500:hover { + border-color: #4299e1; +} + +.hover\:border-blue-600:hover { + border-color: #3182ce; +} + +.hover\:border-blue-700:hover { + border-color: #2b6cb0; +} + +.hover\:border-blue-800:hover { + border-color: #2c5282; +} + +.hover\:border-blue-900:hover { + border-color: #2a4365; +} + +.hover\:border-indigo-100:hover { + border-color: #ebf4ff; +} + +.hover\:border-indigo-200:hover { + border-color: #c3dafe; +} + +.hover\:border-indigo-300:hover { + border-color: #a3bffa; +} + +.hover\:border-indigo-400:hover { + border-color: #7f9cf5; +} + +.hover\:border-indigo-500:hover { + border-color: #667eea; +} + +.hover\:border-indigo-600:hover { + border-color: #5a67d8; +} + +.hover\:border-indigo-700:hover { + border-color: #4c51bf; +} + +.hover\:border-indigo-800:hover { + border-color: #434190; +} + +.hover\:border-indigo-900:hover { + border-color: #3c366b; +} + +.hover\:border-purple-100:hover { + border-color: #faf5ff; +} + +.hover\:border-purple-200:hover { + border-color: #e9d8fd; +} + +.hover\:border-purple-300:hover { + border-color: #d6bcfa; +} + +.hover\:border-purple-400:hover { + border-color: #b794f4; +} + +.hover\:border-purple-500:hover { + border-color: #9f7aea; +} + +.hover\:border-purple-600:hover { + border-color: #805ad5; +} + +.hover\:border-purple-700:hover { + border-color: #6b46c1; +} + +.hover\:border-purple-800:hover { + border-color: #553c9a; +} + +.hover\:border-purple-900:hover { + border-color: #44337a; +} + +.hover\:border-pink-100:hover { + border-color: #fff5f7; +} + +.hover\:border-pink-200:hover { + border-color: #fed7e2; +} + +.hover\:border-pink-300:hover { + border-color: #fbb6ce; +} + +.hover\:border-pink-400:hover { + border-color: #f687b3; +} + +.hover\:border-pink-500:hover { + border-color: #ed64a6; +} + +.hover\:border-pink-600:hover { + border-color: #d53f8c; +} + +.hover\:border-pink-700:hover { + border-color: #b83280; +} + +.hover\:border-pink-800:hover { + border-color: #97266d; +} + +.hover\:border-pink-900:hover { + border-color: #702459; +} + +.focus\:border-transparent:focus { + border-color: transparent; +} + +.focus\:border-current:focus { + border-color: currentColor; +} + +.focus\:border-black:focus { + border-color: #000; +} + +.focus\:border-white:focus { + border-color: #fff; +} + +.focus\:border-gray-100:focus { + border-color: #f7fafc; +} + +.focus\:border-gray-200:focus { + border-color: #edf2f7; +} + +.focus\:border-gray-300:focus { + border-color: #e2e8f0; +} + +.focus\:border-gray-400:focus { + border-color: #cbd5e0; +} + +.focus\:border-gray-500:focus { + border-color: #a0aec0; +} + +.focus\:border-gray-600:focus { + border-color: #718096; +} + +.focus\:border-gray-700:focus { + border-color: #4a5568; +} + +.focus\:border-gray-800:focus { + border-color: #2d3748; +} + +.focus\:border-gray-900:focus { + border-color: #1a202c; +} + +.focus\:border-red-100:focus { + border-color: #fff5f5; +} + +.focus\:border-red-200:focus { + border-color: #fed7d7; +} + +.focus\:border-red-300:focus { + border-color: #feb2b2; +} + +.focus\:border-red-400:focus { + border-color: #fc8181; +} + +.focus\:border-red-500:focus { + border-color: #f56565; +} + +.focus\:border-red-600:focus { + border-color: #e53e3e; +} + +.focus\:border-red-700:focus { + border-color: #c53030; +} + +.focus\:border-red-800:focus { + border-color: #9b2c2c; +} + +.focus\:border-red-900:focus { + border-color: #742a2a; +} + +.focus\:border-orange-100:focus { + border-color: #fffaf0; +} + +.focus\:border-orange-200:focus { + border-color: #feebc8; +} + +.focus\:border-orange-300:focus { + border-color: #fbd38d; +} + +.focus\:border-orange-400:focus { + border-color: #f6ad55; +} + +.focus\:border-orange-500:focus { + border-color: #ed8936; +} + +.focus\:border-orange-600:focus { + border-color: #dd6b20; +} + +.focus\:border-orange-700:focus { + border-color: #c05621; +} + +.focus\:border-orange-800:focus { + border-color: #9c4221; +} + +.focus\:border-orange-900:focus { + border-color: #7b341e; +} + +.focus\:border-yellow-100:focus { + border-color: #fffff0; +} + +.focus\:border-yellow-200:focus { + border-color: #fefcbf; +} + +.focus\:border-yellow-300:focus { + border-color: #faf089; +} + +.focus\:border-yellow-400:focus { + border-color: #f6e05e; +} + +.focus\:border-yellow-500:focus { + border-color: #ecc94b; +} + +.focus\:border-yellow-600:focus { + border-color: #d69e2e; +} + +.focus\:border-yellow-700:focus { + border-color: #b7791f; +} + +.focus\:border-yellow-800:focus { + border-color: #975a16; +} + +.focus\:border-yellow-900:focus { + border-color: #744210; +} + +.focus\:border-green-100:focus { + border-color: #f0fff4; +} + +.focus\:border-green-200:focus { + border-color: #c6f6d5; +} + +.focus\:border-green-300:focus { + border-color: #9ae6b4; +} + +.focus\:border-green-400:focus { + border-color: #68d391; +} + +.focus\:border-green-500:focus { + border-color: #48bb78; +} + +.focus\:border-green-600:focus { + border-color: #38a169; +} + +.focus\:border-green-700:focus { + border-color: #2f855a; +} + +.focus\:border-green-800:focus { + border-color: #276749; +} + +.focus\:border-green-900:focus { + border-color: #22543d; +} + +.focus\:border-teal-100:focus { + border-color: #e6fffa; +} + +.focus\:border-teal-200:focus { + border-color: #b2f5ea; +} + +.focus\:border-teal-300:focus { + border-color: #81e6d9; +} + +.focus\:border-teal-400:focus { + border-color: #4fd1c5; +} + +.focus\:border-teal-500:focus { + border-color: #38b2ac; +} + +.focus\:border-teal-600:focus { + border-color: #319795; +} + +.focus\:border-teal-700:focus { + border-color: #2c7a7b; +} + +.focus\:border-teal-800:focus { + border-color: #285e61; +} + +.focus\:border-teal-900:focus { + border-color: #234e52; +} + +.focus\:border-blue-100:focus { + border-color: #ebf8ff; +} + +.focus\:border-blue-200:focus { + border-color: #bee3f8; +} + +.focus\:border-blue-300:focus { + border-color: #90cdf4; +} + +.focus\:border-blue-400:focus { + border-color: #63b3ed; +} + +.focus\:border-blue-500:focus { + border-color: #4299e1; +} + +.focus\:border-blue-600:focus { + border-color: #3182ce; +} + +.focus\:border-blue-700:focus { + border-color: #2b6cb0; +} + +.focus\:border-blue-800:focus { + border-color: #2c5282; +} + +.focus\:border-blue-900:focus { + border-color: #2a4365; +} + +.focus\:border-indigo-100:focus { + border-color: #ebf4ff; +} + +.focus\:border-indigo-200:focus { + border-color: #c3dafe; +} + +.focus\:border-indigo-300:focus { + border-color: #a3bffa; +} + +.focus\:border-indigo-400:focus { + border-color: #7f9cf5; +} + +.focus\:border-indigo-500:focus { + border-color: #667eea; +} + +.focus\:border-indigo-600:focus { + border-color: #5a67d8; +} + +.focus\:border-indigo-700:focus { + border-color: #4c51bf; +} + +.focus\:border-indigo-800:focus { + border-color: #434190; +} + +.focus\:border-indigo-900:focus { + border-color: #3c366b; +} + +.focus\:border-purple-100:focus { + border-color: #faf5ff; +} + +.focus\:border-purple-200:focus { + border-color: #e9d8fd; +} + +.focus\:border-purple-300:focus { + border-color: #d6bcfa; +} + +.focus\:border-purple-400:focus { + border-color: #b794f4; +} + +.focus\:border-purple-500:focus { + border-color: #9f7aea; +} + +.focus\:border-purple-600:focus { + border-color: #805ad5; +} + +.focus\:border-purple-700:focus { + border-color: #6b46c1; +} + +.focus\:border-purple-800:focus { + border-color: #553c9a; +} + +.focus\:border-purple-900:focus { + border-color: #44337a; +} + +.focus\:border-pink-100:focus { + border-color: #fff5f7; +} + +.focus\:border-pink-200:focus { + border-color: #fed7e2; +} + +.focus\:border-pink-300:focus { + border-color: #fbb6ce; +} + +.focus\:border-pink-400:focus { + border-color: #f687b3; +} + +.focus\:border-pink-500:focus { + border-color: #ed64a6; +} + +.focus\:border-pink-600:focus { + border-color: #d53f8c; +} + +.focus\:border-pink-700:focus { + border-color: #b83280; +} + +.focus\:border-pink-800:focus { + border-color: #97266d; +} + +.focus\:border-pink-900:focus { + border-color: #702459; +} + +.rounded-none { + border-radius: 0; +} + +.rounded-sm { + border-radius: 0.125rem; +} + +.rounded { + border-radius: 0.25rem; +} + +.rounded-md { + border-radius: 0.375rem; +} + +.rounded-lg { + border-radius: 0.5rem; +} + +.rounded-full { + border-radius: 9999px; +} + +.rounded-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.rounded-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; +} + +.rounded-r-sm { + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; +} + +.rounded-b-sm { + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; +} + +.rounded-l-sm { + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; +} + +.rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} + +.rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} + +.rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; +} + +.rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; +} + +.rounded-b-md { + border-bottom-right-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; +} + +.rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; +} + +.rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; +} + +.rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; +} + +.rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} + +.rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} + +.rounded-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; +} + +.rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; +} + +.rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; +} + +.rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; +} + +.rounded-tl-none { + border-top-left-radius: 0; +} + +.rounded-tr-none { + border-top-right-radius: 0; +} + +.rounded-br-none { + border-bottom-right-radius: 0; +} + +.rounded-bl-none { + border-bottom-left-radius: 0; +} + +.rounded-tl-sm { + border-top-left-radius: 0.125rem; +} + +.rounded-tr-sm { + border-top-right-radius: 0.125rem; +} + +.rounded-br-sm { + border-bottom-right-radius: 0.125rem; +} + +.rounded-bl-sm { + border-bottom-left-radius: 0.125rem; +} + +.rounded-tl { + border-top-left-radius: 0.25rem; +} + +.rounded-tr { + border-top-right-radius: 0.25rem; +} + +.rounded-br { + border-bottom-right-radius: 0.25rem; +} + +.rounded-bl { + border-bottom-left-radius: 0.25rem; +} + +.rounded-tl-md { + border-top-left-radius: 0.375rem; +} + +.rounded-tr-md { + border-top-right-radius: 0.375rem; +} + +.rounded-br-md { + border-bottom-right-radius: 0.375rem; +} + +.rounded-bl-md { + border-bottom-left-radius: 0.375rem; +} + +.rounded-tl-lg { + border-top-left-radius: 0.5rem; +} + +.rounded-tr-lg { + border-top-right-radius: 0.5rem; +} + +.rounded-br-lg { + border-bottom-right-radius: 0.5rem; +} + +.rounded-bl-lg { + border-bottom-left-radius: 0.5rem; +} + +.rounded-tl-full { + border-top-left-radius: 9999px; +} + +.rounded-tr-full { + border-top-right-radius: 9999px; +} + +.rounded-br-full { + border-bottom-right-radius: 9999px; +} + +.rounded-bl-full { + border-bottom-left-radius: 9999px; +} + +.border-solid { + border-style: solid; +} + +.border-dashed { + border-style: dashed; +} + +.border-dotted { + border-style: dotted; +} + +.border-double { + border-style: double; +} + +.border-none { + border-style: none; +} + +.border-0 { + border-width: 0; +} + +.border-2 { + border-width: 2px; +} + +.border-4 { + border-width: 4px; +} + +.border-8 { + border-width: 8px; +} + +.border { + border-width: 1px; +} + +.border-t-0 { + border-top-width: 0; +} + +.border-r-0 { + border-right-width: 0; +} + +.border-b-0 { + border-bottom-width: 0; +} + +.border-l-0 { + border-left-width: 0; +} + +.border-t-2 { + border-top-width: 2px; +} + +.border-r-2 { + border-right-width: 2px; +} + +.border-b-2 { + border-bottom-width: 2px; +} + +.border-l-2 { + border-left-width: 2px; +} + +.border-t-4 { + border-top-width: 4px; +} + +.border-r-4 { + border-right-width: 4px; +} + +.border-b-4 { + border-bottom-width: 4px; +} + +.border-l-4 { + border-left-width: 4px; +} + +.border-t-8 { + border-top-width: 8px; +} + +.border-r-8 { + border-right-width: 8px; +} + +.border-b-8 { + border-bottom-width: 8px; +} + +.border-l-8 { + border-left-width: 8px; +} + +.border-t { + border-top-width: 1px; +} + +.border-r { + border-right-width: 1px; +} + +.border-b { + border-bottom-width: 1px; +} + +.border-l { + border-left-width: 1px; +} + +.box-border { + box-sizing: border-box; +} + +.box-content { + box-sizing: content-box; +} + +.cursor-auto { + cursor: auto; +} + +.cursor-default { + cursor: default; +} + +.cursor-pointer { + cursor: pointer; +} + +.cursor-wait { + cursor: wait; +} + +.cursor-text { + cursor: text; +} + +.cursor-move { + cursor: move; +} + +.cursor-not-allowed { + cursor: not-allowed; +} + +.block { + display: block; +} + +.inline-block { + display: inline-block; +} + +.inline { + display: inline; +} + +.flex { + display: flex; +} + +.inline-flex { + display: inline-flex; +} + +.table { + display: 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; +} + +.hidden { + display: none; +} + +.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-no-wrap { + flex-wrap: nowrap; +} + +.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; +} + +.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; +} + +.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; +} + +.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; +} + +.flex-1 { + flex: 1 1 0%; +} + +.flex-auto { + flex: 1 1 auto; +} + +.flex-initial { + flex: 0 1 auto; +} + +.flex-none { + flex: none; +} + +.flex-grow-0 { + flex-grow: 0; +} + +.flex-grow { + flex-grow: 1; +} + +.flex-shrink-0 { + flex-shrink: 0; +} + +.flex-shrink { + flex-shrink: 1; +} + +.order-1 { + order: 1; +} + +.order-2 { + order: 2; +} + +.order-3 { + order: 3; +} + +.order-4 { + order: 4; +} + +.order-5 { + order: 5; +} + +.order-6 { + order: 6; +} + +.order-7 { + order: 7; +} + +.order-8 { + order: 8; +} + +.order-9 { + order: 9; +} + +.order-10 { + order: 10; +} + +.order-11 { + order: 11; +} + +.order-12 { + order: 12; +} + +.order-first { + order: -9999; +} + +.order-last { + order: 9999; +} + +.order-none { + order: 0; +} + +.float-right { + float: right; +} + +.float-left { + float: left; +} + +.float-none { + float: none; +} + +.clearfix:after { + content: ""; + display: table; + clear: both; +} + +.clear-left { + clear: left; +} + +.clear-right { + clear: right; +} + +.clear-both { + clear: both; +} + +.clear-none { + clear: none; +} + +.font-sans { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +.font-serif { + font-family: Georgia, Cambria, "Times New Roman", Times, serif; +} + +.font-mono { + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +.font-hairline { + font-weight: 100; +} + +.font-thin { + font-weight: 200; +} + +.font-light { + font-weight: 300; +} + +.font-normal { + font-weight: 400; +} + +.font-medium { + font-weight: 500; +} + +.font-semibold { + font-weight: 600; +} + +.font-bold { + font-weight: 700; +} + +.font-extrabold { + font-weight: 800; +} + +.font-black { + font-weight: 900; +} + +.hover\:font-hairline:hover { + font-weight: 100; +} + +.hover\:font-thin:hover { + font-weight: 200; +} + +.hover\:font-light:hover { + font-weight: 300; +} + +.hover\:font-normal:hover { + font-weight: 400; +} + +.hover\:font-medium:hover { + font-weight: 500; +} + +.hover\:font-semibold:hover { + font-weight: 600; +} + +.hover\:font-bold:hover { + font-weight: 700; +} + +.hover\:font-extrabold:hover { + font-weight: 800; +} + +.hover\:font-black:hover { + font-weight: 900; +} + +.focus\:font-hairline:focus { + font-weight: 100; +} + +.focus\:font-thin:focus { + font-weight: 200; +} + +.focus\:font-light:focus { + font-weight: 300; +} + +.focus\:font-normal:focus { + font-weight: 400; +} + +.focus\:font-medium:focus { + font-weight: 500; +} + +.focus\:font-semibold:focus { + font-weight: 600; +} + +.focus\:font-bold:focus { + font-weight: 700; +} + +.focus\:font-extrabold:focus { + font-weight: 800; +} + +.focus\:font-black:focus { + font-weight: 900; +} + +.h-0 { + height: 0; +} + +.h-1 { + height: 0.25rem; +} + +.h-2 { + height: 0.5rem; +} + +.h-3 { + height: 0.75rem; +} + +.h-4 { + height: 1rem; +} + +.h-5 { + height: 1.25rem; +} + +.h-6 { + height: 1.5rem; +} + +.h-8 { + height: 2rem; +} + +.h-10 { + height: 2.5rem; +} + +.h-12 { + height: 3rem; +} + +.h-16 { + height: 4rem; +} + +.h-20 { + height: 5rem; +} + +.h-24 { + height: 6rem; +} + +.h-32 { + height: 8rem; +} + +.h-40 { + height: 10rem; +} + +.h-48 { + height: 12rem; +} + +.h-56 { + height: 14rem; +} + +.h-64 { + height: 16rem; +} + +.h-auto { + height: auto; +} + +.h-px { + height: 1px; +} + +.h-full { + height: 100%; +} + +.h-screen { + height: 100vh; +} + +.text-xs { + font-size: 0.75rem; +} + +.text-sm { + font-size: 0.875rem; +} + +.text-base { + font-size: 1rem; +} + +.text-lg { + font-size: 1.125rem; +} + +.text-xl { + font-size: 1.25rem; +} + +.text-2xl { + font-size: 1.5rem; +} + +.text-3xl { + font-size: 1.875rem; +} + +.text-4xl { + font-size: 2.25rem; +} + +.text-5xl { + font-size: 3rem; +} + +.text-6xl { + font-size: 4rem; +} + +.leading-3 { + line-height: .75rem; +} + +.leading-4 { + line-height: 1rem; +} + +.leading-5 { + line-height: 1.25rem; +} + +.leading-6 { + line-height: 1.5rem; +} + +.leading-7 { + line-height: 1.75rem; +} + +.leading-8 { + line-height: 2rem; +} + +.leading-9 { + line-height: 2.25rem; +} + +.leading-10 { + line-height: 2.5rem; +} + +.leading-none { + line-height: 1; +} + +.leading-tight { + line-height: 1.25; +} + +.leading-snug { + line-height: 1.375; +} + +.leading-normal { + line-height: 1.5; +} + +.leading-relaxed { + line-height: 1.625; +} + +.leading-loose { + line-height: 2; +} + +.list-inside { + list-style-position: inside; +} + +.list-outside { + list-style-position: outside; +} + +.list-none { + list-style-type: none; +} + +.list-disc { + list-style-type: disc; +} + +.list-decimal { + list-style-type: decimal; +} + +.m-0 { + margin: 0; +} + +.m-1 { + margin: 0.25rem; +} + +.m-2 { + margin: 0.5rem; +} + +.m-3 { + margin: 0.75rem; +} + +.m-4 { + margin: 1rem; +} + +.m-5 { + margin: 1.25rem; +} + +.m-6 { + margin: 1.5rem; +} + +.m-8 { + margin: 2rem; +} + +.m-10 { + margin: 2.5rem; +} + +.m-12 { + margin: 3rem; +} + +.m-16 { + margin: 4rem; +} + +.m-20 { + margin: 5rem; +} + +.m-24 { + margin: 6rem; +} + +.m-32 { + margin: 8rem; +} + +.m-40 { + margin: 10rem; +} + +.m-48 { + margin: 12rem; +} + +.m-56 { + margin: 14rem; +} + +.m-64 { + margin: 16rem; +} + +.m-auto { + margin: auto; +} + +.m-px { + margin: 1px; +} + +.-m-1 { + margin: -0.25rem; +} + +.-m-2 { + margin: -0.5rem; +} + +.-m-3 { + margin: -0.75rem; +} + +.-m-4 { + margin: -1rem; +} + +.-m-5 { + margin: -1.25rem; +} + +.-m-6 { + margin: -1.5rem; +} + +.-m-8 { + margin: -2rem; +} + +.-m-10 { + margin: -2.5rem; +} + +.-m-12 { + margin: -3rem; +} + +.-m-16 { + margin: -4rem; +} + +.-m-20 { + margin: -5rem; +} + +.-m-24 { + margin: -6rem; +} + +.-m-32 { + margin: -8rem; +} + +.-m-40 { + margin: -10rem; +} + +.-m-48 { + margin: -12rem; +} + +.-m-56 { + margin: -14rem; +} + +.-m-64 { + margin: -16rem; +} + +.-m-px { + margin: -1px; +} + +.my-0 { + margin-top: 0; + margin-bottom: 0; +} + +.mx-0 { + margin-left: 0; + margin-right: 0; +} + +.my-1 { + margin-top: 0.25rem; + margin-bottom: 0.25rem; +} + +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} + +.my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} + +.mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; +} + +.mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; +} + +.my-4 { + margin-top: 1rem; + margin-bottom: 1rem; +} + +.mx-4 { + margin-left: 1rem; + margin-right: 1rem; +} + +.my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; +} + +.mx-5 { + margin-left: 1.25rem; + margin-right: 1.25rem; +} + +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +.mx-6 { + margin-left: 1.5rem; + margin-right: 1.5rem; +} + +.my-8 { + margin-top: 2rem; + margin-bottom: 2rem; +} + +.mx-8 { + margin-left: 2rem; + margin-right: 2rem; +} + +.my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; +} + +.mx-10 { + margin-left: 2.5rem; + margin-right: 2.5rem; +} + +.my-12 { + margin-top: 3rem; + margin-bottom: 3rem; +} + +.mx-12 { + margin-left: 3rem; + margin-right: 3rem; +} + +.my-16 { + margin-top: 4rem; + margin-bottom: 4rem; +} + +.mx-16 { + margin-left: 4rem; + margin-right: 4rem; +} + +.my-20 { + margin-top: 5rem; + margin-bottom: 5rem; +} + +.mx-20 { + margin-left: 5rem; + margin-right: 5rem; +} + +.my-24 { + margin-top: 6rem; + margin-bottom: 6rem; +} + +.mx-24 { + margin-left: 6rem; + margin-right: 6rem; +} + +.my-32 { + margin-top: 8rem; + margin-bottom: 8rem; +} + +.mx-32 { + margin-left: 8rem; + margin-right: 8rem; +} + +.my-40 { + margin-top: 10rem; + margin-bottom: 10rem; +} + +.mx-40 { + margin-left: 10rem; + margin-right: 10rem; +} + +.my-48 { + margin-top: 12rem; + margin-bottom: 12rem; +} + +.mx-48 { + margin-left: 12rem; + margin-right: 12rem; +} + +.my-56 { + margin-top: 14rem; + margin-bottom: 14rem; +} + +.mx-56 { + margin-left: 14rem; + margin-right: 14rem; +} + +.my-64 { + margin-top: 16rem; + margin-bottom: 16rem; +} + +.mx-64 { + margin-left: 16rem; + margin-right: 16rem; +} + +.my-auto { + margin-top: auto; + margin-bottom: auto; +} + +.mx-auto { + margin-left: auto; + margin-right: auto; +} + +.my-px { + margin-top: 1px; + margin-bottom: 1px; +} + +.mx-px { + margin-left: 1px; + margin-right: 1px; +} + +.-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; +} + +.-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; +} + +.-my-2 { + margin-top: -0.5rem; + margin-bottom: -0.5rem; +} + +.-mx-2 { + margin-left: -0.5rem; + margin-right: -0.5rem; +} + +.-my-3 { + margin-top: -0.75rem; + margin-bottom: -0.75rem; +} + +.-mx-3 { + margin-left: -0.75rem; + margin-right: -0.75rem; +} + +.-my-4 { + margin-top: -1rem; + margin-bottom: -1rem; +} + +.-mx-4 { + margin-left: -1rem; + margin-right: -1rem; +} + +.-my-5 { + margin-top: -1.25rem; + margin-bottom: -1.25rem; +} + +.-mx-5 { + margin-left: -1.25rem; + margin-right: -1.25rem; +} + +.-my-6 { + margin-top: -1.5rem; + margin-bottom: -1.5rem; +} + +.-mx-6 { + margin-left: -1.5rem; + margin-right: -1.5rem; +} + +.-my-8 { + margin-top: -2rem; + margin-bottom: -2rem; +} + +.-mx-8 { + margin-left: -2rem; + margin-right: -2rem; +} + +.-my-10 { + margin-top: -2.5rem; + margin-bottom: -2.5rem; +} + +.-mx-10 { + margin-left: -2.5rem; + margin-right: -2.5rem; +} + +.-my-12 { + margin-top: -3rem; + margin-bottom: -3rem; +} + +.-mx-12 { + margin-left: -3rem; + margin-right: -3rem; +} + +.-my-16 { + margin-top: -4rem; + margin-bottom: -4rem; +} + +.-mx-16 { + margin-left: -4rem; + margin-right: -4rem; +} + +.-my-20 { + margin-top: -5rem; + margin-bottom: -5rem; +} + +.-mx-20 { + margin-left: -5rem; + margin-right: -5rem; +} + +.-my-24 { + margin-top: -6rem; + margin-bottom: -6rem; +} + +.-mx-24 { + margin-left: -6rem; + margin-right: -6rem; +} + +.-my-32 { + margin-top: -8rem; + margin-bottom: -8rem; +} + +.-mx-32 { + margin-left: -8rem; + margin-right: -8rem; +} + +.-my-40 { + margin-top: -10rem; + margin-bottom: -10rem; +} + +.-mx-40 { + margin-left: -10rem; + margin-right: -10rem; +} + +.-my-48 { + margin-top: -12rem; + margin-bottom: -12rem; +} + +.-mx-48 { + margin-left: -12rem; + margin-right: -12rem; +} + +.-my-56 { + margin-top: -14rem; + margin-bottom: -14rem; +} + +.-mx-56 { + margin-left: -14rem; + margin-right: -14rem; +} + +.-my-64 { + margin-top: -16rem; + margin-bottom: -16rem; +} + +.-mx-64 { + margin-left: -16rem; + margin-right: -16rem; +} + +.-my-px { + margin-top: -1px; + margin-bottom: -1px; +} + +.-mx-px { + margin-left: -1px; + margin-right: -1px; +} + +.mt-0 { + margin-top: 0; +} + +.mr-0 { + margin-right: 0; +} + +.mb-0 { + margin-bottom: 0; +} + +.ml-0 { + margin-left: 0; +} + +.mt-1 { + margin-top: 0.25rem; +} + +.mr-1 { + margin-right: 0.25rem; +} + +.mb-1 { + margin-bottom: 0.25rem; +} + +.ml-1 { + margin-left: 0.25rem; +} + +.mt-2 { + margin-top: 0.5rem; +} + +.mr-2 { + margin-right: 0.5rem; +} + +.mb-2 { + margin-bottom: 0.5rem; +} + +.ml-2 { + margin-left: 0.5rem; +} + +.mt-3 { + margin-top: 0.75rem; +} + +.mr-3 { + margin-right: 0.75rem; +} + +.mb-3 { + margin-bottom: 0.75rem; +} + +.ml-3 { + margin-left: 0.75rem; +} + +.mt-4 { + margin-top: 1rem; +} + +.mr-4 { + margin-right: 1rem; +} + +.mb-4 { + margin-bottom: 1rem; +} + +.ml-4 { + margin-left: 1rem; +} + +.mt-5 { + margin-top: 1.25rem; +} + +.mr-5 { + margin-right: 1.25rem; +} + +.mb-5 { + margin-bottom: 1.25rem; +} + +.ml-5 { + margin-left: 1.25rem; +} + +.mt-6 { + margin-top: 1.5rem; +} + +.mr-6 { + margin-right: 1.5rem; +} + +.mb-6 { + margin-bottom: 1.5rem; +} + +.ml-6 { + margin-left: 1.5rem; +} + +.mt-8 { + margin-top: 2rem; +} + +.mr-8 { + margin-right: 2rem; +} + +.mb-8 { + margin-bottom: 2rem; +} + +.ml-8 { + margin-left: 2rem; +} + +.mt-10 { + margin-top: 2.5rem; +} + +.mr-10 { + margin-right: 2.5rem; +} + +.mb-10 { + margin-bottom: 2.5rem; +} + +.ml-10 { + margin-left: 2.5rem; +} + +.mt-12 { + margin-top: 3rem; +} + +.mr-12 { + margin-right: 3rem; +} + +.mb-12 { + margin-bottom: 3rem; +} + +.ml-12 { + margin-left: 3rem; +} + +.mt-16 { + margin-top: 4rem; +} + +.mr-16 { + margin-right: 4rem; +} + +.mb-16 { + margin-bottom: 4rem; +} + +.ml-16 { + margin-left: 4rem; +} + +.mt-20 { + margin-top: 5rem; +} + +.mr-20 { + margin-right: 5rem; +} + +.mb-20 { + margin-bottom: 5rem; +} + +.ml-20 { + margin-left: 5rem; +} + +.mt-24 { + margin-top: 6rem; +} + +.mr-24 { + margin-right: 6rem; +} + +.mb-24 { + margin-bottom: 6rem; +} + +.ml-24 { + margin-left: 6rem; +} + +.mt-32 { + margin-top: 8rem; +} + +.mr-32 { + margin-right: 8rem; +} + +.mb-32 { + margin-bottom: 8rem; +} + +.ml-32 { + margin-left: 8rem; +} + +.mt-40 { + margin-top: 10rem; +} + +.mr-40 { + margin-right: 10rem; +} + +.mb-40 { + margin-bottom: 10rem; +} + +.ml-40 { + margin-left: 10rem; +} + +.mt-48 { + margin-top: 12rem; +} + +.mr-48 { + margin-right: 12rem; +} + +.mb-48 { + margin-bottom: 12rem; +} + +.ml-48 { + margin-left: 12rem; +} + +.mt-56 { + margin-top: 14rem; +} + +.mr-56 { + margin-right: 14rem; +} + +.mb-56 { + margin-bottom: 14rem; +} + +.ml-56 { + margin-left: 14rem; +} + +.mt-64 { + margin-top: 16rem; +} + +.mr-64 { + margin-right: 16rem; +} + +.mb-64 { + margin-bottom: 16rem; +} + +.ml-64 { + margin-left: 16rem; +} + +.mt-auto { + margin-top: auto; +} + +.mr-auto { + margin-right: auto; +} + +.mb-auto { + margin-bottom: auto; +} + +.ml-auto { + margin-left: auto; +} + +.mt-px { + margin-top: 1px; +} + +.mr-px { + margin-right: 1px; +} + +.mb-px { + margin-bottom: 1px; +} + +.ml-px { + margin-left: 1px; +} + +.-mt-1 { + margin-top: -0.25rem; +} + +.-mr-1 { + margin-right: -0.25rem; +} + +.-mb-1 { + margin-bottom: -0.25rem; +} + +.-ml-1 { + margin-left: -0.25rem; +} + +.-mt-2 { + margin-top: -0.5rem; +} + +.-mr-2 { + margin-right: -0.5rem; +} + +.-mb-2 { + margin-bottom: -0.5rem; +} + +.-ml-2 { + margin-left: -0.5rem; +} + +.-mt-3 { + margin-top: -0.75rem; +} + +.-mr-3 { + margin-right: -0.75rem; +} + +.-mb-3 { + margin-bottom: -0.75rem; +} + +.-ml-3 { + margin-left: -0.75rem; +} + +.-mt-4 { + margin-top: -1rem; +} + +.-mr-4 { + margin-right: -1rem; +} + +.-mb-4 { + margin-bottom: -1rem; +} + +.-ml-4 { + margin-left: -1rem; +} + +.-mt-5 { + margin-top: -1.25rem; +} + +.-mr-5 { + margin-right: -1.25rem; +} + +.-mb-5 { + margin-bottom: -1.25rem; +} + +.-ml-5 { + margin-left: -1.25rem; +} + +.-mt-6 { + margin-top: -1.5rem; +} + +.-mr-6 { + margin-right: -1.5rem; +} + +.-mb-6 { + margin-bottom: -1.5rem; +} + +.-ml-6 { + margin-left: -1.5rem; +} + +.-mt-8 { + margin-top: -2rem; +} + +.-mr-8 { + margin-right: -2rem; +} + +.-mb-8 { + margin-bottom: -2rem; +} + +.-ml-8 { + margin-left: -2rem; +} + +.-mt-10 { + margin-top: -2.5rem; +} + +.-mr-10 { + margin-right: -2.5rem; +} + +.-mb-10 { + margin-bottom: -2.5rem; +} + +.-ml-10 { + margin-left: -2.5rem; +} + +.-mt-12 { + margin-top: -3rem; +} + +.-mr-12 { + margin-right: -3rem; +} + +.-mb-12 { + margin-bottom: -3rem; +} + +.-ml-12 { + margin-left: -3rem; +} + +.-mt-16 { + margin-top: -4rem; +} + +.-mr-16 { + margin-right: -4rem; +} + +.-mb-16 { + margin-bottom: -4rem; +} + +.-ml-16 { + margin-left: -4rem; +} + +.-mt-20 { + margin-top: -5rem; +} + +.-mr-20 { + margin-right: -5rem; +} + +.-mb-20 { + margin-bottom: -5rem; +} + +.-ml-20 { + margin-left: -5rem; +} + +.-mt-24 { + margin-top: -6rem; +} + +.-mr-24 { + margin-right: -6rem; +} + +.-mb-24 { + margin-bottom: -6rem; +} + +.-ml-24 { + margin-left: -6rem; +} + +.-mt-32 { + margin-top: -8rem; +} + +.-mr-32 { + margin-right: -8rem; +} + +.-mb-32 { + margin-bottom: -8rem; +} + +.-ml-32 { + margin-left: -8rem; +} + +.-mt-40 { + margin-top: -10rem; +} + +.-mr-40 { + margin-right: -10rem; +} + +.-mb-40 { + margin-bottom: -10rem; +} + +.-ml-40 { + margin-left: -10rem; +} + +.-mt-48 { + margin-top: -12rem; +} + +.-mr-48 { + margin-right: -12rem; +} + +.-mb-48 { + margin-bottom: -12rem; +} + +.-ml-48 { + margin-left: -12rem; +} + +.-mt-56 { + margin-top: -14rem; +} + +.-mr-56 { + margin-right: -14rem; +} + +.-mb-56 { + margin-bottom: -14rem; +} + +.-ml-56 { + margin-left: -14rem; +} + +.-mt-64 { + margin-top: -16rem; +} + +.-mr-64 { + margin-right: -16rem; +} + +.-mb-64 { + margin-bottom: -16rem; +} + +.-ml-64 { + margin-left: -16rem; +} + +.-mt-px { + margin-top: -1px; +} + +.-mr-px { + margin-right: -1px; +} + +.-mb-px { + margin-bottom: -1px; +} + +.-ml-px { + margin-left: -1px; +} + +.max-h-full { + max-height: 100%; +} + +.max-h-screen { + max-height: 100vh; +} + +.max-w-none { + max-width: none; +} + +.max-w-xs { + max-width: 20rem; +} + +.max-w-sm { + max-width: 24rem; +} + +.max-w-md { + max-width: 28rem; +} + +.max-w-lg { + max-width: 32rem; +} + +.max-w-xl { + max-width: 36rem; +} + +.max-w-2xl { + max-width: 42rem; +} + +.max-w-3xl { + max-width: 48rem; +} + +.max-w-4xl { + max-width: 56rem; +} + +.max-w-5xl { + max-width: 64rem; +} + +.max-w-6xl { + max-width: 72rem; +} + +.max-w-full { + max-width: 100%; +} + +.max-w-screen-sm { + max-width: 640px; +} + +.max-w-screen-md { + max-width: 768px; +} + +.max-w-screen-lg { + max-width: 1024px; +} + +.max-w-screen-xl { + max-width: 1280px; +} + +.min-h-0 { + min-height: 0; +} + +.min-h-full { + min-height: 100%; +} + +.min-h-screen { + min-height: 100vh; +} + +.min-w-0 { + min-width: 0; +} + +.min-w-full { + min-width: 100%; +} + +.object-contain { + object-fit: contain; +} + +.object-cover { + object-fit: cover; +} + +.object-fill { + object-fit: fill; +} + +.object-none { + object-fit: none; +} + +.object-scale-down { + object-fit: scale-down; +} + +.object-bottom { + object-position: bottom; +} + +.object-center { + object-position: center; +} + +.object-left { + object-position: left; +} + +.object-left-bottom { + object-position: left bottom; +} + +.object-left-top { + object-position: left top; +} + +.object-right { + object-position: right; +} + +.object-right-bottom { + object-position: right bottom; +} + +.object-right-top { + object-position: right top; +} + +.object-top { + object-position: top; +} + +.opacity-0 { + opacity: 0; +} + +.opacity-25 { + opacity: 0.25; +} + +.opacity-50 { + opacity: 0.5; +} + +.opacity-75 { + opacity: 0.75; +} + +.opacity-100 { + opacity: 1; +} + +.hover\:opacity-0:hover { + opacity: 0; +} + +.hover\:opacity-25:hover { + opacity: 0.25; +} + +.hover\:opacity-50:hover { + opacity: 0.5; +} + +.hover\:opacity-75:hover { + opacity: 0.75; +} + +.hover\:opacity-100:hover { + opacity: 1; +} + +.focus\:opacity-0:focus { + opacity: 0; +} + +.focus\:opacity-25:focus { + opacity: 0.25; +} + +.focus\:opacity-50:focus { + opacity: 0.5; +} + +.focus\:opacity-75:focus { + opacity: 0.75; +} + +.focus\:opacity-100:focus { + opacity: 1; +} + +.outline-none { + outline: 0; +} + +.focus\:outline-none:focus { + outline: 0; +} + +.overflow-auto { + overflow: auto; +} + +.overflow-hidden { + overflow: hidden; +} + +.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-visible { + overflow-x: visible; +} + +.overflow-y-visible { + overflow-y: visible; +} + +.overflow-x-scroll { + overflow-x: scroll; +} + +.overflow-y-scroll { + overflow-y: scroll; +} + +.scrolling-touch { + -webkit-overflow-scrolling: touch; +} + +.scrolling-auto { + -webkit-overflow-scrolling: auto; +} + +.p-0 { + padding: 0; +} + +.p-1 { + padding: 0.25rem; +} + +.p-2 { + padding: 0.5rem; +} + +.p-3 { + padding: 0.75rem; +} + +.p-4 { + padding: 1rem; +} + +.p-5 { + padding: 1.25rem; +} + +.p-6 { + padding: 1.5rem; +} + +.p-8 { + padding: 2rem; +} + +.p-10 { + padding: 2.5rem; +} + +.p-12 { + padding: 3rem; +} + +.p-16 { + padding: 4rem; +} + +.p-20 { + padding: 5rem; +} + +.p-24 { + padding: 6rem; +} + +.p-32 { + padding: 8rem; +} + +.p-40 { + padding: 10rem; +} + +.p-48 { + padding: 12rem; +} + +.p-56 { + padding: 14rem; +} + +.p-64 { + padding: 16rem; +} + +.p-px { + padding: 1px; +} + +.py-0 { + padding-top: 0; + padding-bottom: 0; +} + +.px-0 { + padding-left: 0; + padding-right: 0; +} + +.py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} + +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.py-4 { + padding-top: 1rem; + padding-bottom: 1rem; +} + +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} + +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + +.py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} + +.px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + +.py-8 { + padding-top: 2rem; + padding-bottom: 2rem; +} + +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} + +.py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; +} + +.px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; +} + +.py-12 { + padding-top: 3rem; + padding-bottom: 3rem; +} + +.px-12 { + padding-left: 3rem; + padding-right: 3rem; +} + +.py-16 { + padding-top: 4rem; + padding-bottom: 4rem; +} + +.px-16 { + padding-left: 4rem; + padding-right: 4rem; +} + +.py-20 { + padding-top: 5rem; + padding-bottom: 5rem; +} + +.px-20 { + padding-left: 5rem; + padding-right: 5rem; +} + +.py-24 { + padding-top: 6rem; + padding-bottom: 6rem; +} + +.px-24 { + padding-left: 6rem; + padding-right: 6rem; +} + +.py-32 { + padding-top: 8rem; + padding-bottom: 8rem; +} + +.px-32 { + padding-left: 8rem; + padding-right: 8rem; +} + +.py-40 { + padding-top: 10rem; + padding-bottom: 10rem; +} + +.px-40 { + padding-left: 10rem; + padding-right: 10rem; +} + +.py-48 { + padding-top: 12rem; + padding-bottom: 12rem; +} + +.px-48 { + padding-left: 12rem; + padding-right: 12rem; +} + +.py-56 { + padding-top: 14rem; + padding-bottom: 14rem; +} + +.px-56 { + padding-left: 14rem; + padding-right: 14rem; +} + +.py-64 { + padding-top: 16rem; + padding-bottom: 16rem; +} + +.px-64 { + padding-left: 16rem; + padding-right: 16rem; +} + +.py-px { + padding-top: 1px; + padding-bottom: 1px; +} + +.px-px { + padding-left: 1px; + padding-right: 1px; +} + +.pt-0 { + padding-top: 0; +} + +.pr-0 { + padding-right: 0; +} + +.pb-0 { + padding-bottom: 0; +} + +.pl-0 { + padding-left: 0; +} + +.pt-1 { + padding-top: 0.25rem; +} + +.pr-1 { + padding-right: 0.25rem; +} + +.pb-1 { + padding-bottom: 0.25rem; +} + +.pl-1 { + padding-left: 0.25rem; +} + +.pt-2 { + padding-top: 0.5rem; +} + +.pr-2 { + padding-right: 0.5rem; +} + +.pb-2 { + padding-bottom: 0.5rem; +} + +.pl-2 { + padding-left: 0.5rem; +} + +.pt-3 { + padding-top: 0.75rem; +} + +.pr-3 { + padding-right: 0.75rem; +} + +.pb-3 { + padding-bottom: 0.75rem; +} + +.pl-3 { + padding-left: 0.75rem; +} + +.pt-4 { + padding-top: 1rem; +} + +.pr-4 { + padding-right: 1rem; +} + +.pb-4 { + padding-bottom: 1rem; +} + +.pl-4 { + padding-left: 1rem; +} + +.pt-5 { + padding-top: 1.25rem; +} + +.pr-5 { + padding-right: 1.25rem; +} + +.pb-5 { + padding-bottom: 1.25rem; +} + +.pl-5 { + padding-left: 1.25rem; +} + +.pt-6 { + padding-top: 1.5rem; +} + +.pr-6 { + padding-right: 1.5rem; +} + +.pb-6 { + padding-bottom: 1.5rem; +} + +.pl-6 { + padding-left: 1.5rem; +} + +.pt-8 { + padding-top: 2rem; +} + +.pr-8 { + padding-right: 2rem; +} + +.pb-8 { + padding-bottom: 2rem; +} + +.pl-8 { + padding-left: 2rem; +} + +.pt-10 { + padding-top: 2.5rem; +} + +.pr-10 { + padding-right: 2.5rem; +} + +.pb-10 { + padding-bottom: 2.5rem; +} + +.pl-10 { + padding-left: 2.5rem; +} + +.pt-12 { + padding-top: 3rem; +} + +.pr-12 { + padding-right: 3rem; +} + +.pb-12 { + padding-bottom: 3rem; +} + +.pl-12 { + padding-left: 3rem; +} + +.pt-16 { + padding-top: 4rem; +} + +.pr-16 { + padding-right: 4rem; +} + +.pb-16 { + padding-bottom: 4rem; +} + +.pl-16 { + padding-left: 4rem; +} + +.pt-20 { + padding-top: 5rem; +} + +.pr-20 { + padding-right: 5rem; +} + +.pb-20 { + padding-bottom: 5rem; +} + +.pl-20 { + padding-left: 5rem; +} + +.pt-24 { + padding-top: 6rem; +} + +.pr-24 { + padding-right: 6rem; +} + +.pb-24 { + padding-bottom: 6rem; +} + +.pl-24 { + padding-left: 6rem; +} + +.pt-32 { + padding-top: 8rem; +} + +.pr-32 { + padding-right: 8rem; +} + +.pb-32 { + padding-bottom: 8rem; +} + +.pl-32 { + padding-left: 8rem; +} + +.pt-40 { + padding-top: 10rem; +} + +.pr-40 { + padding-right: 10rem; +} + +.pb-40 { + padding-bottom: 10rem; +} + +.pl-40 { + padding-left: 10rem; +} + +.pt-48 { + padding-top: 12rem; +} + +.pr-48 { + padding-right: 12rem; +} + +.pb-48 { + padding-bottom: 12rem; +} + +.pl-48 { + padding-left: 12rem; +} + +.pt-56 { + padding-top: 14rem; +} + +.pr-56 { + padding-right: 14rem; +} + +.pb-56 { + padding-bottom: 14rem; +} + +.pl-56 { + padding-left: 14rem; +} + +.pt-64 { + padding-top: 16rem; +} + +.pr-64 { + padding-right: 16rem; +} + +.pb-64 { + padding-bottom: 16rem; +} + +.pl-64 { + padding-left: 16rem; +} + +.pt-px { + padding-top: 1px; +} + +.pr-px { + padding-right: 1px; +} + +.pb-px { + padding-bottom: 1px; +} + +.pl-px { + padding-left: 1px; +} + +.placeholder-transparent::placeholder { + color: transparent; +} + +.placeholder-current::placeholder { + color: currentColor; +} + +.placeholder-black::placeholder { + color: #000; +} + +.placeholder-white::placeholder { + color: #fff; +} + +.placeholder-gray-100::placeholder { + color: #f7fafc; +} + +.placeholder-gray-200::placeholder { + color: #edf2f7; +} + +.placeholder-gray-300::placeholder { + color: #e2e8f0; +} + +.placeholder-gray-400::placeholder { + color: #cbd5e0; +} + +.placeholder-gray-500::placeholder { + color: #a0aec0; +} + +.placeholder-gray-600::placeholder { + color: #718096; +} + +.placeholder-gray-700::placeholder { + color: #4a5568; +} + +.placeholder-gray-800::placeholder { + color: #2d3748; +} + +.placeholder-gray-900::placeholder { + color: #1a202c; +} + +.placeholder-red-100::placeholder { + color: #fff5f5; +} + +.placeholder-red-200::placeholder { + color: #fed7d7; +} + +.placeholder-red-300::placeholder { + color: #feb2b2; +} + +.placeholder-red-400::placeholder { + color: #fc8181; +} + +.placeholder-red-500::placeholder { + color: #f56565; +} + +.placeholder-red-600::placeholder { + color: #e53e3e; +} + +.placeholder-red-700::placeholder { + color: #c53030; +} + +.placeholder-red-800::placeholder { + color: #9b2c2c; +} + +.placeholder-red-900::placeholder { + color: #742a2a; +} + +.placeholder-orange-100::placeholder { + color: #fffaf0; +} + +.placeholder-orange-200::placeholder { + color: #feebc8; +} + +.placeholder-orange-300::placeholder { + color: #fbd38d; +} + +.placeholder-orange-400::placeholder { + color: #f6ad55; +} + +.placeholder-orange-500::placeholder { + color: #ed8936; +} + +.placeholder-orange-600::placeholder { + color: #dd6b20; +} + +.placeholder-orange-700::placeholder { + color: #c05621; +} + +.placeholder-orange-800::placeholder { + color: #9c4221; +} + +.placeholder-orange-900::placeholder { + color: #7b341e; +} + +.placeholder-yellow-100::placeholder { + color: #fffff0; +} + +.placeholder-yellow-200::placeholder { + color: #fefcbf; +} + +.placeholder-yellow-300::placeholder { + color: #faf089; +} + +.placeholder-yellow-400::placeholder { + color: #f6e05e; +} + +.placeholder-yellow-500::placeholder { + color: #ecc94b; +} + +.placeholder-yellow-600::placeholder { + color: #d69e2e; +} + +.placeholder-yellow-700::placeholder { + color: #b7791f; +} + +.placeholder-yellow-800::placeholder { + color: #975a16; +} + +.placeholder-yellow-900::placeholder { + color: #744210; +} + +.placeholder-green-100::placeholder { + color: #f0fff4; +} + +.placeholder-green-200::placeholder { + color: #c6f6d5; +} + +.placeholder-green-300::placeholder { + color: #9ae6b4; +} + +.placeholder-green-400::placeholder { + color: #68d391; +} + +.placeholder-green-500::placeholder { + color: #48bb78; +} + +.placeholder-green-600::placeholder { + color: #38a169; +} + +.placeholder-green-700::placeholder { + color: #2f855a; +} + +.placeholder-green-800::placeholder { + color: #276749; +} + +.placeholder-green-900::placeholder { + color: #22543d; +} + +.placeholder-teal-100::placeholder { + color: #e6fffa; +} + +.placeholder-teal-200::placeholder { + color: #b2f5ea; +} + +.placeholder-teal-300::placeholder { + color: #81e6d9; +} + +.placeholder-teal-400::placeholder { + color: #4fd1c5; +} + +.placeholder-teal-500::placeholder { + color: #38b2ac; +} + +.placeholder-teal-600::placeholder { + color: #319795; +} + +.placeholder-teal-700::placeholder { + color: #2c7a7b; +} + +.placeholder-teal-800::placeholder { + color: #285e61; +} + +.placeholder-teal-900::placeholder { + color: #234e52; +} + +.placeholder-blue-100::placeholder { + color: #ebf8ff; +} + +.placeholder-blue-200::placeholder { + color: #bee3f8; +} + +.placeholder-blue-300::placeholder { + color: #90cdf4; +} + +.placeholder-blue-400::placeholder { + color: #63b3ed; +} + +.placeholder-blue-500::placeholder { + color: #4299e1; +} + +.placeholder-blue-600::placeholder { + color: #3182ce; +} + +.placeholder-blue-700::placeholder { + color: #2b6cb0; +} + +.placeholder-blue-800::placeholder { + color: #2c5282; +} + +.placeholder-blue-900::placeholder { + color: #2a4365; +} + +.placeholder-indigo-100::placeholder { + color: #ebf4ff; +} + +.placeholder-indigo-200::placeholder { + color: #c3dafe; +} + +.placeholder-indigo-300::placeholder { + color: #a3bffa; +} + +.placeholder-indigo-400::placeholder { + color: #7f9cf5; +} + +.placeholder-indigo-500::placeholder { + color: #667eea; +} + +.placeholder-indigo-600::placeholder { + color: #5a67d8; +} + +.placeholder-indigo-700::placeholder { + color: #4c51bf; +} + +.placeholder-indigo-800::placeholder { + color: #434190; +} + +.placeholder-indigo-900::placeholder { + color: #3c366b; +} + +.placeholder-purple-100::placeholder { + color: #faf5ff; +} + +.placeholder-purple-200::placeholder { + color: #e9d8fd; +} + +.placeholder-purple-300::placeholder { + color: #d6bcfa; +} + +.placeholder-purple-400::placeholder { + color: #b794f4; +} + +.placeholder-purple-500::placeholder { + color: #9f7aea; +} + +.placeholder-purple-600::placeholder { + color: #805ad5; +} + +.placeholder-purple-700::placeholder { + color: #6b46c1; +} + +.placeholder-purple-800::placeholder { + color: #553c9a; +} + +.placeholder-purple-900::placeholder { + color: #44337a; +} + +.placeholder-pink-100::placeholder { + color: #fff5f7; +} + +.placeholder-pink-200::placeholder { + color: #fed7e2; +} + +.placeholder-pink-300::placeholder { + color: #fbb6ce; +} + +.placeholder-pink-400::placeholder { + color: #f687b3; +} + +.placeholder-pink-500::placeholder { + color: #ed64a6; +} + +.placeholder-pink-600::placeholder { + color: #d53f8c; +} + +.placeholder-pink-700::placeholder { + color: #b83280; +} + +.placeholder-pink-800::placeholder { + color: #97266d; +} + +.placeholder-pink-900::placeholder { + color: #702459; +} + +.focus\:placeholder-transparent:focus::placeholder { + color: transparent; +} + +.focus\:placeholder-current:focus::placeholder { + color: currentColor; +} + +.focus\:placeholder-black:focus::placeholder { + color: #000; +} + +.focus\:placeholder-white:focus::placeholder { + color: #fff; +} + +.focus\:placeholder-gray-100:focus::placeholder { + color: #f7fafc; +} + +.focus\:placeholder-gray-200:focus::placeholder { + color: #edf2f7; +} + +.focus\:placeholder-gray-300:focus::placeholder { + color: #e2e8f0; +} + +.focus\:placeholder-gray-400:focus::placeholder { + color: #cbd5e0; +} + +.focus\:placeholder-gray-500:focus::placeholder { + color: #a0aec0; +} + +.focus\:placeholder-gray-600:focus::placeholder { + color: #718096; +} + +.focus\:placeholder-gray-700:focus::placeholder { + color: #4a5568; +} + +.focus\:placeholder-gray-800:focus::placeholder { + color: #2d3748; +} + +.focus\:placeholder-gray-900:focus::placeholder { + color: #1a202c; +} + +.focus\:placeholder-red-100:focus::placeholder { + color: #fff5f5; +} + +.focus\:placeholder-red-200:focus::placeholder { + color: #fed7d7; +} + +.focus\:placeholder-red-300:focus::placeholder { + color: #feb2b2; +} + +.focus\:placeholder-red-400:focus::placeholder { + color: #fc8181; +} + +.focus\:placeholder-red-500:focus::placeholder { + color: #f56565; +} + +.focus\:placeholder-red-600:focus::placeholder { + color: #e53e3e; +} + +.focus\:placeholder-red-700:focus::placeholder { + color: #c53030; +} + +.focus\:placeholder-red-800:focus::placeholder { + color: #9b2c2c; +} + +.focus\:placeholder-red-900:focus::placeholder { + color: #742a2a; +} + +.focus\:placeholder-orange-100:focus::placeholder { + color: #fffaf0; +} + +.focus\:placeholder-orange-200:focus::placeholder { + color: #feebc8; +} + +.focus\:placeholder-orange-300:focus::placeholder { + color: #fbd38d; +} + +.focus\:placeholder-orange-400:focus::placeholder { + color: #f6ad55; +} + +.focus\:placeholder-orange-500:focus::placeholder { + color: #ed8936; +} + +.focus\:placeholder-orange-600:focus::placeholder { + color: #dd6b20; +} + +.focus\:placeholder-orange-700:focus::placeholder { + color: #c05621; +} + +.focus\:placeholder-orange-800:focus::placeholder { + color: #9c4221; +} + +.focus\:placeholder-orange-900:focus::placeholder { + color: #7b341e; +} + +.focus\:placeholder-yellow-100:focus::placeholder { + color: #fffff0; +} + +.focus\:placeholder-yellow-200:focus::placeholder { + color: #fefcbf; +} + +.focus\:placeholder-yellow-300:focus::placeholder { + color: #faf089; +} + +.focus\:placeholder-yellow-400:focus::placeholder { + color: #f6e05e; +} + +.focus\:placeholder-yellow-500:focus::placeholder { + color: #ecc94b; +} + +.focus\:placeholder-yellow-600:focus::placeholder { + color: #d69e2e; +} + +.focus\:placeholder-yellow-700:focus::placeholder { + color: #b7791f; +} + +.focus\:placeholder-yellow-800:focus::placeholder { + color: #975a16; +} + +.focus\:placeholder-yellow-900:focus::placeholder { + color: #744210; +} + +.focus\:placeholder-green-100:focus::placeholder { + color: #f0fff4; +} + +.focus\:placeholder-green-200:focus::placeholder { + color: #c6f6d5; +} + +.focus\:placeholder-green-300:focus::placeholder { + color: #9ae6b4; +} + +.focus\:placeholder-green-400:focus::placeholder { + color: #68d391; +} + +.focus\:placeholder-green-500:focus::placeholder { + color: #48bb78; +} + +.focus\:placeholder-green-600:focus::placeholder { + color: #38a169; +} + +.focus\:placeholder-green-700:focus::placeholder { + color: #2f855a; +} + +.focus\:placeholder-green-800:focus::placeholder { + color: #276749; +} + +.focus\:placeholder-green-900:focus::placeholder { + color: #22543d; +} + +.focus\:placeholder-teal-100:focus::placeholder { + color: #e6fffa; +} + +.focus\:placeholder-teal-200:focus::placeholder { + color: #b2f5ea; +} + +.focus\:placeholder-teal-300:focus::placeholder { + color: #81e6d9; +} + +.focus\:placeholder-teal-400:focus::placeholder { + color: #4fd1c5; +} + +.focus\:placeholder-teal-500:focus::placeholder { + color: #38b2ac; +} + +.focus\:placeholder-teal-600:focus::placeholder { + color: #319795; +} + +.focus\:placeholder-teal-700:focus::placeholder { + color: #2c7a7b; +} + +.focus\:placeholder-teal-800:focus::placeholder { + color: #285e61; +} + +.focus\:placeholder-teal-900:focus::placeholder { + color: #234e52; +} + +.focus\:placeholder-blue-100:focus::placeholder { + color: #ebf8ff; +} + +.focus\:placeholder-blue-200:focus::placeholder { + color: #bee3f8; +} + +.focus\:placeholder-blue-300:focus::placeholder { + color: #90cdf4; +} + +.focus\:placeholder-blue-400:focus::placeholder { + color: #63b3ed; +} + +.focus\:placeholder-blue-500:focus::placeholder { + color: #4299e1; +} + +.focus\:placeholder-blue-600:focus::placeholder { + color: #3182ce; +} + +.focus\:placeholder-blue-700:focus::placeholder { + color: #2b6cb0; +} + +.focus\:placeholder-blue-800:focus::placeholder { + color: #2c5282; +} + +.focus\:placeholder-blue-900:focus::placeholder { + color: #2a4365; +} + +.focus\:placeholder-indigo-100:focus::placeholder { + color: #ebf4ff; +} + +.focus\:placeholder-indigo-200:focus::placeholder { + color: #c3dafe; +} + +.focus\:placeholder-indigo-300:focus::placeholder { + color: #a3bffa; +} + +.focus\:placeholder-indigo-400:focus::placeholder { + color: #7f9cf5; +} + +.focus\:placeholder-indigo-500:focus::placeholder { + color: #667eea; +} + +.focus\:placeholder-indigo-600:focus::placeholder { + color: #5a67d8; +} + +.focus\:placeholder-indigo-700:focus::placeholder { + color: #4c51bf; +} + +.focus\:placeholder-indigo-800:focus::placeholder { + color: #434190; +} + +.focus\:placeholder-indigo-900:focus::placeholder { + color: #3c366b; +} + +.focus\:placeholder-purple-100:focus::placeholder { + color: #faf5ff; +} + +.focus\:placeholder-purple-200:focus::placeholder { + color: #e9d8fd; +} + +.focus\:placeholder-purple-300:focus::placeholder { + color: #d6bcfa; +} + +.focus\:placeholder-purple-400:focus::placeholder { + color: #b794f4; +} + +.focus\:placeholder-purple-500:focus::placeholder { + color: #9f7aea; +} + +.focus\:placeholder-purple-600:focus::placeholder { + color: #805ad5; +} + +.focus\:placeholder-purple-700:focus::placeholder { + color: #6b46c1; +} + +.focus\:placeholder-purple-800:focus::placeholder { + color: #553c9a; +} + +.focus\:placeholder-purple-900:focus::placeholder { + color: #44337a; +} + +.focus\:placeholder-pink-100:focus::placeholder { + color: #fff5f7; +} + +.focus\:placeholder-pink-200:focus::placeholder { + color: #fed7e2; +} + +.focus\:placeholder-pink-300:focus::placeholder { + color: #fbb6ce; +} + +.focus\:placeholder-pink-400:focus::placeholder { + color: #f687b3; +} + +.focus\:placeholder-pink-500:focus::placeholder { + color: #ed64a6; +} + +.focus\:placeholder-pink-600:focus::placeholder { + color: #d53f8c; +} + +.focus\:placeholder-pink-700:focus::placeholder { + color: #b83280; +} + +.focus\:placeholder-pink-800:focus::placeholder { + color: #97266d; +} + +.focus\:placeholder-pink-900:focus::placeholder { + color: #702459; +} + +.pointer-events-none { + pointer-events: none; +} + +.pointer-events-auto { + pointer-events: auto; +} + +.static { + position: static; +} + +.fixed { + position: fixed; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.sticky { + position: sticky; +} + +.inset-0 { + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +.inset-auto { + top: auto; + right: auto; + bottom: auto; + left: auto; +} + +.inset-y-0 { + top: 0; + bottom: 0; +} + +.inset-x-0 { + right: 0; + left: 0; +} + +.inset-y-auto { + top: auto; + bottom: auto; +} + +.inset-x-auto { + right: auto; + left: auto; +} + +.top-0 { + top: 0; +} + +.right-0 { + right: 0; +} + +.bottom-0 { + bottom: 0; +} + +.left-0 { + left: 0; +} + +.top-auto { + top: auto; +} + +.right-auto { + right: auto; +} + +.bottom-auto { + bottom: auto; +} + +.left-auto { + left: auto; +} + +.resize-none { + resize: none; +} + +.resize-y { + resize: vertical; +} + +.resize-x { + resize: horizontal; +} + +.resize { + resize: both; +} + +.shadow-xs { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); +} + +.shadow-sm { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); +} + +.shadow { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); +} + +.shadow-md { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); +} + +.shadow-lg { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); +} + +.shadow-xl { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +.shadow-2xl { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); +} + +.shadow-inner { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); +} + +.shadow-outline { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); +} + +.shadow-none { + box-shadow: none; +} + +.hover\:shadow-xs:hover { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); +} + +.hover\:shadow-sm:hover { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); +} + +.hover\:shadow:hover { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); +} + +.hover\:shadow-md:hover { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); +} + +.hover\:shadow-lg:hover { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); +} + +.hover\:shadow-xl:hover { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +.hover\:shadow-2xl:hover { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); +} + +.hover\:shadow-inner:hover { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); +} + +.hover\:shadow-outline:hover { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); +} + +.hover\:shadow-none:hover { + box-shadow: none; +} + +.focus\:shadow-xs:focus { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); +} + +.focus\:shadow-sm:focus { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); +} + +.focus\:shadow:focus { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); +} + +.focus\:shadow-md:focus { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); +} + +.focus\:shadow-lg:focus { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); +} + +.focus\:shadow-xl:focus { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +.focus\:shadow-2xl:focus { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); +} + +.focus\:shadow-inner:focus { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); +} + +.focus\:shadow-outline:focus { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); +} + +.focus\:shadow-none:focus { + box-shadow: none; +} + +.fill-current { + fill: currentColor; +} + +.stroke-current { + stroke: currentColor; +} + +.stroke-0 { + stroke-width: 0; +} + +.stroke-1 { + stroke-width: 1; +} + +.stroke-2 { + stroke-width: 2; +} + +.table-auto { + table-layout: auto; +} + +.table-fixed { + table-layout: fixed; +} + +.text-left { + text-align: left; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.text-justify { + text-align: justify; +} + +.text-transparent { + color: transparent; +} + +.text-current { + color: currentColor; +} + +.text-black { + color: #000; +} + +.text-white { + color: #fff; +} + +.text-gray-100 { + color: #f7fafc; +} + +.text-gray-200 { + color: #edf2f7; +} + +.text-gray-300 { + color: #e2e8f0; +} + +.text-gray-400 { + color: #cbd5e0; +} + +.text-gray-500 { + color: #a0aec0; +} + +.text-gray-600 { + color: #718096; +} + +.text-gray-700 { + color: #4a5568; +} + +.text-gray-800 { + color: #2d3748; +} + +.text-gray-900 { + color: #1a202c; +} + +.text-red-100 { + color: #fff5f5; +} + +.text-red-200 { + color: #fed7d7; +} + +.text-red-300 { + color: #feb2b2; +} + +.text-red-400 { + color: #fc8181; +} + +.text-red-500 { + color: #f56565; +} + +.text-red-600 { + color: #e53e3e; +} + +.text-red-700 { + color: #c53030; +} + +.text-red-800 { + color: #9b2c2c; +} + +.text-red-900 { + color: #742a2a; +} + +.text-orange-100 { + color: #fffaf0; +} + +.text-orange-200 { + color: #feebc8; +} + +.text-orange-300 { + color: #fbd38d; +} + +.text-orange-400 { + color: #f6ad55; +} + +.text-orange-500 { + color: #ed8936; +} + +.text-orange-600 { + color: #dd6b20; +} + +.text-orange-700 { + color: #c05621; +} + +.text-orange-800 { + color: #9c4221; +} + +.text-orange-900 { + color: #7b341e; +} + +.text-yellow-100 { + color: #fffff0; +} + +.text-yellow-200 { + color: #fefcbf; +} + +.text-yellow-300 { + color: #faf089; +} + +.text-yellow-400 { + color: #f6e05e; +} + +.text-yellow-500 { + color: #ecc94b; +} + +.text-yellow-600 { + color: #d69e2e; +} + +.text-yellow-700 { + color: #b7791f; +} + +.text-yellow-800 { + color: #975a16; +} + +.text-yellow-900 { + color: #744210; +} + +.text-green-100 { + color: #f0fff4; +} + +.text-green-200 { + color: #c6f6d5; +} + +.text-green-300 { + color: #9ae6b4; +} + +.text-green-400 { + color: #68d391; +} + +.text-green-500 { + color: #48bb78; +} + +.text-green-600 { + color: #38a169; +} + +.text-green-700 { + color: #2f855a; +} + +.text-green-800 { + color: #276749; +} + +.text-green-900 { + color: #22543d; +} + +.text-teal-100 { + color: #e6fffa; +} + +.text-teal-200 { + color: #b2f5ea; +} + +.text-teal-300 { + color: #81e6d9; +} + +.text-teal-400 { + color: #4fd1c5; +} + +.text-teal-500 { + color: #38b2ac; +} + +.text-teal-600 { + color: #319795; +} + +.text-teal-700 { + color: #2c7a7b; +} + +.text-teal-800 { + color: #285e61; +} + +.text-teal-900 { + color: #234e52; +} + +.text-blue-100 { + color: #ebf8ff; +} + +.text-blue-200 { + color: #bee3f8; +} + +.text-blue-300 { + color: #90cdf4; +} + +.text-blue-400 { + color: #63b3ed; +} + +.text-blue-500 { + color: #4299e1; +} + +.text-blue-600 { + color: #3182ce; +} + +.text-blue-700 { + color: #2b6cb0; +} + +.text-blue-800 { + color: #2c5282; +} + +.text-blue-900 { + color: #2a4365; +} + +.text-indigo-100 { + color: #ebf4ff; +} + +.text-indigo-200 { + color: #c3dafe; +} + +.text-indigo-300 { + color: #a3bffa; +} + +.text-indigo-400 { + color: #7f9cf5; +} + +.text-indigo-500 { + color: #667eea; +} + +.text-indigo-600 { + color: #5a67d8; +} + +.text-indigo-700 { + color: #4c51bf; +} + +.text-indigo-800 { + color: #434190; +} + +.text-indigo-900 { + color: #3c366b; +} + +.text-purple-100 { + color: #faf5ff; +} + +.text-purple-200 { + color: #e9d8fd; +} + +.text-purple-300 { + color: #d6bcfa; +} + +.text-purple-400 { + color: #b794f4; +} + +.text-purple-500 { + color: #9f7aea; +} + +.text-purple-600 { + color: #805ad5; +} + +.text-purple-700 { + color: #6b46c1; +} + +.text-purple-800 { + color: #553c9a; +} + +.text-purple-900 { + color: #44337a; +} + +.text-pink-100 { + color: #fff5f7; +} + +.text-pink-200 { + color: #fed7e2; +} + +.text-pink-300 { + color: #fbb6ce; +} + +.text-pink-400 { + color: #f687b3; +} + +.text-pink-500 { + color: #ed64a6; +} + +.text-pink-600 { + color: #d53f8c; +} + +.text-pink-700 { + color: #b83280; +} + +.text-pink-800 { + color: #97266d; +} + +.text-pink-900 { + color: #702459; +} + +.hover\:text-transparent:hover { + color: transparent; +} + +.hover\:text-current:hover { + color: currentColor; +} + +.hover\:text-black:hover { + color: #000; +} + +.hover\:text-white:hover { + color: #fff; +} + +.hover\:text-gray-100:hover { + color: #f7fafc; +} + +.hover\:text-gray-200:hover { + color: #edf2f7; +} + +.hover\:text-gray-300:hover { + color: #e2e8f0; +} + +.hover\:text-gray-400:hover { + color: #cbd5e0; +} + +.hover\:text-gray-500:hover { + color: #a0aec0; +} + +.hover\:text-gray-600:hover { + color: #718096; +} + +.hover\:text-gray-700:hover { + color: #4a5568; +} + +.hover\:text-gray-800:hover { + color: #2d3748; +} + +.hover\:text-gray-900:hover { + color: #1a202c; +} + +.hover\:text-red-100:hover { + color: #fff5f5; +} + +.hover\:text-red-200:hover { + color: #fed7d7; +} + +.hover\:text-red-300:hover { + color: #feb2b2; +} + +.hover\:text-red-400:hover { + color: #fc8181; +} + +.hover\:text-red-500:hover { + color: #f56565; +} + +.hover\:text-red-600:hover { + color: #e53e3e; +} + +.hover\:text-red-700:hover { + color: #c53030; +} + +.hover\:text-red-800:hover { + color: #9b2c2c; +} + +.hover\:text-red-900:hover { + color: #742a2a; +} + +.hover\:text-orange-100:hover { + color: #fffaf0; +} + +.hover\:text-orange-200:hover { + color: #feebc8; +} + +.hover\:text-orange-300:hover { + color: #fbd38d; +} + +.hover\:text-orange-400:hover { + color: #f6ad55; +} + +.hover\:text-orange-500:hover { + color: #ed8936; +} + +.hover\:text-orange-600:hover { + color: #dd6b20; +} + +.hover\:text-orange-700:hover { + color: #c05621; +} + +.hover\:text-orange-800:hover { + color: #9c4221; +} + +.hover\:text-orange-900:hover { + color: #7b341e; +} + +.hover\:text-yellow-100:hover { + color: #fffff0; +} + +.hover\:text-yellow-200:hover { + color: #fefcbf; +} + +.hover\:text-yellow-300:hover { + color: #faf089; +} + +.hover\:text-yellow-400:hover { + color: #f6e05e; +} + +.hover\:text-yellow-500:hover { + color: #ecc94b; +} + +.hover\:text-yellow-600:hover { + color: #d69e2e; +} + +.hover\:text-yellow-700:hover { + color: #b7791f; +} + +.hover\:text-yellow-800:hover { + color: #975a16; +} + +.hover\:text-yellow-900:hover { + color: #744210; +} + +.hover\:text-green-100:hover { + color: #f0fff4; +} + +.hover\:text-green-200:hover { + color: #c6f6d5; +} + +.hover\:text-green-300:hover { + color: #9ae6b4; +} + +.hover\:text-green-400:hover { + color: #68d391; +} + +.hover\:text-green-500:hover { + color: #48bb78; +} + +.hover\:text-green-600:hover { + color: #38a169; +} + +.hover\:text-green-700:hover { + color: #2f855a; +} + +.hover\:text-green-800:hover { + color: #276749; +} + +.hover\:text-green-900:hover { + color: #22543d; +} + +.hover\:text-teal-100:hover { + color: #e6fffa; +} + +.hover\:text-teal-200:hover { + color: #b2f5ea; +} + +.hover\:text-teal-300:hover { + color: #81e6d9; +} + +.hover\:text-teal-400:hover { + color: #4fd1c5; +} + +.hover\:text-teal-500:hover { + color: #38b2ac; +} + +.hover\:text-teal-600:hover { + color: #319795; +} + +.hover\:text-teal-700:hover { + color: #2c7a7b; +} + +.hover\:text-teal-800:hover { + color: #285e61; +} + +.hover\:text-teal-900:hover { + color: #234e52; +} + +.hover\:text-blue-100:hover { + color: #ebf8ff; +} + +.hover\:text-blue-200:hover { + color: #bee3f8; +} + +.hover\:text-blue-300:hover { + color: #90cdf4; +} + +.hover\:text-blue-400:hover { + color: #63b3ed; +} + +.hover\:text-blue-500:hover { + color: #4299e1; +} + +.hover\:text-blue-600:hover { + color: #3182ce; +} + +.hover\:text-blue-700:hover { + color: #2b6cb0; +} + +.hover\:text-blue-800:hover { + color: #2c5282; +} + +.hover\:text-blue-900:hover { + color: #2a4365; +} + +.hover\:text-indigo-100:hover { + color: #ebf4ff; +} + +.hover\:text-indigo-200:hover { + color: #c3dafe; +} + +.hover\:text-indigo-300:hover { + color: #a3bffa; +} + +.hover\:text-indigo-400:hover { + color: #7f9cf5; +} + +.hover\:text-indigo-500:hover { + color: #667eea; +} + +.hover\:text-indigo-600:hover { + color: #5a67d8; +} + +.hover\:text-indigo-700:hover { + color: #4c51bf; +} + +.hover\:text-indigo-800:hover { + color: #434190; +} + +.hover\:text-indigo-900:hover { + color: #3c366b; +} + +.hover\:text-purple-100:hover { + color: #faf5ff; +} + +.hover\:text-purple-200:hover { + color: #e9d8fd; +} + +.hover\:text-purple-300:hover { + color: #d6bcfa; +} + +.hover\:text-purple-400:hover { + color: #b794f4; +} + +.hover\:text-purple-500:hover { + color: #9f7aea; +} + +.hover\:text-purple-600:hover { + color: #805ad5; +} + +.hover\:text-purple-700:hover { + color: #6b46c1; +} + +.hover\:text-purple-800:hover { + color: #553c9a; +} + +.hover\:text-purple-900:hover { + color: #44337a; +} + +.hover\:text-pink-100:hover { + color: #fff5f7; +} + +.hover\:text-pink-200:hover { + color: #fed7e2; +} + +.hover\:text-pink-300:hover { + color: #fbb6ce; +} + +.hover\:text-pink-400:hover { + color: #f687b3; +} + +.hover\:text-pink-500:hover { + color: #ed64a6; +} + +.hover\:text-pink-600:hover { + color: #d53f8c; +} + +.hover\:text-pink-700:hover { + color: #b83280; +} + +.hover\:text-pink-800:hover { + color: #97266d; +} + +.hover\:text-pink-900:hover { + color: #702459; +} + +.focus\:text-transparent:focus { + color: transparent; +} + +.focus\:text-current:focus { + color: currentColor; +} + +.focus\:text-black:focus { + color: #000; +} + +.focus\:text-white:focus { + color: #fff; +} + +.focus\:text-gray-100:focus { + color: #f7fafc; +} + +.focus\:text-gray-200:focus { + color: #edf2f7; +} + +.focus\:text-gray-300:focus { + color: #e2e8f0; +} + +.focus\:text-gray-400:focus { + color: #cbd5e0; +} + +.focus\:text-gray-500:focus { + color: #a0aec0; +} + +.focus\:text-gray-600:focus { + color: #718096; +} + +.focus\:text-gray-700:focus { + color: #4a5568; +} + +.focus\:text-gray-800:focus { + color: #2d3748; +} + +.focus\:text-gray-900:focus { + color: #1a202c; +} + +.focus\:text-red-100:focus { + color: #fff5f5; +} + +.focus\:text-red-200:focus { + color: #fed7d7; +} + +.focus\:text-red-300:focus { + color: #feb2b2; +} + +.focus\:text-red-400:focus { + color: #fc8181; +} + +.focus\:text-red-500:focus { + color: #f56565; +} + +.focus\:text-red-600:focus { + color: #e53e3e; +} + +.focus\:text-red-700:focus { + color: #c53030; +} + +.focus\:text-red-800:focus { + color: #9b2c2c; +} + +.focus\:text-red-900:focus { + color: #742a2a; +} + +.focus\:text-orange-100:focus { + color: #fffaf0; +} + +.focus\:text-orange-200:focus { + color: #feebc8; +} + +.focus\:text-orange-300:focus { + color: #fbd38d; +} + +.focus\:text-orange-400:focus { + color: #f6ad55; +} + +.focus\:text-orange-500:focus { + color: #ed8936; +} + +.focus\:text-orange-600:focus { + color: #dd6b20; +} + +.focus\:text-orange-700:focus { + color: #c05621; +} + +.focus\:text-orange-800:focus { + color: #9c4221; +} + +.focus\:text-orange-900:focus { + color: #7b341e; +} + +.focus\:text-yellow-100:focus { + color: #fffff0; +} + +.focus\:text-yellow-200:focus { + color: #fefcbf; +} + +.focus\:text-yellow-300:focus { + color: #faf089; +} + +.focus\:text-yellow-400:focus { + color: #f6e05e; +} + +.focus\:text-yellow-500:focus { + color: #ecc94b; +} + +.focus\:text-yellow-600:focus { + color: #d69e2e; +} + +.focus\:text-yellow-700:focus { + color: #b7791f; +} + +.focus\:text-yellow-800:focus { + color: #975a16; +} + +.focus\:text-yellow-900:focus { + color: #744210; +} + +.focus\:text-green-100:focus { + color: #f0fff4; +} + +.focus\:text-green-200:focus { + color: #c6f6d5; +} + +.focus\:text-green-300:focus { + color: #9ae6b4; +} + +.focus\:text-green-400:focus { + color: #68d391; +} + +.focus\:text-green-500:focus { + color: #48bb78; +} + +.focus\:text-green-600:focus { + color: #38a169; +} + +.focus\:text-green-700:focus { + color: #2f855a; +} + +.focus\:text-green-800:focus { + color: #276749; +} + +.focus\:text-green-900:focus { + color: #22543d; +} + +.focus\:text-teal-100:focus { + color: #e6fffa; +} + +.focus\:text-teal-200:focus { + color: #b2f5ea; +} + +.focus\:text-teal-300:focus { + color: #81e6d9; +} + +.focus\:text-teal-400:focus { + color: #4fd1c5; +} + +.focus\:text-teal-500:focus { + color: #38b2ac; +} + +.focus\:text-teal-600:focus { + color: #319795; +} + +.focus\:text-teal-700:focus { + color: #2c7a7b; +} + +.focus\:text-teal-800:focus { + color: #285e61; +} + +.focus\:text-teal-900:focus { + color: #234e52; +} + +.focus\:text-blue-100:focus { + color: #ebf8ff; +} + +.focus\:text-blue-200:focus { + color: #bee3f8; +} + +.focus\:text-blue-300:focus { + color: #90cdf4; +} + +.focus\:text-blue-400:focus { + color: #63b3ed; +} + +.focus\:text-blue-500:focus { + color: #4299e1; +} + +.focus\:text-blue-600:focus { + color: #3182ce; +} + +.focus\:text-blue-700:focus { + color: #2b6cb0; +} + +.focus\:text-blue-800:focus { + color: #2c5282; +} + +.focus\:text-blue-900:focus { + color: #2a4365; +} + +.focus\:text-indigo-100:focus { + color: #ebf4ff; +} + +.focus\:text-indigo-200:focus { + color: #c3dafe; +} + +.focus\:text-indigo-300:focus { + color: #a3bffa; +} + +.focus\:text-indigo-400:focus { + color: #7f9cf5; +} + +.focus\:text-indigo-500:focus { + color: #667eea; +} + +.focus\:text-indigo-600:focus { + color: #5a67d8; +} + +.focus\:text-indigo-700:focus { + color: #4c51bf; +} + +.focus\:text-indigo-800:focus { + color: #434190; +} + +.focus\:text-indigo-900:focus { + color: #3c366b; +} + +.focus\:text-purple-100:focus { + color: #faf5ff; +} + +.focus\:text-purple-200:focus { + color: #e9d8fd; +} + +.focus\:text-purple-300:focus { + color: #d6bcfa; +} + +.focus\:text-purple-400:focus { + color: #b794f4; +} + +.focus\:text-purple-500:focus { + color: #9f7aea; +} + +.focus\:text-purple-600:focus { + color: #805ad5; +} + +.focus\:text-purple-700:focus { + color: #6b46c1; +} + +.focus\:text-purple-800:focus { + color: #553c9a; +} + +.focus\:text-purple-900:focus { + color: #44337a; +} + +.focus\:text-pink-100:focus { + color: #fff5f7; +} + +.focus\:text-pink-200:focus { + color: #fed7e2; +} + +.focus\:text-pink-300:focus { + color: #fbb6ce; +} + +.focus\:text-pink-400:focus { + color: #f687b3; +} + +.focus\:text-pink-500:focus { + color: #ed64a6; +} + +.focus\:text-pink-600:focus { + color: #d53f8c; +} + +.focus\:text-pink-700:focus { + color: #b83280; +} + +.focus\:text-pink-800:focus { + color: #97266d; +} + +.focus\:text-pink-900:focus { + color: #702459; +} + +.italic { + font-style: italic; +} + +.not-italic { + font-style: normal; +} + +.uppercase { + text-transform: uppercase; +} + +.lowercase { + text-transform: lowercase; +} + +.capitalize { + text-transform: capitalize; +} + +.normal-case { + text-transform: none; +} + +.underline { + text-decoration: underline; +} + +.line-through { + text-decoration: line-through; +} + +.no-underline { + text-decoration: none; +} + +.hover\:underline:hover { + text-decoration: underline; +} + +.hover\:line-through:hover { + text-decoration: line-through; +} + +.hover\:no-underline:hover { + text-decoration: none; +} + +.focus\:underline:focus { + text-decoration: underline; +} + +.focus\:line-through:focus { + text-decoration: line-through; +} + +.focus\:no-underline:focus { + text-decoration: none; +} + +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.subpixel-antialiased { + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; +} + +.tracking-tighter { + letter-spacing: -0.05em; +} + +.tracking-tight { + letter-spacing: -0.025em; +} + +.tracking-normal { + letter-spacing: 0; +} + +.tracking-wide { + letter-spacing: 0.025em; +} + +.tracking-wider { + letter-spacing: 0.05em; +} + +.tracking-widest { + letter-spacing: 0.1em; +} + +.select-none { + user-select: none; +} + +.select-text { + user-select: text; +} + +.select-all { + user-select: all; +} + +.select-auto { + user-select: auto; +} + +.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; +} + +.visible { + visibility: visible; +} + +.invisible { + visibility: hidden; +} + +.whitespace-normal { + white-space: normal; +} + +.whitespace-no-wrap { + white-space: nowrap; +} + +.whitespace-pre { + white-space: pre; +} + +.whitespace-pre-line { + white-space: pre-line; +} + +.whitespace-pre-wrap { + white-space: pre-wrap; +} + +.break-normal { + overflow-wrap: normal; + word-break: normal; +} + +.break-words { + overflow-wrap: break-word; +} + +.break-all { + word-break: break-all; +} + +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.w-0 { + width: 0; +} + +.w-1 { + width: 0.25rem; +} + +.w-2 { + width: 0.5rem; +} + +.w-3 { + width: 0.75rem; +} + +.w-4 { + width: 1rem; +} + +.w-5 { + width: 1.25rem; +} + +.w-6 { + width: 1.5rem; +} + +.w-8 { + width: 2rem; +} + +.w-10 { + width: 2.5rem; +} + +.w-12 { + width: 3rem; +} + +.w-16 { + width: 4rem; +} + +.w-20 { + width: 5rem; +} + +.w-24 { + width: 6rem; +} + +.w-32 { + width: 8rem; +} + +.w-40 { + width: 10rem; +} + +.w-48 { + width: 12rem; +} + +.w-56 { + width: 14rem; +} + +.w-64 { + width: 16rem; +} + +.w-auto { + width: auto; +} + +.w-px { + width: 1px; +} + +.w-1\/2 { + width: 50%; +} + +.w-1\/3 { + width: 33.333333%; +} + +.w-2\/3 { + width: 66.666667%; +} + +.w-1\/4 { + width: 25%; +} + +.w-2\/4 { + width: 50%; +} + +.w-3\/4 { + width: 75%; +} + +.w-1\/5 { + width: 20%; +} + +.w-2\/5 { + width: 40%; +} + +.w-3\/5 { + width: 60%; +} + +.w-4\/5 { + width: 80%; +} + +.w-1\/6 { + width: 16.666667%; +} + +.w-2\/6 { + width: 33.333333%; +} + +.w-3\/6 { + width: 50%; +} + +.w-4\/6 { + width: 66.666667%; +} + +.w-5\/6 { + width: 83.333333%; +} + +.w-1\/12 { + width: 8.333333%; +} + +.w-2\/12 { + width: 16.666667%; +} + +.w-3\/12 { + width: 25%; +} + +.w-4\/12 { + width: 33.333333%; +} + +.w-5\/12 { + width: 41.666667%; +} + +.w-6\/12 { + width: 50%; +} + +.w-7\/12 { + width: 58.333333%; +} + +.w-8\/12 { + width: 66.666667%; +} + +.w-9\/12 { + width: 75%; +} + +.w-10\/12 { + width: 83.333333%; +} + +.w-11\/12 { + width: 91.666667%; +} + +.w-full { + width: 100%; +} + +.w-screen { + width: 100vw; +} + +.z-0 { + z-index: 0; +} + +.z-10 { + z-index: 10; +} + +.z-20 { + z-index: 20; +} + +.z-30 { + z-index: 30; +} + +.z-40 { + z-index: 40; +} + +.z-50 { + z-index: 50; +} + +.z-auto { + z-index: auto; +} + +.gap-0 { + grid-gap: 0; + gap: 0; +} + +.gap-1 { + grid-gap: 0.25rem; + gap: 0.25rem; +} + +.gap-2 { + grid-gap: 0.5rem; + gap: 0.5rem; +} + +.gap-3 { + grid-gap: 0.75rem; + gap: 0.75rem; +} + +.gap-4 { + grid-gap: 1rem; + gap: 1rem; +} + +.gap-5 { + grid-gap: 1.25rem; + gap: 1.25rem; +} + +.gap-6 { + grid-gap: 1.5rem; + gap: 1.5rem; +} + +.gap-8 { + grid-gap: 2rem; + gap: 2rem; +} + +.gap-10 { + grid-gap: 2.5rem; + gap: 2.5rem; +} + +.gap-12 { + grid-gap: 3rem; + gap: 3rem; +} + +.gap-16 { + grid-gap: 4rem; + gap: 4rem; +} + +.gap-20 { + grid-gap: 5rem; + gap: 5rem; +} + +.gap-24 { + grid-gap: 6rem; + gap: 6rem; +} + +.gap-32 { + grid-gap: 8rem; + gap: 8rem; +} + +.gap-40 { + grid-gap: 10rem; + gap: 10rem; +} + +.gap-48 { + grid-gap: 12rem; + gap: 12rem; +} + +.gap-56 { + grid-gap: 14rem; + gap: 14rem; +} + +.gap-64 { + grid-gap: 16rem; + gap: 16rem; +} + +.gap-px { + grid-gap: 1px; + gap: 1px; +} + +.col-gap-0 { + grid-column-gap: 0; + column-gap: 0; +} + +.col-gap-1 { + grid-column-gap: 0.25rem; + column-gap: 0.25rem; +} + +.col-gap-2 { + grid-column-gap: 0.5rem; + column-gap: 0.5rem; +} + +.col-gap-3 { + grid-column-gap: 0.75rem; + column-gap: 0.75rem; +} + +.col-gap-4 { + grid-column-gap: 1rem; + column-gap: 1rem; +} + +.col-gap-5 { + grid-column-gap: 1.25rem; + column-gap: 1.25rem; +} + +.col-gap-6 { + grid-column-gap: 1.5rem; + column-gap: 1.5rem; +} + +.col-gap-8 { + grid-column-gap: 2rem; + column-gap: 2rem; +} + +.col-gap-10 { + grid-column-gap: 2.5rem; + column-gap: 2.5rem; +} + +.col-gap-12 { + grid-column-gap: 3rem; + column-gap: 3rem; +} + +.col-gap-16 { + grid-column-gap: 4rem; + column-gap: 4rem; +} + +.col-gap-20 { + grid-column-gap: 5rem; + column-gap: 5rem; +} + +.col-gap-24 { + grid-column-gap: 6rem; + column-gap: 6rem; +} + +.col-gap-32 { + grid-column-gap: 8rem; + column-gap: 8rem; +} + +.col-gap-40 { + grid-column-gap: 10rem; + column-gap: 10rem; +} + +.col-gap-48 { + grid-column-gap: 12rem; + column-gap: 12rem; +} + +.col-gap-56 { + grid-column-gap: 14rem; + column-gap: 14rem; +} + +.col-gap-64 { + grid-column-gap: 16rem; + column-gap: 16rem; +} + +.col-gap-px { + grid-column-gap: 1px; + column-gap: 1px; +} + +.row-gap-0 { + grid-row-gap: 0; + row-gap: 0; +} + +.row-gap-1 { + grid-row-gap: 0.25rem; + row-gap: 0.25rem; +} + +.row-gap-2 { + grid-row-gap: 0.5rem; + row-gap: 0.5rem; +} + +.row-gap-3 { + grid-row-gap: 0.75rem; + row-gap: 0.75rem; +} + +.row-gap-4 { + grid-row-gap: 1rem; + row-gap: 1rem; +} + +.row-gap-5 { + grid-row-gap: 1.25rem; + row-gap: 1.25rem; +} + +.row-gap-6 { + grid-row-gap: 1.5rem; + row-gap: 1.5rem; +} + +.row-gap-8 { + grid-row-gap: 2rem; + row-gap: 2rem; +} + +.row-gap-10 { + grid-row-gap: 2.5rem; + row-gap: 2.5rem; +} + +.row-gap-12 { + grid-row-gap: 3rem; + row-gap: 3rem; +} + +.row-gap-16 { + grid-row-gap: 4rem; + row-gap: 4rem; +} + +.row-gap-20 { + grid-row-gap: 5rem; + row-gap: 5rem; +} + +.row-gap-24 { + grid-row-gap: 6rem; + row-gap: 6rem; +} + +.row-gap-32 { + grid-row-gap: 8rem; + row-gap: 8rem; +} + +.row-gap-40 { + grid-row-gap: 10rem; + row-gap: 10rem; +} + +.row-gap-48 { + grid-row-gap: 12rem; + row-gap: 12rem; +} + +.row-gap-56 { + grid-row-gap: 14rem; + row-gap: 14rem; +} + +.row-gap-64 { + grid-row-gap: 16rem; + row-gap: 16rem; +} + +.row-gap-px { + grid-row-gap: 1px; + row-gap: 1px; +} + +.grid-flow-row { + grid-auto-flow: row; +} + +.grid-flow-col { + grid-auto-flow: column; +} + +.grid-flow-row-dense { + grid-auto-flow: row dense; +} + +.grid-flow-col-dense { + grid-auto-flow: column dense; +} + +.grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} + +.grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} + +.grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + +.grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); +} + +.grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); +} + +.grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); +} + +.grid-cols-9 { + grid-template-columns: repeat(9, minmax(0, 1fr)); +} + +.grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); +} + +.grid-cols-11 { + grid-template-columns: repeat(11, minmax(0, 1fr)); +} + +.grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); +} + +.grid-cols-none { + grid-template-columns: none; +} + +.col-auto { + grid-column: auto; +} + +.col-span-1 { + grid-column: span 1 / span 1; +} + +.col-span-2 { + grid-column: span 2 / span 2; +} + +.col-span-3 { + grid-column: span 3 / span 3; +} + +.col-span-4 { + grid-column: span 4 / span 4; +} + +.col-span-5 { + grid-column: span 5 / span 5; +} + +.col-span-6 { + grid-column: span 6 / span 6; +} + +.col-span-7 { + grid-column: span 7 / span 7; +} + +.col-span-8 { + grid-column: span 8 / span 8; +} + +.col-span-9 { + grid-column: span 9 / span 9; +} + +.col-span-10 { + grid-column: span 10 / span 10; +} + +.col-span-11 { + grid-column: span 11 / span 11; +} + +.col-span-12 { + grid-column: span 12 / span 12; +} + +.col-start-1 { + grid-column-start: 1; +} + +.col-start-2 { + grid-column-start: 2; +} + +.col-start-3 { + grid-column-start: 3; +} + +.col-start-4 { + grid-column-start: 4; +} + +.col-start-5 { + grid-column-start: 5; +} + +.col-start-6 { + grid-column-start: 6; +} + +.col-start-7 { + grid-column-start: 7; +} + +.col-start-8 { + grid-column-start: 8; +} + +.col-start-9 { + grid-column-start: 9; +} + +.col-start-10 { + grid-column-start: 10; +} + +.col-start-11 { + grid-column-start: 11; +} + +.col-start-12 { + grid-column-start: 12; +} + +.col-start-13 { + grid-column-start: 13; +} + +.col-start-auto { + grid-column-start: auto; +} + +.col-end-1 { + grid-column-end: 1; +} + +.col-end-2 { + grid-column-end: 2; +} + +.col-end-3 { + grid-column-end: 3; +} + +.col-end-4 { + grid-column-end: 4; +} + +.col-end-5 { + grid-column-end: 5; +} + +.col-end-6 { + grid-column-end: 6; +} + +.col-end-7 { + grid-column-end: 7; +} + +.col-end-8 { + grid-column-end: 8; +} + +.col-end-9 { + grid-column-end: 9; +} + +.col-end-10 { + grid-column-end: 10; +} + +.col-end-11 { + grid-column-end: 11; +} + +.col-end-12 { + grid-column-end: 12; +} + +.col-end-13 { + grid-column-end: 13; +} + +.col-end-auto { + grid-column-end: auto; +} + +.grid-rows-1 { + grid-template-rows: repeat(1, minmax(0, 1fr)); +} + +.grid-rows-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); +} + +.grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); +} + +.grid-rows-4 { + grid-template-rows: repeat(4, minmax(0, 1fr)); +} + +.grid-rows-5 { + grid-template-rows: repeat(5, minmax(0, 1fr)); +} + +.grid-rows-6 { + grid-template-rows: repeat(6, minmax(0, 1fr)); +} + +.grid-rows-none { + grid-template-rows: none; +} + +.row-auto { + grid-row: auto; +} + +.row-span-1 { + grid-row: span 1 / span 1; +} + +.row-span-2 { + grid-row: span 2 / span 2; +} + +.row-span-3 { + grid-row: span 3 / span 3; +} + +.row-span-4 { + grid-row: span 4 / span 4; +} + +.row-span-5 { + grid-row: span 5 / span 5; +} + +.row-span-6 { + grid-row: span 6 / span 6; +} + +.row-start-1 { + grid-row-start: 1; +} + +.row-start-2 { + grid-row-start: 2; +} + +.row-start-3 { + grid-row-start: 3; +} + +.row-start-4 { + grid-row-start: 4; +} + +.row-start-5 { + grid-row-start: 5; +} + +.row-start-6 { + grid-row-start: 6; +} + +.row-start-7 { + grid-row-start: 7; +} + +.row-start-auto { + grid-row-start: auto; +} + +.row-end-1 { + grid-row-end: 1; +} + +.row-end-2 { + grid-row-end: 2; +} + +.row-end-3 { + grid-row-end: 3; +} + +.row-end-4 { + grid-row-end: 4; +} + +.row-end-5 { + grid-row-end: 5; +} + +.row-end-6 { + grid-row-end: 6; +} + +.row-end-7 { + grid-row-end: 7; +} + +.row-end-auto { + grid-row-end: auto; +} + +.transform { + --transform-translate-x: 0; + --transform-translate-y: 0; + --transform-rotate: 0; + --transform-skew-x: 0; + --transform-skew-y: 0; + --transform-scale-x: 1; + --transform-scale-y: 1; + transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y)); +} + +.transform-none { + transform: none; +} + +.origin-center { + transform-origin: center; +} + +.origin-top { + transform-origin: top; +} + +.origin-top-right { + transform-origin: top right; +} + +.origin-right { + transform-origin: right; +} + +.origin-bottom-right { + transform-origin: bottom right; +} + +.origin-bottom { + transform-origin: bottom; +} + +.origin-bottom-left { + transform-origin: bottom left; +} + +.origin-left { + transform-origin: left; +} + +.origin-top-left { + transform-origin: top left; +} + +.scale-0 { + --transform-scale-x: 0; + --transform-scale-y: 0; +} + +.scale-50 { + --transform-scale-x: .5; + --transform-scale-y: .5; +} + +.scale-75 { + --transform-scale-x: .75; + --transform-scale-y: .75; +} + +.scale-90 { + --transform-scale-x: .9; + --transform-scale-y: .9; +} + +.scale-95 { + --transform-scale-x: .95; + --transform-scale-y: .95; +} + +.scale-100 { + --transform-scale-x: 1; + --transform-scale-y: 1; +} + +.scale-105 { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; +} + +.scale-110 { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; +} + +.scale-125 { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; +} + +.scale-150 { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; +} + +.scale-x-0 { + --transform-scale-x: 0; +} + +.scale-x-50 { + --transform-scale-x: .5; +} + +.scale-x-75 { + --transform-scale-x: .75; +} + +.scale-x-90 { + --transform-scale-x: .9; +} + +.scale-x-95 { + --transform-scale-x: .95; +} + +.scale-x-100 { + --transform-scale-x: 1; +} + +.scale-x-105 { + --transform-scale-x: 1.05; +} + +.scale-x-110 { + --transform-scale-x: 1.1; +} + +.scale-x-125 { + --transform-scale-x: 1.25; +} + +.scale-x-150 { + --transform-scale-x: 1.5; +} + +.scale-y-0 { + --transform-scale-y: 0; +} + +.scale-y-50 { + --transform-scale-y: .5; +} + +.scale-y-75 { + --transform-scale-y: .75; +} + +.scale-y-90 { + --transform-scale-y: .9; +} + +.scale-y-95 { + --transform-scale-y: .95; +} + +.scale-y-100 { + --transform-scale-y: 1; +} + +.scale-y-105 { + --transform-scale-y: 1.05; +} + +.scale-y-110 { + --transform-scale-y: 1.1; +} + +.scale-y-125 { + --transform-scale-y: 1.25; +} + +.scale-y-150 { + --transform-scale-y: 1.5; +} + +.hover\:scale-0:hover { + --transform-scale-x: 0; + --transform-scale-y: 0; +} + +.hover\:scale-50:hover { + --transform-scale-x: .5; + --transform-scale-y: .5; +} + +.hover\:scale-75:hover { + --transform-scale-x: .75; + --transform-scale-y: .75; +} + +.hover\:scale-90:hover { + --transform-scale-x: .9; + --transform-scale-y: .9; +} + +.hover\:scale-95:hover { + --transform-scale-x: .95; + --transform-scale-y: .95; +} + +.hover\:scale-100:hover { + --transform-scale-x: 1; + --transform-scale-y: 1; +} + +.hover\:scale-105:hover { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; +} + +.hover\:scale-110:hover { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; +} + +.hover\:scale-125:hover { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; +} + +.hover\:scale-150:hover { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; +} + +.hover\:scale-x-0:hover { + --transform-scale-x: 0; +} + +.hover\:scale-x-50:hover { + --transform-scale-x: .5; +} + +.hover\:scale-x-75:hover { + --transform-scale-x: .75; +} + +.hover\:scale-x-90:hover { + --transform-scale-x: .9; +} + +.hover\:scale-x-95:hover { + --transform-scale-x: .95; +} + +.hover\:scale-x-100:hover { + --transform-scale-x: 1; +} + +.hover\:scale-x-105:hover { + --transform-scale-x: 1.05; +} + +.hover\:scale-x-110:hover { + --transform-scale-x: 1.1; +} + +.hover\:scale-x-125:hover { + --transform-scale-x: 1.25; +} + +.hover\:scale-x-150:hover { + --transform-scale-x: 1.5; +} + +.hover\:scale-y-0:hover { + --transform-scale-y: 0; +} + +.hover\:scale-y-50:hover { + --transform-scale-y: .5; +} + +.hover\:scale-y-75:hover { + --transform-scale-y: .75; +} + +.hover\:scale-y-90:hover { + --transform-scale-y: .9; +} + +.hover\:scale-y-95:hover { + --transform-scale-y: .95; +} + +.hover\:scale-y-100:hover { + --transform-scale-y: 1; +} + +.hover\:scale-y-105:hover { + --transform-scale-y: 1.05; +} + +.hover\:scale-y-110:hover { + --transform-scale-y: 1.1; +} + +.hover\:scale-y-125:hover { + --transform-scale-y: 1.25; +} + +.hover\:scale-y-150:hover { + --transform-scale-y: 1.5; +} + +.focus\:scale-0:focus { + --transform-scale-x: 0; + --transform-scale-y: 0; +} + +.focus\:scale-50:focus { + --transform-scale-x: .5; + --transform-scale-y: .5; +} + +.focus\:scale-75:focus { + --transform-scale-x: .75; + --transform-scale-y: .75; +} + +.focus\:scale-90:focus { + --transform-scale-x: .9; + --transform-scale-y: .9; +} + +.focus\:scale-95:focus { + --transform-scale-x: .95; + --transform-scale-y: .95; +} + +.focus\:scale-100:focus { + --transform-scale-x: 1; + --transform-scale-y: 1; +} + +.focus\:scale-105:focus { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; +} + +.focus\:scale-110:focus { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; +} + +.focus\:scale-125:focus { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; +} + +.focus\:scale-150:focus { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; +} + +.focus\:scale-x-0:focus { + --transform-scale-x: 0; +} + +.focus\:scale-x-50:focus { + --transform-scale-x: .5; +} + +.focus\:scale-x-75:focus { + --transform-scale-x: .75; +} + +.focus\:scale-x-90:focus { + --transform-scale-x: .9; +} + +.focus\:scale-x-95:focus { + --transform-scale-x: .95; +} + +.focus\:scale-x-100:focus { + --transform-scale-x: 1; +} + +.focus\:scale-x-105:focus { + --transform-scale-x: 1.05; +} + +.focus\:scale-x-110:focus { + --transform-scale-x: 1.1; +} + +.focus\:scale-x-125:focus { + --transform-scale-x: 1.25; +} + +.focus\:scale-x-150:focus { + --transform-scale-x: 1.5; +} + +.focus\:scale-y-0:focus { + --transform-scale-y: 0; +} + +.focus\:scale-y-50:focus { + --transform-scale-y: .5; +} + +.focus\:scale-y-75:focus { + --transform-scale-y: .75; +} + +.focus\:scale-y-90:focus { + --transform-scale-y: .9; +} + +.focus\:scale-y-95:focus { + --transform-scale-y: .95; +} + +.focus\:scale-y-100:focus { + --transform-scale-y: 1; +} + +.focus\:scale-y-105:focus { + --transform-scale-y: 1.05; +} + +.focus\:scale-y-110:focus { + --transform-scale-y: 1.1; +} + +.focus\:scale-y-125:focus { + --transform-scale-y: 1.25; +} + +.focus\:scale-y-150:focus { + --transform-scale-y: 1.5; +} + +.rotate-0 { + --transform-rotate: 0; +} + +.rotate-45 { + --transform-rotate: 45deg; +} + +.rotate-90 { + --transform-rotate: 90deg; +} + +.rotate-180 { + --transform-rotate: 180deg; +} + +.-rotate-180 { + --transform-rotate: -180deg; +} + +.-rotate-90 { + --transform-rotate: -90deg; +} + +.-rotate-45 { + --transform-rotate: -45deg; +} + +.hover\:rotate-0:hover { + --transform-rotate: 0; +} + +.hover\:rotate-45:hover { + --transform-rotate: 45deg; +} + +.hover\:rotate-90:hover { + --transform-rotate: 90deg; +} + +.hover\:rotate-180:hover { + --transform-rotate: 180deg; +} + +.hover\:-rotate-180:hover { + --transform-rotate: -180deg; +} + +.hover\:-rotate-90:hover { + --transform-rotate: -90deg; +} + +.hover\:-rotate-45:hover { + --transform-rotate: -45deg; +} + +.focus\:rotate-0:focus { + --transform-rotate: 0; +} + +.focus\:rotate-45:focus { + --transform-rotate: 45deg; +} + +.focus\:rotate-90:focus { + --transform-rotate: 90deg; +} + +.focus\:rotate-180:focus { + --transform-rotate: 180deg; +} + +.focus\:-rotate-180:focus { + --transform-rotate: -180deg; +} + +.focus\:-rotate-90:focus { + --transform-rotate: -90deg; +} + +.focus\:-rotate-45:focus { + --transform-rotate: -45deg; +} + +.translate-x-0 { + --transform-translate-x: 0; +} + +.translate-x-1 { + --transform-translate-x: 0.25rem; +} + +.translate-x-2 { + --transform-translate-x: 0.5rem; +} + +.translate-x-3 { + --transform-translate-x: 0.75rem; +} + +.translate-x-4 { + --transform-translate-x: 1rem; +} + +.translate-x-5 { + --transform-translate-x: 1.25rem; +} + +.translate-x-6 { + --transform-translate-x: 1.5rem; +} + +.translate-x-8 { + --transform-translate-x: 2rem; +} + +.translate-x-10 { + --transform-translate-x: 2.5rem; +} + +.translate-x-12 { + --transform-translate-x: 3rem; +} + +.translate-x-16 { + --transform-translate-x: 4rem; +} + +.translate-x-20 { + --transform-translate-x: 5rem; +} + +.translate-x-24 { + --transform-translate-x: 6rem; +} + +.translate-x-32 { + --transform-translate-x: 8rem; +} + +.translate-x-40 { + --transform-translate-x: 10rem; +} + +.translate-x-48 { + --transform-translate-x: 12rem; +} + +.translate-x-56 { + --transform-translate-x: 14rem; +} + +.translate-x-64 { + --transform-translate-x: 16rem; +} + +.translate-x-px { + --transform-translate-x: 1px; +} + +.-translate-x-1 { + --transform-translate-x: -0.25rem; +} + +.-translate-x-2 { + --transform-translate-x: -0.5rem; +} + +.-translate-x-3 { + --transform-translate-x: -0.75rem; +} + +.-translate-x-4 { + --transform-translate-x: -1rem; +} + +.-translate-x-5 { + --transform-translate-x: -1.25rem; +} + +.-translate-x-6 { + --transform-translate-x: -1.5rem; +} + +.-translate-x-8 { + --transform-translate-x: -2rem; +} + +.-translate-x-10 { + --transform-translate-x: -2.5rem; +} + +.-translate-x-12 { + --transform-translate-x: -3rem; +} + +.-translate-x-16 { + --transform-translate-x: -4rem; +} + +.-translate-x-20 { + --transform-translate-x: -5rem; +} + +.-translate-x-24 { + --transform-translate-x: -6rem; +} + +.-translate-x-32 { + --transform-translate-x: -8rem; +} + +.-translate-x-40 { + --transform-translate-x: -10rem; +} + +.-translate-x-48 { + --transform-translate-x: -12rem; +} + +.-translate-x-56 { + --transform-translate-x: -14rem; +} + +.-translate-x-64 { + --transform-translate-x: -16rem; +} + +.-translate-x-px { + --transform-translate-x: -1px; +} + +.-translate-x-full { + --transform-translate-x: -100%; +} + +.-translate-x-1\/2 { + --transform-translate-x: -50%; +} + +.translate-x-1\/2 { + --transform-translate-x: 50%; +} + +.translate-x-full { + --transform-translate-x: 100%; +} + +.translate-y-0 { + --transform-translate-y: 0; +} + +.translate-y-1 { + --transform-translate-y: 0.25rem; +} + +.translate-y-2 { + --transform-translate-y: 0.5rem; +} + +.translate-y-3 { + --transform-translate-y: 0.75rem; +} + +.translate-y-4 { + --transform-translate-y: 1rem; +} + +.translate-y-5 { + --transform-translate-y: 1.25rem; +} + +.translate-y-6 { + --transform-translate-y: 1.5rem; +} + +.translate-y-8 { + --transform-translate-y: 2rem; +} + +.translate-y-10 { + --transform-translate-y: 2.5rem; +} + +.translate-y-12 { + --transform-translate-y: 3rem; +} + +.translate-y-16 { + --transform-translate-y: 4rem; +} + +.translate-y-20 { + --transform-translate-y: 5rem; +} + +.translate-y-24 { + --transform-translate-y: 6rem; +} + +.translate-y-32 { + --transform-translate-y: 8rem; +} + +.translate-y-40 { + --transform-translate-y: 10rem; +} + +.translate-y-48 { + --transform-translate-y: 12rem; +} + +.translate-y-56 { + --transform-translate-y: 14rem; +} + +.translate-y-64 { + --transform-translate-y: 16rem; +} + +.translate-y-px { + --transform-translate-y: 1px; +} + +.-translate-y-1 { + --transform-translate-y: -0.25rem; +} + +.-translate-y-2 { + --transform-translate-y: -0.5rem; +} + +.-translate-y-3 { + --transform-translate-y: -0.75rem; +} + +.-translate-y-4 { + --transform-translate-y: -1rem; +} + +.-translate-y-5 { + --transform-translate-y: -1.25rem; +} + +.-translate-y-6 { + --transform-translate-y: -1.5rem; +} + +.-translate-y-8 { + --transform-translate-y: -2rem; +} + +.-translate-y-10 { + --transform-translate-y: -2.5rem; +} + +.-translate-y-12 { + --transform-translate-y: -3rem; +} + +.-translate-y-16 { + --transform-translate-y: -4rem; +} + +.-translate-y-20 { + --transform-translate-y: -5rem; +} + +.-translate-y-24 { + --transform-translate-y: -6rem; +} + +.-translate-y-32 { + --transform-translate-y: -8rem; +} + +.-translate-y-40 { + --transform-translate-y: -10rem; +} + +.-translate-y-48 { + --transform-translate-y: -12rem; +} + +.-translate-y-56 { + --transform-translate-y: -14rem; +} + +.-translate-y-64 { + --transform-translate-y: -16rem; +} + +.-translate-y-px { + --transform-translate-y: -1px; +} + +.-translate-y-full { + --transform-translate-y: -100%; +} + +.-translate-y-1\/2 { + --transform-translate-y: -50%; +} + +.translate-y-1\/2 { + --transform-translate-y: 50%; +} + +.translate-y-full { + --transform-translate-y: 100%; +} + +.hover\:translate-x-0:hover { + --transform-translate-x: 0; +} + +.hover\:translate-x-1:hover { + --transform-translate-x: 0.25rem; +} + +.hover\:translate-x-2:hover { + --transform-translate-x: 0.5rem; +} + +.hover\:translate-x-3:hover { + --transform-translate-x: 0.75rem; +} + +.hover\:translate-x-4:hover { + --transform-translate-x: 1rem; +} + +.hover\:translate-x-5:hover { + --transform-translate-x: 1.25rem; +} + +.hover\:translate-x-6:hover { + --transform-translate-x: 1.5rem; +} + +.hover\:translate-x-8:hover { + --transform-translate-x: 2rem; +} + +.hover\:translate-x-10:hover { + --transform-translate-x: 2.5rem; +} + +.hover\:translate-x-12:hover { + --transform-translate-x: 3rem; +} + +.hover\:translate-x-16:hover { + --transform-translate-x: 4rem; +} + +.hover\:translate-x-20:hover { + --transform-translate-x: 5rem; +} + +.hover\:translate-x-24:hover { + --transform-translate-x: 6rem; +} + +.hover\:translate-x-32:hover { + --transform-translate-x: 8rem; +} + +.hover\:translate-x-40:hover { + --transform-translate-x: 10rem; +} + +.hover\:translate-x-48:hover { + --transform-translate-x: 12rem; +} + +.hover\:translate-x-56:hover { + --transform-translate-x: 14rem; +} + +.hover\:translate-x-64:hover { + --transform-translate-x: 16rem; +} + +.hover\:translate-x-px:hover { + --transform-translate-x: 1px; +} + +.hover\:-translate-x-1:hover { + --transform-translate-x: -0.25rem; +} + +.hover\:-translate-x-2:hover { + --transform-translate-x: -0.5rem; +} + +.hover\:-translate-x-3:hover { + --transform-translate-x: -0.75rem; +} + +.hover\:-translate-x-4:hover { + --transform-translate-x: -1rem; +} + +.hover\:-translate-x-5:hover { + --transform-translate-x: -1.25rem; +} + +.hover\:-translate-x-6:hover { + --transform-translate-x: -1.5rem; +} + +.hover\:-translate-x-8:hover { + --transform-translate-x: -2rem; +} + +.hover\:-translate-x-10:hover { + --transform-translate-x: -2.5rem; +} + +.hover\:-translate-x-12:hover { + --transform-translate-x: -3rem; +} + +.hover\:-translate-x-16:hover { + --transform-translate-x: -4rem; +} + +.hover\:-translate-x-20:hover { + --transform-translate-x: -5rem; +} + +.hover\:-translate-x-24:hover { + --transform-translate-x: -6rem; +} + +.hover\:-translate-x-32:hover { + --transform-translate-x: -8rem; +} + +.hover\:-translate-x-40:hover { + --transform-translate-x: -10rem; +} + +.hover\:-translate-x-48:hover { + --transform-translate-x: -12rem; +} + +.hover\:-translate-x-56:hover { + --transform-translate-x: -14rem; +} + +.hover\:-translate-x-64:hover { + --transform-translate-x: -16rem; +} + +.hover\:-translate-x-px:hover { + --transform-translate-x: -1px; +} + +.hover\:-translate-x-full:hover { + --transform-translate-x: -100%; +} + +.hover\:-translate-x-1\/2:hover { + --transform-translate-x: -50%; +} + +.hover\:translate-x-1\/2:hover { + --transform-translate-x: 50%; +} + +.hover\:translate-x-full:hover { + --transform-translate-x: 100%; +} + +.hover\:translate-y-0:hover { + --transform-translate-y: 0; +} + +.hover\:translate-y-1:hover { + --transform-translate-y: 0.25rem; +} + +.hover\:translate-y-2:hover { + --transform-translate-y: 0.5rem; +} + +.hover\:translate-y-3:hover { + --transform-translate-y: 0.75rem; +} + +.hover\:translate-y-4:hover { + --transform-translate-y: 1rem; +} + +.hover\:translate-y-5:hover { + --transform-translate-y: 1.25rem; +} + +.hover\:translate-y-6:hover { + --transform-translate-y: 1.5rem; +} + +.hover\:translate-y-8:hover { + --transform-translate-y: 2rem; +} + +.hover\:translate-y-10:hover { + --transform-translate-y: 2.5rem; +} + +.hover\:translate-y-12:hover { + --transform-translate-y: 3rem; +} + +.hover\:translate-y-16:hover { + --transform-translate-y: 4rem; +} + +.hover\:translate-y-20:hover { + --transform-translate-y: 5rem; +} + +.hover\:translate-y-24:hover { + --transform-translate-y: 6rem; +} + +.hover\:translate-y-32:hover { + --transform-translate-y: 8rem; +} + +.hover\:translate-y-40:hover { + --transform-translate-y: 10rem; +} + +.hover\:translate-y-48:hover { + --transform-translate-y: 12rem; +} + +.hover\:translate-y-56:hover { + --transform-translate-y: 14rem; +} + +.hover\:translate-y-64:hover { + --transform-translate-y: 16rem; +} + +.hover\:translate-y-px:hover { + --transform-translate-y: 1px; +} + +.hover\:-translate-y-1:hover { + --transform-translate-y: -0.25rem; +} + +.hover\:-translate-y-2:hover { + --transform-translate-y: -0.5rem; +} + +.hover\:-translate-y-3:hover { + --transform-translate-y: -0.75rem; +} + +.hover\:-translate-y-4:hover { + --transform-translate-y: -1rem; +} + +.hover\:-translate-y-5:hover { + --transform-translate-y: -1.25rem; +} + +.hover\:-translate-y-6:hover { + --transform-translate-y: -1.5rem; +} + +.hover\:-translate-y-8:hover { + --transform-translate-y: -2rem; +} + +.hover\:-translate-y-10:hover { + --transform-translate-y: -2.5rem; +} + +.hover\:-translate-y-12:hover { + --transform-translate-y: -3rem; +} + +.hover\:-translate-y-16:hover { + --transform-translate-y: -4rem; +} + +.hover\:-translate-y-20:hover { + --transform-translate-y: -5rem; +} + +.hover\:-translate-y-24:hover { + --transform-translate-y: -6rem; +} + +.hover\:-translate-y-32:hover { + --transform-translate-y: -8rem; +} + +.hover\:-translate-y-40:hover { + --transform-translate-y: -10rem; +} + +.hover\:-translate-y-48:hover { + --transform-translate-y: -12rem; +} + +.hover\:-translate-y-56:hover { + --transform-translate-y: -14rem; +} + +.hover\:-translate-y-64:hover { + --transform-translate-y: -16rem; +} + +.hover\:-translate-y-px:hover { + --transform-translate-y: -1px; +} + +.hover\:-translate-y-full:hover { + --transform-translate-y: -100%; +} + +.hover\:-translate-y-1\/2:hover { + --transform-translate-y: -50%; +} + +.hover\:translate-y-1\/2:hover { + --transform-translate-y: 50%; +} + +.hover\:translate-y-full:hover { + --transform-translate-y: 100%; +} + +.focus\:translate-x-0:focus { + --transform-translate-x: 0; +} + +.focus\:translate-x-1:focus { + --transform-translate-x: 0.25rem; +} + +.focus\:translate-x-2:focus { + --transform-translate-x: 0.5rem; +} + +.focus\:translate-x-3:focus { + --transform-translate-x: 0.75rem; +} + +.focus\:translate-x-4:focus { + --transform-translate-x: 1rem; +} + +.focus\:translate-x-5:focus { + --transform-translate-x: 1.25rem; +} + +.focus\:translate-x-6:focus { + --transform-translate-x: 1.5rem; +} + +.focus\:translate-x-8:focus { + --transform-translate-x: 2rem; +} + +.focus\:translate-x-10:focus { + --transform-translate-x: 2.5rem; +} + +.focus\:translate-x-12:focus { + --transform-translate-x: 3rem; +} + +.focus\:translate-x-16:focus { + --transform-translate-x: 4rem; +} + +.focus\:translate-x-20:focus { + --transform-translate-x: 5rem; +} + +.focus\:translate-x-24:focus { + --transform-translate-x: 6rem; +} + +.focus\:translate-x-32:focus { + --transform-translate-x: 8rem; +} + +.focus\:translate-x-40:focus { + --transform-translate-x: 10rem; +} + +.focus\:translate-x-48:focus { + --transform-translate-x: 12rem; +} + +.focus\:translate-x-56:focus { + --transform-translate-x: 14rem; +} + +.focus\:translate-x-64:focus { + --transform-translate-x: 16rem; +} + +.focus\:translate-x-px:focus { + --transform-translate-x: 1px; +} + +.focus\:-translate-x-1:focus { + --transform-translate-x: -0.25rem; +} + +.focus\:-translate-x-2:focus { + --transform-translate-x: -0.5rem; +} + +.focus\:-translate-x-3:focus { + --transform-translate-x: -0.75rem; +} + +.focus\:-translate-x-4:focus { + --transform-translate-x: -1rem; +} + +.focus\:-translate-x-5:focus { + --transform-translate-x: -1.25rem; +} + +.focus\:-translate-x-6:focus { + --transform-translate-x: -1.5rem; +} + +.focus\:-translate-x-8:focus { + --transform-translate-x: -2rem; +} + +.focus\:-translate-x-10:focus { + --transform-translate-x: -2.5rem; +} + +.focus\:-translate-x-12:focus { + --transform-translate-x: -3rem; +} + +.focus\:-translate-x-16:focus { + --transform-translate-x: -4rem; +} + +.focus\:-translate-x-20:focus { + --transform-translate-x: -5rem; +} + +.focus\:-translate-x-24:focus { + --transform-translate-x: -6rem; +} + +.focus\:-translate-x-32:focus { + --transform-translate-x: -8rem; +} + +.focus\:-translate-x-40:focus { + --transform-translate-x: -10rem; +} + +.focus\:-translate-x-48:focus { + --transform-translate-x: -12rem; +} + +.focus\:-translate-x-56:focus { + --transform-translate-x: -14rem; +} + +.focus\:-translate-x-64:focus { + --transform-translate-x: -16rem; +} + +.focus\:-translate-x-px:focus { + --transform-translate-x: -1px; +} + +.focus\:-translate-x-full:focus { + --transform-translate-x: -100%; +} + +.focus\:-translate-x-1\/2:focus { + --transform-translate-x: -50%; +} + +.focus\:translate-x-1\/2:focus { + --transform-translate-x: 50%; +} + +.focus\:translate-x-full:focus { + --transform-translate-x: 100%; +} + +.focus\:translate-y-0:focus { + --transform-translate-y: 0; +} + +.focus\:translate-y-1:focus { + --transform-translate-y: 0.25rem; +} + +.focus\:translate-y-2:focus { + --transform-translate-y: 0.5rem; +} + +.focus\:translate-y-3:focus { + --transform-translate-y: 0.75rem; +} + +.focus\:translate-y-4:focus { + --transform-translate-y: 1rem; +} + +.focus\:translate-y-5:focus { + --transform-translate-y: 1.25rem; +} + +.focus\:translate-y-6:focus { + --transform-translate-y: 1.5rem; +} + +.focus\:translate-y-8:focus { + --transform-translate-y: 2rem; +} + +.focus\:translate-y-10:focus { + --transform-translate-y: 2.5rem; +} + +.focus\:translate-y-12:focus { + --transform-translate-y: 3rem; +} + +.focus\:translate-y-16:focus { + --transform-translate-y: 4rem; +} + +.focus\:translate-y-20:focus { + --transform-translate-y: 5rem; +} + +.focus\:translate-y-24:focus { + --transform-translate-y: 6rem; +} + +.focus\:translate-y-32:focus { + --transform-translate-y: 8rem; +} + +.focus\:translate-y-40:focus { + --transform-translate-y: 10rem; +} + +.focus\:translate-y-48:focus { + --transform-translate-y: 12rem; +} + +.focus\:translate-y-56:focus { + --transform-translate-y: 14rem; +} + +.focus\:translate-y-64:focus { + --transform-translate-y: 16rem; +} + +.focus\:translate-y-px:focus { + --transform-translate-y: 1px; +} + +.focus\:-translate-y-1:focus { + --transform-translate-y: -0.25rem; +} + +.focus\:-translate-y-2:focus { + --transform-translate-y: -0.5rem; +} + +.focus\:-translate-y-3:focus { + --transform-translate-y: -0.75rem; +} + +.focus\:-translate-y-4:focus { + --transform-translate-y: -1rem; +} + +.focus\:-translate-y-5:focus { + --transform-translate-y: -1.25rem; +} + +.focus\:-translate-y-6:focus { + --transform-translate-y: -1.5rem; +} + +.focus\:-translate-y-8:focus { + --transform-translate-y: -2rem; +} + +.focus\:-translate-y-10:focus { + --transform-translate-y: -2.5rem; +} + +.focus\:-translate-y-12:focus { + --transform-translate-y: -3rem; +} + +.focus\:-translate-y-16:focus { + --transform-translate-y: -4rem; +} + +.focus\:-translate-y-20:focus { + --transform-translate-y: -5rem; +} + +.focus\:-translate-y-24:focus { + --transform-translate-y: -6rem; +} + +.focus\:-translate-y-32:focus { + --transform-translate-y: -8rem; +} + +.focus\:-translate-y-40:focus { + --transform-translate-y: -10rem; +} + +.focus\:-translate-y-48:focus { + --transform-translate-y: -12rem; +} + +.focus\:-translate-y-56:focus { + --transform-translate-y: -14rem; +} + +.focus\:-translate-y-64:focus { + --transform-translate-y: -16rem; +} + +.focus\:-translate-y-px:focus { + --transform-translate-y: -1px; +} + +.focus\:-translate-y-full:focus { + --transform-translate-y: -100%; +} + +.focus\:-translate-y-1\/2:focus { + --transform-translate-y: -50%; +} + +.focus\:translate-y-1\/2:focus { + --transform-translate-y: 50%; +} + +.focus\:translate-y-full:focus { + --transform-translate-y: 100%; +} + +.skew-x-0 { + --transform-skew-x: 0; +} + +.skew-x-3 { + --transform-skew-x: 3deg; +} + +.skew-x-6 { + --transform-skew-x: 6deg; +} + +.skew-x-12 { + --transform-skew-x: 12deg; +} + +.-skew-x-12 { + --transform-skew-x: -12deg; +} + +.-skew-x-6 { + --transform-skew-x: -6deg; +} + +.-skew-x-3 { + --transform-skew-x: -3deg; +} + +.skew-y-0 { + --transform-skew-y: 0; +} + +.skew-y-3 { + --transform-skew-y: 3deg; +} + +.skew-y-6 { + --transform-skew-y: 6deg; +} + +.skew-y-12 { + --transform-skew-y: 12deg; +} + +.-skew-y-12 { + --transform-skew-y: -12deg; +} + +.-skew-y-6 { + --transform-skew-y: -6deg; +} + +.-skew-y-3 { + --transform-skew-y: -3deg; +} + +.hover\:skew-x-0:hover { + --transform-skew-x: 0; +} + +.hover\:skew-x-3:hover { + --transform-skew-x: 3deg; +} + +.hover\:skew-x-6:hover { + --transform-skew-x: 6deg; +} + +.hover\:skew-x-12:hover { + --transform-skew-x: 12deg; +} + +.hover\:-skew-x-12:hover { + --transform-skew-x: -12deg; +} + +.hover\:-skew-x-6:hover { + --transform-skew-x: -6deg; +} + +.hover\:-skew-x-3:hover { + --transform-skew-x: -3deg; +} + +.hover\:skew-y-0:hover { + --transform-skew-y: 0; +} + +.hover\:skew-y-3:hover { + --transform-skew-y: 3deg; +} + +.hover\:skew-y-6:hover { + --transform-skew-y: 6deg; +} + +.hover\:skew-y-12:hover { + --transform-skew-y: 12deg; +} + +.hover\:-skew-y-12:hover { + --transform-skew-y: -12deg; +} + +.hover\:-skew-y-6:hover { + --transform-skew-y: -6deg; +} + +.hover\:-skew-y-3:hover { + --transform-skew-y: -3deg; +} + +.focus\:skew-x-0:focus { + --transform-skew-x: 0; +} + +.focus\:skew-x-3:focus { + --transform-skew-x: 3deg; +} + +.focus\:skew-x-6:focus { + --transform-skew-x: 6deg; +} + +.focus\:skew-x-12:focus { + --transform-skew-x: 12deg; +} + +.focus\:-skew-x-12:focus { + --transform-skew-x: -12deg; +} + +.focus\:-skew-x-6:focus { + --transform-skew-x: -6deg; +} + +.focus\:-skew-x-3:focus { + --transform-skew-x: -3deg; +} + +.focus\:skew-y-0:focus { + --transform-skew-y: 0; +} + +.focus\:skew-y-3:focus { + --transform-skew-y: 3deg; +} + +.focus\:skew-y-6:focus { + --transform-skew-y: 6deg; +} + +.focus\:skew-y-12:focus { + --transform-skew-y: 12deg; +} + +.focus\:-skew-y-12:focus { + --transform-skew-y: -12deg; +} + +.focus\:-skew-y-6:focus { + --transform-skew-y: -6deg; +} + +.focus\:-skew-y-3:focus { + --transform-skew-y: -3deg; +} + +.transition-none { + transition-property: none; +} + +.transition-all { + transition-property: all; +} + +.transition { + transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; +} + +.transition-colors { + transition-property: background-color, border-color, color, fill, stroke; +} + +.transition-opacity { + transition-property: opacity; +} + +.transition-shadow { + transition-property: box-shadow; +} + +.transition-transform { + transition-property: transform; +} + +.ease-linear { + transition-timing-function: linear; +} + +.ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); +} + +.ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +} + +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.duration-75 { + transition-duration: 75ms; +} + +.duration-100 { + transition-duration: 100ms; +} + +.duration-150 { + transition-duration: 150ms; +} + +.duration-200 { + transition-duration: 200ms; +} + +.duration-300 { + transition-duration: 300ms; +} + +.duration-500 { + transition-duration: 500ms; +} + +.duration-700 { + transition-duration: 700ms; +} + +.duration-1000 { + transition-duration: 1000ms; +} + +.delay-75 { + transition-delay: 75ms; +} + +.delay-100 { + transition-delay: 100ms; +} + +.delay-150 { + transition-delay: 150ms; +} + +.delay-200 { + transition-delay: 200ms; +} + +.delay-300 { + transition-delay: 300ms; +} + +.delay-500 { + transition-delay: 500ms; +} + +.delay-700 { + transition-delay: 700ms; +} + +.delay-1000 { + transition-delay: 1000ms; +} + +.example { + font-weight: 700; + color: #f56565; +} + +@media (min-width: 640px) { + .sm\:space-y-0 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0px * var(--space-y-reverse)); + } + + .sm\:space-x-0 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0px * var(--space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.25rem * var(--space-y-reverse)); + } + + .sm\:space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.25rem * var(--space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.5rem * var(--space-y-reverse)); + } + + .sm\:space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.5rem * var(--space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.75rem * var(--space-y-reverse)); + } + + .sm\:space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.75rem * var(--space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1rem * var(--space-y-reverse)); + } + + .sm\:space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1rem * var(--space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.25rem * var(--space-y-reverse)); + } + + .sm\:space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.25rem * var(--space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.5rem * var(--space-y-reverse)); + } + + .sm\:space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.5rem * var(--space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2rem * var(--space-y-reverse)); + } + + .sm\:space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2rem * var(--space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2.5rem * var(--space-y-reverse)); + } + + .sm\:space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2.5rem * var(--space-x-reverse)); + margin-left: calc(2.5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(3rem * var(--space-y-reverse)); + } + + .sm\:space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(3rem * var(--space-x-reverse)); + margin-left: calc(3rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(4rem * var(--space-y-reverse)); + } + + .sm\:space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(4rem * var(--space-x-reverse)); + margin-left: calc(4rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(5rem * var(--space-y-reverse)); + } + + .sm\:space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(5rem * var(--space-x-reverse)); + margin-left: calc(5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(6rem * var(--space-y-reverse)); + } + + .sm\:space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(6rem * var(--space-x-reverse)); + margin-left: calc(6rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(8rem * var(--space-y-reverse)); + } + + .sm\:space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(8rem * var(--space-x-reverse)); + margin-left: calc(8rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(10rem * var(--space-y-reverse)); + } + + .sm\:space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(10rem * var(--space-x-reverse)); + margin-left: calc(10rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(12rem * var(--space-y-reverse)); + } + + .sm\:space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(12rem * var(--space-x-reverse)); + margin-left: calc(12rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(14rem * var(--space-y-reverse)); + } + + .sm\:space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(14rem * var(--space-x-reverse)); + margin-left: calc(14rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(16rem * var(--space-y-reverse)); + } + + .sm\:space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(16rem * var(--space-x-reverse)); + margin-left: calc(16rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1px * var(--space-y-reverse)); + } + + .sm\:space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1px * var(--space-x-reverse)); + margin-left: calc(1px * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.25rem * var(--space-y-reverse)); + } + + .sm\:-space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.25rem * var(--space-x-reverse)); + margin-left: calc(-0.25rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.5rem * var(--space-y-reverse)); + } + + .sm\:-space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.5rem * var(--space-x-reverse)); + margin-left: calc(-0.5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.75rem * var(--space-y-reverse)); + } + + .sm\:-space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1rem * var(--space-y-reverse)); + } + + .sm\:-space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1rem * var(--space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.25rem * var(--space-y-reverse)); + } + + .sm\:-space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.25rem * var(--space-x-reverse)); + margin-left: calc(-1.25rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.5rem * var(--space-y-reverse)); + } + + .sm\:-space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.5rem * var(--space-x-reverse)); + margin-left: calc(-1.5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2rem * var(--space-y-reverse)); + } + + .sm\:-space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2rem * var(--space-x-reverse)); + margin-left: calc(-2rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2.5rem * var(--space-y-reverse)); + } + + .sm\:-space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2.5rem * var(--space-x-reverse)); + margin-left: calc(-2.5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-3rem * var(--space-y-reverse)); + } + + .sm\:-space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-3rem * var(--space-x-reverse)); + margin-left: calc(-3rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-4rem * var(--space-y-reverse)); + } + + .sm\:-space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-4rem * var(--space-x-reverse)); + margin-left: calc(-4rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-5rem * var(--space-y-reverse)); + } + + .sm\:-space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-5rem * var(--space-x-reverse)); + margin-left: calc(-5rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-6rem * var(--space-y-reverse)); + } + + .sm\:-space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-6rem * var(--space-x-reverse)); + margin-left: calc(-6rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-8rem * var(--space-y-reverse)); + } + + .sm\:-space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-8rem * var(--space-x-reverse)); + margin-left: calc(-8rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-10rem * var(--space-y-reverse)); + } + + .sm\:-space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-10rem * var(--space-x-reverse)); + margin-left: calc(-10rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-12rem * var(--space-y-reverse)); + } + + .sm\:-space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-12rem * var(--space-x-reverse)); + margin-left: calc(-12rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-14rem * var(--space-y-reverse)); + } + + .sm\:-space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-14rem * var(--space-x-reverse)); + margin-left: calc(-14rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-16rem * var(--space-y-reverse)); + } + + .sm\:-space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-16rem * var(--space-x-reverse)); + margin-left: calc(-16rem * calc(1 - var(--space-x-reverse))); + } + + .sm\:-space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1px * var(--space-y-reverse)); + } + + .sm\:-space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1px * var(--space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--space-x-reverse))); + } + + .sm\:space-y-reverse > :not(template) ~ :not(template) { + --space-y-reverse: 1; + } + + .sm\:space-x-reverse > :not(template) ~ :not(template) { + --space-x-reverse: 1; + } + + .sm\:divide-y-0 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(0px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(0px * var(--divide-y-reverse)); + } + + .sm\:divide-x-0 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(0px * var(--divide-x-reverse)); + border-left-width: calc(0px * calc(1 - var(--divide-x-reverse))); + } + + .sm\:divide-y-2 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(2px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(2px * var(--divide-y-reverse)); + } + + .sm\:divide-x-2 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(2px * var(--divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--divide-x-reverse))); + } + + .sm\:divide-y-4 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(4px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(4px * var(--divide-y-reverse)); + } + + .sm\:divide-x-4 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(4px * var(--divide-x-reverse)); + border-left-width: calc(4px * calc(1 - var(--divide-x-reverse))); + } + + .sm\:divide-y-8 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(8px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(8px * var(--divide-y-reverse)); + } + + .sm\:divide-x-8 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(8px * var(--divide-x-reverse)); + border-left-width: calc(8px * calc(1 - var(--divide-x-reverse))); + } + + .sm\:divide-y > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(1px * var(--divide-y-reverse)); + } + + .sm\:divide-x > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(1px * var(--divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--divide-x-reverse))); + } + + .sm\:divide-y-reverse > :not(template) ~ :not(template) { + --divide-y-reverse: 1; + } + + .sm\:divide-x-reverse > :not(template) ~ :not(template) { + --divide-x-reverse: 1; + } + + .sm\:divide-transparent > :not(template) ~ :not(template) { + border-color: transparent; + } + + .sm\:divide-current > :not(template) ~ :not(template) { + border-color: currentColor; + } + + .sm\:divide-black > :not(template) ~ :not(template) { + border-color: #000; + } + + .sm\:divide-white > :not(template) ~ :not(template) { + border-color: #fff; + } + + .sm\:divide-gray-100 > :not(template) ~ :not(template) { + border-color: #f7fafc; + } + + .sm\:divide-gray-200 > :not(template) ~ :not(template) { + border-color: #edf2f7; + } + + .sm\:divide-gray-300 > :not(template) ~ :not(template) { + border-color: #e2e8f0; + } + + .sm\:divide-gray-400 > :not(template) ~ :not(template) { + border-color: #cbd5e0; + } + + .sm\:divide-gray-500 > :not(template) ~ :not(template) { + border-color: #a0aec0; + } + + .sm\:divide-gray-600 > :not(template) ~ :not(template) { + border-color: #718096; + } + + .sm\:divide-gray-700 > :not(template) ~ :not(template) { + border-color: #4a5568; + } + + .sm\:divide-gray-800 > :not(template) ~ :not(template) { + border-color: #2d3748; + } + + .sm\:divide-gray-900 > :not(template) ~ :not(template) { + border-color: #1a202c; + } + + .sm\:divide-red-100 > :not(template) ~ :not(template) { + border-color: #fff5f5; + } + + .sm\:divide-red-200 > :not(template) ~ :not(template) { + border-color: #fed7d7; + } + + .sm\:divide-red-300 > :not(template) ~ :not(template) { + border-color: #feb2b2; + } + + .sm\:divide-red-400 > :not(template) ~ :not(template) { + border-color: #fc8181; + } + + .sm\:divide-red-500 > :not(template) ~ :not(template) { + border-color: #f56565; + } + + .sm\:divide-red-600 > :not(template) ~ :not(template) { + border-color: #e53e3e; + } + + .sm\:divide-red-700 > :not(template) ~ :not(template) { + border-color: #c53030; + } + + .sm\:divide-red-800 > :not(template) ~ :not(template) { + border-color: #9b2c2c; + } + + .sm\:divide-red-900 > :not(template) ~ :not(template) { + border-color: #742a2a; + } + + .sm\:divide-orange-100 > :not(template) ~ :not(template) { + border-color: #fffaf0; + } + + .sm\:divide-orange-200 > :not(template) ~ :not(template) { + border-color: #feebc8; + } + + .sm\:divide-orange-300 > :not(template) ~ :not(template) { + border-color: #fbd38d; + } + + .sm\:divide-orange-400 > :not(template) ~ :not(template) { + border-color: #f6ad55; + } + + .sm\:divide-orange-500 > :not(template) ~ :not(template) { + border-color: #ed8936; + } + + .sm\:divide-orange-600 > :not(template) ~ :not(template) { + border-color: #dd6b20; + } + + .sm\:divide-orange-700 > :not(template) ~ :not(template) { + border-color: #c05621; + } + + .sm\:divide-orange-800 > :not(template) ~ :not(template) { + border-color: #9c4221; + } + + .sm\:divide-orange-900 > :not(template) ~ :not(template) { + border-color: #7b341e; + } + + .sm\:divide-yellow-100 > :not(template) ~ :not(template) { + border-color: #fffff0; + } + + .sm\:divide-yellow-200 > :not(template) ~ :not(template) { + border-color: #fefcbf; + } + + .sm\:divide-yellow-300 > :not(template) ~ :not(template) { + border-color: #faf089; + } + + .sm\:divide-yellow-400 > :not(template) ~ :not(template) { + border-color: #f6e05e; + } + + .sm\:divide-yellow-500 > :not(template) ~ :not(template) { + border-color: #ecc94b; + } + + .sm\:divide-yellow-600 > :not(template) ~ :not(template) { + border-color: #d69e2e; + } + + .sm\:divide-yellow-700 > :not(template) ~ :not(template) { + border-color: #b7791f; + } + + .sm\:divide-yellow-800 > :not(template) ~ :not(template) { + border-color: #975a16; + } + + .sm\:divide-yellow-900 > :not(template) ~ :not(template) { + border-color: #744210; + } + + .sm\:divide-green-100 > :not(template) ~ :not(template) { + border-color: #f0fff4; + } + + .sm\:divide-green-200 > :not(template) ~ :not(template) { + border-color: #c6f6d5; + } + + .sm\:divide-green-300 > :not(template) ~ :not(template) { + border-color: #9ae6b4; + } + + .sm\:divide-green-400 > :not(template) ~ :not(template) { + border-color: #68d391; + } + + .sm\:divide-green-500 > :not(template) ~ :not(template) { + border-color: #48bb78; + } + + .sm\:divide-green-600 > :not(template) ~ :not(template) { + border-color: #38a169; + } + + .sm\:divide-green-700 > :not(template) ~ :not(template) { + border-color: #2f855a; + } + + .sm\:divide-green-800 > :not(template) ~ :not(template) { + border-color: #276749; + } + + .sm\:divide-green-900 > :not(template) ~ :not(template) { + border-color: #22543d; + } + + .sm\:divide-teal-100 > :not(template) ~ :not(template) { + border-color: #e6fffa; + } + + .sm\:divide-teal-200 > :not(template) ~ :not(template) { + border-color: #b2f5ea; + } + + .sm\:divide-teal-300 > :not(template) ~ :not(template) { + border-color: #81e6d9; + } + + .sm\:divide-teal-400 > :not(template) ~ :not(template) { + border-color: #4fd1c5; + } + + .sm\:divide-teal-500 > :not(template) ~ :not(template) { + border-color: #38b2ac; + } + + .sm\:divide-teal-600 > :not(template) ~ :not(template) { + border-color: #319795; + } + + .sm\:divide-teal-700 > :not(template) ~ :not(template) { + border-color: #2c7a7b; + } + + .sm\:divide-teal-800 > :not(template) ~ :not(template) { + border-color: #285e61; + } + + .sm\:divide-teal-900 > :not(template) ~ :not(template) { + border-color: #234e52; + } + + .sm\:divide-blue-100 > :not(template) ~ :not(template) { + border-color: #ebf8ff; + } + + .sm\:divide-blue-200 > :not(template) ~ :not(template) { + border-color: #bee3f8; + } + + .sm\:divide-blue-300 > :not(template) ~ :not(template) { + border-color: #90cdf4; + } + + .sm\:divide-blue-400 > :not(template) ~ :not(template) { + border-color: #63b3ed; + } + + .sm\:divide-blue-500 > :not(template) ~ :not(template) { + border-color: #4299e1; + } + + .sm\:divide-blue-600 > :not(template) ~ :not(template) { + border-color: #3182ce; + } + + .sm\:divide-blue-700 > :not(template) ~ :not(template) { + border-color: #2b6cb0; + } + + .sm\:divide-blue-800 > :not(template) ~ :not(template) { + border-color: #2c5282; + } + + .sm\:divide-blue-900 > :not(template) ~ :not(template) { + border-color: #2a4365; + } + + .sm\:divide-indigo-100 > :not(template) ~ :not(template) { + border-color: #ebf4ff; + } + + .sm\:divide-indigo-200 > :not(template) ~ :not(template) { + border-color: #c3dafe; + } + + .sm\:divide-indigo-300 > :not(template) ~ :not(template) { + border-color: #a3bffa; + } + + .sm\:divide-indigo-400 > :not(template) ~ :not(template) { + border-color: #7f9cf5; + } + + .sm\:divide-indigo-500 > :not(template) ~ :not(template) { + border-color: #667eea; + } + + .sm\:divide-indigo-600 > :not(template) ~ :not(template) { + border-color: #5a67d8; + } + + .sm\:divide-indigo-700 > :not(template) ~ :not(template) { + border-color: #4c51bf; + } + + .sm\:divide-indigo-800 > :not(template) ~ :not(template) { + border-color: #434190; + } + + .sm\:divide-indigo-900 > :not(template) ~ :not(template) { + border-color: #3c366b; + } + + .sm\:divide-purple-100 > :not(template) ~ :not(template) { + border-color: #faf5ff; + } + + .sm\:divide-purple-200 > :not(template) ~ :not(template) { + border-color: #e9d8fd; + } + + .sm\:divide-purple-300 > :not(template) ~ :not(template) { + border-color: #d6bcfa; + } + + .sm\:divide-purple-400 > :not(template) ~ :not(template) { + border-color: #b794f4; + } + + .sm\:divide-purple-500 > :not(template) ~ :not(template) { + border-color: #9f7aea; + } + + .sm\:divide-purple-600 > :not(template) ~ :not(template) { + border-color: #805ad5; + } + + .sm\:divide-purple-700 > :not(template) ~ :not(template) { + border-color: #6b46c1; + } + + .sm\:divide-purple-800 > :not(template) ~ :not(template) { + border-color: #553c9a; + } + + .sm\:divide-purple-900 > :not(template) ~ :not(template) { + border-color: #44337a; + } + + .sm\:divide-pink-100 > :not(template) ~ :not(template) { + border-color: #fff5f7; + } + + .sm\:divide-pink-200 > :not(template) ~ :not(template) { + border-color: #fed7e2; + } + + .sm\:divide-pink-300 > :not(template) ~ :not(template) { + border-color: #fbb6ce; + } + + .sm\:divide-pink-400 > :not(template) ~ :not(template) { + border-color: #f687b3; + } + + .sm\:divide-pink-500 > :not(template) ~ :not(template) { + border-color: #ed64a6; + } + + .sm\:divide-pink-600 > :not(template) ~ :not(template) { + border-color: #d53f8c; + } + + .sm\:divide-pink-700 > :not(template) ~ :not(template) { + border-color: #b83280; + } + + .sm\:divide-pink-800 > :not(template) ~ :not(template) { + border-color: #97266d; + } + + .sm\:divide-pink-900 > :not(template) ~ :not(template) { + border-color: #702459; + } + + .sm\: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; + } + + .sm\:not-sr-only { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .sm\:focus\:sr-only:focus { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + } + + .sm\:focus\:not-sr-only:focus { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .sm\:appearance-none { + appearance: none; + } + + .sm\:bg-fixed { + background-attachment: fixed; + } + + .sm\:bg-local { + background-attachment: local; + } + + .sm\:bg-scroll { + background-attachment: scroll; + } + + .sm\:bg-transparent { + background-color: transparent; + } + + .sm\:bg-current { + background-color: currentColor; + } + + .sm\:bg-black { + background-color: #000; + } + + .sm\:bg-white { + background-color: #fff; + } + + .sm\:bg-gray-100 { + background-color: #f7fafc; + } + + .sm\:bg-gray-200 { + background-color: #edf2f7; + } + + .sm\:bg-gray-300 { + background-color: #e2e8f0; + } + + .sm\:bg-gray-400 { + background-color: #cbd5e0; + } + + .sm\:bg-gray-500 { + background-color: #a0aec0; + } + + .sm\:bg-gray-600 { + background-color: #718096; + } + + .sm\:bg-gray-700 { + background-color: #4a5568; + } + + .sm\:bg-gray-800 { + background-color: #2d3748; + } + + .sm\:bg-gray-900 { + background-color: #1a202c; + } + + .sm\:bg-red-100 { + background-color: #fff5f5; + } + + .sm\:bg-red-200 { + background-color: #fed7d7; + } + + .sm\:bg-red-300 { + background-color: #feb2b2; + } + + .sm\:bg-red-400 { + background-color: #fc8181; + } + + .sm\:bg-red-500 { + background-color: #f56565; + } + + .sm\:bg-red-600 { + background-color: #e53e3e; + } + + .sm\:bg-red-700 { + background-color: #c53030; + } + + .sm\:bg-red-800 { + background-color: #9b2c2c; + } + + .sm\:bg-red-900 { + background-color: #742a2a; + } + + .sm\:bg-orange-100 { + background-color: #fffaf0; + } + + .sm\:bg-orange-200 { + background-color: #feebc8; + } + + .sm\:bg-orange-300 { + background-color: #fbd38d; + } + + .sm\:bg-orange-400 { + background-color: #f6ad55; + } + + .sm\:bg-orange-500 { + background-color: #ed8936; + } + + .sm\:bg-orange-600 { + background-color: #dd6b20; + } + + .sm\:bg-orange-700 { + background-color: #c05621; + } + + .sm\:bg-orange-800 { + background-color: #9c4221; + } + + .sm\:bg-orange-900 { + background-color: #7b341e; + } + + .sm\:bg-yellow-100 { + background-color: #fffff0; + } + + .sm\:bg-yellow-200 { + background-color: #fefcbf; + } + + .sm\:bg-yellow-300 { + background-color: #faf089; + } + + .sm\:bg-yellow-400 { + background-color: #f6e05e; + } + + .sm\:bg-yellow-500 { + background-color: #ecc94b; + } + + .sm\:bg-yellow-600 { + background-color: #d69e2e; + } + + .sm\:bg-yellow-700 { + background-color: #b7791f; + } + + .sm\:bg-yellow-800 { + background-color: #975a16; + } + + .sm\:bg-yellow-900 { + background-color: #744210; + } + + .sm\:bg-green-100 { + background-color: #f0fff4; + } + + .sm\:bg-green-200 { + background-color: #c6f6d5; + } + + .sm\:bg-green-300 { + background-color: #9ae6b4; + } + + .sm\:bg-green-400 { + background-color: #68d391; + } + + .sm\:bg-green-500 { + background-color: #48bb78; + } + + .sm\:bg-green-600 { + background-color: #38a169; + } + + .sm\:bg-green-700 { + background-color: #2f855a; + } + + .sm\:bg-green-800 { + background-color: #276749; + } + + .sm\:bg-green-900 { + background-color: #22543d; + } + + .sm\:bg-teal-100 { + background-color: #e6fffa; + } + + .sm\:bg-teal-200 { + background-color: #b2f5ea; + } + + .sm\:bg-teal-300 { + background-color: #81e6d9; + } + + .sm\:bg-teal-400 { + background-color: #4fd1c5; + } + + .sm\:bg-teal-500 { + background-color: #38b2ac; + } + + .sm\:bg-teal-600 { + background-color: #319795; + } + + .sm\:bg-teal-700 { + background-color: #2c7a7b; + } + + .sm\:bg-teal-800 { + background-color: #285e61; + } + + .sm\:bg-teal-900 { + background-color: #234e52; + } + + .sm\:bg-blue-100 { + background-color: #ebf8ff; + } + + .sm\:bg-blue-200 { + background-color: #bee3f8; + } + + .sm\:bg-blue-300 { + background-color: #90cdf4; + } + + .sm\:bg-blue-400 { + background-color: #63b3ed; + } + + .sm\:bg-blue-500 { + background-color: #4299e1; + } + + .sm\:bg-blue-600 { + background-color: #3182ce; + } + + .sm\:bg-blue-700 { + background-color: #2b6cb0; + } + + .sm\:bg-blue-800 { + background-color: #2c5282; + } + + .sm\:bg-blue-900 { + background-color: #2a4365; + } + + .sm\:bg-indigo-100 { + background-color: #ebf4ff; + } + + .sm\:bg-indigo-200 { + background-color: #c3dafe; + } + + .sm\:bg-indigo-300 { + background-color: #a3bffa; + } + + .sm\:bg-indigo-400 { + background-color: #7f9cf5; + } + + .sm\:bg-indigo-500 { + background-color: #667eea; + } + + .sm\:bg-indigo-600 { + background-color: #5a67d8; + } + + .sm\:bg-indigo-700 { + background-color: #4c51bf; + } + + .sm\:bg-indigo-800 { + background-color: #434190; + } + + .sm\:bg-indigo-900 { + background-color: #3c366b; + } + + .sm\:bg-purple-100 { + background-color: #faf5ff; + } + + .sm\:bg-purple-200 { + background-color: #e9d8fd; + } + + .sm\:bg-purple-300 { + background-color: #d6bcfa; + } + + .sm\:bg-purple-400 { + background-color: #b794f4; + } + + .sm\:bg-purple-500 { + background-color: #9f7aea; + } + + .sm\:bg-purple-600 { + background-color: #805ad5; + } + + .sm\:bg-purple-700 { + background-color: #6b46c1; + } + + .sm\:bg-purple-800 { + background-color: #553c9a; + } + + .sm\:bg-purple-900 { + background-color: #44337a; + } + + .sm\:bg-pink-100 { + background-color: #fff5f7; + } + + .sm\:bg-pink-200 { + background-color: #fed7e2; + } + + .sm\:bg-pink-300 { + background-color: #fbb6ce; + } + + .sm\:bg-pink-400 { + background-color: #f687b3; + } + + .sm\:bg-pink-500 { + background-color: #ed64a6; + } + + .sm\:bg-pink-600 { + background-color: #d53f8c; + } + + .sm\:bg-pink-700 { + background-color: #b83280; + } + + .sm\:bg-pink-800 { + background-color: #97266d; + } + + .sm\:bg-pink-900 { + background-color: #702459; + } + + .sm\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .sm\:hover\:bg-current:hover { + background-color: currentColor; + } + + .sm\:hover\:bg-black:hover { + background-color: #000; + } + + .sm\:hover\:bg-white:hover { + background-color: #fff; + } + + .sm\:hover\:bg-gray-100:hover { + background-color: #f7fafc; + } + + .sm\:hover\:bg-gray-200:hover { + background-color: #edf2f7; + } + + .sm\:hover\:bg-gray-300:hover { + background-color: #e2e8f0; + } + + .sm\:hover\:bg-gray-400:hover { + background-color: #cbd5e0; + } + + .sm\:hover\:bg-gray-500:hover { + background-color: #a0aec0; + } + + .sm\:hover\:bg-gray-600:hover { + background-color: #718096; + } + + .sm\:hover\:bg-gray-700:hover { + background-color: #4a5568; + } + + .sm\:hover\:bg-gray-800:hover { + background-color: #2d3748; + } + + .sm\:hover\:bg-gray-900:hover { + background-color: #1a202c; + } + + .sm\:hover\:bg-red-100:hover { + background-color: #fff5f5; + } + + .sm\:hover\:bg-red-200:hover { + background-color: #fed7d7; + } + + .sm\:hover\:bg-red-300:hover { + background-color: #feb2b2; + } + + .sm\:hover\:bg-red-400:hover { + background-color: #fc8181; + } + + .sm\:hover\:bg-red-500:hover { + background-color: #f56565; + } + + .sm\:hover\:bg-red-600:hover { + background-color: #e53e3e; + } + + .sm\:hover\:bg-red-700:hover { + background-color: #c53030; + } + + .sm\:hover\:bg-red-800:hover { + background-color: #9b2c2c; + } + + .sm\:hover\:bg-red-900:hover { + background-color: #742a2a; + } + + .sm\:hover\:bg-orange-100:hover { + background-color: #fffaf0; + } + + .sm\:hover\:bg-orange-200:hover { + background-color: #feebc8; + } + + .sm\:hover\:bg-orange-300:hover { + background-color: #fbd38d; + } + + .sm\:hover\:bg-orange-400:hover { + background-color: #f6ad55; + } + + .sm\:hover\:bg-orange-500:hover { + background-color: #ed8936; + } + + .sm\:hover\:bg-orange-600:hover { + background-color: #dd6b20; + } + + .sm\:hover\:bg-orange-700:hover { + background-color: #c05621; + } + + .sm\:hover\:bg-orange-800:hover { + background-color: #9c4221; + } + + .sm\:hover\:bg-orange-900:hover { + background-color: #7b341e; + } + + .sm\:hover\:bg-yellow-100:hover { + background-color: #fffff0; + } + + .sm\:hover\:bg-yellow-200:hover { + background-color: #fefcbf; + } + + .sm\:hover\:bg-yellow-300:hover { + background-color: #faf089; + } + + .sm\:hover\:bg-yellow-400:hover { + background-color: #f6e05e; + } + + .sm\:hover\:bg-yellow-500:hover { + background-color: #ecc94b; + } + + .sm\:hover\:bg-yellow-600:hover { + background-color: #d69e2e; + } + + .sm\:hover\:bg-yellow-700:hover { + background-color: #b7791f; + } + + .sm\:hover\:bg-yellow-800:hover { + background-color: #975a16; + } + + .sm\:hover\:bg-yellow-900:hover { + background-color: #744210; + } + + .sm\:hover\:bg-green-100:hover { + background-color: #f0fff4; + } + + .sm\:hover\:bg-green-200:hover { + background-color: #c6f6d5; + } + + .sm\:hover\:bg-green-300:hover { + background-color: #9ae6b4; + } + + .sm\:hover\:bg-green-400:hover { + background-color: #68d391; + } + + .sm\:hover\:bg-green-500:hover { + background-color: #48bb78; + } + + .sm\:hover\:bg-green-600:hover { + background-color: #38a169; + } + + .sm\:hover\:bg-green-700:hover { + background-color: #2f855a; + } + + .sm\:hover\:bg-green-800:hover { + background-color: #276749; + } + + .sm\:hover\:bg-green-900:hover { + background-color: #22543d; + } + + .sm\:hover\:bg-teal-100:hover { + background-color: #e6fffa; + } + + .sm\:hover\:bg-teal-200:hover { + background-color: #b2f5ea; + } + + .sm\:hover\:bg-teal-300:hover { + background-color: #81e6d9; + } + + .sm\:hover\:bg-teal-400:hover { + background-color: #4fd1c5; + } + + .sm\:hover\:bg-teal-500:hover { + background-color: #38b2ac; + } + + .sm\:hover\:bg-teal-600:hover { + background-color: #319795; + } + + .sm\:hover\:bg-teal-700:hover { + background-color: #2c7a7b; + } + + .sm\:hover\:bg-teal-800:hover { + background-color: #285e61; + } + + .sm\:hover\:bg-teal-900:hover { + background-color: #234e52; + } + + .sm\:hover\:bg-blue-100:hover { + background-color: #ebf8ff; + } + + .sm\:hover\:bg-blue-200:hover { + background-color: #bee3f8; + } + + .sm\:hover\:bg-blue-300:hover { + background-color: #90cdf4; + } + + .sm\:hover\:bg-blue-400:hover { + background-color: #63b3ed; + } + + .sm\:hover\:bg-blue-500:hover { + background-color: #4299e1; + } + + .sm\:hover\:bg-blue-600:hover { + background-color: #3182ce; + } + + .sm\:hover\:bg-blue-700:hover { + background-color: #2b6cb0; + } + + .sm\:hover\:bg-blue-800:hover { + background-color: #2c5282; + } + + .sm\:hover\:bg-blue-900:hover { + background-color: #2a4365; + } + + .sm\:hover\:bg-indigo-100:hover { + background-color: #ebf4ff; + } + + .sm\:hover\:bg-indigo-200:hover { + background-color: #c3dafe; + } + + .sm\:hover\:bg-indigo-300:hover { + background-color: #a3bffa; + } + + .sm\:hover\:bg-indigo-400:hover { + background-color: #7f9cf5; + } + + .sm\:hover\:bg-indigo-500:hover { + background-color: #667eea; + } + + .sm\:hover\:bg-indigo-600:hover { + background-color: #5a67d8; + } + + .sm\:hover\:bg-indigo-700:hover { + background-color: #4c51bf; + } + + .sm\:hover\:bg-indigo-800:hover { + background-color: #434190; + } + + .sm\:hover\:bg-indigo-900:hover { + background-color: #3c366b; + } + + .sm\:hover\:bg-purple-100:hover { + background-color: #faf5ff; + } + + .sm\:hover\:bg-purple-200:hover { + background-color: #e9d8fd; + } + + .sm\:hover\:bg-purple-300:hover { + background-color: #d6bcfa; + } + + .sm\:hover\:bg-purple-400:hover { + background-color: #b794f4; + } + + .sm\:hover\:bg-purple-500:hover { + background-color: #9f7aea; + } + + .sm\:hover\:bg-purple-600:hover { + background-color: #805ad5; + } + + .sm\:hover\:bg-purple-700:hover { + background-color: #6b46c1; + } + + .sm\:hover\:bg-purple-800:hover { + background-color: #553c9a; + } + + .sm\:hover\:bg-purple-900:hover { + background-color: #44337a; + } + + .sm\:hover\:bg-pink-100:hover { + background-color: #fff5f7; + } + + .sm\:hover\:bg-pink-200:hover { + background-color: #fed7e2; + } + + .sm\:hover\:bg-pink-300:hover { + background-color: #fbb6ce; + } + + .sm\:hover\:bg-pink-400:hover { + background-color: #f687b3; + } + + .sm\:hover\:bg-pink-500:hover { + background-color: #ed64a6; + } + + .sm\:hover\:bg-pink-600:hover { + background-color: #d53f8c; + } + + .sm\:hover\:bg-pink-700:hover { + background-color: #b83280; + } + + .sm\:hover\:bg-pink-800:hover { + background-color: #97266d; + } + + .sm\:hover\:bg-pink-900:hover { + background-color: #702459; + } + + .sm\:focus\:bg-transparent:focus { + background-color: transparent; + } + + .sm\:focus\:bg-current:focus { + background-color: currentColor; + } + + .sm\:focus\:bg-black:focus { + background-color: #000; + } + + .sm\:focus\:bg-white:focus { + background-color: #fff; + } + + .sm\:focus\:bg-gray-100:focus { + background-color: #f7fafc; + } + + .sm\:focus\:bg-gray-200:focus { + background-color: #edf2f7; + } + + .sm\:focus\:bg-gray-300:focus { + background-color: #e2e8f0; + } + + .sm\:focus\:bg-gray-400:focus { + background-color: #cbd5e0; + } + + .sm\:focus\:bg-gray-500:focus { + background-color: #a0aec0; + } + + .sm\:focus\:bg-gray-600:focus { + background-color: #718096; + } + + .sm\:focus\:bg-gray-700:focus { + background-color: #4a5568; + } + + .sm\:focus\:bg-gray-800:focus { + background-color: #2d3748; + } + + .sm\:focus\:bg-gray-900:focus { + background-color: #1a202c; + } + + .sm\:focus\:bg-red-100:focus { + background-color: #fff5f5; + } + + .sm\:focus\:bg-red-200:focus { + background-color: #fed7d7; + } + + .sm\:focus\:bg-red-300:focus { + background-color: #feb2b2; + } + + .sm\:focus\:bg-red-400:focus { + background-color: #fc8181; + } + + .sm\:focus\:bg-red-500:focus { + background-color: #f56565; + } + + .sm\:focus\:bg-red-600:focus { + background-color: #e53e3e; + } + + .sm\:focus\:bg-red-700:focus { + background-color: #c53030; + } + + .sm\:focus\:bg-red-800:focus { + background-color: #9b2c2c; + } + + .sm\:focus\:bg-red-900:focus { + background-color: #742a2a; + } + + .sm\:focus\:bg-orange-100:focus { + background-color: #fffaf0; + } + + .sm\:focus\:bg-orange-200:focus { + background-color: #feebc8; + } + + .sm\:focus\:bg-orange-300:focus { + background-color: #fbd38d; + } + + .sm\:focus\:bg-orange-400:focus { + background-color: #f6ad55; + } + + .sm\:focus\:bg-orange-500:focus { + background-color: #ed8936; + } + + .sm\:focus\:bg-orange-600:focus { + background-color: #dd6b20; + } + + .sm\:focus\:bg-orange-700:focus { + background-color: #c05621; + } + + .sm\:focus\:bg-orange-800:focus { + background-color: #9c4221; + } + + .sm\:focus\:bg-orange-900:focus { + background-color: #7b341e; + } + + .sm\:focus\:bg-yellow-100:focus { + background-color: #fffff0; + } + + .sm\:focus\:bg-yellow-200:focus { + background-color: #fefcbf; + } + + .sm\:focus\:bg-yellow-300:focus { + background-color: #faf089; + } + + .sm\:focus\:bg-yellow-400:focus { + background-color: #f6e05e; + } + + .sm\:focus\:bg-yellow-500:focus { + background-color: #ecc94b; + } + + .sm\:focus\:bg-yellow-600:focus { + background-color: #d69e2e; + } + + .sm\:focus\:bg-yellow-700:focus { + background-color: #b7791f; + } + + .sm\:focus\:bg-yellow-800:focus { + background-color: #975a16; + } + + .sm\:focus\:bg-yellow-900:focus { + background-color: #744210; + } + + .sm\:focus\:bg-green-100:focus { + background-color: #f0fff4; + } + + .sm\:focus\:bg-green-200:focus { + background-color: #c6f6d5; + } + + .sm\:focus\:bg-green-300:focus { + background-color: #9ae6b4; + } + + .sm\:focus\:bg-green-400:focus { + background-color: #68d391; + } + + .sm\:focus\:bg-green-500:focus { + background-color: #48bb78; + } + + .sm\:focus\:bg-green-600:focus { + background-color: #38a169; + } + + .sm\:focus\:bg-green-700:focus { + background-color: #2f855a; + } + + .sm\:focus\:bg-green-800:focus { + background-color: #276749; + } + + .sm\:focus\:bg-green-900:focus { + background-color: #22543d; + } + + .sm\:focus\:bg-teal-100:focus { + background-color: #e6fffa; + } + + .sm\:focus\:bg-teal-200:focus { + background-color: #b2f5ea; + } + + .sm\:focus\:bg-teal-300:focus { + background-color: #81e6d9; + } + + .sm\:focus\:bg-teal-400:focus { + background-color: #4fd1c5; + } + + .sm\:focus\:bg-teal-500:focus { + background-color: #38b2ac; + } + + .sm\:focus\:bg-teal-600:focus { + background-color: #319795; + } + + .sm\:focus\:bg-teal-700:focus { + background-color: #2c7a7b; + } + + .sm\:focus\:bg-teal-800:focus { + background-color: #285e61; + } + + .sm\:focus\:bg-teal-900:focus { + background-color: #234e52; + } + + .sm\:focus\:bg-blue-100:focus { + background-color: #ebf8ff; + } + + .sm\:focus\:bg-blue-200:focus { + background-color: #bee3f8; + } + + .sm\:focus\:bg-blue-300:focus { + background-color: #90cdf4; + } + + .sm\:focus\:bg-blue-400:focus { + background-color: #63b3ed; + } + + .sm\:focus\:bg-blue-500:focus { + background-color: #4299e1; + } + + .sm\:focus\:bg-blue-600:focus { + background-color: #3182ce; + } + + .sm\:focus\:bg-blue-700:focus { + background-color: #2b6cb0; + } + + .sm\:focus\:bg-blue-800:focus { + background-color: #2c5282; + } + + .sm\:focus\:bg-blue-900:focus { + background-color: #2a4365; + } + + .sm\:focus\:bg-indigo-100:focus { + background-color: #ebf4ff; + } + + .sm\:focus\:bg-indigo-200:focus { + background-color: #c3dafe; + } + + .sm\:focus\:bg-indigo-300:focus { + background-color: #a3bffa; + } + + .sm\:focus\:bg-indigo-400:focus { + background-color: #7f9cf5; + } + + .sm\:focus\:bg-indigo-500:focus { + background-color: #667eea; + } + + .sm\:focus\:bg-indigo-600:focus { + background-color: #5a67d8; + } + + .sm\:focus\:bg-indigo-700:focus { + background-color: #4c51bf; + } + + .sm\:focus\:bg-indigo-800:focus { + background-color: #434190; + } + + .sm\:focus\:bg-indigo-900:focus { + background-color: #3c366b; + } + + .sm\:focus\:bg-purple-100:focus { + background-color: #faf5ff; + } + + .sm\:focus\:bg-purple-200:focus { + background-color: #e9d8fd; + } + + .sm\:focus\:bg-purple-300:focus { + background-color: #d6bcfa; + } + + .sm\:focus\:bg-purple-400:focus { + background-color: #b794f4; + } + + .sm\:focus\:bg-purple-500:focus { + background-color: #9f7aea; + } + + .sm\:focus\:bg-purple-600:focus { + background-color: #805ad5; + } + + .sm\:focus\:bg-purple-700:focus { + background-color: #6b46c1; + } + + .sm\:focus\:bg-purple-800:focus { + background-color: #553c9a; + } + + .sm\:focus\:bg-purple-900:focus { + background-color: #44337a; + } + + .sm\:focus\:bg-pink-100:focus { + background-color: #fff5f7; + } + + .sm\:focus\:bg-pink-200:focus { + background-color: #fed7e2; + } + + .sm\:focus\:bg-pink-300:focus { + background-color: #fbb6ce; + } + + .sm\:focus\:bg-pink-400:focus { + background-color: #f687b3; + } + + .sm\:focus\:bg-pink-500:focus { + background-color: #ed64a6; + } + + .sm\:focus\:bg-pink-600:focus { + background-color: #d53f8c; + } + + .sm\:focus\:bg-pink-700:focus { + background-color: #b83280; + } + + .sm\:focus\:bg-pink-800:focus { + background-color: #97266d; + } + + .sm\:focus\:bg-pink-900:focus { + background-color: #702459; + } + + .sm\:bg-bottom { + background-position: bottom; + } + + .sm\:bg-center { + background-position: center; + } + + .sm\:bg-left { + background-position: left; + } + + .sm\:bg-left-bottom { + background-position: left bottom; + } + + .sm\:bg-left-top { + background-position: left top; + } + + .sm\:bg-right { + background-position: right; + } + + .sm\:bg-right-bottom { + background-position: right bottom; + } + + .sm\:bg-right-top { + background-position: right top; + } + + .sm\:bg-top { + background-position: top; + } + + .sm\:bg-repeat { + background-repeat: repeat; + } + + .sm\:bg-no-repeat { + background-repeat: no-repeat; + } + + .sm\:bg-repeat-x { + background-repeat: repeat-x; + } + + .sm\:bg-repeat-y { + background-repeat: repeat-y; + } + + .sm\:bg-repeat-round { + background-repeat: round; + } + + .sm\:bg-repeat-space { + background-repeat: space; + } + + .sm\:bg-auto { + background-size: auto; + } + + .sm\:bg-cover { + background-size: cover; + } + + .sm\:bg-contain { + background-size: contain; + } + + .sm\:border-collapse { + border-collapse: collapse; + } + + .sm\:border-separate { + border-collapse: separate; + } + + .sm\:border-transparent { + border-color: transparent; + } + + .sm\:border-current { + border-color: currentColor; + } + + .sm\:border-black { + border-color: #000; + } + + .sm\:border-white { + border-color: #fff; + } + + .sm\:border-gray-100 { + border-color: #f7fafc; + } + + .sm\:border-gray-200 { + border-color: #edf2f7; + } + + .sm\:border-gray-300 { + border-color: #e2e8f0; + } + + .sm\:border-gray-400 { + border-color: #cbd5e0; + } + + .sm\:border-gray-500 { + border-color: #a0aec0; + } + + .sm\:border-gray-600 { + border-color: #718096; + } + + .sm\:border-gray-700 { + border-color: #4a5568; + } + + .sm\:border-gray-800 { + border-color: #2d3748; + } + + .sm\:border-gray-900 { + border-color: #1a202c; + } + + .sm\:border-red-100 { + border-color: #fff5f5; + } + + .sm\:border-red-200 { + border-color: #fed7d7; + } + + .sm\:border-red-300 { + border-color: #feb2b2; + } + + .sm\:border-red-400 { + border-color: #fc8181; + } + + .sm\:border-red-500 { + border-color: #f56565; + } + + .sm\:border-red-600 { + border-color: #e53e3e; + } + + .sm\:border-red-700 { + border-color: #c53030; + } + + .sm\:border-red-800 { + border-color: #9b2c2c; + } + + .sm\:border-red-900 { + border-color: #742a2a; + } + + .sm\:border-orange-100 { + border-color: #fffaf0; + } + + .sm\:border-orange-200 { + border-color: #feebc8; + } + + .sm\:border-orange-300 { + border-color: #fbd38d; + } + + .sm\:border-orange-400 { + border-color: #f6ad55; + } + + .sm\:border-orange-500 { + border-color: #ed8936; + } + + .sm\:border-orange-600 { + border-color: #dd6b20; + } + + .sm\:border-orange-700 { + border-color: #c05621; + } + + .sm\:border-orange-800 { + border-color: #9c4221; + } + + .sm\:border-orange-900 { + border-color: #7b341e; + } + + .sm\:border-yellow-100 { + border-color: #fffff0; + } + + .sm\:border-yellow-200 { + border-color: #fefcbf; + } + + .sm\:border-yellow-300 { + border-color: #faf089; + } + + .sm\:border-yellow-400 { + border-color: #f6e05e; + } + + .sm\:border-yellow-500 { + border-color: #ecc94b; + } + + .sm\:border-yellow-600 { + border-color: #d69e2e; + } + + .sm\:border-yellow-700 { + border-color: #b7791f; + } + + .sm\:border-yellow-800 { + border-color: #975a16; + } + + .sm\:border-yellow-900 { + border-color: #744210; + } + + .sm\:border-green-100 { + border-color: #f0fff4; + } + + .sm\:border-green-200 { + border-color: #c6f6d5; + } + + .sm\:border-green-300 { + border-color: #9ae6b4; + } + + .sm\:border-green-400 { + border-color: #68d391; + } + + .sm\:border-green-500 { + border-color: #48bb78; + } + + .sm\:border-green-600 { + border-color: #38a169; + } + + .sm\:border-green-700 { + border-color: #2f855a; + } + + .sm\:border-green-800 { + border-color: #276749; + } + + .sm\:border-green-900 { + border-color: #22543d; + } + + .sm\:border-teal-100 { + border-color: #e6fffa; + } + + .sm\:border-teal-200 { + border-color: #b2f5ea; + } + + .sm\:border-teal-300 { + border-color: #81e6d9; + } + + .sm\:border-teal-400 { + border-color: #4fd1c5; + } + + .sm\:border-teal-500 { + border-color: #38b2ac; + } + + .sm\:border-teal-600 { + border-color: #319795; + } + + .sm\:border-teal-700 { + border-color: #2c7a7b; + } + + .sm\:border-teal-800 { + border-color: #285e61; + } + + .sm\:border-teal-900 { + border-color: #234e52; + } + + .sm\:border-blue-100 { + border-color: #ebf8ff; + } + + .sm\:border-blue-200 { + border-color: #bee3f8; + } + + .sm\:border-blue-300 { + border-color: #90cdf4; + } + + .sm\:border-blue-400 { + border-color: #63b3ed; + } + + .sm\:border-blue-500 { + border-color: #4299e1; + } + + .sm\:border-blue-600 { + border-color: #3182ce; + } + + .sm\:border-blue-700 { + border-color: #2b6cb0; + } + + .sm\:border-blue-800 { + border-color: #2c5282; + } + + .sm\:border-blue-900 { + border-color: #2a4365; + } + + .sm\:border-indigo-100 { + border-color: #ebf4ff; + } + + .sm\:border-indigo-200 { + border-color: #c3dafe; + } + + .sm\:border-indigo-300 { + border-color: #a3bffa; + } + + .sm\:border-indigo-400 { + border-color: #7f9cf5; + } + + .sm\:border-indigo-500 { + border-color: #667eea; + } + + .sm\:border-indigo-600 { + border-color: #5a67d8; + } + + .sm\:border-indigo-700 { + border-color: #4c51bf; + } + + .sm\:border-indigo-800 { + border-color: #434190; + } + + .sm\:border-indigo-900 { + border-color: #3c366b; + } + + .sm\:border-purple-100 { + border-color: #faf5ff; + } + + .sm\:border-purple-200 { + border-color: #e9d8fd; + } + + .sm\:border-purple-300 { + border-color: #d6bcfa; + } + + .sm\:border-purple-400 { + border-color: #b794f4; + } + + .sm\:border-purple-500 { + border-color: #9f7aea; + } + + .sm\:border-purple-600 { + border-color: #805ad5; + } + + .sm\:border-purple-700 { + border-color: #6b46c1; + } + + .sm\:border-purple-800 { + border-color: #553c9a; + } + + .sm\:border-purple-900 { + border-color: #44337a; + } + + .sm\:border-pink-100 { + border-color: #fff5f7; + } + + .sm\:border-pink-200 { + border-color: #fed7e2; + } + + .sm\:border-pink-300 { + border-color: #fbb6ce; + } + + .sm\:border-pink-400 { + border-color: #f687b3; + } + + .sm\:border-pink-500 { + border-color: #ed64a6; + } + + .sm\:border-pink-600 { + border-color: #d53f8c; + } + + .sm\:border-pink-700 { + border-color: #b83280; + } + + .sm\:border-pink-800 { + border-color: #97266d; + } + + .sm\:border-pink-900 { + border-color: #702459; + } + + .sm\:hover\:border-transparent:hover { + border-color: transparent; + } + + .sm\:hover\:border-current:hover { + border-color: currentColor; + } + + .sm\:hover\:border-black:hover { + border-color: #000; + } + + .sm\:hover\:border-white:hover { + border-color: #fff; + } + + .sm\:hover\:border-gray-100:hover { + border-color: #f7fafc; + } + + .sm\:hover\:border-gray-200:hover { + border-color: #edf2f7; + } + + .sm\:hover\:border-gray-300:hover { + border-color: #e2e8f0; + } + + .sm\:hover\:border-gray-400:hover { + border-color: #cbd5e0; + } + + .sm\:hover\:border-gray-500:hover { + border-color: #a0aec0; + } + + .sm\:hover\:border-gray-600:hover { + border-color: #718096; + } + + .sm\:hover\:border-gray-700:hover { + border-color: #4a5568; + } + + .sm\:hover\:border-gray-800:hover { + border-color: #2d3748; + } + + .sm\:hover\:border-gray-900:hover { + border-color: #1a202c; + } + + .sm\:hover\:border-red-100:hover { + border-color: #fff5f5; + } + + .sm\:hover\:border-red-200:hover { + border-color: #fed7d7; + } + + .sm\:hover\:border-red-300:hover { + border-color: #feb2b2; + } + + .sm\:hover\:border-red-400:hover { + border-color: #fc8181; + } + + .sm\:hover\:border-red-500:hover { + border-color: #f56565; + } + + .sm\:hover\:border-red-600:hover { + border-color: #e53e3e; + } + + .sm\:hover\:border-red-700:hover { + border-color: #c53030; + } + + .sm\:hover\:border-red-800:hover { + border-color: #9b2c2c; + } + + .sm\:hover\:border-red-900:hover { + border-color: #742a2a; + } + + .sm\:hover\:border-orange-100:hover { + border-color: #fffaf0; + } + + .sm\:hover\:border-orange-200:hover { + border-color: #feebc8; + } + + .sm\:hover\:border-orange-300:hover { + border-color: #fbd38d; + } + + .sm\:hover\:border-orange-400:hover { + border-color: #f6ad55; + } + + .sm\:hover\:border-orange-500:hover { + border-color: #ed8936; + } + + .sm\:hover\:border-orange-600:hover { + border-color: #dd6b20; + } + + .sm\:hover\:border-orange-700:hover { + border-color: #c05621; + } + + .sm\:hover\:border-orange-800:hover { + border-color: #9c4221; + } + + .sm\:hover\:border-orange-900:hover { + border-color: #7b341e; + } + + .sm\:hover\:border-yellow-100:hover { + border-color: #fffff0; + } + + .sm\:hover\:border-yellow-200:hover { + border-color: #fefcbf; + } + + .sm\:hover\:border-yellow-300:hover { + border-color: #faf089; + } + + .sm\:hover\:border-yellow-400:hover { + border-color: #f6e05e; + } + + .sm\:hover\:border-yellow-500:hover { + border-color: #ecc94b; + } + + .sm\:hover\:border-yellow-600:hover { + border-color: #d69e2e; + } + + .sm\:hover\:border-yellow-700:hover { + border-color: #b7791f; + } + + .sm\:hover\:border-yellow-800:hover { + border-color: #975a16; + } + + .sm\:hover\:border-yellow-900:hover { + border-color: #744210; + } + + .sm\:hover\:border-green-100:hover { + border-color: #f0fff4; + } + + .sm\:hover\:border-green-200:hover { + border-color: #c6f6d5; + } + + .sm\:hover\:border-green-300:hover { + border-color: #9ae6b4; + } + + .sm\:hover\:border-green-400:hover { + border-color: #68d391; + } + + .sm\:hover\:border-green-500:hover { + border-color: #48bb78; + } + + .sm\:hover\:border-green-600:hover { + border-color: #38a169; + } + + .sm\:hover\:border-green-700:hover { + border-color: #2f855a; + } + + .sm\:hover\:border-green-800:hover { + border-color: #276749; + } + + .sm\:hover\:border-green-900:hover { + border-color: #22543d; + } + + .sm\:hover\:border-teal-100:hover { + border-color: #e6fffa; + } + + .sm\:hover\:border-teal-200:hover { + border-color: #b2f5ea; + } + + .sm\:hover\:border-teal-300:hover { + border-color: #81e6d9; + } + + .sm\:hover\:border-teal-400:hover { + border-color: #4fd1c5; + } + + .sm\:hover\:border-teal-500:hover { + border-color: #38b2ac; + } + + .sm\:hover\:border-teal-600:hover { + border-color: #319795; + } + + .sm\:hover\:border-teal-700:hover { + border-color: #2c7a7b; + } + + .sm\:hover\:border-teal-800:hover { + border-color: #285e61; + } + + .sm\:hover\:border-teal-900:hover { + border-color: #234e52; + } + + .sm\:hover\:border-blue-100:hover { + border-color: #ebf8ff; + } + + .sm\:hover\:border-blue-200:hover { + border-color: #bee3f8; + } + + .sm\:hover\:border-blue-300:hover { + border-color: #90cdf4; + } + + .sm\:hover\:border-blue-400:hover { + border-color: #63b3ed; + } + + .sm\:hover\:border-blue-500:hover { + border-color: #4299e1; + } + + .sm\:hover\:border-blue-600:hover { + border-color: #3182ce; + } + + .sm\:hover\:border-blue-700:hover { + border-color: #2b6cb0; + } + + .sm\:hover\:border-blue-800:hover { + border-color: #2c5282; + } + + .sm\:hover\:border-blue-900:hover { + border-color: #2a4365; + } + + .sm\:hover\:border-indigo-100:hover { + border-color: #ebf4ff; + } + + .sm\:hover\:border-indigo-200:hover { + border-color: #c3dafe; + } + + .sm\:hover\:border-indigo-300:hover { + border-color: #a3bffa; + } + + .sm\:hover\:border-indigo-400:hover { + border-color: #7f9cf5; + } + + .sm\:hover\:border-indigo-500:hover { + border-color: #667eea; + } + + .sm\:hover\:border-indigo-600:hover { + border-color: #5a67d8; + } + + .sm\:hover\:border-indigo-700:hover { + border-color: #4c51bf; + } + + .sm\:hover\:border-indigo-800:hover { + border-color: #434190; + } + + .sm\:hover\:border-indigo-900:hover { + border-color: #3c366b; + } + + .sm\:hover\:border-purple-100:hover { + border-color: #faf5ff; + } + + .sm\:hover\:border-purple-200:hover { + border-color: #e9d8fd; + } + + .sm\:hover\:border-purple-300:hover { + border-color: #d6bcfa; + } + + .sm\:hover\:border-purple-400:hover { + border-color: #b794f4; + } + + .sm\:hover\:border-purple-500:hover { + border-color: #9f7aea; + } + + .sm\:hover\:border-purple-600:hover { + border-color: #805ad5; + } + + .sm\:hover\:border-purple-700:hover { + border-color: #6b46c1; + } + + .sm\:hover\:border-purple-800:hover { + border-color: #553c9a; + } + + .sm\:hover\:border-purple-900:hover { + border-color: #44337a; + } + + .sm\:hover\:border-pink-100:hover { + border-color: #fff5f7; + } + + .sm\:hover\:border-pink-200:hover { + border-color: #fed7e2; + } + + .sm\:hover\:border-pink-300:hover { + border-color: #fbb6ce; + } + + .sm\:hover\:border-pink-400:hover { + border-color: #f687b3; + } + + .sm\:hover\:border-pink-500:hover { + border-color: #ed64a6; + } + + .sm\:hover\:border-pink-600:hover { + border-color: #d53f8c; + } + + .sm\:hover\:border-pink-700:hover { + border-color: #b83280; + } + + .sm\:hover\:border-pink-800:hover { + border-color: #97266d; + } + + .sm\:hover\:border-pink-900:hover { + border-color: #702459; + } + + .sm\:focus\:border-transparent:focus { + border-color: transparent; + } + + .sm\:focus\:border-current:focus { + border-color: currentColor; + } + + .sm\:focus\:border-black:focus { + border-color: #000; + } + + .sm\:focus\:border-white:focus { + border-color: #fff; + } + + .sm\:focus\:border-gray-100:focus { + border-color: #f7fafc; + } + + .sm\:focus\:border-gray-200:focus { + border-color: #edf2f7; + } + + .sm\:focus\:border-gray-300:focus { + border-color: #e2e8f0; + } + + .sm\:focus\:border-gray-400:focus { + border-color: #cbd5e0; + } + + .sm\:focus\:border-gray-500:focus { + border-color: #a0aec0; + } + + .sm\:focus\:border-gray-600:focus { + border-color: #718096; + } + + .sm\:focus\:border-gray-700:focus { + border-color: #4a5568; + } + + .sm\:focus\:border-gray-800:focus { + border-color: #2d3748; + } + + .sm\:focus\:border-gray-900:focus { + border-color: #1a202c; + } + + .sm\:focus\:border-red-100:focus { + border-color: #fff5f5; + } + + .sm\:focus\:border-red-200:focus { + border-color: #fed7d7; + } + + .sm\:focus\:border-red-300:focus { + border-color: #feb2b2; + } + + .sm\:focus\:border-red-400:focus { + border-color: #fc8181; + } + + .sm\:focus\:border-red-500:focus { + border-color: #f56565; + } + + .sm\:focus\:border-red-600:focus { + border-color: #e53e3e; + } + + .sm\:focus\:border-red-700:focus { + border-color: #c53030; + } + + .sm\:focus\:border-red-800:focus { + border-color: #9b2c2c; + } + + .sm\:focus\:border-red-900:focus { + border-color: #742a2a; + } + + .sm\:focus\:border-orange-100:focus { + border-color: #fffaf0; + } + + .sm\:focus\:border-orange-200:focus { + border-color: #feebc8; + } + + .sm\:focus\:border-orange-300:focus { + border-color: #fbd38d; + } + + .sm\:focus\:border-orange-400:focus { + border-color: #f6ad55; + } + + .sm\:focus\:border-orange-500:focus { + border-color: #ed8936; + } + + .sm\:focus\:border-orange-600:focus { + border-color: #dd6b20; + } + + .sm\:focus\:border-orange-700:focus { + border-color: #c05621; + } + + .sm\:focus\:border-orange-800:focus { + border-color: #9c4221; + } + + .sm\:focus\:border-orange-900:focus { + border-color: #7b341e; + } + + .sm\:focus\:border-yellow-100:focus { + border-color: #fffff0; + } + + .sm\:focus\:border-yellow-200:focus { + border-color: #fefcbf; + } + + .sm\:focus\:border-yellow-300:focus { + border-color: #faf089; + } + + .sm\:focus\:border-yellow-400:focus { + border-color: #f6e05e; + } + + .sm\:focus\:border-yellow-500:focus { + border-color: #ecc94b; + } + + .sm\:focus\:border-yellow-600:focus { + border-color: #d69e2e; + } + + .sm\:focus\:border-yellow-700:focus { + border-color: #b7791f; + } + + .sm\:focus\:border-yellow-800:focus { + border-color: #975a16; + } + + .sm\:focus\:border-yellow-900:focus { + border-color: #744210; + } + + .sm\:focus\:border-green-100:focus { + border-color: #f0fff4; + } + + .sm\:focus\:border-green-200:focus { + border-color: #c6f6d5; + } + + .sm\:focus\:border-green-300:focus { + border-color: #9ae6b4; + } + + .sm\:focus\:border-green-400:focus { + border-color: #68d391; + } + + .sm\:focus\:border-green-500:focus { + border-color: #48bb78; + } + + .sm\:focus\:border-green-600:focus { + border-color: #38a169; + } + + .sm\:focus\:border-green-700:focus { + border-color: #2f855a; + } + + .sm\:focus\:border-green-800:focus { + border-color: #276749; + } + + .sm\:focus\:border-green-900:focus { + border-color: #22543d; + } + + .sm\:focus\:border-teal-100:focus { + border-color: #e6fffa; + } + + .sm\:focus\:border-teal-200:focus { + border-color: #b2f5ea; + } + + .sm\:focus\:border-teal-300:focus { + border-color: #81e6d9; + } + + .sm\:focus\:border-teal-400:focus { + border-color: #4fd1c5; + } + + .sm\:focus\:border-teal-500:focus { + border-color: #38b2ac; + } + + .sm\:focus\:border-teal-600:focus { + border-color: #319795; + } + + .sm\:focus\:border-teal-700:focus { + border-color: #2c7a7b; + } + + .sm\:focus\:border-teal-800:focus { + border-color: #285e61; + } + + .sm\:focus\:border-teal-900:focus { + border-color: #234e52; + } + + .sm\:focus\:border-blue-100:focus { + border-color: #ebf8ff; + } + + .sm\:focus\:border-blue-200:focus { + border-color: #bee3f8; + } + + .sm\:focus\:border-blue-300:focus { + border-color: #90cdf4; + } + + .sm\:focus\:border-blue-400:focus { + border-color: #63b3ed; + } + + .sm\:focus\:border-blue-500:focus { + border-color: #4299e1; + } + + .sm\:focus\:border-blue-600:focus { + border-color: #3182ce; + } + + .sm\:focus\:border-blue-700:focus { + border-color: #2b6cb0; + } + + .sm\:focus\:border-blue-800:focus { + border-color: #2c5282; + } + + .sm\:focus\:border-blue-900:focus { + border-color: #2a4365; + } + + .sm\:focus\:border-indigo-100:focus { + border-color: #ebf4ff; + } + + .sm\:focus\:border-indigo-200:focus { + border-color: #c3dafe; + } + + .sm\:focus\:border-indigo-300:focus { + border-color: #a3bffa; + } + + .sm\:focus\:border-indigo-400:focus { + border-color: #7f9cf5; + } + + .sm\:focus\:border-indigo-500:focus { + border-color: #667eea; + } + + .sm\:focus\:border-indigo-600:focus { + border-color: #5a67d8; + } + + .sm\:focus\:border-indigo-700:focus { + border-color: #4c51bf; + } + + .sm\:focus\:border-indigo-800:focus { + border-color: #434190; + } + + .sm\:focus\:border-indigo-900:focus { + border-color: #3c366b; + } + + .sm\:focus\:border-purple-100:focus { + border-color: #faf5ff; + } + + .sm\:focus\:border-purple-200:focus { + border-color: #e9d8fd; + } + + .sm\:focus\:border-purple-300:focus { + border-color: #d6bcfa; + } + + .sm\:focus\:border-purple-400:focus { + border-color: #b794f4; + } + + .sm\:focus\:border-purple-500:focus { + border-color: #9f7aea; + } + + .sm\:focus\:border-purple-600:focus { + border-color: #805ad5; + } + + .sm\:focus\:border-purple-700:focus { + border-color: #6b46c1; + } + + .sm\:focus\:border-purple-800:focus { + border-color: #553c9a; + } + + .sm\:focus\:border-purple-900:focus { + border-color: #44337a; + } + + .sm\:focus\:border-pink-100:focus { + border-color: #fff5f7; + } + + .sm\:focus\:border-pink-200:focus { + border-color: #fed7e2; + } + + .sm\:focus\:border-pink-300:focus { + border-color: #fbb6ce; + } + + .sm\:focus\:border-pink-400:focus { + border-color: #f687b3; + } + + .sm\:focus\:border-pink-500:focus { + border-color: #ed64a6; + } + + .sm\:focus\:border-pink-600:focus { + border-color: #d53f8c; + } + + .sm\:focus\:border-pink-700:focus { + border-color: #b83280; + } + + .sm\:focus\:border-pink-800:focus { + border-color: #97266d; + } + + .sm\:focus\:border-pink-900:focus { + border-color: #702459; + } + + .sm\:rounded-none { + border-radius: 0; + } + + .sm\:rounded-sm { + border-radius: 0.125rem; + } + + .sm\:rounded { + border-radius: 0.25rem; + } + + .sm\:rounded-md { + border-radius: 0.375rem; + } + + .sm\:rounded-lg { + border-radius: 0.5rem; + } + + .sm\:rounded-full { + border-radius: 9999px; + } + + .sm\:rounded-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .sm\:rounded-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .sm\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .sm\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .sm\:rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; + } + + .sm\:rounded-r-sm { + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; + } + + .sm\:rounded-b-sm { + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .sm\:rounded-l-sm { + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .sm\:rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + } + + .sm\:rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + } + + .sm\:rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .sm\:rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .sm\:rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; + } + + .sm\:rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; + } + + .sm\:rounded-b-md { + border-bottom-right-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .sm\:rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .sm\:rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + .sm\:rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + } + + .sm\:rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .sm\:rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .sm\:rounded-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .sm\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .sm\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .sm\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .sm\:rounded-tl-none { + border-top-left-radius: 0; + } + + .sm\:rounded-tr-none { + border-top-right-radius: 0; + } + + .sm\:rounded-br-none { + border-bottom-right-radius: 0; + } + + .sm\:rounded-bl-none { + border-bottom-left-radius: 0; + } + + .sm\:rounded-tl-sm { + border-top-left-radius: 0.125rem; + } + + .sm\:rounded-tr-sm { + border-top-right-radius: 0.125rem; + } + + .sm\:rounded-br-sm { + border-bottom-right-radius: 0.125rem; + } + + .sm\:rounded-bl-sm { + border-bottom-left-radius: 0.125rem; + } + + .sm\:rounded-tl { + border-top-left-radius: 0.25rem; + } + + .sm\:rounded-tr { + border-top-right-radius: 0.25rem; + } + + .sm\:rounded-br { + border-bottom-right-radius: 0.25rem; + } + + .sm\:rounded-bl { + border-bottom-left-radius: 0.25rem; + } + + .sm\:rounded-tl-md { + border-top-left-radius: 0.375rem; + } + + .sm\:rounded-tr-md { + border-top-right-radius: 0.375rem; + } + + .sm\:rounded-br-md { + border-bottom-right-radius: 0.375rem; + } + + .sm\:rounded-bl-md { + border-bottom-left-radius: 0.375rem; + } + + .sm\:rounded-tl-lg { + border-top-left-radius: 0.5rem; + } + + .sm\:rounded-tr-lg { + border-top-right-radius: 0.5rem; + } + + .sm\:rounded-br-lg { + border-bottom-right-radius: 0.5rem; + } + + .sm\:rounded-bl-lg { + border-bottom-left-radius: 0.5rem; + } + + .sm\:rounded-tl-full { + border-top-left-radius: 9999px; + } + + .sm\:rounded-tr-full { + border-top-right-radius: 9999px; + } + + .sm\:rounded-br-full { + border-bottom-right-radius: 9999px; + } + + .sm\:rounded-bl-full { + border-bottom-left-radius: 9999px; + } + + .sm\:border-solid { + border-style: solid; + } + + .sm\:border-dashed { + border-style: dashed; + } + + .sm\:border-dotted { + border-style: dotted; + } + + .sm\:border-double { + border-style: double; + } + + .sm\:border-none { + border-style: none; + } + + .sm\:border-0 { + border-width: 0; + } + + .sm\:border-2 { + border-width: 2px; + } + + .sm\:border-4 { + border-width: 4px; + } + + .sm\:border-8 { + border-width: 8px; + } + + .sm\:border { + border-width: 1px; + } + + .sm\:border-t-0 { + border-top-width: 0; + } + + .sm\:border-r-0 { + border-right-width: 0; + } + + .sm\:border-b-0 { + border-bottom-width: 0; + } + + .sm\:border-l-0 { + border-left-width: 0; + } + + .sm\:border-t-2 { + border-top-width: 2px; + } + + .sm\:border-r-2 { + border-right-width: 2px; + } + + .sm\:border-b-2 { + border-bottom-width: 2px; + } + + .sm\:border-l-2 { + border-left-width: 2px; + } + + .sm\:border-t-4 { + border-top-width: 4px; + } + + .sm\:border-r-4 { + border-right-width: 4px; + } + + .sm\:border-b-4 { + border-bottom-width: 4px; + } + + .sm\:border-l-4 { + border-left-width: 4px; + } + + .sm\:border-t-8 { + border-top-width: 8px; + } + + .sm\:border-r-8 { + border-right-width: 8px; + } + + .sm\:border-b-8 { + border-bottom-width: 8px; + } + + .sm\:border-l-8 { + border-left-width: 8px; + } + + .sm\:border-t { + border-top-width: 1px; + } + + .sm\:border-r { + border-right-width: 1px; + } + + .sm\:border-b { + border-bottom-width: 1px; + } + + .sm\:border-l { + border-left-width: 1px; + } + + .sm\:box-border { + box-sizing: border-box; + } + + .sm\:box-content { + box-sizing: content-box; + } + + .sm\:cursor-auto { + cursor: auto; + } + + .sm\:cursor-default { + cursor: default; + } + + .sm\:cursor-pointer { + cursor: pointer; + } + + .sm\:cursor-wait { + cursor: wait; + } + + .sm\:cursor-text { + cursor: text; + } + + .sm\:cursor-move { + cursor: move; + } + + .sm\:cursor-not-allowed { + cursor: not-allowed; + } + + .sm\:block { + display: block; + } + + .sm\:inline-block { + display: inline-block; + } + + .sm\:inline { + display: inline; + } + + .sm\:flex { + display: flex; + } + + .sm\:inline-flex { + display: inline-flex; + } + + .sm\:table { + display: table; + } + + .sm\:table-caption { + display: table-caption; + } + + .sm\:table-cell { + display: table-cell; + } + + .sm\:table-column { + display: table-column; + } + + .sm\:table-column-group { + display: table-column-group; + } + + .sm\:table-footer-group { + display: table-footer-group; + } + + .sm\:table-header-group { + display: table-header-group; + } + + .sm\:table-row-group { + display: table-row-group; + } + + .sm\:table-row { + display: table-row; + } + + .sm\:flow-root { + display: flow-root; + } + + .sm\:grid { + display: grid; + } + + .sm\:inline-grid { + display: inline-grid; + } + + .sm\:hidden { + display: none; + } + + .sm\:flex-row { + flex-direction: row; + } + + .sm\:flex-row-reverse { + flex-direction: row-reverse; + } + + .sm\:flex-col { + flex-direction: column; + } + + .sm\:flex-col-reverse { + flex-direction: column-reverse; + } + + .sm\:flex-wrap { + flex-wrap: wrap; + } + + .sm\:flex-wrap-reverse { + flex-wrap: wrap-reverse; + } + + .sm\:flex-no-wrap { + flex-wrap: nowrap; + } + + .sm\:items-start { + align-items: flex-start; + } + + .sm\:items-end { + align-items: flex-end; + } + + .sm\:items-center { + align-items: center; + } + + .sm\:items-baseline { + align-items: baseline; + } + + .sm\:items-stretch { + align-items: stretch; + } + + .sm\:self-auto { + align-self: auto; + } + + .sm\:self-start { + align-self: flex-start; + } + + .sm\:self-end { + align-self: flex-end; + } + + .sm\:self-center { + align-self: center; + } + + .sm\:self-stretch { + align-self: stretch; + } + + .sm\:justify-start { + justify-content: flex-start; + } + + .sm\:justify-end { + justify-content: flex-end; + } + + .sm\:justify-center { + justify-content: center; + } + + .sm\:justify-between { + justify-content: space-between; + } + + .sm\:justify-around { + justify-content: space-around; + } + + .sm\:justify-evenly { + justify-content: space-evenly; + } + + .sm\:content-center { + align-content: center; + } + + .sm\:content-start { + align-content: flex-start; + } + + .sm\:content-end { + align-content: flex-end; + } + + .sm\:content-between { + align-content: space-between; + } + + .sm\:content-around { + align-content: space-around; + } + + .sm\:flex-1 { + flex: 1 1 0%; + } + + .sm\:flex-auto { + flex: 1 1 auto; + } + + .sm\:flex-initial { + flex: 0 1 auto; + } + + .sm\:flex-none { + flex: none; + } + + .sm\:flex-grow-0 { + flex-grow: 0; + } + + .sm\:flex-grow { + flex-grow: 1; + } + + .sm\:flex-shrink-0 { + flex-shrink: 0; + } + + .sm\:flex-shrink { + flex-shrink: 1; + } + + .sm\:order-1 { + order: 1; + } + + .sm\:order-2 { + order: 2; + } + + .sm\:order-3 { + order: 3; + } + + .sm\:order-4 { + order: 4; + } + + .sm\:order-5 { + order: 5; + } + + .sm\:order-6 { + order: 6; + } + + .sm\:order-7 { + order: 7; + } + + .sm\:order-8 { + order: 8; + } + + .sm\:order-9 { + order: 9; + } + + .sm\:order-10 { + order: 10; + } + + .sm\:order-11 { + order: 11; + } + + .sm\:order-12 { + order: 12; + } + + .sm\:order-first { + order: -9999; + } + + .sm\:order-last { + order: 9999; + } + + .sm\:order-none { + order: 0; + } + + .sm\:float-right { + float: right; + } + + .sm\:float-left { + float: left; + } + + .sm\:float-none { + float: none; + } + + .sm\:clearfix:after { + content: ""; + display: table; + clear: both; + } + + .sm\:clear-left { + clear: left; + } + + .sm\:clear-right { + clear: right; + } + + .sm\:clear-both { + clear: both; + } + + .sm\:clear-none { + clear: none; + } + + .sm\:font-sans { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + } + + .sm\:font-serif { + font-family: Georgia, Cambria, "Times New Roman", Times, serif; + } + + .sm\:font-mono { + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + } + + .sm\:font-hairline { + font-weight: 100; + } + + .sm\:font-thin { + font-weight: 200; + } + + .sm\:font-light { + font-weight: 300; + } + + .sm\:font-normal { + font-weight: 400; + } + + .sm\:font-medium { + font-weight: 500; + } + + .sm\:font-semibold { + font-weight: 600; + } + + .sm\:font-bold { + font-weight: 700; + } + + .sm\:font-extrabold { + font-weight: 800; + } + + .sm\:font-black { + font-weight: 900; + } + + .sm\:hover\:font-hairline:hover { + font-weight: 100; + } + + .sm\:hover\:font-thin:hover { + font-weight: 200; + } + + .sm\:hover\:font-light:hover { + font-weight: 300; + } + + .sm\:hover\:font-normal:hover { + font-weight: 400; + } + + .sm\:hover\:font-medium:hover { + font-weight: 500; + } + + .sm\:hover\:font-semibold:hover { + font-weight: 600; + } + + .sm\:hover\:font-bold:hover { + font-weight: 700; + } + + .sm\:hover\:font-extrabold:hover { + font-weight: 800; + } + + .sm\:hover\:font-black:hover { + font-weight: 900; + } + + .sm\:focus\:font-hairline:focus { + font-weight: 100; + } + + .sm\:focus\:font-thin:focus { + font-weight: 200; + } + + .sm\:focus\:font-light:focus { + font-weight: 300; + } + + .sm\:focus\:font-normal:focus { + font-weight: 400; + } + + .sm\:focus\:font-medium:focus { + font-weight: 500; + } + + .sm\:focus\:font-semibold:focus { + font-weight: 600; + } + + .sm\:focus\:font-bold:focus { + font-weight: 700; + } + + .sm\:focus\:font-extrabold:focus { + font-weight: 800; + } + + .sm\:focus\:font-black:focus { + font-weight: 900; + } + + .sm\:h-0 { + height: 0; + } + + .sm\:h-1 { + height: 0.25rem; + } + + .sm\:h-2 { + height: 0.5rem; + } + + .sm\:h-3 { + height: 0.75rem; + } + + .sm\:h-4 { + height: 1rem; + } + + .sm\:h-5 { + height: 1.25rem; + } + + .sm\:h-6 { + height: 1.5rem; + } + + .sm\:h-8 { + height: 2rem; + } + + .sm\:h-10 { + height: 2.5rem; + } + + .sm\:h-12 { + height: 3rem; + } + + .sm\:h-16 { + height: 4rem; + } + + .sm\:h-20 { + height: 5rem; + } + + .sm\:h-24 { + height: 6rem; + } + + .sm\:h-32 { + height: 8rem; + } + + .sm\:h-40 { + height: 10rem; + } + + .sm\:h-48 { + height: 12rem; + } + + .sm\:h-56 { + height: 14rem; + } + + .sm\:h-64 { + height: 16rem; + } + + .sm\:h-auto { + height: auto; + } + + .sm\:h-px { + height: 1px; + } + + .sm\:h-full { + height: 100%; + } + + .sm\:h-screen { + height: 100vh; + } + + .sm\:text-xs { + font-size: 0.75rem; + } + + .sm\:text-sm { + font-size: 0.875rem; + } + + .sm\:text-base { + font-size: 1rem; + } + + .sm\:text-lg { + font-size: 1.125rem; + } + + .sm\:text-xl { + font-size: 1.25rem; + } + + .sm\:text-2xl { + font-size: 1.5rem; + } + + .sm\:text-3xl { + font-size: 1.875rem; + } + + .sm\:text-4xl { + font-size: 2.25rem; + } + + .sm\:text-5xl { + font-size: 3rem; + } + + .sm\:text-6xl { + font-size: 4rem; + } + + .sm\:leading-3 { + line-height: .75rem; + } + + .sm\:leading-4 { + line-height: 1rem; + } + + .sm\:leading-5 { + line-height: 1.25rem; + } + + .sm\:leading-6 { + line-height: 1.5rem; + } + + .sm\:leading-7 { + line-height: 1.75rem; + } + + .sm\:leading-8 { + line-height: 2rem; + } + + .sm\:leading-9 { + line-height: 2.25rem; + } + + .sm\:leading-10 { + line-height: 2.5rem; + } + + .sm\:leading-none { + line-height: 1; + } + + .sm\:leading-tight { + line-height: 1.25; + } + + .sm\:leading-snug { + line-height: 1.375; + } + + .sm\:leading-normal { + line-height: 1.5; + } + + .sm\:leading-relaxed { + line-height: 1.625; + } + + .sm\:leading-loose { + line-height: 2; + } + + .sm\:list-inside { + list-style-position: inside; + } + + .sm\:list-outside { + list-style-position: outside; + } + + .sm\:list-none { + list-style-type: none; + } + + .sm\:list-disc { + list-style-type: disc; + } + + .sm\:list-decimal { + list-style-type: decimal; + } + + .sm\:m-0 { + margin: 0; + } + + .sm\:m-1 { + margin: 0.25rem; + } + + .sm\:m-2 { + margin: 0.5rem; + } + + .sm\:m-3 { + margin: 0.75rem; + } + + .sm\:m-4 { + margin: 1rem; + } + + .sm\:m-5 { + margin: 1.25rem; + } + + .sm\:m-6 { + margin: 1.5rem; + } + + .sm\:m-8 { + margin: 2rem; + } + + .sm\:m-10 { + margin: 2.5rem; + } + + .sm\:m-12 { + margin: 3rem; + } + + .sm\:m-16 { + margin: 4rem; + } + + .sm\:m-20 { + margin: 5rem; + } + + .sm\:m-24 { + margin: 6rem; + } + + .sm\:m-32 { + margin: 8rem; + } + + .sm\:m-40 { + margin: 10rem; + } + + .sm\:m-48 { + margin: 12rem; + } + + .sm\:m-56 { + margin: 14rem; + } + + .sm\:m-64 { + margin: 16rem; + } + + .sm\:m-auto { + margin: auto; + } + + .sm\:m-px { + margin: 1px; + } + + .sm\:-m-1 { + margin: -0.25rem; + } + + .sm\:-m-2 { + margin: -0.5rem; + } + + .sm\:-m-3 { + margin: -0.75rem; + } + + .sm\:-m-4 { + margin: -1rem; + } + + .sm\:-m-5 { + margin: -1.25rem; + } + + .sm\:-m-6 { + margin: -1.5rem; + } + + .sm\:-m-8 { + margin: -2rem; + } + + .sm\:-m-10 { + margin: -2.5rem; + } + + .sm\:-m-12 { + margin: -3rem; + } + + .sm\:-m-16 { + margin: -4rem; + } + + .sm\:-m-20 { + margin: -5rem; + } + + .sm\:-m-24 { + margin: -6rem; + } + + .sm\:-m-32 { + margin: -8rem; + } + + .sm\:-m-40 { + margin: -10rem; + } + + .sm\:-m-48 { + margin: -12rem; + } + + .sm\:-m-56 { + margin: -14rem; + } + + .sm\:-m-64 { + margin: -16rem; + } + + .sm\:-m-px { + margin: -1px; + } + + .sm\:my-0 { + margin-top: 0; + margin-bottom: 0; + } + + .sm\:mx-0 { + margin-left: 0; + margin-right: 0; + } + + .sm\:my-1 { + margin-top: 0.25rem; + margin-bottom: 0.25rem; + } + + .sm\:mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; + } + + .sm\:my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; + } + + .sm\:mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; + } + + .sm\:my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; + } + + .sm\:mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; + } + + .sm\:my-4 { + margin-top: 1rem; + margin-bottom: 1rem; + } + + .sm\:mx-4 { + margin-left: 1rem; + margin-right: 1rem; + } + + .sm\:my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; + } + + .sm\:mx-5 { + margin-left: 1.25rem; + margin-right: 1.25rem; + } + + .sm\:my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + } + + .sm\:mx-6 { + margin-left: 1.5rem; + margin-right: 1.5rem; + } + + .sm\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .sm\:mx-8 { + margin-left: 2rem; + margin-right: 2rem; + } + + .sm\:my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; + } + + .sm\:mx-10 { + margin-left: 2.5rem; + margin-right: 2.5rem; + } + + .sm\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .sm\:mx-12 { + margin-left: 3rem; + margin-right: 3rem; + } + + .sm\:my-16 { + margin-top: 4rem; + margin-bottom: 4rem; + } + + .sm\:mx-16 { + margin-left: 4rem; + margin-right: 4rem; + } + + .sm\:my-20 { + margin-top: 5rem; + margin-bottom: 5rem; + } + + .sm\:mx-20 { + margin-left: 5rem; + margin-right: 5rem; + } + + .sm\:my-24 { + margin-top: 6rem; + margin-bottom: 6rem; + } + + .sm\:mx-24 { + margin-left: 6rem; + margin-right: 6rem; + } + + .sm\:my-32 { + margin-top: 8rem; + margin-bottom: 8rem; + } + + .sm\:mx-32 { + margin-left: 8rem; + margin-right: 8rem; + } + + .sm\:my-40 { + margin-top: 10rem; + margin-bottom: 10rem; + } + + .sm\:mx-40 { + margin-left: 10rem; + margin-right: 10rem; + } + + .sm\:my-48 { + margin-top: 12rem; + margin-bottom: 12rem; + } + + .sm\:mx-48 { + margin-left: 12rem; + margin-right: 12rem; + } + + .sm\:my-56 { + margin-top: 14rem; + margin-bottom: 14rem; + } + + .sm\:mx-56 { + margin-left: 14rem; + margin-right: 14rem; + } + + .sm\:my-64 { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .sm\:mx-64 { + margin-left: 16rem; + margin-right: 16rem; + } + + .sm\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .sm\:mx-auto { + margin-left: auto; + margin-right: auto; + } + + .sm\:my-px { + margin-top: 1px; + margin-bottom: 1px; + } + + .sm\:mx-px { + margin-left: 1px; + margin-right: 1px; + } + + .sm\:-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; + } + + .sm\:-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; + } + + .sm\:-my-2 { + margin-top: -0.5rem; + margin-bottom: -0.5rem; + } + + .sm\:-mx-2 { + margin-left: -0.5rem; + margin-right: -0.5rem; + } + + .sm\:-my-3 { + margin-top: -0.75rem; + margin-bottom: -0.75rem; + } + + .sm\:-mx-3 { + margin-left: -0.75rem; + margin-right: -0.75rem; + } + + .sm\:-my-4 { + margin-top: -1rem; + margin-bottom: -1rem; + } + + .sm\:-mx-4 { + margin-left: -1rem; + margin-right: -1rem; + } + + .sm\:-my-5 { + margin-top: -1.25rem; + margin-bottom: -1.25rem; + } + + .sm\:-mx-5 { + margin-left: -1.25rem; + margin-right: -1.25rem; + } + + .sm\:-my-6 { + margin-top: -1.5rem; + margin-bottom: -1.5rem; + } + + .sm\:-mx-6 { + margin-left: -1.5rem; + margin-right: -1.5rem; + } + + .sm\:-my-8 { + margin-top: -2rem; + margin-bottom: -2rem; + } + + .sm\:-mx-8 { + margin-left: -2rem; + margin-right: -2rem; + } + + .sm\:-my-10 { + margin-top: -2.5rem; + margin-bottom: -2.5rem; + } + + .sm\:-mx-10 { + margin-left: -2.5rem; + margin-right: -2.5rem; + } + + .sm\:-my-12 { + margin-top: -3rem; + margin-bottom: -3rem; + } + + .sm\:-mx-12 { + margin-left: -3rem; + margin-right: -3rem; + } + + .sm\:-my-16 { + margin-top: -4rem; + margin-bottom: -4rem; + } + + .sm\:-mx-16 { + margin-left: -4rem; + margin-right: -4rem; + } + + .sm\:-my-20 { + margin-top: -5rem; + margin-bottom: -5rem; + } + + .sm\:-mx-20 { + margin-left: -5rem; + margin-right: -5rem; + } + + .sm\:-my-24 { + margin-top: -6rem; + margin-bottom: -6rem; + } + + .sm\:-mx-24 { + margin-left: -6rem; + margin-right: -6rem; + } + + .sm\:-my-32 { + margin-top: -8rem; + margin-bottom: -8rem; + } + + .sm\:-mx-32 { + margin-left: -8rem; + margin-right: -8rem; + } + + .sm\:-my-40 { + margin-top: -10rem; + margin-bottom: -10rem; + } + + .sm\:-mx-40 { + margin-left: -10rem; + margin-right: -10rem; + } + + .sm\:-my-48 { + margin-top: -12rem; + margin-bottom: -12rem; + } + + .sm\:-mx-48 { + margin-left: -12rem; + margin-right: -12rem; + } + + .sm\:-my-56 { + margin-top: -14rem; + margin-bottom: -14rem; + } + + .sm\:-mx-56 { + margin-left: -14rem; + margin-right: -14rem; + } + + .sm\:-my-64 { + margin-top: -16rem; + margin-bottom: -16rem; + } + + .sm\:-mx-64 { + margin-left: -16rem; + margin-right: -16rem; + } + + .sm\:-my-px { + margin-top: -1px; + margin-bottom: -1px; + } + + .sm\:-mx-px { + margin-left: -1px; + margin-right: -1px; + } + + .sm\:mt-0 { + margin-top: 0; + } + + .sm\:mr-0 { + margin-right: 0; + } + + .sm\:mb-0 { + margin-bottom: 0; + } + + .sm\:ml-0 { + margin-left: 0; + } + + .sm\:mt-1 { + margin-top: 0.25rem; + } + + .sm\:mr-1 { + margin-right: 0.25rem; + } + + .sm\:mb-1 { + margin-bottom: 0.25rem; + } + + .sm\:ml-1 { + margin-left: 0.25rem; + } + + .sm\:mt-2 { + margin-top: 0.5rem; + } + + .sm\:mr-2 { + margin-right: 0.5rem; + } + + .sm\:mb-2 { + margin-bottom: 0.5rem; + } + + .sm\:ml-2 { + margin-left: 0.5rem; + } + + .sm\:mt-3 { + margin-top: 0.75rem; + } + + .sm\:mr-3 { + margin-right: 0.75rem; + } + + .sm\:mb-3 { + margin-bottom: 0.75rem; + } + + .sm\:ml-3 { + margin-left: 0.75rem; + } + + .sm\:mt-4 { + margin-top: 1rem; + } + + .sm\:mr-4 { + margin-right: 1rem; + } + + .sm\:mb-4 { + margin-bottom: 1rem; + } + + .sm\:ml-4 { + margin-left: 1rem; + } + + .sm\:mt-5 { + margin-top: 1.25rem; + } + + .sm\:mr-5 { + margin-right: 1.25rem; + } + + .sm\:mb-5 { + margin-bottom: 1.25rem; + } + + .sm\:ml-5 { + margin-left: 1.25rem; + } + + .sm\:mt-6 { + margin-top: 1.5rem; + } + + .sm\:mr-6 { + margin-right: 1.5rem; + } + + .sm\:mb-6 { + margin-bottom: 1.5rem; + } + + .sm\:ml-6 { + margin-left: 1.5rem; + } + + .sm\:mt-8 { + margin-top: 2rem; + } + + .sm\:mr-8 { + margin-right: 2rem; + } + + .sm\:mb-8 { + margin-bottom: 2rem; + } + + .sm\:ml-8 { + margin-left: 2rem; + } + + .sm\:mt-10 { + margin-top: 2.5rem; + } + + .sm\:mr-10 { + margin-right: 2.5rem; + } + + .sm\:mb-10 { + margin-bottom: 2.5rem; + } + + .sm\:ml-10 { + margin-left: 2.5rem; + } + + .sm\:mt-12 { + margin-top: 3rem; + } + + .sm\:mr-12 { + margin-right: 3rem; + } + + .sm\:mb-12 { + margin-bottom: 3rem; + } + + .sm\:ml-12 { + margin-left: 3rem; + } + + .sm\:mt-16 { + margin-top: 4rem; + } + + .sm\:mr-16 { + margin-right: 4rem; + } + + .sm\:mb-16 { + margin-bottom: 4rem; + } + + .sm\:ml-16 { + margin-left: 4rem; + } + + .sm\:mt-20 { + margin-top: 5rem; + } + + .sm\:mr-20 { + margin-right: 5rem; + } + + .sm\:mb-20 { + margin-bottom: 5rem; + } + + .sm\:ml-20 { + margin-left: 5rem; + } + + .sm\:mt-24 { + margin-top: 6rem; + } + + .sm\:mr-24 { + margin-right: 6rem; + } + + .sm\:mb-24 { + margin-bottom: 6rem; + } + + .sm\:ml-24 { + margin-left: 6rem; + } + + .sm\:mt-32 { + margin-top: 8rem; + } + + .sm\:mr-32 { + margin-right: 8rem; + } + + .sm\:mb-32 { + margin-bottom: 8rem; + } + + .sm\:ml-32 { + margin-left: 8rem; + } + + .sm\:mt-40 { + margin-top: 10rem; + } + + .sm\:mr-40 { + margin-right: 10rem; + } + + .sm\:mb-40 { + margin-bottom: 10rem; + } + + .sm\:ml-40 { + margin-left: 10rem; + } + + .sm\:mt-48 { + margin-top: 12rem; + } + + .sm\:mr-48 { + margin-right: 12rem; + } + + .sm\:mb-48 { + margin-bottom: 12rem; + } + + .sm\:ml-48 { + margin-left: 12rem; + } + + .sm\:mt-56 { + margin-top: 14rem; + } + + .sm\:mr-56 { + margin-right: 14rem; + } + + .sm\:mb-56 { + margin-bottom: 14rem; + } + + .sm\:ml-56 { + margin-left: 14rem; + } + + .sm\:mt-64 { + margin-top: 16rem; + } + + .sm\:mr-64 { + margin-right: 16rem; + } + + .sm\:mb-64 { + margin-bottom: 16rem; + } + + .sm\:ml-64 { + margin-left: 16rem; + } + + .sm\:mt-auto { + margin-top: auto; + } + + .sm\:mr-auto { + margin-right: auto; + } + + .sm\:mb-auto { + margin-bottom: auto; + } + + .sm\:ml-auto { + margin-left: auto; + } + + .sm\:mt-px { + margin-top: 1px; + } + + .sm\:mr-px { + margin-right: 1px; + } + + .sm\:mb-px { + margin-bottom: 1px; + } + + .sm\:ml-px { + margin-left: 1px; + } + + .sm\:-mt-1 { + margin-top: -0.25rem; + } + + .sm\:-mr-1 { + margin-right: -0.25rem; + } + + .sm\:-mb-1 { + margin-bottom: -0.25rem; + } + + .sm\:-ml-1 { + margin-left: -0.25rem; + } + + .sm\:-mt-2 { + margin-top: -0.5rem; + } + + .sm\:-mr-2 { + margin-right: -0.5rem; + } + + .sm\:-mb-2 { + margin-bottom: -0.5rem; + } + + .sm\:-ml-2 { + margin-left: -0.5rem; + } + + .sm\:-mt-3 { + margin-top: -0.75rem; + } + + .sm\:-mr-3 { + margin-right: -0.75rem; + } + + .sm\:-mb-3 { + margin-bottom: -0.75rem; + } + + .sm\:-ml-3 { + margin-left: -0.75rem; + } + + .sm\:-mt-4 { + margin-top: -1rem; + } + + .sm\:-mr-4 { + margin-right: -1rem; + } + + .sm\:-mb-4 { + margin-bottom: -1rem; + } + + .sm\:-ml-4 { + margin-left: -1rem; + } + + .sm\:-mt-5 { + margin-top: -1.25rem; + } + + .sm\:-mr-5 { + margin-right: -1.25rem; + } + + .sm\:-mb-5 { + margin-bottom: -1.25rem; + } + + .sm\:-ml-5 { + margin-left: -1.25rem; + } + + .sm\:-mt-6 { + margin-top: -1.5rem; + } + + .sm\:-mr-6 { + margin-right: -1.5rem; + } + + .sm\:-mb-6 { + margin-bottom: -1.5rem; + } + + .sm\:-ml-6 { + margin-left: -1.5rem; + } + + .sm\:-mt-8 { + margin-top: -2rem; + } + + .sm\:-mr-8 { + margin-right: -2rem; + } + + .sm\:-mb-8 { + margin-bottom: -2rem; + } + + .sm\:-ml-8 { + margin-left: -2rem; + } + + .sm\:-mt-10 { + margin-top: -2.5rem; + } + + .sm\:-mr-10 { + margin-right: -2.5rem; + } + + .sm\:-mb-10 { + margin-bottom: -2.5rem; + } + + .sm\:-ml-10 { + margin-left: -2.5rem; + } + + .sm\:-mt-12 { + margin-top: -3rem; + } + + .sm\:-mr-12 { + margin-right: -3rem; + } + + .sm\:-mb-12 { + margin-bottom: -3rem; + } + + .sm\:-ml-12 { + margin-left: -3rem; + } + + .sm\:-mt-16 { + margin-top: -4rem; + } + + .sm\:-mr-16 { + margin-right: -4rem; + } + + .sm\:-mb-16 { + margin-bottom: -4rem; + } + + .sm\:-ml-16 { + margin-left: -4rem; + } + + .sm\:-mt-20 { + margin-top: -5rem; + } + + .sm\:-mr-20 { + margin-right: -5rem; + } + + .sm\:-mb-20 { + margin-bottom: -5rem; + } + + .sm\:-ml-20 { + margin-left: -5rem; + } + + .sm\:-mt-24 { + margin-top: -6rem; + } + + .sm\:-mr-24 { + margin-right: -6rem; + } + + .sm\:-mb-24 { + margin-bottom: -6rem; + } + + .sm\:-ml-24 { + margin-left: -6rem; + } + + .sm\:-mt-32 { + margin-top: -8rem; + } + + .sm\:-mr-32 { + margin-right: -8rem; + } + + .sm\:-mb-32 { + margin-bottom: -8rem; + } + + .sm\:-ml-32 { + margin-left: -8rem; + } + + .sm\:-mt-40 { + margin-top: -10rem; + } + + .sm\:-mr-40 { + margin-right: -10rem; + } + + .sm\:-mb-40 { + margin-bottom: -10rem; + } + + .sm\:-ml-40 { + margin-left: -10rem; + } + + .sm\:-mt-48 { + margin-top: -12rem; + } + + .sm\:-mr-48 { + margin-right: -12rem; + } + + .sm\:-mb-48 { + margin-bottom: -12rem; + } + + .sm\:-ml-48 { + margin-left: -12rem; + } + + .sm\:-mt-56 { + margin-top: -14rem; + } + + .sm\:-mr-56 { + margin-right: -14rem; + } + + .sm\:-mb-56 { + margin-bottom: -14rem; + } + + .sm\:-ml-56 { + margin-left: -14rem; + } + + .sm\:-mt-64 { + margin-top: -16rem; + } + + .sm\:-mr-64 { + margin-right: -16rem; + } + + .sm\:-mb-64 { + margin-bottom: -16rem; + } + + .sm\:-ml-64 { + margin-left: -16rem; + } + + .sm\:-mt-px { + margin-top: -1px; + } + + .sm\:-mr-px { + margin-right: -1px; + } + + .sm\:-mb-px { + margin-bottom: -1px; + } + + .sm\:-ml-px { + margin-left: -1px; + } + + .sm\:max-h-full { + max-height: 100%; + } + + .sm\:max-h-screen { + max-height: 100vh; + } + + .sm\:max-w-none { + max-width: none; + } + + .sm\:max-w-xs { + max-width: 20rem; + } + + .sm\:max-w-sm { + max-width: 24rem; + } + + .sm\:max-w-md { + max-width: 28rem; + } + + .sm\:max-w-lg { + max-width: 32rem; + } + + .sm\:max-w-xl { + max-width: 36rem; + } + + .sm\:max-w-2xl { + max-width: 42rem; + } + + .sm\:max-w-3xl { + max-width: 48rem; + } + + .sm\:max-w-4xl { + max-width: 56rem; + } + + .sm\:max-w-5xl { + max-width: 64rem; + } + + .sm\:max-w-6xl { + max-width: 72rem; + } + + .sm\:max-w-full { + max-width: 100%; + } + + .sm\:max-w-screen-sm { + max-width: 640px; + } + + .sm\:max-w-screen-md { + max-width: 768px; + } + + .sm\:max-w-screen-lg { + max-width: 1024px; + } + + .sm\:max-w-screen-xl { + max-width: 1280px; + } + + .sm\:min-h-0 { + min-height: 0; + } + + .sm\:min-h-full { + min-height: 100%; + } + + .sm\:min-h-screen { + min-height: 100vh; + } + + .sm\:min-w-0 { + min-width: 0; + } + + .sm\:min-w-full { + min-width: 100%; + } + + .sm\:object-contain { + object-fit: contain; + } + + .sm\:object-cover { + object-fit: cover; + } + + .sm\:object-fill { + object-fit: fill; + } + + .sm\:object-none { + object-fit: none; + } + + .sm\:object-scale-down { + object-fit: scale-down; + } + + .sm\:object-bottom { + object-position: bottom; + } + + .sm\:object-center { + object-position: center; + } + + .sm\:object-left { + object-position: left; + } + + .sm\:object-left-bottom { + object-position: left bottom; + } + + .sm\:object-left-top { + object-position: left top; + } + + .sm\:object-right { + object-position: right; + } + + .sm\:object-right-bottom { + object-position: right bottom; + } + + .sm\:object-right-top { + object-position: right top; + } + + .sm\:object-top { + object-position: top; + } + + .sm\:opacity-0 { + opacity: 0; + } + + .sm\:opacity-25 { + opacity: 0.25; + } + + .sm\:opacity-50 { + opacity: 0.5; + } + + .sm\:opacity-75 { + opacity: 0.75; + } + + .sm\:opacity-100 { + opacity: 1; + } + + .sm\:hover\:opacity-0:hover { + opacity: 0; + } + + .sm\:hover\:opacity-25:hover { + opacity: 0.25; + } + + .sm\:hover\:opacity-50:hover { + opacity: 0.5; + } + + .sm\:hover\:opacity-75:hover { + opacity: 0.75; + } + + .sm\:hover\:opacity-100:hover { + opacity: 1; + } + + .sm\:focus\:opacity-0:focus { + opacity: 0; + } + + .sm\:focus\:opacity-25:focus { + opacity: 0.25; + } + + .sm\:focus\:opacity-50:focus { + opacity: 0.5; + } + + .sm\:focus\:opacity-75:focus { + opacity: 0.75; + } + + .sm\:focus\:opacity-100:focus { + opacity: 1; + } + + .sm\:outline-none { + outline: 0; + } + + .sm\:focus\:outline-none:focus { + outline: 0; + } + + .sm\:overflow-auto { + overflow: auto; + } + + .sm\:overflow-hidden { + overflow: hidden; + } + + .sm\:overflow-visible { + overflow: visible; + } + + .sm\:overflow-scroll { + overflow: scroll; + } + + .sm\:overflow-x-auto { + overflow-x: auto; + } + + .sm\:overflow-y-auto { + overflow-y: auto; + } + + .sm\:overflow-x-hidden { + overflow-x: hidden; + } + + .sm\:overflow-y-hidden { + overflow-y: hidden; + } + + .sm\:overflow-x-visible { + overflow-x: visible; + } + + .sm\:overflow-y-visible { + overflow-y: visible; + } + + .sm\:overflow-x-scroll { + overflow-x: scroll; + } + + .sm\:overflow-y-scroll { + overflow-y: scroll; + } + + .sm\:scrolling-touch { + -webkit-overflow-scrolling: touch; + } + + .sm\:scrolling-auto { + -webkit-overflow-scrolling: auto; + } + + .sm\:p-0 { + padding: 0; + } + + .sm\:p-1 { + padding: 0.25rem; + } + + .sm\:p-2 { + padding: 0.5rem; + } + + .sm\:p-3 { + padding: 0.75rem; + } + + .sm\:p-4 { + padding: 1rem; + } + + .sm\:p-5 { + padding: 1.25rem; + } + + .sm\:p-6 { + padding: 1.5rem; + } + + .sm\:p-8 { + padding: 2rem; + } + + .sm\:p-10 { + padding: 2.5rem; + } + + .sm\:p-12 { + padding: 3rem; + } + + .sm\:p-16 { + padding: 4rem; + } + + .sm\:p-20 { + padding: 5rem; + } + + .sm\:p-24 { + padding: 6rem; + } + + .sm\:p-32 { + padding: 8rem; + } + + .sm\:p-40 { + padding: 10rem; + } + + .sm\:p-48 { + padding: 12rem; + } + + .sm\:p-56 { + padding: 14rem; + } + + .sm\:p-64 { + padding: 16rem; + } + + .sm\:p-px { + padding: 1px; + } + + .sm\:py-0 { + padding-top: 0; + padding-bottom: 0; + } + + .sm\:px-0 { + padding-left: 0; + padding-right: 0; + } + + .sm\:py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .sm\:px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; + } + + .sm\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .sm\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .sm\:py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + } + + .sm\:px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; + } + + .sm\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .sm\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .sm\:py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; + } + + .sm\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .sm\:py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; + } + + .sm\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .sm\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .sm\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .sm\:py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; + } + + .sm\:px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; + } + + .sm\:py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + + .sm\:px-12 { + padding-left: 3rem; + padding-right: 3rem; + } + + .sm\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .sm\:px-16 { + padding-left: 4rem; + padding-right: 4rem; + } + + .sm\:py-20 { + padding-top: 5rem; + padding-bottom: 5rem; + } + + .sm\:px-20 { + padding-left: 5rem; + padding-right: 5rem; + } + + .sm\:py-24 { + padding-top: 6rem; + padding-bottom: 6rem; + } + + .sm\:px-24 { + padding-left: 6rem; + padding-right: 6rem; + } + + .sm\:py-32 { + padding-top: 8rem; + padding-bottom: 8rem; + } + + .sm\:px-32 { + padding-left: 8rem; + padding-right: 8rem; + } + + .sm\:py-40 { + padding-top: 10rem; + padding-bottom: 10rem; + } + + .sm\:px-40 { + padding-left: 10rem; + padding-right: 10rem; + } + + .sm\:py-48 { + padding-top: 12rem; + padding-bottom: 12rem; + } + + .sm\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .sm\:py-56 { + padding-top: 14rem; + padding-bottom: 14rem; + } + + .sm\:px-56 { + padding-left: 14rem; + padding-right: 14rem; + } + + .sm\:py-64 { + padding-top: 16rem; + padding-bottom: 16rem; + } + + .sm\:px-64 { + padding-left: 16rem; + padding-right: 16rem; + } + + .sm\:py-px { + padding-top: 1px; + padding-bottom: 1px; + } + + .sm\:px-px { + padding-left: 1px; + padding-right: 1px; + } + + .sm\:pt-0 { + padding-top: 0; + } + + .sm\:pr-0 { + padding-right: 0; + } + + .sm\:pb-0 { + padding-bottom: 0; + } + + .sm\:pl-0 { + padding-left: 0; + } + + .sm\:pt-1 { + padding-top: 0.25rem; + } + + .sm\:pr-1 { + padding-right: 0.25rem; + } + + .sm\:pb-1 { + padding-bottom: 0.25rem; + } + + .sm\:pl-1 { + padding-left: 0.25rem; + } + + .sm\:pt-2 { + padding-top: 0.5rem; + } + + .sm\:pr-2 { + padding-right: 0.5rem; + } + + .sm\:pb-2 { + padding-bottom: 0.5rem; + } + + .sm\:pl-2 { + padding-left: 0.5rem; + } + + .sm\:pt-3 { + padding-top: 0.75rem; + } + + .sm\:pr-3 { + padding-right: 0.75rem; + } + + .sm\:pb-3 { + padding-bottom: 0.75rem; + } + + .sm\:pl-3 { + padding-left: 0.75rem; + } + + .sm\:pt-4 { + padding-top: 1rem; + } + + .sm\:pr-4 { + padding-right: 1rem; + } + + .sm\:pb-4 { + padding-bottom: 1rem; + } + + .sm\:pl-4 { + padding-left: 1rem; + } + + .sm\:pt-5 { + padding-top: 1.25rem; + } + + .sm\:pr-5 { + padding-right: 1.25rem; + } + + .sm\:pb-5 { + padding-bottom: 1.25rem; + } + + .sm\:pl-5 { + padding-left: 1.25rem; + } + + .sm\:pt-6 { + padding-top: 1.5rem; + } + + .sm\:pr-6 { + padding-right: 1.5rem; + } + + .sm\:pb-6 { + padding-bottom: 1.5rem; + } + + .sm\:pl-6 { + padding-left: 1.5rem; + } + + .sm\:pt-8 { + padding-top: 2rem; + } + + .sm\:pr-8 { + padding-right: 2rem; + } + + .sm\:pb-8 { + padding-bottom: 2rem; + } + + .sm\:pl-8 { + padding-left: 2rem; + } + + .sm\:pt-10 { + padding-top: 2.5rem; + } + + .sm\:pr-10 { + padding-right: 2.5rem; + } + + .sm\:pb-10 { + padding-bottom: 2.5rem; + } + + .sm\:pl-10 { + padding-left: 2.5rem; + } + + .sm\:pt-12 { + padding-top: 3rem; + } + + .sm\:pr-12 { + padding-right: 3rem; + } + + .sm\:pb-12 { + padding-bottom: 3rem; + } + + .sm\:pl-12 { + padding-left: 3rem; + } + + .sm\:pt-16 { + padding-top: 4rem; + } + + .sm\:pr-16 { + padding-right: 4rem; + } + + .sm\:pb-16 { + padding-bottom: 4rem; + } + + .sm\:pl-16 { + padding-left: 4rem; + } + + .sm\:pt-20 { + padding-top: 5rem; + } + + .sm\:pr-20 { + padding-right: 5rem; + } + + .sm\:pb-20 { + padding-bottom: 5rem; + } + + .sm\:pl-20 { + padding-left: 5rem; + } + + .sm\:pt-24 { + padding-top: 6rem; + } + + .sm\:pr-24 { + padding-right: 6rem; + } + + .sm\:pb-24 { + padding-bottom: 6rem; + } + + .sm\:pl-24 { + padding-left: 6rem; + } + + .sm\:pt-32 { + padding-top: 8rem; + } + + .sm\:pr-32 { + padding-right: 8rem; + } + + .sm\:pb-32 { + padding-bottom: 8rem; + } + + .sm\:pl-32 { + padding-left: 8rem; + } + + .sm\:pt-40 { + padding-top: 10rem; + } + + .sm\:pr-40 { + padding-right: 10rem; + } + + .sm\:pb-40 { + padding-bottom: 10rem; + } + + .sm\:pl-40 { + padding-left: 10rem; + } + + .sm\:pt-48 { + padding-top: 12rem; + } + + .sm\:pr-48 { + padding-right: 12rem; + } + + .sm\:pb-48 { + padding-bottom: 12rem; + } + + .sm\:pl-48 { + padding-left: 12rem; + } + + .sm\:pt-56 { + padding-top: 14rem; + } + + .sm\:pr-56 { + padding-right: 14rem; + } + + .sm\:pb-56 { + padding-bottom: 14rem; + } + + .sm\:pl-56 { + padding-left: 14rem; + } + + .sm\:pt-64 { + padding-top: 16rem; + } + + .sm\:pr-64 { + padding-right: 16rem; + } + + .sm\:pb-64 { + padding-bottom: 16rem; + } + + .sm\:pl-64 { + padding-left: 16rem; + } + + .sm\:pt-px { + padding-top: 1px; + } + + .sm\:pr-px { + padding-right: 1px; + } + + .sm\:pb-px { + padding-bottom: 1px; + } + + .sm\:pl-px { + padding-left: 1px; + } + + .sm\:placeholder-transparent::placeholder { + color: transparent; + } + + .sm\:placeholder-current::placeholder { + color: currentColor; + } + + .sm\:placeholder-black::placeholder { + color: #000; + } + + .sm\:placeholder-white::placeholder { + color: #fff; + } + + .sm\:placeholder-gray-100::placeholder { + color: #f7fafc; + } + + .sm\:placeholder-gray-200::placeholder { + color: #edf2f7; + } + + .sm\:placeholder-gray-300::placeholder { + color: #e2e8f0; + } + + .sm\:placeholder-gray-400::placeholder { + color: #cbd5e0; + } + + .sm\:placeholder-gray-500::placeholder { + color: #a0aec0; + } + + .sm\:placeholder-gray-600::placeholder { + color: #718096; + } + + .sm\:placeholder-gray-700::placeholder { + color: #4a5568; + } + + .sm\:placeholder-gray-800::placeholder { + color: #2d3748; + } + + .sm\:placeholder-gray-900::placeholder { + color: #1a202c; + } + + .sm\:placeholder-red-100::placeholder { + color: #fff5f5; + } + + .sm\:placeholder-red-200::placeholder { + color: #fed7d7; + } + + .sm\:placeholder-red-300::placeholder { + color: #feb2b2; + } + + .sm\:placeholder-red-400::placeholder { + color: #fc8181; + } + + .sm\:placeholder-red-500::placeholder { + color: #f56565; + } + + .sm\:placeholder-red-600::placeholder { + color: #e53e3e; + } + + .sm\:placeholder-red-700::placeholder { + color: #c53030; + } + + .sm\:placeholder-red-800::placeholder { + color: #9b2c2c; + } + + .sm\:placeholder-red-900::placeholder { + color: #742a2a; + } + + .sm\:placeholder-orange-100::placeholder { + color: #fffaf0; + } + + .sm\:placeholder-orange-200::placeholder { + color: #feebc8; + } + + .sm\:placeholder-orange-300::placeholder { + color: #fbd38d; + } + + .sm\:placeholder-orange-400::placeholder { + color: #f6ad55; + } + + .sm\:placeholder-orange-500::placeholder { + color: #ed8936; + } + + .sm\:placeholder-orange-600::placeholder { + color: #dd6b20; + } + + .sm\:placeholder-orange-700::placeholder { + color: #c05621; + } + + .sm\:placeholder-orange-800::placeholder { + color: #9c4221; + } + + .sm\:placeholder-orange-900::placeholder { + color: #7b341e; + } + + .sm\:placeholder-yellow-100::placeholder { + color: #fffff0; + } + + .sm\:placeholder-yellow-200::placeholder { + color: #fefcbf; + } + + .sm\:placeholder-yellow-300::placeholder { + color: #faf089; + } + + .sm\:placeholder-yellow-400::placeholder { + color: #f6e05e; + } + + .sm\:placeholder-yellow-500::placeholder { + color: #ecc94b; + } + + .sm\:placeholder-yellow-600::placeholder { + color: #d69e2e; + } + + .sm\:placeholder-yellow-700::placeholder { + color: #b7791f; + } + + .sm\:placeholder-yellow-800::placeholder { + color: #975a16; + } + + .sm\:placeholder-yellow-900::placeholder { + color: #744210; + } + + .sm\:placeholder-green-100::placeholder { + color: #f0fff4; + } + + .sm\:placeholder-green-200::placeholder { + color: #c6f6d5; + } + + .sm\:placeholder-green-300::placeholder { + color: #9ae6b4; + } + + .sm\:placeholder-green-400::placeholder { + color: #68d391; + } + + .sm\:placeholder-green-500::placeholder { + color: #48bb78; + } + + .sm\:placeholder-green-600::placeholder { + color: #38a169; + } + + .sm\:placeholder-green-700::placeholder { + color: #2f855a; + } + + .sm\:placeholder-green-800::placeholder { + color: #276749; + } + + .sm\:placeholder-green-900::placeholder { + color: #22543d; + } + + .sm\:placeholder-teal-100::placeholder { + color: #e6fffa; + } + + .sm\:placeholder-teal-200::placeholder { + color: #b2f5ea; + } + + .sm\:placeholder-teal-300::placeholder { + color: #81e6d9; + } + + .sm\:placeholder-teal-400::placeholder { + color: #4fd1c5; + } + + .sm\:placeholder-teal-500::placeholder { + color: #38b2ac; + } + + .sm\:placeholder-teal-600::placeholder { + color: #319795; + } + + .sm\:placeholder-teal-700::placeholder { + color: #2c7a7b; + } + + .sm\:placeholder-teal-800::placeholder { + color: #285e61; + } + + .sm\:placeholder-teal-900::placeholder { + color: #234e52; + } + + .sm\:placeholder-blue-100::placeholder { + color: #ebf8ff; + } + + .sm\:placeholder-blue-200::placeholder { + color: #bee3f8; + } + + .sm\:placeholder-blue-300::placeholder { + color: #90cdf4; + } + + .sm\:placeholder-blue-400::placeholder { + color: #63b3ed; + } + + .sm\:placeholder-blue-500::placeholder { + color: #4299e1; + } + + .sm\:placeholder-blue-600::placeholder { + color: #3182ce; + } + + .sm\:placeholder-blue-700::placeholder { + color: #2b6cb0; + } + + .sm\:placeholder-blue-800::placeholder { + color: #2c5282; + } + + .sm\:placeholder-blue-900::placeholder { + color: #2a4365; + } + + .sm\:placeholder-indigo-100::placeholder { + color: #ebf4ff; + } + + .sm\:placeholder-indigo-200::placeholder { + color: #c3dafe; + } + + .sm\:placeholder-indigo-300::placeholder { + color: #a3bffa; + } + + .sm\:placeholder-indigo-400::placeholder { + color: #7f9cf5; + } + + .sm\:placeholder-indigo-500::placeholder { + color: #667eea; + } + + .sm\:placeholder-indigo-600::placeholder { + color: #5a67d8; + } + + .sm\:placeholder-indigo-700::placeholder { + color: #4c51bf; + } + + .sm\:placeholder-indigo-800::placeholder { + color: #434190; + } + + .sm\:placeholder-indigo-900::placeholder { + color: #3c366b; + } + + .sm\:placeholder-purple-100::placeholder { + color: #faf5ff; + } + + .sm\:placeholder-purple-200::placeholder { + color: #e9d8fd; + } + + .sm\:placeholder-purple-300::placeholder { + color: #d6bcfa; + } + + .sm\:placeholder-purple-400::placeholder { + color: #b794f4; + } + + .sm\:placeholder-purple-500::placeholder { + color: #9f7aea; + } + + .sm\:placeholder-purple-600::placeholder { + color: #805ad5; + } + + .sm\:placeholder-purple-700::placeholder { + color: #6b46c1; + } + + .sm\:placeholder-purple-800::placeholder { + color: #553c9a; + } + + .sm\:placeholder-purple-900::placeholder { + color: #44337a; + } + + .sm\:placeholder-pink-100::placeholder { + color: #fff5f7; + } + + .sm\:placeholder-pink-200::placeholder { + color: #fed7e2; + } + + .sm\:placeholder-pink-300::placeholder { + color: #fbb6ce; + } + + .sm\:placeholder-pink-400::placeholder { + color: #f687b3; + } + + .sm\:placeholder-pink-500::placeholder { + color: #ed64a6; + } + + .sm\:placeholder-pink-600::placeholder { + color: #d53f8c; + } + + .sm\:placeholder-pink-700::placeholder { + color: #b83280; + } + + .sm\:placeholder-pink-800::placeholder { + color: #97266d; + } + + .sm\:placeholder-pink-900::placeholder { + color: #702459; + } + + .sm\:focus\:placeholder-transparent:focus::placeholder { + color: transparent; + } + + .sm\:focus\:placeholder-current:focus::placeholder { + color: currentColor; + } + + .sm\:focus\:placeholder-black:focus::placeholder { + color: #000; + } + + .sm\:focus\:placeholder-white:focus::placeholder { + color: #fff; + } + + .sm\:focus\:placeholder-gray-100:focus::placeholder { + color: #f7fafc; + } + + .sm\:focus\:placeholder-gray-200:focus::placeholder { + color: #edf2f7; + } + + .sm\:focus\:placeholder-gray-300:focus::placeholder { + color: #e2e8f0; + } + + .sm\:focus\:placeholder-gray-400:focus::placeholder { + color: #cbd5e0; + } + + .sm\:focus\:placeholder-gray-500:focus::placeholder { + color: #a0aec0; + } + + .sm\:focus\:placeholder-gray-600:focus::placeholder { + color: #718096; + } + + .sm\:focus\:placeholder-gray-700:focus::placeholder { + color: #4a5568; + } + + .sm\:focus\:placeholder-gray-800:focus::placeholder { + color: #2d3748; + } + + .sm\:focus\:placeholder-gray-900:focus::placeholder { + color: #1a202c; + } + + .sm\:focus\:placeholder-red-100:focus::placeholder { + color: #fff5f5; + } + + .sm\:focus\:placeholder-red-200:focus::placeholder { + color: #fed7d7; + } + + .sm\:focus\:placeholder-red-300:focus::placeholder { + color: #feb2b2; + } + + .sm\:focus\:placeholder-red-400:focus::placeholder { + color: #fc8181; + } + + .sm\:focus\:placeholder-red-500:focus::placeholder { + color: #f56565; + } + + .sm\:focus\:placeholder-red-600:focus::placeholder { + color: #e53e3e; + } + + .sm\:focus\:placeholder-red-700:focus::placeholder { + color: #c53030; + } + + .sm\:focus\:placeholder-red-800:focus::placeholder { + color: #9b2c2c; + } + + .sm\:focus\:placeholder-red-900:focus::placeholder { + color: #742a2a; + } + + .sm\:focus\:placeholder-orange-100:focus::placeholder { + color: #fffaf0; + } + + .sm\:focus\:placeholder-orange-200:focus::placeholder { + color: #feebc8; + } + + .sm\:focus\:placeholder-orange-300:focus::placeholder { + color: #fbd38d; + } + + .sm\:focus\:placeholder-orange-400:focus::placeholder { + color: #f6ad55; + } + + .sm\:focus\:placeholder-orange-500:focus::placeholder { + color: #ed8936; + } + + .sm\:focus\:placeholder-orange-600:focus::placeholder { + color: #dd6b20; + } + + .sm\:focus\:placeholder-orange-700:focus::placeholder { + color: #c05621; + } + + .sm\:focus\:placeholder-orange-800:focus::placeholder { + color: #9c4221; + } + + .sm\:focus\:placeholder-orange-900:focus::placeholder { + color: #7b341e; + } + + .sm\:focus\:placeholder-yellow-100:focus::placeholder { + color: #fffff0; + } + + .sm\:focus\:placeholder-yellow-200:focus::placeholder { + color: #fefcbf; + } + + .sm\:focus\:placeholder-yellow-300:focus::placeholder { + color: #faf089; + } + + .sm\:focus\:placeholder-yellow-400:focus::placeholder { + color: #f6e05e; + } + + .sm\:focus\:placeholder-yellow-500:focus::placeholder { + color: #ecc94b; + } + + .sm\:focus\:placeholder-yellow-600:focus::placeholder { + color: #d69e2e; + } + + .sm\:focus\:placeholder-yellow-700:focus::placeholder { + color: #b7791f; + } + + .sm\:focus\:placeholder-yellow-800:focus::placeholder { + color: #975a16; + } + + .sm\:focus\:placeholder-yellow-900:focus::placeholder { + color: #744210; + } + + .sm\:focus\:placeholder-green-100:focus::placeholder { + color: #f0fff4; + } + + .sm\:focus\:placeholder-green-200:focus::placeholder { + color: #c6f6d5; + } + + .sm\:focus\:placeholder-green-300:focus::placeholder { + color: #9ae6b4; + } + + .sm\:focus\:placeholder-green-400:focus::placeholder { + color: #68d391; + } + + .sm\:focus\:placeholder-green-500:focus::placeholder { + color: #48bb78; + } + + .sm\:focus\:placeholder-green-600:focus::placeholder { + color: #38a169; + } + + .sm\:focus\:placeholder-green-700:focus::placeholder { + color: #2f855a; + } + + .sm\:focus\:placeholder-green-800:focus::placeholder { + color: #276749; + } + + .sm\:focus\:placeholder-green-900:focus::placeholder { + color: #22543d; + } + + .sm\:focus\:placeholder-teal-100:focus::placeholder { + color: #e6fffa; + } + + .sm\:focus\:placeholder-teal-200:focus::placeholder { + color: #b2f5ea; + } + + .sm\:focus\:placeholder-teal-300:focus::placeholder { + color: #81e6d9; + } + + .sm\:focus\:placeholder-teal-400:focus::placeholder { + color: #4fd1c5; + } + + .sm\:focus\:placeholder-teal-500:focus::placeholder { + color: #38b2ac; + } + + .sm\:focus\:placeholder-teal-600:focus::placeholder { + color: #319795; + } + + .sm\:focus\:placeholder-teal-700:focus::placeholder { + color: #2c7a7b; + } + + .sm\:focus\:placeholder-teal-800:focus::placeholder { + color: #285e61; + } + + .sm\:focus\:placeholder-teal-900:focus::placeholder { + color: #234e52; + } + + .sm\:focus\:placeholder-blue-100:focus::placeholder { + color: #ebf8ff; + } + + .sm\:focus\:placeholder-blue-200:focus::placeholder { + color: #bee3f8; + } + + .sm\:focus\:placeholder-blue-300:focus::placeholder { + color: #90cdf4; + } + + .sm\:focus\:placeholder-blue-400:focus::placeholder { + color: #63b3ed; + } + + .sm\:focus\:placeholder-blue-500:focus::placeholder { + color: #4299e1; + } + + .sm\:focus\:placeholder-blue-600:focus::placeholder { + color: #3182ce; + } + + .sm\:focus\:placeholder-blue-700:focus::placeholder { + color: #2b6cb0; + } + + .sm\:focus\:placeholder-blue-800:focus::placeholder { + color: #2c5282; + } + + .sm\:focus\:placeholder-blue-900:focus::placeholder { + color: #2a4365; + } + + .sm\:focus\:placeholder-indigo-100:focus::placeholder { + color: #ebf4ff; + } + + .sm\:focus\:placeholder-indigo-200:focus::placeholder { + color: #c3dafe; + } + + .sm\:focus\:placeholder-indigo-300:focus::placeholder { + color: #a3bffa; + } + + .sm\:focus\:placeholder-indigo-400:focus::placeholder { + color: #7f9cf5; + } + + .sm\:focus\:placeholder-indigo-500:focus::placeholder { + color: #667eea; + } + + .sm\:focus\:placeholder-indigo-600:focus::placeholder { + color: #5a67d8; + } + + .sm\:focus\:placeholder-indigo-700:focus::placeholder { + color: #4c51bf; + } + + .sm\:focus\:placeholder-indigo-800:focus::placeholder { + color: #434190; + } + + .sm\:focus\:placeholder-indigo-900:focus::placeholder { + color: #3c366b; + } + + .sm\:focus\:placeholder-purple-100:focus::placeholder { + color: #faf5ff; + } + + .sm\:focus\:placeholder-purple-200:focus::placeholder { + color: #e9d8fd; + } + + .sm\:focus\:placeholder-purple-300:focus::placeholder { + color: #d6bcfa; + } + + .sm\:focus\:placeholder-purple-400:focus::placeholder { + color: #b794f4; + } + + .sm\:focus\:placeholder-purple-500:focus::placeholder { + color: #9f7aea; + } + + .sm\:focus\:placeholder-purple-600:focus::placeholder { + color: #805ad5; + } + + .sm\:focus\:placeholder-purple-700:focus::placeholder { + color: #6b46c1; + } + + .sm\:focus\:placeholder-purple-800:focus::placeholder { + color: #553c9a; + } + + .sm\:focus\:placeholder-purple-900:focus::placeholder { + color: #44337a; + } + + .sm\:focus\:placeholder-pink-100:focus::placeholder { + color: #fff5f7; + } + + .sm\:focus\:placeholder-pink-200:focus::placeholder { + color: #fed7e2; + } + + .sm\:focus\:placeholder-pink-300:focus::placeholder { + color: #fbb6ce; + } + + .sm\:focus\:placeholder-pink-400:focus::placeholder { + color: #f687b3; + } + + .sm\:focus\:placeholder-pink-500:focus::placeholder { + color: #ed64a6; + } + + .sm\:focus\:placeholder-pink-600:focus::placeholder { + color: #d53f8c; + } + + .sm\:focus\:placeholder-pink-700:focus::placeholder { + color: #b83280; + } + + .sm\:focus\:placeholder-pink-800:focus::placeholder { + color: #97266d; + } + + .sm\:focus\:placeholder-pink-900:focus::placeholder { + color: #702459; + } + + .sm\:pointer-events-none { + pointer-events: none; + } + + .sm\:pointer-events-auto { + pointer-events: auto; + } + + .sm\:static { + position: static; + } + + .sm\:fixed { + position: fixed; + } + + .sm\:absolute { + position: absolute; + } + + .sm\:relative { + position: relative; + } + + .sm\:sticky { + position: sticky; + } + + .sm\:inset-0 { + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + .sm\:inset-auto { + top: auto; + right: auto; + bottom: auto; + left: auto; + } + + .sm\:inset-y-0 { + top: 0; + bottom: 0; + } + + .sm\:inset-x-0 { + right: 0; + left: 0; + } + + .sm\:inset-y-auto { + top: auto; + bottom: auto; + } + + .sm\:inset-x-auto { + right: auto; + left: auto; + } + + .sm\:top-0 { + top: 0; + } + + .sm\:right-0 { + right: 0; + } + + .sm\:bottom-0 { + bottom: 0; + } + + .sm\:left-0 { + left: 0; + } + + .sm\:top-auto { + top: auto; + } + + .sm\:right-auto { + right: auto; + } + + .sm\:bottom-auto { + bottom: auto; + } + + .sm\:left-auto { + left: auto; + } + + .sm\:resize-none { + resize: none; + } + + .sm\:resize-y { + resize: vertical; + } + + .sm\:resize-x { + resize: horizontal; + } + + .sm\:resize { + resize: both; + } + + .sm\:shadow-xs { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .sm\:shadow-sm { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .sm\:shadow { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .sm\:shadow-md { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .sm\:shadow-lg { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .sm\:shadow-xl { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .sm\:shadow-2xl { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .sm\:shadow-inner { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .sm\:shadow-outline { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .sm\:shadow-none { + box-shadow: none; + } + + .sm\:hover\:shadow-xs:hover { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .sm\:hover\:shadow-sm:hover { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .sm\:hover\:shadow:hover { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .sm\:hover\:shadow-md:hover { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .sm\:hover\:shadow-lg:hover { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .sm\:hover\:shadow-xl:hover { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .sm\:hover\:shadow-2xl:hover { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .sm\:hover\:shadow-inner:hover { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .sm\:hover\:shadow-outline:hover { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .sm\:hover\:shadow-none:hover { + box-shadow: none; + } + + .sm\:focus\:shadow-xs:focus { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .sm\:focus\:shadow-sm:focus { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .sm\:focus\:shadow:focus { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .sm\:focus\:shadow-md:focus { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .sm\:focus\:shadow-lg:focus { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .sm\:focus\:shadow-xl:focus { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .sm\:focus\:shadow-2xl:focus { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .sm\:focus\:shadow-inner:focus { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .sm\:focus\:shadow-outline:focus { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .sm\:focus\:shadow-none:focus { + box-shadow: none; + } + + .sm\:fill-current { + fill: currentColor; + } + + .sm\:stroke-current { + stroke: currentColor; + } + + .sm\:stroke-0 { + stroke-width: 0; + } + + .sm\:stroke-1 { + stroke-width: 1; + } + + .sm\:stroke-2 { + stroke-width: 2; + } + + .sm\:table-auto { + table-layout: auto; + } + + .sm\:table-fixed { + table-layout: fixed; + } + + .sm\:text-left { + text-align: left; + } + + .sm\:text-center { + text-align: center; + } + + .sm\:text-right { + text-align: right; + } + + .sm\:text-justify { + text-align: justify; + } + + .sm\:text-transparent { + color: transparent; + } + + .sm\:text-current { + color: currentColor; + } + + .sm\:text-black { + color: #000; + } + + .sm\:text-white { + color: #fff; + } + + .sm\:text-gray-100 { + color: #f7fafc; + } + + .sm\:text-gray-200 { + color: #edf2f7; + } + + .sm\:text-gray-300 { + color: #e2e8f0; + } + + .sm\:text-gray-400 { + color: #cbd5e0; + } + + .sm\:text-gray-500 { + color: #a0aec0; + } + + .sm\:text-gray-600 { + color: #718096; + } + + .sm\:text-gray-700 { + color: #4a5568; + } + + .sm\:text-gray-800 { + color: #2d3748; + } + + .sm\:text-gray-900 { + color: #1a202c; + } + + .sm\:text-red-100 { + color: #fff5f5; + } + + .sm\:text-red-200 { + color: #fed7d7; + } + + .sm\:text-red-300 { + color: #feb2b2; + } + + .sm\:text-red-400 { + color: #fc8181; + } + + .sm\:text-red-500 { + color: #f56565; + } + + .sm\:text-red-600 { + color: #e53e3e; + } + + .sm\:text-red-700 { + color: #c53030; + } + + .sm\:text-red-800 { + color: #9b2c2c; + } + + .sm\:text-red-900 { + color: #742a2a; + } + + .sm\:text-orange-100 { + color: #fffaf0; + } + + .sm\:text-orange-200 { + color: #feebc8; + } + + .sm\:text-orange-300 { + color: #fbd38d; + } + + .sm\:text-orange-400 { + color: #f6ad55; + } + + .sm\:text-orange-500 { + color: #ed8936; + } + + .sm\:text-orange-600 { + color: #dd6b20; + } + + .sm\:text-orange-700 { + color: #c05621; + } + + .sm\:text-orange-800 { + color: #9c4221; + } + + .sm\:text-orange-900 { + color: #7b341e; + } + + .sm\:text-yellow-100 { + color: #fffff0; + } + + .sm\:text-yellow-200 { + color: #fefcbf; + } + + .sm\:text-yellow-300 { + color: #faf089; + } + + .sm\:text-yellow-400 { + color: #f6e05e; + } + + .sm\:text-yellow-500 { + color: #ecc94b; + } + + .sm\:text-yellow-600 { + color: #d69e2e; + } + + .sm\:text-yellow-700 { + color: #b7791f; + } + + .sm\:text-yellow-800 { + color: #975a16; + } + + .sm\:text-yellow-900 { + color: #744210; + } + + .sm\:text-green-100 { + color: #f0fff4; + } + + .sm\:text-green-200 { + color: #c6f6d5; + } + + .sm\:text-green-300 { + color: #9ae6b4; + } + + .sm\:text-green-400 { + color: #68d391; + } + + .sm\:text-green-500 { + color: #48bb78; + } + + .sm\:text-green-600 { + color: #38a169; + } + + .sm\:text-green-700 { + color: #2f855a; + } + + .sm\:text-green-800 { + color: #276749; + } + + .sm\:text-green-900 { + color: #22543d; + } + + .sm\:text-teal-100 { + color: #e6fffa; + } + + .sm\:text-teal-200 { + color: #b2f5ea; + } + + .sm\:text-teal-300 { + color: #81e6d9; + } + + .sm\:text-teal-400 { + color: #4fd1c5; + } + + .sm\:text-teal-500 { + color: #38b2ac; + } + + .sm\:text-teal-600 { + color: #319795; + } + + .sm\:text-teal-700 { + color: #2c7a7b; + } + + .sm\:text-teal-800 { + color: #285e61; + } + + .sm\:text-teal-900 { + color: #234e52; + } + + .sm\:text-blue-100 { + color: #ebf8ff; + } + + .sm\:text-blue-200 { + color: #bee3f8; + } + + .sm\:text-blue-300 { + color: #90cdf4; + } + + .sm\:text-blue-400 { + color: #63b3ed; + } + + .sm\:text-blue-500 { + color: #4299e1; + } + + .sm\:text-blue-600 { + color: #3182ce; + } + + .sm\:text-blue-700 { + color: #2b6cb0; + } + + .sm\:text-blue-800 { + color: #2c5282; + } + + .sm\:text-blue-900 { + color: #2a4365; + } + + .sm\:text-indigo-100 { + color: #ebf4ff; + } + + .sm\:text-indigo-200 { + color: #c3dafe; + } + + .sm\:text-indigo-300 { + color: #a3bffa; + } + + .sm\:text-indigo-400 { + color: #7f9cf5; + } + + .sm\:text-indigo-500 { + color: #667eea; + } + + .sm\:text-indigo-600 { + color: #5a67d8; + } + + .sm\:text-indigo-700 { + color: #4c51bf; + } + + .sm\:text-indigo-800 { + color: #434190; + } + + .sm\:text-indigo-900 { + color: #3c366b; + } + + .sm\:text-purple-100 { + color: #faf5ff; + } + + .sm\:text-purple-200 { + color: #e9d8fd; + } + + .sm\:text-purple-300 { + color: #d6bcfa; + } + + .sm\:text-purple-400 { + color: #b794f4; + } + + .sm\:text-purple-500 { + color: #9f7aea; + } + + .sm\:text-purple-600 { + color: #805ad5; + } + + .sm\:text-purple-700 { + color: #6b46c1; + } + + .sm\:text-purple-800 { + color: #553c9a; + } + + .sm\:text-purple-900 { + color: #44337a; + } + + .sm\:text-pink-100 { + color: #fff5f7; + } + + .sm\:text-pink-200 { + color: #fed7e2; + } + + .sm\:text-pink-300 { + color: #fbb6ce; + } + + .sm\:text-pink-400 { + color: #f687b3; + } + + .sm\:text-pink-500 { + color: #ed64a6; + } + + .sm\:text-pink-600 { + color: #d53f8c; + } + + .sm\:text-pink-700 { + color: #b83280; + } + + .sm\:text-pink-800 { + color: #97266d; + } + + .sm\:text-pink-900 { + color: #702459; + } + + .sm\:hover\:text-transparent:hover { + color: transparent; + } + + .sm\:hover\:text-current:hover { + color: currentColor; + } + + .sm\:hover\:text-black:hover { + color: #000; + } + + .sm\:hover\:text-white:hover { + color: #fff; + } + + .sm\:hover\:text-gray-100:hover { + color: #f7fafc; + } + + .sm\:hover\:text-gray-200:hover { + color: #edf2f7; + } + + .sm\:hover\:text-gray-300:hover { + color: #e2e8f0; + } + + .sm\:hover\:text-gray-400:hover { + color: #cbd5e0; + } + + .sm\:hover\:text-gray-500:hover { + color: #a0aec0; + } + + .sm\:hover\:text-gray-600:hover { + color: #718096; + } + + .sm\:hover\:text-gray-700:hover { + color: #4a5568; + } + + .sm\:hover\:text-gray-800:hover { + color: #2d3748; + } + + .sm\:hover\:text-gray-900:hover { + color: #1a202c; + } + + .sm\:hover\:text-red-100:hover { + color: #fff5f5; + } + + .sm\:hover\:text-red-200:hover { + color: #fed7d7; + } + + .sm\:hover\:text-red-300:hover { + color: #feb2b2; + } + + .sm\:hover\:text-red-400:hover { + color: #fc8181; + } + + .sm\:hover\:text-red-500:hover { + color: #f56565; + } + + .sm\:hover\:text-red-600:hover { + color: #e53e3e; + } + + .sm\:hover\:text-red-700:hover { + color: #c53030; + } + + .sm\:hover\:text-red-800:hover { + color: #9b2c2c; + } + + .sm\:hover\:text-red-900:hover { + color: #742a2a; + } + + .sm\:hover\:text-orange-100:hover { + color: #fffaf0; + } + + .sm\:hover\:text-orange-200:hover { + color: #feebc8; + } + + .sm\:hover\:text-orange-300:hover { + color: #fbd38d; + } + + .sm\:hover\:text-orange-400:hover { + color: #f6ad55; + } + + .sm\:hover\:text-orange-500:hover { + color: #ed8936; + } + + .sm\:hover\:text-orange-600:hover { + color: #dd6b20; + } + + .sm\:hover\:text-orange-700:hover { + color: #c05621; + } + + .sm\:hover\:text-orange-800:hover { + color: #9c4221; + } + + .sm\:hover\:text-orange-900:hover { + color: #7b341e; + } + + .sm\:hover\:text-yellow-100:hover { + color: #fffff0; + } + + .sm\:hover\:text-yellow-200:hover { + color: #fefcbf; + } + + .sm\:hover\:text-yellow-300:hover { + color: #faf089; + } + + .sm\:hover\:text-yellow-400:hover { + color: #f6e05e; + } + + .sm\:hover\:text-yellow-500:hover { + color: #ecc94b; + } + + .sm\:hover\:text-yellow-600:hover { + color: #d69e2e; + } + + .sm\:hover\:text-yellow-700:hover { + color: #b7791f; + } + + .sm\:hover\:text-yellow-800:hover { + color: #975a16; + } + + .sm\:hover\:text-yellow-900:hover { + color: #744210; + } + + .sm\:hover\:text-green-100:hover { + color: #f0fff4; + } + + .sm\:hover\:text-green-200:hover { + color: #c6f6d5; + } + + .sm\:hover\:text-green-300:hover { + color: #9ae6b4; + } + + .sm\:hover\:text-green-400:hover { + color: #68d391; + } + + .sm\:hover\:text-green-500:hover { + color: #48bb78; + } + + .sm\:hover\:text-green-600:hover { + color: #38a169; + } + + .sm\:hover\:text-green-700:hover { + color: #2f855a; + } + + .sm\:hover\:text-green-800:hover { + color: #276749; + } + + .sm\:hover\:text-green-900:hover { + color: #22543d; + } + + .sm\:hover\:text-teal-100:hover { + color: #e6fffa; + } + + .sm\:hover\:text-teal-200:hover { + color: #b2f5ea; + } + + .sm\:hover\:text-teal-300:hover { + color: #81e6d9; + } + + .sm\:hover\:text-teal-400:hover { + color: #4fd1c5; + } + + .sm\:hover\:text-teal-500:hover { + color: #38b2ac; + } + + .sm\:hover\:text-teal-600:hover { + color: #319795; + } + + .sm\:hover\:text-teal-700:hover { + color: #2c7a7b; + } + + .sm\:hover\:text-teal-800:hover { + color: #285e61; + } + + .sm\:hover\:text-teal-900:hover { + color: #234e52; + } + + .sm\:hover\:text-blue-100:hover { + color: #ebf8ff; + } + + .sm\:hover\:text-blue-200:hover { + color: #bee3f8; + } + + .sm\:hover\:text-blue-300:hover { + color: #90cdf4; + } + + .sm\:hover\:text-blue-400:hover { + color: #63b3ed; + } + + .sm\:hover\:text-blue-500:hover { + color: #4299e1; + } + + .sm\:hover\:text-blue-600:hover { + color: #3182ce; + } + + .sm\:hover\:text-blue-700:hover { + color: #2b6cb0; + } + + .sm\:hover\:text-blue-800:hover { + color: #2c5282; + } + + .sm\:hover\:text-blue-900:hover { + color: #2a4365; + } + + .sm\:hover\:text-indigo-100:hover { + color: #ebf4ff; + } + + .sm\:hover\:text-indigo-200:hover { + color: #c3dafe; + } + + .sm\:hover\:text-indigo-300:hover { + color: #a3bffa; + } + + .sm\:hover\:text-indigo-400:hover { + color: #7f9cf5; + } + + .sm\:hover\:text-indigo-500:hover { + color: #667eea; + } + + .sm\:hover\:text-indigo-600:hover { + color: #5a67d8; + } + + .sm\:hover\:text-indigo-700:hover { + color: #4c51bf; + } + + .sm\:hover\:text-indigo-800:hover { + color: #434190; + } + + .sm\:hover\:text-indigo-900:hover { + color: #3c366b; + } + + .sm\:hover\:text-purple-100:hover { + color: #faf5ff; + } + + .sm\:hover\:text-purple-200:hover { + color: #e9d8fd; + } + + .sm\:hover\:text-purple-300:hover { + color: #d6bcfa; + } + + .sm\:hover\:text-purple-400:hover { + color: #b794f4; + } + + .sm\:hover\:text-purple-500:hover { + color: #9f7aea; + } + + .sm\:hover\:text-purple-600:hover { + color: #805ad5; + } + + .sm\:hover\:text-purple-700:hover { + color: #6b46c1; + } + + .sm\:hover\:text-purple-800:hover { + color: #553c9a; + } + + .sm\:hover\:text-purple-900:hover { + color: #44337a; + } + + .sm\:hover\:text-pink-100:hover { + color: #fff5f7; + } + + .sm\:hover\:text-pink-200:hover { + color: #fed7e2; + } + + .sm\:hover\:text-pink-300:hover { + color: #fbb6ce; + } + + .sm\:hover\:text-pink-400:hover { + color: #f687b3; + } + + .sm\:hover\:text-pink-500:hover { + color: #ed64a6; + } + + .sm\:hover\:text-pink-600:hover { + color: #d53f8c; + } + + .sm\:hover\:text-pink-700:hover { + color: #b83280; + } + + .sm\:hover\:text-pink-800:hover { + color: #97266d; + } + + .sm\:hover\:text-pink-900:hover { + color: #702459; + } + + .sm\:focus\:text-transparent:focus { + color: transparent; + } + + .sm\:focus\:text-current:focus { + color: currentColor; + } + + .sm\:focus\:text-black:focus { + color: #000; + } + + .sm\:focus\:text-white:focus { + color: #fff; + } + + .sm\:focus\:text-gray-100:focus { + color: #f7fafc; + } + + .sm\:focus\:text-gray-200:focus { + color: #edf2f7; + } + + .sm\:focus\:text-gray-300:focus { + color: #e2e8f0; + } + + .sm\:focus\:text-gray-400:focus { + color: #cbd5e0; + } + + .sm\:focus\:text-gray-500:focus { + color: #a0aec0; + } + + .sm\:focus\:text-gray-600:focus { + color: #718096; + } + + .sm\:focus\:text-gray-700:focus { + color: #4a5568; + } + + .sm\:focus\:text-gray-800:focus { + color: #2d3748; + } + + .sm\:focus\:text-gray-900:focus { + color: #1a202c; + } + + .sm\:focus\:text-red-100:focus { + color: #fff5f5; + } + + .sm\:focus\:text-red-200:focus { + color: #fed7d7; + } + + .sm\:focus\:text-red-300:focus { + color: #feb2b2; + } + + .sm\:focus\:text-red-400:focus { + color: #fc8181; + } + + .sm\:focus\:text-red-500:focus { + color: #f56565; + } + + .sm\:focus\:text-red-600:focus { + color: #e53e3e; + } + + .sm\:focus\:text-red-700:focus { + color: #c53030; + } + + .sm\:focus\:text-red-800:focus { + color: #9b2c2c; + } + + .sm\:focus\:text-red-900:focus { + color: #742a2a; + } + + .sm\:focus\:text-orange-100:focus { + color: #fffaf0; + } + + .sm\:focus\:text-orange-200:focus { + color: #feebc8; + } + + .sm\:focus\:text-orange-300:focus { + color: #fbd38d; + } + + .sm\:focus\:text-orange-400:focus { + color: #f6ad55; + } + + .sm\:focus\:text-orange-500:focus { + color: #ed8936; + } + + .sm\:focus\:text-orange-600:focus { + color: #dd6b20; + } + + .sm\:focus\:text-orange-700:focus { + color: #c05621; + } + + .sm\:focus\:text-orange-800:focus { + color: #9c4221; + } + + .sm\:focus\:text-orange-900:focus { + color: #7b341e; + } + + .sm\:focus\:text-yellow-100:focus { + color: #fffff0; + } + + .sm\:focus\:text-yellow-200:focus { + color: #fefcbf; + } + + .sm\:focus\:text-yellow-300:focus { + color: #faf089; + } + + .sm\:focus\:text-yellow-400:focus { + color: #f6e05e; + } + + .sm\:focus\:text-yellow-500:focus { + color: #ecc94b; + } + + .sm\:focus\:text-yellow-600:focus { + color: #d69e2e; + } + + .sm\:focus\:text-yellow-700:focus { + color: #b7791f; + } + + .sm\:focus\:text-yellow-800:focus { + color: #975a16; + } + + .sm\:focus\:text-yellow-900:focus { + color: #744210; + } + + .sm\:focus\:text-green-100:focus { + color: #f0fff4; + } + + .sm\:focus\:text-green-200:focus { + color: #c6f6d5; + } + + .sm\:focus\:text-green-300:focus { + color: #9ae6b4; + } + + .sm\:focus\:text-green-400:focus { + color: #68d391; + } + + .sm\:focus\:text-green-500:focus { + color: #48bb78; + } + + .sm\:focus\:text-green-600:focus { + color: #38a169; + } + + .sm\:focus\:text-green-700:focus { + color: #2f855a; + } + + .sm\:focus\:text-green-800:focus { + color: #276749; + } + + .sm\:focus\:text-green-900:focus { + color: #22543d; + } + + .sm\:focus\:text-teal-100:focus { + color: #e6fffa; + } + + .sm\:focus\:text-teal-200:focus { + color: #b2f5ea; + } + + .sm\:focus\:text-teal-300:focus { + color: #81e6d9; + } + + .sm\:focus\:text-teal-400:focus { + color: #4fd1c5; + } + + .sm\:focus\:text-teal-500:focus { + color: #38b2ac; + } + + .sm\:focus\:text-teal-600:focus { + color: #319795; + } + + .sm\:focus\:text-teal-700:focus { + color: #2c7a7b; + } + + .sm\:focus\:text-teal-800:focus { + color: #285e61; + } + + .sm\:focus\:text-teal-900:focus { + color: #234e52; + } + + .sm\:focus\:text-blue-100:focus { + color: #ebf8ff; + } + + .sm\:focus\:text-blue-200:focus { + color: #bee3f8; + } + + .sm\:focus\:text-blue-300:focus { + color: #90cdf4; + } + + .sm\:focus\:text-blue-400:focus { + color: #63b3ed; + } + + .sm\:focus\:text-blue-500:focus { + color: #4299e1; + } + + .sm\:focus\:text-blue-600:focus { + color: #3182ce; + } + + .sm\:focus\:text-blue-700:focus { + color: #2b6cb0; + } + + .sm\:focus\:text-blue-800:focus { + color: #2c5282; + } + + .sm\:focus\:text-blue-900:focus { + color: #2a4365; + } + + .sm\:focus\:text-indigo-100:focus { + color: #ebf4ff; + } + + .sm\:focus\:text-indigo-200:focus { + color: #c3dafe; + } + + .sm\:focus\:text-indigo-300:focus { + color: #a3bffa; + } + + .sm\:focus\:text-indigo-400:focus { + color: #7f9cf5; + } + + .sm\:focus\:text-indigo-500:focus { + color: #667eea; + } + + .sm\:focus\:text-indigo-600:focus { + color: #5a67d8; + } + + .sm\:focus\:text-indigo-700:focus { + color: #4c51bf; + } + + .sm\:focus\:text-indigo-800:focus { + color: #434190; + } + + .sm\:focus\:text-indigo-900:focus { + color: #3c366b; + } + + .sm\:focus\:text-purple-100:focus { + color: #faf5ff; + } + + .sm\:focus\:text-purple-200:focus { + color: #e9d8fd; + } + + .sm\:focus\:text-purple-300:focus { + color: #d6bcfa; + } + + .sm\:focus\:text-purple-400:focus { + color: #b794f4; + } + + .sm\:focus\:text-purple-500:focus { + color: #9f7aea; + } + + .sm\:focus\:text-purple-600:focus { + color: #805ad5; + } + + .sm\:focus\:text-purple-700:focus { + color: #6b46c1; + } + + .sm\:focus\:text-purple-800:focus { + color: #553c9a; + } + + .sm\:focus\:text-purple-900:focus { + color: #44337a; + } + + .sm\:focus\:text-pink-100:focus { + color: #fff5f7; + } + + .sm\:focus\:text-pink-200:focus { + color: #fed7e2; + } + + .sm\:focus\:text-pink-300:focus { + color: #fbb6ce; + } + + .sm\:focus\:text-pink-400:focus { + color: #f687b3; + } + + .sm\:focus\:text-pink-500:focus { + color: #ed64a6; + } + + .sm\:focus\:text-pink-600:focus { + color: #d53f8c; + } + + .sm\:focus\:text-pink-700:focus { + color: #b83280; + } + + .sm\:focus\:text-pink-800:focus { + color: #97266d; + } + + .sm\:focus\:text-pink-900:focus { + color: #702459; + } + + .sm\:italic { + font-style: italic; + } + + .sm\:not-italic { + font-style: normal; + } + + .sm\:uppercase { + text-transform: uppercase; + } + + .sm\:lowercase { + text-transform: lowercase; + } + + .sm\:capitalize { + text-transform: capitalize; + } + + .sm\:normal-case { + text-transform: none; + } + + .sm\:underline { + text-decoration: underline; + } + + .sm\:line-through { + text-decoration: line-through; + } + + .sm\:no-underline { + text-decoration: none; + } + + .sm\:hover\:underline:hover { + text-decoration: underline; + } + + .sm\:hover\:line-through:hover { + text-decoration: line-through; + } + + .sm\:hover\:no-underline:hover { + text-decoration: none; + } + + .sm\:focus\:underline:focus { + text-decoration: underline; + } + + .sm\:focus\:line-through:focus { + text-decoration: line-through; + } + + .sm\:focus\:no-underline:focus { + text-decoration: none; + } + + .sm\:antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + .sm\:subpixel-antialiased { + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; + } + + .sm\:tracking-tighter { + letter-spacing: -0.05em; + } + + .sm\:tracking-tight { + letter-spacing: -0.025em; + } + + .sm\:tracking-normal { + letter-spacing: 0; + } + + .sm\:tracking-wide { + letter-spacing: 0.025em; + } + + .sm\:tracking-wider { + letter-spacing: 0.05em; + } + + .sm\:tracking-widest { + letter-spacing: 0.1em; + } + + .sm\:select-none { + user-select: none; + } + + .sm\:select-text { + user-select: text; + } + + .sm\:select-all { + user-select: all; + } + + .sm\:select-auto { + user-select: auto; + } + + .sm\:align-baseline { + vertical-align: baseline; + } + + .sm\:align-top { + vertical-align: top; + } + + .sm\:align-middle { + vertical-align: middle; + } + + .sm\:align-bottom { + vertical-align: bottom; + } + + .sm\:align-text-top { + vertical-align: text-top; + } + + .sm\:align-text-bottom { + vertical-align: text-bottom; + } + + .sm\:visible { + visibility: visible; + } + + .sm\:invisible { + visibility: hidden; + } + + .sm\:whitespace-normal { + white-space: normal; + } + + .sm\:whitespace-no-wrap { + white-space: nowrap; + } + + .sm\:whitespace-pre { + white-space: pre; + } + + .sm\:whitespace-pre-line { + white-space: pre-line; + } + + .sm\:whitespace-pre-wrap { + white-space: pre-wrap; + } + + .sm\:break-normal { + overflow-wrap: normal; + word-break: normal; + } + + .sm\:break-words { + overflow-wrap: break-word; + } + + .sm\:break-all { + word-break: break-all; + } + + .sm\:truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .sm\:w-0 { + width: 0; + } + + .sm\:w-1 { + width: 0.25rem; + } + + .sm\:w-2 { + width: 0.5rem; + } + + .sm\:w-3 { + width: 0.75rem; + } + + .sm\:w-4 { + width: 1rem; + } + + .sm\:w-5 { + width: 1.25rem; + } + + .sm\:w-6 { + width: 1.5rem; + } + + .sm\:w-8 { + width: 2rem; + } + + .sm\:w-10 { + width: 2.5rem; + } + + .sm\:w-12 { + width: 3rem; + } + + .sm\:w-16 { + width: 4rem; + } + + .sm\:w-20 { + width: 5rem; + } + + .sm\:w-24 { + width: 6rem; + } + + .sm\:w-32 { + width: 8rem; + } + + .sm\:w-40 { + width: 10rem; + } + + .sm\:w-48 { + width: 12rem; + } + + .sm\:w-56 { + width: 14rem; + } + + .sm\:w-64 { + width: 16rem; + } + + .sm\:w-auto { + width: auto; + } + + .sm\:w-px { + width: 1px; + } + + .sm\:w-1\/2 { + width: 50%; + } + + .sm\:w-1\/3 { + width: 33.333333%; + } + + .sm\:w-2\/3 { + width: 66.666667%; + } + + .sm\:w-1\/4 { + width: 25%; + } + + .sm\:w-2\/4 { + width: 50%; + } + + .sm\:w-3\/4 { + width: 75%; + } + + .sm\:w-1\/5 { + width: 20%; + } + + .sm\:w-2\/5 { + width: 40%; + } + + .sm\:w-3\/5 { + width: 60%; + } + + .sm\:w-4\/5 { + width: 80%; + } + + .sm\:w-1\/6 { + width: 16.666667%; + } + + .sm\:w-2\/6 { + width: 33.333333%; + } + + .sm\:w-3\/6 { + width: 50%; + } + + .sm\:w-4\/6 { + width: 66.666667%; + } + + .sm\:w-5\/6 { + width: 83.333333%; + } + + .sm\:w-1\/12 { + width: 8.333333%; + } + + .sm\:w-2\/12 { + width: 16.666667%; + } + + .sm\:w-3\/12 { + width: 25%; + } + + .sm\:w-4\/12 { + width: 33.333333%; + } + + .sm\:w-5\/12 { + width: 41.666667%; + } + + .sm\:w-6\/12 { + width: 50%; + } + + .sm\:w-7\/12 { + width: 58.333333%; + } + + .sm\:w-8\/12 { + width: 66.666667%; + } + + .sm\:w-9\/12 { + width: 75%; + } + + .sm\:w-10\/12 { + width: 83.333333%; + } + + .sm\:w-11\/12 { + width: 91.666667%; + } + + .sm\:w-full { + width: 100%; + } + + .sm\:w-screen { + width: 100vw; + } + + .sm\:z-0 { + z-index: 0; + } + + .sm\:z-10 { + z-index: 10; + } + + .sm\:z-20 { + z-index: 20; + } + + .sm\:z-30 { + z-index: 30; + } + + .sm\:z-40 { + z-index: 40; + } + + .sm\:z-50 { + z-index: 50; + } + + .sm\:z-auto { + z-index: auto; + } + + .sm\:gap-0 { + grid-gap: 0; + gap: 0; + } + + .sm\:gap-1 { + grid-gap: 0.25rem; + gap: 0.25rem; + } + + .sm\:gap-2 { + grid-gap: 0.5rem; + gap: 0.5rem; + } + + .sm\:gap-3 { + grid-gap: 0.75rem; + gap: 0.75rem; + } + + .sm\:gap-4 { + grid-gap: 1rem; + gap: 1rem; + } + + .sm\:gap-5 { + grid-gap: 1.25rem; + gap: 1.25rem; + } + + .sm\:gap-6 { + grid-gap: 1.5rem; + gap: 1.5rem; + } + + .sm\:gap-8 { + grid-gap: 2rem; + gap: 2rem; + } + + .sm\:gap-10 { + grid-gap: 2.5rem; + gap: 2.5rem; + } + + .sm\:gap-12 { + grid-gap: 3rem; + gap: 3rem; + } + + .sm\:gap-16 { + grid-gap: 4rem; + gap: 4rem; + } + + .sm\:gap-20 { + grid-gap: 5rem; + gap: 5rem; + } + + .sm\:gap-24 { + grid-gap: 6rem; + gap: 6rem; + } + + .sm\:gap-32 { + grid-gap: 8rem; + gap: 8rem; + } + + .sm\:gap-40 { + grid-gap: 10rem; + gap: 10rem; + } + + .sm\:gap-48 { + grid-gap: 12rem; + gap: 12rem; + } + + .sm\:gap-56 { + grid-gap: 14rem; + gap: 14rem; + } + + .sm\:gap-64 { + grid-gap: 16rem; + gap: 16rem; + } + + .sm\:gap-px { + grid-gap: 1px; + gap: 1px; + } + + .sm\:col-gap-0 { + grid-column-gap: 0; + column-gap: 0; + } + + .sm\:col-gap-1 { + grid-column-gap: 0.25rem; + column-gap: 0.25rem; + } + + .sm\:col-gap-2 { + grid-column-gap: 0.5rem; + column-gap: 0.5rem; + } + + .sm\:col-gap-3 { + grid-column-gap: 0.75rem; + column-gap: 0.75rem; + } + + .sm\:col-gap-4 { + grid-column-gap: 1rem; + column-gap: 1rem; + } + + .sm\:col-gap-5 { + grid-column-gap: 1.25rem; + column-gap: 1.25rem; + } + + .sm\:col-gap-6 { + grid-column-gap: 1.5rem; + column-gap: 1.5rem; + } + + .sm\:col-gap-8 { + grid-column-gap: 2rem; + column-gap: 2rem; + } + + .sm\:col-gap-10 { + grid-column-gap: 2.5rem; + column-gap: 2.5rem; + } + + .sm\:col-gap-12 { + grid-column-gap: 3rem; + column-gap: 3rem; + } + + .sm\:col-gap-16 { + grid-column-gap: 4rem; + column-gap: 4rem; + } + + .sm\:col-gap-20 { + grid-column-gap: 5rem; + column-gap: 5rem; + } + + .sm\:col-gap-24 { + grid-column-gap: 6rem; + column-gap: 6rem; + } + + .sm\:col-gap-32 { + grid-column-gap: 8rem; + column-gap: 8rem; + } + + .sm\:col-gap-40 { + grid-column-gap: 10rem; + column-gap: 10rem; + } + + .sm\:col-gap-48 { + grid-column-gap: 12rem; + column-gap: 12rem; + } + + .sm\:col-gap-56 { + grid-column-gap: 14rem; + column-gap: 14rem; + } + + .sm\:col-gap-64 { + grid-column-gap: 16rem; + column-gap: 16rem; + } + + .sm\:col-gap-px { + grid-column-gap: 1px; + column-gap: 1px; + } + + .sm\:row-gap-0 { + grid-row-gap: 0; + row-gap: 0; + } + + .sm\:row-gap-1 { + grid-row-gap: 0.25rem; + row-gap: 0.25rem; + } + + .sm\:row-gap-2 { + grid-row-gap: 0.5rem; + row-gap: 0.5rem; + } + + .sm\:row-gap-3 { + grid-row-gap: 0.75rem; + row-gap: 0.75rem; + } + + .sm\:row-gap-4 { + grid-row-gap: 1rem; + row-gap: 1rem; + } + + .sm\:row-gap-5 { + grid-row-gap: 1.25rem; + row-gap: 1.25rem; + } + + .sm\:row-gap-6 { + grid-row-gap: 1.5rem; + row-gap: 1.5rem; + } + + .sm\:row-gap-8 { + grid-row-gap: 2rem; + row-gap: 2rem; + } + + .sm\:row-gap-10 { + grid-row-gap: 2.5rem; + row-gap: 2.5rem; + } + + .sm\:row-gap-12 { + grid-row-gap: 3rem; + row-gap: 3rem; + } + + .sm\:row-gap-16 { + grid-row-gap: 4rem; + row-gap: 4rem; + } + + .sm\:row-gap-20 { + grid-row-gap: 5rem; + row-gap: 5rem; + } + + .sm\:row-gap-24 { + grid-row-gap: 6rem; + row-gap: 6rem; + } + + .sm\:row-gap-32 { + grid-row-gap: 8rem; + row-gap: 8rem; + } + + .sm\:row-gap-40 { + grid-row-gap: 10rem; + row-gap: 10rem; + } + + .sm\:row-gap-48 { + grid-row-gap: 12rem; + row-gap: 12rem; + } + + .sm\:row-gap-56 { + grid-row-gap: 14rem; + row-gap: 14rem; + } + + .sm\:row-gap-64 { + grid-row-gap: 16rem; + row-gap: 16rem; + } + + .sm\:row-gap-px { + grid-row-gap: 1px; + row-gap: 1px; + } + + .sm\:grid-flow-row { + grid-auto-flow: row; + } + + .sm\:grid-flow-col { + grid-auto-flow: column; + } + + .sm\:grid-flow-row-dense { + grid-auto-flow: row dense; + } + + .sm\:grid-flow-col-dense { + grid-auto-flow: column dense; + } + + .sm\:grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + + .sm\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .sm\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .sm\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .sm\:grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); + } + + .sm\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .sm\:grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); + } + + .sm\:grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); + } + + .sm\:grid-cols-9 { + grid-template-columns: repeat(9, minmax(0, 1fr)); + } + + .sm\:grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); + } + + .sm\:grid-cols-11 { + grid-template-columns: repeat(11, minmax(0, 1fr)); + } + + .sm\:grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .sm\:grid-cols-none { + grid-template-columns: none; + } + + .sm\:col-auto { + grid-column: auto; + } + + .sm\:col-span-1 { + grid-column: span 1 / span 1; + } + + .sm\:col-span-2 { + grid-column: span 2 / span 2; + } + + .sm\:col-span-3 { + grid-column: span 3 / span 3; + } + + .sm\:col-span-4 { + grid-column: span 4 / span 4; + } + + .sm\:col-span-5 { + grid-column: span 5 / span 5; + } + + .sm\:col-span-6 { + grid-column: span 6 / span 6; + } + + .sm\:col-span-7 { + grid-column: span 7 / span 7; + } + + .sm\:col-span-8 { + grid-column: span 8 / span 8; + } + + .sm\:col-span-9 { + grid-column: span 9 / span 9; + } + + .sm\:col-span-10 { + grid-column: span 10 / span 10; + } + + .sm\:col-span-11 { + grid-column: span 11 / span 11; + } + + .sm\:col-span-12 { + grid-column: span 12 / span 12; + } + + .sm\:col-start-1 { + grid-column-start: 1; + } + + .sm\:col-start-2 { + grid-column-start: 2; + } + + .sm\:col-start-3 { + grid-column-start: 3; + } + + .sm\:col-start-4 { + grid-column-start: 4; + } + + .sm\:col-start-5 { + grid-column-start: 5; + } + + .sm\:col-start-6 { + grid-column-start: 6; + } + + .sm\:col-start-7 { + grid-column-start: 7; + } + + .sm\:col-start-8 { + grid-column-start: 8; + } + + .sm\:col-start-9 { + grid-column-start: 9; + } + + .sm\:col-start-10 { + grid-column-start: 10; + } + + .sm\:col-start-11 { + grid-column-start: 11; + } + + .sm\:col-start-12 { + grid-column-start: 12; + } + + .sm\:col-start-13 { + grid-column-start: 13; + } + + .sm\:col-start-auto { + grid-column-start: auto; + } + + .sm\:col-end-1 { + grid-column-end: 1; + } + + .sm\:col-end-2 { + grid-column-end: 2; + } + + .sm\:col-end-3 { + grid-column-end: 3; + } + + .sm\:col-end-4 { + grid-column-end: 4; + } + + .sm\:col-end-5 { + grid-column-end: 5; + } + + .sm\:col-end-6 { + grid-column-end: 6; + } + + .sm\:col-end-7 { + grid-column-end: 7; + } + + .sm\:col-end-8 { + grid-column-end: 8; + } + + .sm\:col-end-9 { + grid-column-end: 9; + } + + .sm\:col-end-10 { + grid-column-end: 10; + } + + .sm\:col-end-11 { + grid-column-end: 11; + } + + .sm\:col-end-12 { + grid-column-end: 12; + } + + .sm\:col-end-13 { + grid-column-end: 13; + } + + .sm\:col-end-auto { + grid-column-end: auto; + } + + .sm\:grid-rows-1 { + grid-template-rows: repeat(1, minmax(0, 1fr)); + } + + .sm\:grid-rows-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); + } + + .sm\:grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); + } + + .sm\:grid-rows-4 { + grid-template-rows: repeat(4, minmax(0, 1fr)); + } + + .sm\:grid-rows-5 { + grid-template-rows: repeat(5, minmax(0, 1fr)); + } + + .sm\:grid-rows-6 { + grid-template-rows: repeat(6, minmax(0, 1fr)); + } + + .sm\:grid-rows-none { + grid-template-rows: none; + } + + .sm\:row-auto { + grid-row: auto; + } + + .sm\:row-span-1 { + grid-row: span 1 / span 1; + } + + .sm\:row-span-2 { + grid-row: span 2 / span 2; + } + + .sm\:row-span-3 { + grid-row: span 3 / span 3; + } + + .sm\:row-span-4 { + grid-row: span 4 / span 4; + } + + .sm\:row-span-5 { + grid-row: span 5 / span 5; + } + + .sm\:row-span-6 { + grid-row: span 6 / span 6; + } + + .sm\:row-start-1 { + grid-row-start: 1; + } + + .sm\:row-start-2 { + grid-row-start: 2; + } + + .sm\:row-start-3 { + grid-row-start: 3; + } + + .sm\:row-start-4 { + grid-row-start: 4; + } + + .sm\:row-start-5 { + grid-row-start: 5; + } + + .sm\:row-start-6 { + grid-row-start: 6; + } + + .sm\:row-start-7 { + grid-row-start: 7; + } + + .sm\:row-start-auto { + grid-row-start: auto; + } + + .sm\:row-end-1 { + grid-row-end: 1; + } + + .sm\:row-end-2 { + grid-row-end: 2; + } + + .sm\:row-end-3 { + grid-row-end: 3; + } + + .sm\:row-end-4 { + grid-row-end: 4; + } + + .sm\:row-end-5 { + grid-row-end: 5; + } + + .sm\:row-end-6 { + grid-row-end: 6; + } + + .sm\:row-end-7 { + grid-row-end: 7; + } + + .sm\:row-end-auto { + grid-row-end: auto; + } + + .sm\:transform { + --transform-translate-x: 0; + --transform-translate-y: 0; + --transform-rotate: 0; + --transform-skew-x: 0; + --transform-skew-y: 0; + --transform-scale-x: 1; + --transform-scale-y: 1; + transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y)); + } + + .sm\:transform-none { + transform: none; + } + + .sm\:origin-center { + transform-origin: center; + } + + .sm\:origin-top { + transform-origin: top; + } + + .sm\:origin-top-right { + transform-origin: top right; + } + + .sm\:origin-right { + transform-origin: right; + } + + .sm\:origin-bottom-right { + transform-origin: bottom right; + } + + .sm\:origin-bottom { + transform-origin: bottom; + } + + .sm\:origin-bottom-left { + transform-origin: bottom left; + } + + .sm\:origin-left { + transform-origin: left; + } + + .sm\:origin-top-left { + transform-origin: top left; + } + + .sm\:scale-0 { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .sm\:scale-50 { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .sm\:scale-75 { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .sm\:scale-90 { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .sm\:scale-95 { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .sm\:scale-100 { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .sm\:scale-105 { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .sm\:scale-110 { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .sm\:scale-125 { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .sm\:scale-150 { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .sm\:scale-x-0 { + --transform-scale-x: 0; + } + + .sm\:scale-x-50 { + --transform-scale-x: .5; + } + + .sm\:scale-x-75 { + --transform-scale-x: .75; + } + + .sm\:scale-x-90 { + --transform-scale-x: .9; + } + + .sm\:scale-x-95 { + --transform-scale-x: .95; + } + + .sm\:scale-x-100 { + --transform-scale-x: 1; + } + + .sm\:scale-x-105 { + --transform-scale-x: 1.05; + } + + .sm\:scale-x-110 { + --transform-scale-x: 1.1; + } + + .sm\:scale-x-125 { + --transform-scale-x: 1.25; + } + + .sm\:scale-x-150 { + --transform-scale-x: 1.5; + } + + .sm\:scale-y-0 { + --transform-scale-y: 0; + } + + .sm\:scale-y-50 { + --transform-scale-y: .5; + } + + .sm\:scale-y-75 { + --transform-scale-y: .75; + } + + .sm\:scale-y-90 { + --transform-scale-y: .9; + } + + .sm\:scale-y-95 { + --transform-scale-y: .95; + } + + .sm\:scale-y-100 { + --transform-scale-y: 1; + } + + .sm\:scale-y-105 { + --transform-scale-y: 1.05; + } + + .sm\:scale-y-110 { + --transform-scale-y: 1.1; + } + + .sm\:scale-y-125 { + --transform-scale-y: 1.25; + } + + .sm\:scale-y-150 { + --transform-scale-y: 1.5; + } + + .sm\:hover\:scale-0:hover { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .sm\:hover\:scale-50:hover { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .sm\:hover\:scale-75:hover { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .sm\:hover\:scale-90:hover { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .sm\:hover\:scale-95:hover { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .sm\:hover\:scale-100:hover { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .sm\:hover\:scale-105:hover { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .sm\:hover\:scale-110:hover { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .sm\:hover\:scale-125:hover { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .sm\:hover\:scale-150:hover { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .sm\:hover\:scale-x-0:hover { + --transform-scale-x: 0; + } + + .sm\:hover\:scale-x-50:hover { + --transform-scale-x: .5; + } + + .sm\:hover\:scale-x-75:hover { + --transform-scale-x: .75; + } + + .sm\:hover\:scale-x-90:hover { + --transform-scale-x: .9; + } + + .sm\:hover\:scale-x-95:hover { + --transform-scale-x: .95; + } + + .sm\:hover\:scale-x-100:hover { + --transform-scale-x: 1; + } + + .sm\:hover\:scale-x-105:hover { + --transform-scale-x: 1.05; + } + + .sm\:hover\:scale-x-110:hover { + --transform-scale-x: 1.1; + } + + .sm\:hover\:scale-x-125:hover { + --transform-scale-x: 1.25; + } + + .sm\:hover\:scale-x-150:hover { + --transform-scale-x: 1.5; + } + + .sm\:hover\:scale-y-0:hover { + --transform-scale-y: 0; + } + + .sm\:hover\:scale-y-50:hover { + --transform-scale-y: .5; + } + + .sm\:hover\:scale-y-75:hover { + --transform-scale-y: .75; + } + + .sm\:hover\:scale-y-90:hover { + --transform-scale-y: .9; + } + + .sm\:hover\:scale-y-95:hover { + --transform-scale-y: .95; + } + + .sm\:hover\:scale-y-100:hover { + --transform-scale-y: 1; + } + + .sm\:hover\:scale-y-105:hover { + --transform-scale-y: 1.05; + } + + .sm\:hover\:scale-y-110:hover { + --transform-scale-y: 1.1; + } + + .sm\:hover\:scale-y-125:hover { + --transform-scale-y: 1.25; + } + + .sm\:hover\:scale-y-150:hover { + --transform-scale-y: 1.5; + } + + .sm\:focus\:scale-0:focus { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .sm\:focus\:scale-50:focus { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .sm\:focus\:scale-75:focus { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .sm\:focus\:scale-90:focus { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .sm\:focus\:scale-95:focus { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .sm\:focus\:scale-100:focus { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .sm\:focus\:scale-105:focus { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .sm\:focus\:scale-110:focus { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .sm\:focus\:scale-125:focus { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .sm\:focus\:scale-150:focus { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .sm\:focus\:scale-x-0:focus { + --transform-scale-x: 0; + } + + .sm\:focus\:scale-x-50:focus { + --transform-scale-x: .5; + } + + .sm\:focus\:scale-x-75:focus { + --transform-scale-x: .75; + } + + .sm\:focus\:scale-x-90:focus { + --transform-scale-x: .9; + } + + .sm\:focus\:scale-x-95:focus { + --transform-scale-x: .95; + } + + .sm\:focus\:scale-x-100:focus { + --transform-scale-x: 1; + } + + .sm\:focus\:scale-x-105:focus { + --transform-scale-x: 1.05; + } + + .sm\:focus\:scale-x-110:focus { + --transform-scale-x: 1.1; + } + + .sm\:focus\:scale-x-125:focus { + --transform-scale-x: 1.25; + } + + .sm\:focus\:scale-x-150:focus { + --transform-scale-x: 1.5; + } + + .sm\:focus\:scale-y-0:focus { + --transform-scale-y: 0; + } + + .sm\:focus\:scale-y-50:focus { + --transform-scale-y: .5; + } + + .sm\:focus\:scale-y-75:focus { + --transform-scale-y: .75; + } + + .sm\:focus\:scale-y-90:focus { + --transform-scale-y: .9; + } + + .sm\:focus\:scale-y-95:focus { + --transform-scale-y: .95; + } + + .sm\:focus\:scale-y-100:focus { + --transform-scale-y: 1; + } + + .sm\:focus\:scale-y-105:focus { + --transform-scale-y: 1.05; + } + + .sm\:focus\:scale-y-110:focus { + --transform-scale-y: 1.1; + } + + .sm\:focus\:scale-y-125:focus { + --transform-scale-y: 1.25; + } + + .sm\:focus\:scale-y-150:focus { + --transform-scale-y: 1.5; + } + + .sm\:rotate-0 { + --transform-rotate: 0; + } + + .sm\:rotate-45 { + --transform-rotate: 45deg; + } + + .sm\:rotate-90 { + --transform-rotate: 90deg; + } + + .sm\:rotate-180 { + --transform-rotate: 180deg; + } + + .sm\:-rotate-180 { + --transform-rotate: -180deg; + } + + .sm\:-rotate-90 { + --transform-rotate: -90deg; + } + + .sm\:-rotate-45 { + --transform-rotate: -45deg; + } + + .sm\:hover\:rotate-0:hover { + --transform-rotate: 0; + } + + .sm\:hover\:rotate-45:hover { + --transform-rotate: 45deg; + } + + .sm\:hover\:rotate-90:hover { + --transform-rotate: 90deg; + } + + .sm\:hover\:rotate-180:hover { + --transform-rotate: 180deg; + } + + .sm\:hover\:-rotate-180:hover { + --transform-rotate: -180deg; + } + + .sm\:hover\:-rotate-90:hover { + --transform-rotate: -90deg; + } + + .sm\:hover\:-rotate-45:hover { + --transform-rotate: -45deg; + } + + .sm\:focus\:rotate-0:focus { + --transform-rotate: 0; + } + + .sm\:focus\:rotate-45:focus { + --transform-rotate: 45deg; + } + + .sm\:focus\:rotate-90:focus { + --transform-rotate: 90deg; + } + + .sm\:focus\:rotate-180:focus { + --transform-rotate: 180deg; + } + + .sm\:focus\:-rotate-180:focus { + --transform-rotate: -180deg; + } + + .sm\:focus\:-rotate-90:focus { + --transform-rotate: -90deg; + } + + .sm\:focus\:-rotate-45:focus { + --transform-rotate: -45deg; + } + + .sm\:translate-x-0 { + --transform-translate-x: 0; + } + + .sm\:translate-x-1 { + --transform-translate-x: 0.25rem; + } + + .sm\:translate-x-2 { + --transform-translate-x: 0.5rem; + } + + .sm\:translate-x-3 { + --transform-translate-x: 0.75rem; + } + + .sm\:translate-x-4 { + --transform-translate-x: 1rem; + } + + .sm\:translate-x-5 { + --transform-translate-x: 1.25rem; + } + + .sm\:translate-x-6 { + --transform-translate-x: 1.5rem; + } + + .sm\:translate-x-8 { + --transform-translate-x: 2rem; + } + + .sm\:translate-x-10 { + --transform-translate-x: 2.5rem; + } + + .sm\:translate-x-12 { + --transform-translate-x: 3rem; + } + + .sm\:translate-x-16 { + --transform-translate-x: 4rem; + } + + .sm\:translate-x-20 { + --transform-translate-x: 5rem; + } + + .sm\:translate-x-24 { + --transform-translate-x: 6rem; + } + + .sm\:translate-x-32 { + --transform-translate-x: 8rem; + } + + .sm\:translate-x-40 { + --transform-translate-x: 10rem; + } + + .sm\:translate-x-48 { + --transform-translate-x: 12rem; + } + + .sm\:translate-x-56 { + --transform-translate-x: 14rem; + } + + .sm\:translate-x-64 { + --transform-translate-x: 16rem; + } + + .sm\:translate-x-px { + --transform-translate-x: 1px; + } + + .sm\:-translate-x-1 { + --transform-translate-x: -0.25rem; + } + + .sm\:-translate-x-2 { + --transform-translate-x: -0.5rem; + } + + .sm\:-translate-x-3 { + --transform-translate-x: -0.75rem; + } + + .sm\:-translate-x-4 { + --transform-translate-x: -1rem; + } + + .sm\:-translate-x-5 { + --transform-translate-x: -1.25rem; + } + + .sm\:-translate-x-6 { + --transform-translate-x: -1.5rem; + } + + .sm\:-translate-x-8 { + --transform-translate-x: -2rem; + } + + .sm\:-translate-x-10 { + --transform-translate-x: -2.5rem; + } + + .sm\:-translate-x-12 { + --transform-translate-x: -3rem; + } + + .sm\:-translate-x-16 { + --transform-translate-x: -4rem; + } + + .sm\:-translate-x-20 { + --transform-translate-x: -5rem; + } + + .sm\:-translate-x-24 { + --transform-translate-x: -6rem; + } + + .sm\:-translate-x-32 { + --transform-translate-x: -8rem; + } + + .sm\:-translate-x-40 { + --transform-translate-x: -10rem; + } + + .sm\:-translate-x-48 { + --transform-translate-x: -12rem; + } + + .sm\:-translate-x-56 { + --transform-translate-x: -14rem; + } + + .sm\:-translate-x-64 { + --transform-translate-x: -16rem; + } + + .sm\:-translate-x-px { + --transform-translate-x: -1px; + } + + .sm\:-translate-x-full { + --transform-translate-x: -100%; + } + + .sm\:-translate-x-1\/2 { + --transform-translate-x: -50%; + } + + .sm\:translate-x-1\/2 { + --transform-translate-x: 50%; + } + + .sm\:translate-x-full { + --transform-translate-x: 100%; + } + + .sm\:translate-y-0 { + --transform-translate-y: 0; + } + + .sm\:translate-y-1 { + --transform-translate-y: 0.25rem; + } + + .sm\:translate-y-2 { + --transform-translate-y: 0.5rem; + } + + .sm\:translate-y-3 { + --transform-translate-y: 0.75rem; + } + + .sm\:translate-y-4 { + --transform-translate-y: 1rem; + } + + .sm\:translate-y-5 { + --transform-translate-y: 1.25rem; + } + + .sm\:translate-y-6 { + --transform-translate-y: 1.5rem; + } + + .sm\:translate-y-8 { + --transform-translate-y: 2rem; + } + + .sm\:translate-y-10 { + --transform-translate-y: 2.5rem; + } + + .sm\:translate-y-12 { + --transform-translate-y: 3rem; + } + + .sm\:translate-y-16 { + --transform-translate-y: 4rem; + } + + .sm\:translate-y-20 { + --transform-translate-y: 5rem; + } + + .sm\:translate-y-24 { + --transform-translate-y: 6rem; + } + + .sm\:translate-y-32 { + --transform-translate-y: 8rem; + } + + .sm\:translate-y-40 { + --transform-translate-y: 10rem; + } + + .sm\:translate-y-48 { + --transform-translate-y: 12rem; + } + + .sm\:translate-y-56 { + --transform-translate-y: 14rem; + } + + .sm\:translate-y-64 { + --transform-translate-y: 16rem; + } + + .sm\:translate-y-px { + --transform-translate-y: 1px; + } + + .sm\:-translate-y-1 { + --transform-translate-y: -0.25rem; + } + + .sm\:-translate-y-2 { + --transform-translate-y: -0.5rem; + } + + .sm\:-translate-y-3 { + --transform-translate-y: -0.75rem; + } + + .sm\:-translate-y-4 { + --transform-translate-y: -1rem; + } + + .sm\:-translate-y-5 { + --transform-translate-y: -1.25rem; + } + + .sm\:-translate-y-6 { + --transform-translate-y: -1.5rem; + } + + .sm\:-translate-y-8 { + --transform-translate-y: -2rem; + } + + .sm\:-translate-y-10 { + --transform-translate-y: -2.5rem; + } + + .sm\:-translate-y-12 { + --transform-translate-y: -3rem; + } + + .sm\:-translate-y-16 { + --transform-translate-y: -4rem; + } + + .sm\:-translate-y-20 { + --transform-translate-y: -5rem; + } + + .sm\:-translate-y-24 { + --transform-translate-y: -6rem; + } + + .sm\:-translate-y-32 { + --transform-translate-y: -8rem; + } + + .sm\:-translate-y-40 { + --transform-translate-y: -10rem; + } + + .sm\:-translate-y-48 { + --transform-translate-y: -12rem; + } + + .sm\:-translate-y-56 { + --transform-translate-y: -14rem; + } + + .sm\:-translate-y-64 { + --transform-translate-y: -16rem; + } + + .sm\:-translate-y-px { + --transform-translate-y: -1px; + } + + .sm\:-translate-y-full { + --transform-translate-y: -100%; + } + + .sm\:-translate-y-1\/2 { + --transform-translate-y: -50%; + } + + .sm\:translate-y-1\/2 { + --transform-translate-y: 50%; + } + + .sm\:translate-y-full { + --transform-translate-y: 100%; + } + + .sm\:hover\:translate-x-0:hover { + --transform-translate-x: 0; + } + + .sm\:hover\:translate-x-1:hover { + --transform-translate-x: 0.25rem; + } + + .sm\:hover\:translate-x-2:hover { + --transform-translate-x: 0.5rem; + } + + .sm\:hover\:translate-x-3:hover { + --transform-translate-x: 0.75rem; + } + + .sm\:hover\:translate-x-4:hover { + --transform-translate-x: 1rem; + } + + .sm\:hover\:translate-x-5:hover { + --transform-translate-x: 1.25rem; + } + + .sm\:hover\:translate-x-6:hover { + --transform-translate-x: 1.5rem; + } + + .sm\:hover\:translate-x-8:hover { + --transform-translate-x: 2rem; + } + + .sm\:hover\:translate-x-10:hover { + --transform-translate-x: 2.5rem; + } + + .sm\:hover\:translate-x-12:hover { + --transform-translate-x: 3rem; + } + + .sm\:hover\:translate-x-16:hover { + --transform-translate-x: 4rem; + } + + .sm\:hover\:translate-x-20:hover { + --transform-translate-x: 5rem; + } + + .sm\:hover\:translate-x-24:hover { + --transform-translate-x: 6rem; + } + + .sm\:hover\:translate-x-32:hover { + --transform-translate-x: 8rem; + } + + .sm\:hover\:translate-x-40:hover { + --transform-translate-x: 10rem; + } + + .sm\:hover\:translate-x-48:hover { + --transform-translate-x: 12rem; + } + + .sm\:hover\:translate-x-56:hover { + --transform-translate-x: 14rem; + } + + .sm\:hover\:translate-x-64:hover { + --transform-translate-x: 16rem; + } + + .sm\:hover\:translate-x-px:hover { + --transform-translate-x: 1px; + } + + .sm\:hover\:-translate-x-1:hover { + --transform-translate-x: -0.25rem; + } + + .sm\:hover\:-translate-x-2:hover { + --transform-translate-x: -0.5rem; + } + + .sm\:hover\:-translate-x-3:hover { + --transform-translate-x: -0.75rem; + } + + .sm\:hover\:-translate-x-4:hover { + --transform-translate-x: -1rem; + } + + .sm\:hover\:-translate-x-5:hover { + --transform-translate-x: -1.25rem; + } + + .sm\:hover\:-translate-x-6:hover { + --transform-translate-x: -1.5rem; + } + + .sm\:hover\:-translate-x-8:hover { + --transform-translate-x: -2rem; + } + + .sm\:hover\:-translate-x-10:hover { + --transform-translate-x: -2.5rem; + } + + .sm\:hover\:-translate-x-12:hover { + --transform-translate-x: -3rem; + } + + .sm\:hover\:-translate-x-16:hover { + --transform-translate-x: -4rem; + } + + .sm\:hover\:-translate-x-20:hover { + --transform-translate-x: -5rem; + } + + .sm\:hover\:-translate-x-24:hover { + --transform-translate-x: -6rem; + } + + .sm\:hover\:-translate-x-32:hover { + --transform-translate-x: -8rem; + } + + .sm\:hover\:-translate-x-40:hover { + --transform-translate-x: -10rem; + } + + .sm\:hover\:-translate-x-48:hover { + --transform-translate-x: -12rem; + } + + .sm\:hover\:-translate-x-56:hover { + --transform-translate-x: -14rem; + } + + .sm\:hover\:-translate-x-64:hover { + --transform-translate-x: -16rem; + } + + .sm\:hover\:-translate-x-px:hover { + --transform-translate-x: -1px; + } + + .sm\:hover\:-translate-x-full:hover { + --transform-translate-x: -100%; + } + + .sm\:hover\:-translate-x-1\/2:hover { + --transform-translate-x: -50%; + } + + .sm\:hover\:translate-x-1\/2:hover { + --transform-translate-x: 50%; + } + + .sm\:hover\:translate-x-full:hover { + --transform-translate-x: 100%; + } + + .sm\:hover\:translate-y-0:hover { + --transform-translate-y: 0; + } + + .sm\:hover\:translate-y-1:hover { + --transform-translate-y: 0.25rem; + } + + .sm\:hover\:translate-y-2:hover { + --transform-translate-y: 0.5rem; + } + + .sm\:hover\:translate-y-3:hover { + --transform-translate-y: 0.75rem; + } + + .sm\:hover\:translate-y-4:hover { + --transform-translate-y: 1rem; + } + + .sm\:hover\:translate-y-5:hover { + --transform-translate-y: 1.25rem; + } + + .sm\:hover\:translate-y-6:hover { + --transform-translate-y: 1.5rem; + } + + .sm\:hover\:translate-y-8:hover { + --transform-translate-y: 2rem; + } + + .sm\:hover\:translate-y-10:hover { + --transform-translate-y: 2.5rem; + } + + .sm\:hover\:translate-y-12:hover { + --transform-translate-y: 3rem; + } + + .sm\:hover\:translate-y-16:hover { + --transform-translate-y: 4rem; + } + + .sm\:hover\:translate-y-20:hover { + --transform-translate-y: 5rem; + } + + .sm\:hover\:translate-y-24:hover { + --transform-translate-y: 6rem; + } + + .sm\:hover\:translate-y-32:hover { + --transform-translate-y: 8rem; + } + + .sm\:hover\:translate-y-40:hover { + --transform-translate-y: 10rem; + } + + .sm\:hover\:translate-y-48:hover { + --transform-translate-y: 12rem; + } + + .sm\:hover\:translate-y-56:hover { + --transform-translate-y: 14rem; + } + + .sm\:hover\:translate-y-64:hover { + --transform-translate-y: 16rem; + } + + .sm\:hover\:translate-y-px:hover { + --transform-translate-y: 1px; + } + + .sm\:hover\:-translate-y-1:hover { + --transform-translate-y: -0.25rem; + } + + .sm\:hover\:-translate-y-2:hover { + --transform-translate-y: -0.5rem; + } + + .sm\:hover\:-translate-y-3:hover { + --transform-translate-y: -0.75rem; + } + + .sm\:hover\:-translate-y-4:hover { + --transform-translate-y: -1rem; + } + + .sm\:hover\:-translate-y-5:hover { + --transform-translate-y: -1.25rem; + } + + .sm\:hover\:-translate-y-6:hover { + --transform-translate-y: -1.5rem; + } + + .sm\:hover\:-translate-y-8:hover { + --transform-translate-y: -2rem; + } + + .sm\:hover\:-translate-y-10:hover { + --transform-translate-y: -2.5rem; + } + + .sm\:hover\:-translate-y-12:hover { + --transform-translate-y: -3rem; + } + + .sm\:hover\:-translate-y-16:hover { + --transform-translate-y: -4rem; + } + + .sm\:hover\:-translate-y-20:hover { + --transform-translate-y: -5rem; + } + + .sm\:hover\:-translate-y-24:hover { + --transform-translate-y: -6rem; + } + + .sm\:hover\:-translate-y-32:hover { + --transform-translate-y: -8rem; + } + + .sm\:hover\:-translate-y-40:hover { + --transform-translate-y: -10rem; + } + + .sm\:hover\:-translate-y-48:hover { + --transform-translate-y: -12rem; + } + + .sm\:hover\:-translate-y-56:hover { + --transform-translate-y: -14rem; + } + + .sm\:hover\:-translate-y-64:hover { + --transform-translate-y: -16rem; + } + + .sm\:hover\:-translate-y-px:hover { + --transform-translate-y: -1px; + } + + .sm\:hover\:-translate-y-full:hover { + --transform-translate-y: -100%; + } + + .sm\:hover\:-translate-y-1\/2:hover { + --transform-translate-y: -50%; + } + + .sm\:hover\:translate-y-1\/2:hover { + --transform-translate-y: 50%; + } + + .sm\:hover\:translate-y-full:hover { + --transform-translate-y: 100%; + } + + .sm\:focus\:translate-x-0:focus { + --transform-translate-x: 0; + } + + .sm\:focus\:translate-x-1:focus { + --transform-translate-x: 0.25rem; + } + + .sm\:focus\:translate-x-2:focus { + --transform-translate-x: 0.5rem; + } + + .sm\:focus\:translate-x-3:focus { + --transform-translate-x: 0.75rem; + } + + .sm\:focus\:translate-x-4:focus { + --transform-translate-x: 1rem; + } + + .sm\:focus\:translate-x-5:focus { + --transform-translate-x: 1.25rem; + } + + .sm\:focus\:translate-x-6:focus { + --transform-translate-x: 1.5rem; + } + + .sm\:focus\:translate-x-8:focus { + --transform-translate-x: 2rem; + } + + .sm\:focus\:translate-x-10:focus { + --transform-translate-x: 2.5rem; + } + + .sm\:focus\:translate-x-12:focus { + --transform-translate-x: 3rem; + } + + .sm\:focus\:translate-x-16:focus { + --transform-translate-x: 4rem; + } + + .sm\:focus\:translate-x-20:focus { + --transform-translate-x: 5rem; + } + + .sm\:focus\:translate-x-24:focus { + --transform-translate-x: 6rem; + } + + .sm\:focus\:translate-x-32:focus { + --transform-translate-x: 8rem; + } + + .sm\:focus\:translate-x-40:focus { + --transform-translate-x: 10rem; + } + + .sm\:focus\:translate-x-48:focus { + --transform-translate-x: 12rem; + } + + .sm\:focus\:translate-x-56:focus { + --transform-translate-x: 14rem; + } + + .sm\:focus\:translate-x-64:focus { + --transform-translate-x: 16rem; + } + + .sm\:focus\:translate-x-px:focus { + --transform-translate-x: 1px; + } + + .sm\:focus\:-translate-x-1:focus { + --transform-translate-x: -0.25rem; + } + + .sm\:focus\:-translate-x-2:focus { + --transform-translate-x: -0.5rem; + } + + .sm\:focus\:-translate-x-3:focus { + --transform-translate-x: -0.75rem; + } + + .sm\:focus\:-translate-x-4:focus { + --transform-translate-x: -1rem; + } + + .sm\:focus\:-translate-x-5:focus { + --transform-translate-x: -1.25rem; + } + + .sm\:focus\:-translate-x-6:focus { + --transform-translate-x: -1.5rem; + } + + .sm\:focus\:-translate-x-8:focus { + --transform-translate-x: -2rem; + } + + .sm\:focus\:-translate-x-10:focus { + --transform-translate-x: -2.5rem; + } + + .sm\:focus\:-translate-x-12:focus { + --transform-translate-x: -3rem; + } + + .sm\:focus\:-translate-x-16:focus { + --transform-translate-x: -4rem; + } + + .sm\:focus\:-translate-x-20:focus { + --transform-translate-x: -5rem; + } + + .sm\:focus\:-translate-x-24:focus { + --transform-translate-x: -6rem; + } + + .sm\:focus\:-translate-x-32:focus { + --transform-translate-x: -8rem; + } + + .sm\:focus\:-translate-x-40:focus { + --transform-translate-x: -10rem; + } + + .sm\:focus\:-translate-x-48:focus { + --transform-translate-x: -12rem; + } + + .sm\:focus\:-translate-x-56:focus { + --transform-translate-x: -14rem; + } + + .sm\:focus\:-translate-x-64:focus { + --transform-translate-x: -16rem; + } + + .sm\:focus\:-translate-x-px:focus { + --transform-translate-x: -1px; + } + + .sm\:focus\:-translate-x-full:focus { + --transform-translate-x: -100%; + } + + .sm\:focus\:-translate-x-1\/2:focus { + --transform-translate-x: -50%; + } + + .sm\:focus\:translate-x-1\/2:focus { + --transform-translate-x: 50%; + } + + .sm\:focus\:translate-x-full:focus { + --transform-translate-x: 100%; + } + + .sm\:focus\:translate-y-0:focus { + --transform-translate-y: 0; + } + + .sm\:focus\:translate-y-1:focus { + --transform-translate-y: 0.25rem; + } + + .sm\:focus\:translate-y-2:focus { + --transform-translate-y: 0.5rem; + } + + .sm\:focus\:translate-y-3:focus { + --transform-translate-y: 0.75rem; + } + + .sm\:focus\:translate-y-4:focus { + --transform-translate-y: 1rem; + } + + .sm\:focus\:translate-y-5:focus { + --transform-translate-y: 1.25rem; + } + + .sm\:focus\:translate-y-6:focus { + --transform-translate-y: 1.5rem; + } + + .sm\:focus\:translate-y-8:focus { + --transform-translate-y: 2rem; + } + + .sm\:focus\:translate-y-10:focus { + --transform-translate-y: 2.5rem; + } + + .sm\:focus\:translate-y-12:focus { + --transform-translate-y: 3rem; + } + + .sm\:focus\:translate-y-16:focus { + --transform-translate-y: 4rem; + } + + .sm\:focus\:translate-y-20:focus { + --transform-translate-y: 5rem; + } + + .sm\:focus\:translate-y-24:focus { + --transform-translate-y: 6rem; + } + + .sm\:focus\:translate-y-32:focus { + --transform-translate-y: 8rem; + } + + .sm\:focus\:translate-y-40:focus { + --transform-translate-y: 10rem; + } + + .sm\:focus\:translate-y-48:focus { + --transform-translate-y: 12rem; + } + + .sm\:focus\:translate-y-56:focus { + --transform-translate-y: 14rem; + } + + .sm\:focus\:translate-y-64:focus { + --transform-translate-y: 16rem; + } + + .sm\:focus\:translate-y-px:focus { + --transform-translate-y: 1px; + } + + .sm\:focus\:-translate-y-1:focus { + --transform-translate-y: -0.25rem; + } + + .sm\:focus\:-translate-y-2:focus { + --transform-translate-y: -0.5rem; + } + + .sm\:focus\:-translate-y-3:focus { + --transform-translate-y: -0.75rem; + } + + .sm\:focus\:-translate-y-4:focus { + --transform-translate-y: -1rem; + } + + .sm\:focus\:-translate-y-5:focus { + --transform-translate-y: -1.25rem; + } + + .sm\:focus\:-translate-y-6:focus { + --transform-translate-y: -1.5rem; + } + + .sm\:focus\:-translate-y-8:focus { + --transform-translate-y: -2rem; + } + + .sm\:focus\:-translate-y-10:focus { + --transform-translate-y: -2.5rem; + } + + .sm\:focus\:-translate-y-12:focus { + --transform-translate-y: -3rem; + } + + .sm\:focus\:-translate-y-16:focus { + --transform-translate-y: -4rem; + } + + .sm\:focus\:-translate-y-20:focus { + --transform-translate-y: -5rem; + } + + .sm\:focus\:-translate-y-24:focus { + --transform-translate-y: -6rem; + } + + .sm\:focus\:-translate-y-32:focus { + --transform-translate-y: -8rem; + } + + .sm\:focus\:-translate-y-40:focus { + --transform-translate-y: -10rem; + } + + .sm\:focus\:-translate-y-48:focus { + --transform-translate-y: -12rem; + } + + .sm\:focus\:-translate-y-56:focus { + --transform-translate-y: -14rem; + } + + .sm\:focus\:-translate-y-64:focus { + --transform-translate-y: -16rem; + } + + .sm\:focus\:-translate-y-px:focus { + --transform-translate-y: -1px; + } + + .sm\:focus\:-translate-y-full:focus { + --transform-translate-y: -100%; + } + + .sm\:focus\:-translate-y-1\/2:focus { + --transform-translate-y: -50%; + } + + .sm\:focus\:translate-y-1\/2:focus { + --transform-translate-y: 50%; + } + + .sm\:focus\:translate-y-full:focus { + --transform-translate-y: 100%; + } + + .sm\:skew-x-0 { + --transform-skew-x: 0; + } + + .sm\:skew-x-3 { + --transform-skew-x: 3deg; + } + + .sm\:skew-x-6 { + --transform-skew-x: 6deg; + } + + .sm\:skew-x-12 { + --transform-skew-x: 12deg; + } + + .sm\:-skew-x-12 { + --transform-skew-x: -12deg; + } + + .sm\:-skew-x-6 { + --transform-skew-x: -6deg; + } + + .sm\:-skew-x-3 { + --transform-skew-x: -3deg; + } + + .sm\:skew-y-0 { + --transform-skew-y: 0; + } + + .sm\:skew-y-3 { + --transform-skew-y: 3deg; + } + + .sm\:skew-y-6 { + --transform-skew-y: 6deg; + } + + .sm\:skew-y-12 { + --transform-skew-y: 12deg; + } + + .sm\:-skew-y-12 { + --transform-skew-y: -12deg; + } + + .sm\:-skew-y-6 { + --transform-skew-y: -6deg; + } + + .sm\:-skew-y-3 { + --transform-skew-y: -3deg; + } + + .sm\:hover\:skew-x-0:hover { + --transform-skew-x: 0; + } + + .sm\:hover\:skew-x-3:hover { + --transform-skew-x: 3deg; + } + + .sm\:hover\:skew-x-6:hover { + --transform-skew-x: 6deg; + } + + .sm\:hover\:skew-x-12:hover { + --transform-skew-x: 12deg; + } + + .sm\:hover\:-skew-x-12:hover { + --transform-skew-x: -12deg; + } + + .sm\:hover\:-skew-x-6:hover { + --transform-skew-x: -6deg; + } + + .sm\:hover\:-skew-x-3:hover { + --transform-skew-x: -3deg; + } + + .sm\:hover\:skew-y-0:hover { + --transform-skew-y: 0; + } + + .sm\:hover\:skew-y-3:hover { + --transform-skew-y: 3deg; + } + + .sm\:hover\:skew-y-6:hover { + --transform-skew-y: 6deg; + } + + .sm\:hover\:skew-y-12:hover { + --transform-skew-y: 12deg; + } + + .sm\:hover\:-skew-y-12:hover { + --transform-skew-y: -12deg; + } + + .sm\:hover\:-skew-y-6:hover { + --transform-skew-y: -6deg; + } + + .sm\:hover\:-skew-y-3:hover { + --transform-skew-y: -3deg; + } + + .sm\:focus\:skew-x-0:focus { + --transform-skew-x: 0; + } + + .sm\:focus\:skew-x-3:focus { + --transform-skew-x: 3deg; + } + + .sm\:focus\:skew-x-6:focus { + --transform-skew-x: 6deg; + } + + .sm\:focus\:skew-x-12:focus { + --transform-skew-x: 12deg; + } + + .sm\:focus\:-skew-x-12:focus { + --transform-skew-x: -12deg; + } + + .sm\:focus\:-skew-x-6:focus { + --transform-skew-x: -6deg; + } + + .sm\:focus\:-skew-x-3:focus { + --transform-skew-x: -3deg; + } + + .sm\:focus\:skew-y-0:focus { + --transform-skew-y: 0; + } + + .sm\:focus\:skew-y-3:focus { + --transform-skew-y: 3deg; + } + + .sm\:focus\:skew-y-6:focus { + --transform-skew-y: 6deg; + } + + .sm\:focus\:skew-y-12:focus { + --transform-skew-y: 12deg; + } + + .sm\:focus\:-skew-y-12:focus { + --transform-skew-y: -12deg; + } + + .sm\:focus\:-skew-y-6:focus { + --transform-skew-y: -6deg; + } + + .sm\:focus\:-skew-y-3:focus { + --transform-skew-y: -3deg; + } + + .sm\:transition-none { + transition-property: none; + } + + .sm\:transition-all { + transition-property: all; + } + + .sm\:transition { + transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; + } + + .sm\:transition-colors { + transition-property: background-color, border-color, color, fill, stroke; + } + + .sm\:transition-opacity { + transition-property: opacity; + } + + .sm\:transition-shadow { + transition-property: box-shadow; + } + + .sm\:transition-transform { + transition-property: transform; + } + + .sm\:ease-linear { + transition-timing-function: linear; + } + + .sm\:ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); + } + + .sm\:ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + + .sm\:ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + } + + .sm\:duration-75 { + transition-duration: 75ms; + } + + .sm\:duration-100 { + transition-duration: 100ms; + } + + .sm\:duration-150 { + transition-duration: 150ms; + } + + .sm\:duration-200 { + transition-duration: 200ms; + } + + .sm\:duration-300 { + transition-duration: 300ms; + } + + .sm\:duration-500 { + transition-duration: 500ms; + } + + .sm\:duration-700 { + transition-duration: 700ms; + } + + .sm\:duration-1000 { + transition-duration: 1000ms; + } + + .sm\:delay-75 { + transition-delay: 75ms; + } + + .sm\:delay-100 { + transition-delay: 100ms; + } + + .sm\:delay-150 { + transition-delay: 150ms; + } + + .sm\:delay-200 { + transition-delay: 200ms; + } + + .sm\:delay-300 { + transition-delay: 300ms; + } + + .sm\:delay-500 { + transition-delay: 500ms; + } + + .sm\:delay-700 { + transition-delay: 700ms; + } + + .sm\:delay-1000 { + transition-delay: 1000ms; + } + + .sm\:example { + font-weight: 700; + color: #f56565; + } +} + +@media (min-width: 768px) { + .md\:space-y-0 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0px * var(--space-y-reverse)); + } + + .md\:space-x-0 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0px * var(--space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.25rem * var(--space-y-reverse)); + } + + .md\:space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.25rem * var(--space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.5rem * var(--space-y-reverse)); + } + + .md\:space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.5rem * var(--space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.75rem * var(--space-y-reverse)); + } + + .md\:space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.75rem * var(--space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1rem * var(--space-y-reverse)); + } + + .md\:space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1rem * var(--space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.25rem * var(--space-y-reverse)); + } + + .md\:space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.25rem * var(--space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.5rem * var(--space-y-reverse)); + } + + .md\:space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.5rem * var(--space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2rem * var(--space-y-reverse)); + } + + .md\:space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2rem * var(--space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2.5rem * var(--space-y-reverse)); + } + + .md\:space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2.5rem * var(--space-x-reverse)); + margin-left: calc(2.5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(3rem * var(--space-y-reverse)); + } + + .md\:space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(3rem * var(--space-x-reverse)); + margin-left: calc(3rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(4rem * var(--space-y-reverse)); + } + + .md\:space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(4rem * var(--space-x-reverse)); + margin-left: calc(4rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(5rem * var(--space-y-reverse)); + } + + .md\:space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(5rem * var(--space-x-reverse)); + margin-left: calc(5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(6rem * var(--space-y-reverse)); + } + + .md\:space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(6rem * var(--space-x-reverse)); + margin-left: calc(6rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(8rem * var(--space-y-reverse)); + } + + .md\:space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(8rem * var(--space-x-reverse)); + margin-left: calc(8rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(10rem * var(--space-y-reverse)); + } + + .md\:space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(10rem * var(--space-x-reverse)); + margin-left: calc(10rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(12rem * var(--space-y-reverse)); + } + + .md\:space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(12rem * var(--space-x-reverse)); + margin-left: calc(12rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(14rem * var(--space-y-reverse)); + } + + .md\:space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(14rem * var(--space-x-reverse)); + margin-left: calc(14rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(16rem * var(--space-y-reverse)); + } + + .md\:space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(16rem * var(--space-x-reverse)); + margin-left: calc(16rem * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1px * var(--space-y-reverse)); + } + + .md\:space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1px * var(--space-x-reverse)); + margin-left: calc(1px * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.25rem * var(--space-y-reverse)); + } + + .md\:-space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.25rem * var(--space-x-reverse)); + margin-left: calc(-0.25rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.5rem * var(--space-y-reverse)); + } + + .md\:-space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.5rem * var(--space-x-reverse)); + margin-left: calc(-0.5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.75rem * var(--space-y-reverse)); + } + + .md\:-space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1rem * var(--space-y-reverse)); + } + + .md\:-space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1rem * var(--space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.25rem * var(--space-y-reverse)); + } + + .md\:-space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.25rem * var(--space-x-reverse)); + margin-left: calc(-1.25rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.5rem * var(--space-y-reverse)); + } + + .md\:-space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.5rem * var(--space-x-reverse)); + margin-left: calc(-1.5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2rem * var(--space-y-reverse)); + } + + .md\:-space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2rem * var(--space-x-reverse)); + margin-left: calc(-2rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2.5rem * var(--space-y-reverse)); + } + + .md\:-space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2.5rem * var(--space-x-reverse)); + margin-left: calc(-2.5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-3rem * var(--space-y-reverse)); + } + + .md\:-space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-3rem * var(--space-x-reverse)); + margin-left: calc(-3rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-4rem * var(--space-y-reverse)); + } + + .md\:-space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-4rem * var(--space-x-reverse)); + margin-left: calc(-4rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-5rem * var(--space-y-reverse)); + } + + .md\:-space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-5rem * var(--space-x-reverse)); + margin-left: calc(-5rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-6rem * var(--space-y-reverse)); + } + + .md\:-space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-6rem * var(--space-x-reverse)); + margin-left: calc(-6rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-8rem * var(--space-y-reverse)); + } + + .md\:-space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-8rem * var(--space-x-reverse)); + margin-left: calc(-8rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-10rem * var(--space-y-reverse)); + } + + .md\:-space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-10rem * var(--space-x-reverse)); + margin-left: calc(-10rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-12rem * var(--space-y-reverse)); + } + + .md\:-space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-12rem * var(--space-x-reverse)); + margin-left: calc(-12rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-14rem * var(--space-y-reverse)); + } + + .md\:-space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-14rem * var(--space-x-reverse)); + margin-left: calc(-14rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-16rem * var(--space-y-reverse)); + } + + .md\:-space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-16rem * var(--space-x-reverse)); + margin-left: calc(-16rem * calc(1 - var(--space-x-reverse))); + } + + .md\:-space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1px * var(--space-y-reverse)); + } + + .md\:-space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1px * var(--space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--space-x-reverse))); + } + + .md\:space-y-reverse > :not(template) ~ :not(template) { + --space-y-reverse: 1; + } + + .md\:space-x-reverse > :not(template) ~ :not(template) { + --space-x-reverse: 1; + } + + .md\:divide-y-0 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(0px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(0px * var(--divide-y-reverse)); + } + + .md\:divide-x-0 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(0px * var(--divide-x-reverse)); + border-left-width: calc(0px * calc(1 - var(--divide-x-reverse))); + } + + .md\:divide-y-2 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(2px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(2px * var(--divide-y-reverse)); + } + + .md\:divide-x-2 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(2px * var(--divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--divide-x-reverse))); + } + + .md\:divide-y-4 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(4px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(4px * var(--divide-y-reverse)); + } + + .md\:divide-x-4 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(4px * var(--divide-x-reverse)); + border-left-width: calc(4px * calc(1 - var(--divide-x-reverse))); + } + + .md\:divide-y-8 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(8px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(8px * var(--divide-y-reverse)); + } + + .md\:divide-x-8 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(8px * var(--divide-x-reverse)); + border-left-width: calc(8px * calc(1 - var(--divide-x-reverse))); + } + + .md\:divide-y > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(1px * var(--divide-y-reverse)); + } + + .md\:divide-x > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(1px * var(--divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--divide-x-reverse))); + } + + .md\:divide-y-reverse > :not(template) ~ :not(template) { + --divide-y-reverse: 1; + } + + .md\:divide-x-reverse > :not(template) ~ :not(template) { + --divide-x-reverse: 1; + } + + .md\:divide-transparent > :not(template) ~ :not(template) { + border-color: transparent; + } + + .md\:divide-current > :not(template) ~ :not(template) { + border-color: currentColor; + } + + .md\:divide-black > :not(template) ~ :not(template) { + border-color: #000; + } + + .md\:divide-white > :not(template) ~ :not(template) { + border-color: #fff; + } + + .md\:divide-gray-100 > :not(template) ~ :not(template) { + border-color: #f7fafc; + } + + .md\:divide-gray-200 > :not(template) ~ :not(template) { + border-color: #edf2f7; + } + + .md\:divide-gray-300 > :not(template) ~ :not(template) { + border-color: #e2e8f0; + } + + .md\:divide-gray-400 > :not(template) ~ :not(template) { + border-color: #cbd5e0; + } + + .md\:divide-gray-500 > :not(template) ~ :not(template) { + border-color: #a0aec0; + } + + .md\:divide-gray-600 > :not(template) ~ :not(template) { + border-color: #718096; + } + + .md\:divide-gray-700 > :not(template) ~ :not(template) { + border-color: #4a5568; + } + + .md\:divide-gray-800 > :not(template) ~ :not(template) { + border-color: #2d3748; + } + + .md\:divide-gray-900 > :not(template) ~ :not(template) { + border-color: #1a202c; + } + + .md\:divide-red-100 > :not(template) ~ :not(template) { + border-color: #fff5f5; + } + + .md\:divide-red-200 > :not(template) ~ :not(template) { + border-color: #fed7d7; + } + + .md\:divide-red-300 > :not(template) ~ :not(template) { + border-color: #feb2b2; + } + + .md\:divide-red-400 > :not(template) ~ :not(template) { + border-color: #fc8181; + } + + .md\:divide-red-500 > :not(template) ~ :not(template) { + border-color: #f56565; + } + + .md\:divide-red-600 > :not(template) ~ :not(template) { + border-color: #e53e3e; + } + + .md\:divide-red-700 > :not(template) ~ :not(template) { + border-color: #c53030; + } + + .md\:divide-red-800 > :not(template) ~ :not(template) { + border-color: #9b2c2c; + } + + .md\:divide-red-900 > :not(template) ~ :not(template) { + border-color: #742a2a; + } + + .md\:divide-orange-100 > :not(template) ~ :not(template) { + border-color: #fffaf0; + } + + .md\:divide-orange-200 > :not(template) ~ :not(template) { + border-color: #feebc8; + } + + .md\:divide-orange-300 > :not(template) ~ :not(template) { + border-color: #fbd38d; + } + + .md\:divide-orange-400 > :not(template) ~ :not(template) { + border-color: #f6ad55; + } + + .md\:divide-orange-500 > :not(template) ~ :not(template) { + border-color: #ed8936; + } + + .md\:divide-orange-600 > :not(template) ~ :not(template) { + border-color: #dd6b20; + } + + .md\:divide-orange-700 > :not(template) ~ :not(template) { + border-color: #c05621; + } + + .md\:divide-orange-800 > :not(template) ~ :not(template) { + border-color: #9c4221; + } + + .md\:divide-orange-900 > :not(template) ~ :not(template) { + border-color: #7b341e; + } + + .md\:divide-yellow-100 > :not(template) ~ :not(template) { + border-color: #fffff0; + } + + .md\:divide-yellow-200 > :not(template) ~ :not(template) { + border-color: #fefcbf; + } + + .md\:divide-yellow-300 > :not(template) ~ :not(template) { + border-color: #faf089; + } + + .md\:divide-yellow-400 > :not(template) ~ :not(template) { + border-color: #f6e05e; + } + + .md\:divide-yellow-500 > :not(template) ~ :not(template) { + border-color: #ecc94b; + } + + .md\:divide-yellow-600 > :not(template) ~ :not(template) { + border-color: #d69e2e; + } + + .md\:divide-yellow-700 > :not(template) ~ :not(template) { + border-color: #b7791f; + } + + .md\:divide-yellow-800 > :not(template) ~ :not(template) { + border-color: #975a16; + } + + .md\:divide-yellow-900 > :not(template) ~ :not(template) { + border-color: #744210; + } + + .md\:divide-green-100 > :not(template) ~ :not(template) { + border-color: #f0fff4; + } + + .md\:divide-green-200 > :not(template) ~ :not(template) { + border-color: #c6f6d5; + } + + .md\:divide-green-300 > :not(template) ~ :not(template) { + border-color: #9ae6b4; + } + + .md\:divide-green-400 > :not(template) ~ :not(template) { + border-color: #68d391; + } + + .md\:divide-green-500 > :not(template) ~ :not(template) { + border-color: #48bb78; + } + + .md\:divide-green-600 > :not(template) ~ :not(template) { + border-color: #38a169; + } + + .md\:divide-green-700 > :not(template) ~ :not(template) { + border-color: #2f855a; + } + + .md\:divide-green-800 > :not(template) ~ :not(template) { + border-color: #276749; + } + + .md\:divide-green-900 > :not(template) ~ :not(template) { + border-color: #22543d; + } + + .md\:divide-teal-100 > :not(template) ~ :not(template) { + border-color: #e6fffa; + } + + .md\:divide-teal-200 > :not(template) ~ :not(template) { + border-color: #b2f5ea; + } + + .md\:divide-teal-300 > :not(template) ~ :not(template) { + border-color: #81e6d9; + } + + .md\:divide-teal-400 > :not(template) ~ :not(template) { + border-color: #4fd1c5; + } + + .md\:divide-teal-500 > :not(template) ~ :not(template) { + border-color: #38b2ac; + } + + .md\:divide-teal-600 > :not(template) ~ :not(template) { + border-color: #319795; + } + + .md\:divide-teal-700 > :not(template) ~ :not(template) { + border-color: #2c7a7b; + } + + .md\:divide-teal-800 > :not(template) ~ :not(template) { + border-color: #285e61; + } + + .md\:divide-teal-900 > :not(template) ~ :not(template) { + border-color: #234e52; + } + + .md\:divide-blue-100 > :not(template) ~ :not(template) { + border-color: #ebf8ff; + } + + .md\:divide-blue-200 > :not(template) ~ :not(template) { + border-color: #bee3f8; + } + + .md\:divide-blue-300 > :not(template) ~ :not(template) { + border-color: #90cdf4; + } + + .md\:divide-blue-400 > :not(template) ~ :not(template) { + border-color: #63b3ed; + } + + .md\:divide-blue-500 > :not(template) ~ :not(template) { + border-color: #4299e1; + } + + .md\:divide-blue-600 > :not(template) ~ :not(template) { + border-color: #3182ce; + } + + .md\:divide-blue-700 > :not(template) ~ :not(template) { + border-color: #2b6cb0; + } + + .md\:divide-blue-800 > :not(template) ~ :not(template) { + border-color: #2c5282; + } + + .md\:divide-blue-900 > :not(template) ~ :not(template) { + border-color: #2a4365; + } + + .md\:divide-indigo-100 > :not(template) ~ :not(template) { + border-color: #ebf4ff; + } + + .md\:divide-indigo-200 > :not(template) ~ :not(template) { + border-color: #c3dafe; + } + + .md\:divide-indigo-300 > :not(template) ~ :not(template) { + border-color: #a3bffa; + } + + .md\:divide-indigo-400 > :not(template) ~ :not(template) { + border-color: #7f9cf5; + } + + .md\:divide-indigo-500 > :not(template) ~ :not(template) { + border-color: #667eea; + } + + .md\:divide-indigo-600 > :not(template) ~ :not(template) { + border-color: #5a67d8; + } + + .md\:divide-indigo-700 > :not(template) ~ :not(template) { + border-color: #4c51bf; + } + + .md\:divide-indigo-800 > :not(template) ~ :not(template) { + border-color: #434190; + } + + .md\:divide-indigo-900 > :not(template) ~ :not(template) { + border-color: #3c366b; + } + + .md\:divide-purple-100 > :not(template) ~ :not(template) { + border-color: #faf5ff; + } + + .md\:divide-purple-200 > :not(template) ~ :not(template) { + border-color: #e9d8fd; + } + + .md\:divide-purple-300 > :not(template) ~ :not(template) { + border-color: #d6bcfa; + } + + .md\:divide-purple-400 > :not(template) ~ :not(template) { + border-color: #b794f4; + } + + .md\:divide-purple-500 > :not(template) ~ :not(template) { + border-color: #9f7aea; + } + + .md\:divide-purple-600 > :not(template) ~ :not(template) { + border-color: #805ad5; + } + + .md\:divide-purple-700 > :not(template) ~ :not(template) { + border-color: #6b46c1; + } + + .md\:divide-purple-800 > :not(template) ~ :not(template) { + border-color: #553c9a; + } + + .md\:divide-purple-900 > :not(template) ~ :not(template) { + border-color: #44337a; + } + + .md\:divide-pink-100 > :not(template) ~ :not(template) { + border-color: #fff5f7; + } + + .md\:divide-pink-200 > :not(template) ~ :not(template) { + border-color: #fed7e2; + } + + .md\:divide-pink-300 > :not(template) ~ :not(template) { + border-color: #fbb6ce; + } + + .md\:divide-pink-400 > :not(template) ~ :not(template) { + border-color: #f687b3; + } + + .md\:divide-pink-500 > :not(template) ~ :not(template) { + border-color: #ed64a6; + } + + .md\:divide-pink-600 > :not(template) ~ :not(template) { + border-color: #d53f8c; + } + + .md\:divide-pink-700 > :not(template) ~ :not(template) { + border-color: #b83280; + } + + .md\:divide-pink-800 > :not(template) ~ :not(template) { + border-color: #97266d; + } + + .md\:divide-pink-900 > :not(template) ~ :not(template) { + border-color: #702459; + } + + .md\: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; + } + + .md\:not-sr-only { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .md\:focus\:sr-only:focus { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + } + + .md\:focus\:not-sr-only:focus { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .md\:appearance-none { + appearance: none; + } + + .md\:bg-fixed { + background-attachment: fixed; + } + + .md\:bg-local { + background-attachment: local; + } + + .md\:bg-scroll { + background-attachment: scroll; + } + + .md\:bg-transparent { + background-color: transparent; + } + + .md\:bg-current { + background-color: currentColor; + } + + .md\:bg-black { + background-color: #000; + } + + .md\:bg-white { + background-color: #fff; + } + + .md\:bg-gray-100 { + background-color: #f7fafc; + } + + .md\:bg-gray-200 { + background-color: #edf2f7; + } + + .md\:bg-gray-300 { + background-color: #e2e8f0; + } + + .md\:bg-gray-400 { + background-color: #cbd5e0; + } + + .md\:bg-gray-500 { + background-color: #a0aec0; + } + + .md\:bg-gray-600 { + background-color: #718096; + } + + .md\:bg-gray-700 { + background-color: #4a5568; + } + + .md\:bg-gray-800 { + background-color: #2d3748; + } + + .md\:bg-gray-900 { + background-color: #1a202c; + } + + .md\:bg-red-100 { + background-color: #fff5f5; + } + + .md\:bg-red-200 { + background-color: #fed7d7; + } + + .md\:bg-red-300 { + background-color: #feb2b2; + } + + .md\:bg-red-400 { + background-color: #fc8181; + } + + .md\:bg-red-500 { + background-color: #f56565; + } + + .md\:bg-red-600 { + background-color: #e53e3e; + } + + .md\:bg-red-700 { + background-color: #c53030; + } + + .md\:bg-red-800 { + background-color: #9b2c2c; + } + + .md\:bg-red-900 { + background-color: #742a2a; + } + + .md\:bg-orange-100 { + background-color: #fffaf0; + } + + .md\:bg-orange-200 { + background-color: #feebc8; + } + + .md\:bg-orange-300 { + background-color: #fbd38d; + } + + .md\:bg-orange-400 { + background-color: #f6ad55; + } + + .md\:bg-orange-500 { + background-color: #ed8936; + } + + .md\:bg-orange-600 { + background-color: #dd6b20; + } + + .md\:bg-orange-700 { + background-color: #c05621; + } + + .md\:bg-orange-800 { + background-color: #9c4221; + } + + .md\:bg-orange-900 { + background-color: #7b341e; + } + + .md\:bg-yellow-100 { + background-color: #fffff0; + } + + .md\:bg-yellow-200 { + background-color: #fefcbf; + } + + .md\:bg-yellow-300 { + background-color: #faf089; + } + + .md\:bg-yellow-400 { + background-color: #f6e05e; + } + + .md\:bg-yellow-500 { + background-color: #ecc94b; + } + + .md\:bg-yellow-600 { + background-color: #d69e2e; + } + + .md\:bg-yellow-700 { + background-color: #b7791f; + } + + .md\:bg-yellow-800 { + background-color: #975a16; + } + + .md\:bg-yellow-900 { + background-color: #744210; + } + + .md\:bg-green-100 { + background-color: #f0fff4; + } + + .md\:bg-green-200 { + background-color: #c6f6d5; + } + + .md\:bg-green-300 { + background-color: #9ae6b4; + } + + .md\:bg-green-400 { + background-color: #68d391; + } + + .md\:bg-green-500 { + background-color: #48bb78; + } + + .md\:bg-green-600 { + background-color: #38a169; + } + + .md\:bg-green-700 { + background-color: #2f855a; + } + + .md\:bg-green-800 { + background-color: #276749; + } + + .md\:bg-green-900 { + background-color: #22543d; + } + + .md\:bg-teal-100 { + background-color: #e6fffa; + } + + .md\:bg-teal-200 { + background-color: #b2f5ea; + } + + .md\:bg-teal-300 { + background-color: #81e6d9; + } + + .md\:bg-teal-400 { + background-color: #4fd1c5; + } + + .md\:bg-teal-500 { + background-color: #38b2ac; + } + + .md\:bg-teal-600 { + background-color: #319795; + } + + .md\:bg-teal-700 { + background-color: #2c7a7b; + } + + .md\:bg-teal-800 { + background-color: #285e61; + } + + .md\:bg-teal-900 { + background-color: #234e52; + } + + .md\:bg-blue-100 { + background-color: #ebf8ff; + } + + .md\:bg-blue-200 { + background-color: #bee3f8; + } + + .md\:bg-blue-300 { + background-color: #90cdf4; + } + + .md\:bg-blue-400 { + background-color: #63b3ed; + } + + .md\:bg-blue-500 { + background-color: #4299e1; + } + + .md\:bg-blue-600 { + background-color: #3182ce; + } + + .md\:bg-blue-700 { + background-color: #2b6cb0; + } + + .md\:bg-blue-800 { + background-color: #2c5282; + } + + .md\:bg-blue-900 { + background-color: #2a4365; + } + + .md\:bg-indigo-100 { + background-color: #ebf4ff; + } + + .md\:bg-indigo-200 { + background-color: #c3dafe; + } + + .md\:bg-indigo-300 { + background-color: #a3bffa; + } + + .md\:bg-indigo-400 { + background-color: #7f9cf5; + } + + .md\:bg-indigo-500 { + background-color: #667eea; + } + + .md\:bg-indigo-600 { + background-color: #5a67d8; + } + + .md\:bg-indigo-700 { + background-color: #4c51bf; + } + + .md\:bg-indigo-800 { + background-color: #434190; + } + + .md\:bg-indigo-900 { + background-color: #3c366b; + } + + .md\:bg-purple-100 { + background-color: #faf5ff; + } + + .md\:bg-purple-200 { + background-color: #e9d8fd; + } + + .md\:bg-purple-300 { + background-color: #d6bcfa; + } + + .md\:bg-purple-400 { + background-color: #b794f4; + } + + .md\:bg-purple-500 { + background-color: #9f7aea; + } + + .md\:bg-purple-600 { + background-color: #805ad5; + } + + .md\:bg-purple-700 { + background-color: #6b46c1; + } + + .md\:bg-purple-800 { + background-color: #553c9a; + } + + .md\:bg-purple-900 { + background-color: #44337a; + } + + .md\:bg-pink-100 { + background-color: #fff5f7; + } + + .md\:bg-pink-200 { + background-color: #fed7e2; + } + + .md\:bg-pink-300 { + background-color: #fbb6ce; + } + + .md\:bg-pink-400 { + background-color: #f687b3; + } + + .md\:bg-pink-500 { + background-color: #ed64a6; + } + + .md\:bg-pink-600 { + background-color: #d53f8c; + } + + .md\:bg-pink-700 { + background-color: #b83280; + } + + .md\:bg-pink-800 { + background-color: #97266d; + } + + .md\:bg-pink-900 { + background-color: #702459; + } + + .md\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .md\:hover\:bg-current:hover { + background-color: currentColor; + } + + .md\:hover\:bg-black:hover { + background-color: #000; + } + + .md\:hover\:bg-white:hover { + background-color: #fff; + } + + .md\:hover\:bg-gray-100:hover { + background-color: #f7fafc; + } + + .md\:hover\:bg-gray-200:hover { + background-color: #edf2f7; + } + + .md\:hover\:bg-gray-300:hover { + background-color: #e2e8f0; + } + + .md\:hover\:bg-gray-400:hover { + background-color: #cbd5e0; + } + + .md\:hover\:bg-gray-500:hover { + background-color: #a0aec0; + } + + .md\:hover\:bg-gray-600:hover { + background-color: #718096; + } + + .md\:hover\:bg-gray-700:hover { + background-color: #4a5568; + } + + .md\:hover\:bg-gray-800:hover { + background-color: #2d3748; + } + + .md\:hover\:bg-gray-900:hover { + background-color: #1a202c; + } + + .md\:hover\:bg-red-100:hover { + background-color: #fff5f5; + } + + .md\:hover\:bg-red-200:hover { + background-color: #fed7d7; + } + + .md\:hover\:bg-red-300:hover { + background-color: #feb2b2; + } + + .md\:hover\:bg-red-400:hover { + background-color: #fc8181; + } + + .md\:hover\:bg-red-500:hover { + background-color: #f56565; + } + + .md\:hover\:bg-red-600:hover { + background-color: #e53e3e; + } + + .md\:hover\:bg-red-700:hover { + background-color: #c53030; + } + + .md\:hover\:bg-red-800:hover { + background-color: #9b2c2c; + } + + .md\:hover\:bg-red-900:hover { + background-color: #742a2a; + } + + .md\:hover\:bg-orange-100:hover { + background-color: #fffaf0; + } + + .md\:hover\:bg-orange-200:hover { + background-color: #feebc8; + } + + .md\:hover\:bg-orange-300:hover { + background-color: #fbd38d; + } + + .md\:hover\:bg-orange-400:hover { + background-color: #f6ad55; + } + + .md\:hover\:bg-orange-500:hover { + background-color: #ed8936; + } + + .md\:hover\:bg-orange-600:hover { + background-color: #dd6b20; + } + + .md\:hover\:bg-orange-700:hover { + background-color: #c05621; + } + + .md\:hover\:bg-orange-800:hover { + background-color: #9c4221; + } + + .md\:hover\:bg-orange-900:hover { + background-color: #7b341e; + } + + .md\:hover\:bg-yellow-100:hover { + background-color: #fffff0; + } + + .md\:hover\:bg-yellow-200:hover { + background-color: #fefcbf; + } + + .md\:hover\:bg-yellow-300:hover { + background-color: #faf089; + } + + .md\:hover\:bg-yellow-400:hover { + background-color: #f6e05e; + } + + .md\:hover\:bg-yellow-500:hover { + background-color: #ecc94b; + } + + .md\:hover\:bg-yellow-600:hover { + background-color: #d69e2e; + } + + .md\:hover\:bg-yellow-700:hover { + background-color: #b7791f; + } + + .md\:hover\:bg-yellow-800:hover { + background-color: #975a16; + } + + .md\:hover\:bg-yellow-900:hover { + background-color: #744210; + } + + .md\:hover\:bg-green-100:hover { + background-color: #f0fff4; + } + + .md\:hover\:bg-green-200:hover { + background-color: #c6f6d5; + } + + .md\:hover\:bg-green-300:hover { + background-color: #9ae6b4; + } + + .md\:hover\:bg-green-400:hover { + background-color: #68d391; + } + + .md\:hover\:bg-green-500:hover { + background-color: #48bb78; + } + + .md\:hover\:bg-green-600:hover { + background-color: #38a169; + } + + .md\:hover\:bg-green-700:hover { + background-color: #2f855a; + } + + .md\:hover\:bg-green-800:hover { + background-color: #276749; + } + + .md\:hover\:bg-green-900:hover { + background-color: #22543d; + } + + .md\:hover\:bg-teal-100:hover { + background-color: #e6fffa; + } + + .md\:hover\:bg-teal-200:hover { + background-color: #b2f5ea; + } + + .md\:hover\:bg-teal-300:hover { + background-color: #81e6d9; + } + + .md\:hover\:bg-teal-400:hover { + background-color: #4fd1c5; + } + + .md\:hover\:bg-teal-500:hover { + background-color: #38b2ac; + } + + .md\:hover\:bg-teal-600:hover { + background-color: #319795; + } + + .md\:hover\:bg-teal-700:hover { + background-color: #2c7a7b; + } + + .md\:hover\:bg-teal-800:hover { + background-color: #285e61; + } + + .md\:hover\:bg-teal-900:hover { + background-color: #234e52; + } + + .md\:hover\:bg-blue-100:hover { + background-color: #ebf8ff; + } + + .md\:hover\:bg-blue-200:hover { + background-color: #bee3f8; + } + + .md\:hover\:bg-blue-300:hover { + background-color: #90cdf4; + } + + .md\:hover\:bg-blue-400:hover { + background-color: #63b3ed; + } + + .md\:hover\:bg-blue-500:hover { + background-color: #4299e1; + } + + .md\:hover\:bg-blue-600:hover { + background-color: #3182ce; + } + + .md\:hover\:bg-blue-700:hover { + background-color: #2b6cb0; + } + + .md\:hover\:bg-blue-800:hover { + background-color: #2c5282; + } + + .md\:hover\:bg-blue-900:hover { + background-color: #2a4365; + } + + .md\:hover\:bg-indigo-100:hover { + background-color: #ebf4ff; + } + + .md\:hover\:bg-indigo-200:hover { + background-color: #c3dafe; + } + + .md\:hover\:bg-indigo-300:hover { + background-color: #a3bffa; + } + + .md\:hover\:bg-indigo-400:hover { + background-color: #7f9cf5; + } + + .md\:hover\:bg-indigo-500:hover { + background-color: #667eea; + } + + .md\:hover\:bg-indigo-600:hover { + background-color: #5a67d8; + } + + .md\:hover\:bg-indigo-700:hover { + background-color: #4c51bf; + } + + .md\:hover\:bg-indigo-800:hover { + background-color: #434190; + } + + .md\:hover\:bg-indigo-900:hover { + background-color: #3c366b; + } + + .md\:hover\:bg-purple-100:hover { + background-color: #faf5ff; + } + + .md\:hover\:bg-purple-200:hover { + background-color: #e9d8fd; + } + + .md\:hover\:bg-purple-300:hover { + background-color: #d6bcfa; + } + + .md\:hover\:bg-purple-400:hover { + background-color: #b794f4; + } + + .md\:hover\:bg-purple-500:hover { + background-color: #9f7aea; + } + + .md\:hover\:bg-purple-600:hover { + background-color: #805ad5; + } + + .md\:hover\:bg-purple-700:hover { + background-color: #6b46c1; + } + + .md\:hover\:bg-purple-800:hover { + background-color: #553c9a; + } + + .md\:hover\:bg-purple-900:hover { + background-color: #44337a; + } + + .md\:hover\:bg-pink-100:hover { + background-color: #fff5f7; + } + + .md\:hover\:bg-pink-200:hover { + background-color: #fed7e2; + } + + .md\:hover\:bg-pink-300:hover { + background-color: #fbb6ce; + } + + .md\:hover\:bg-pink-400:hover { + background-color: #f687b3; + } + + .md\:hover\:bg-pink-500:hover { + background-color: #ed64a6; + } + + .md\:hover\:bg-pink-600:hover { + background-color: #d53f8c; + } + + .md\:hover\:bg-pink-700:hover { + background-color: #b83280; + } + + .md\:hover\:bg-pink-800:hover { + background-color: #97266d; + } + + .md\:hover\:bg-pink-900:hover { + background-color: #702459; + } + + .md\:focus\:bg-transparent:focus { + background-color: transparent; + } + + .md\:focus\:bg-current:focus { + background-color: currentColor; + } + + .md\:focus\:bg-black:focus { + background-color: #000; + } + + .md\:focus\:bg-white:focus { + background-color: #fff; + } + + .md\:focus\:bg-gray-100:focus { + background-color: #f7fafc; + } + + .md\:focus\:bg-gray-200:focus { + background-color: #edf2f7; + } + + .md\:focus\:bg-gray-300:focus { + background-color: #e2e8f0; + } + + .md\:focus\:bg-gray-400:focus { + background-color: #cbd5e0; + } + + .md\:focus\:bg-gray-500:focus { + background-color: #a0aec0; + } + + .md\:focus\:bg-gray-600:focus { + background-color: #718096; + } + + .md\:focus\:bg-gray-700:focus { + background-color: #4a5568; + } + + .md\:focus\:bg-gray-800:focus { + background-color: #2d3748; + } + + .md\:focus\:bg-gray-900:focus { + background-color: #1a202c; + } + + .md\:focus\:bg-red-100:focus { + background-color: #fff5f5; + } + + .md\:focus\:bg-red-200:focus { + background-color: #fed7d7; + } + + .md\:focus\:bg-red-300:focus { + background-color: #feb2b2; + } + + .md\:focus\:bg-red-400:focus { + background-color: #fc8181; + } + + .md\:focus\:bg-red-500:focus { + background-color: #f56565; + } + + .md\:focus\:bg-red-600:focus { + background-color: #e53e3e; + } + + .md\:focus\:bg-red-700:focus { + background-color: #c53030; + } + + .md\:focus\:bg-red-800:focus { + background-color: #9b2c2c; + } + + .md\:focus\:bg-red-900:focus { + background-color: #742a2a; + } + + .md\:focus\:bg-orange-100:focus { + background-color: #fffaf0; + } + + .md\:focus\:bg-orange-200:focus { + background-color: #feebc8; + } + + .md\:focus\:bg-orange-300:focus { + background-color: #fbd38d; + } + + .md\:focus\:bg-orange-400:focus { + background-color: #f6ad55; + } + + .md\:focus\:bg-orange-500:focus { + background-color: #ed8936; + } + + .md\:focus\:bg-orange-600:focus { + background-color: #dd6b20; + } + + .md\:focus\:bg-orange-700:focus { + background-color: #c05621; + } + + .md\:focus\:bg-orange-800:focus { + background-color: #9c4221; + } + + .md\:focus\:bg-orange-900:focus { + background-color: #7b341e; + } + + .md\:focus\:bg-yellow-100:focus { + background-color: #fffff0; + } + + .md\:focus\:bg-yellow-200:focus { + background-color: #fefcbf; + } + + .md\:focus\:bg-yellow-300:focus { + background-color: #faf089; + } + + .md\:focus\:bg-yellow-400:focus { + background-color: #f6e05e; + } + + .md\:focus\:bg-yellow-500:focus { + background-color: #ecc94b; + } + + .md\:focus\:bg-yellow-600:focus { + background-color: #d69e2e; + } + + .md\:focus\:bg-yellow-700:focus { + background-color: #b7791f; + } + + .md\:focus\:bg-yellow-800:focus { + background-color: #975a16; + } + + .md\:focus\:bg-yellow-900:focus { + background-color: #744210; + } + + .md\:focus\:bg-green-100:focus { + background-color: #f0fff4; + } + + .md\:focus\:bg-green-200:focus { + background-color: #c6f6d5; + } + + .md\:focus\:bg-green-300:focus { + background-color: #9ae6b4; + } + + .md\:focus\:bg-green-400:focus { + background-color: #68d391; + } + + .md\:focus\:bg-green-500:focus { + background-color: #48bb78; + } + + .md\:focus\:bg-green-600:focus { + background-color: #38a169; + } + + .md\:focus\:bg-green-700:focus { + background-color: #2f855a; + } + + .md\:focus\:bg-green-800:focus { + background-color: #276749; + } + + .md\:focus\:bg-green-900:focus { + background-color: #22543d; + } + + .md\:focus\:bg-teal-100:focus { + background-color: #e6fffa; + } + + .md\:focus\:bg-teal-200:focus { + background-color: #b2f5ea; + } + + .md\:focus\:bg-teal-300:focus { + background-color: #81e6d9; + } + + .md\:focus\:bg-teal-400:focus { + background-color: #4fd1c5; + } + + .md\:focus\:bg-teal-500:focus { + background-color: #38b2ac; + } + + .md\:focus\:bg-teal-600:focus { + background-color: #319795; + } + + .md\:focus\:bg-teal-700:focus { + background-color: #2c7a7b; + } + + .md\:focus\:bg-teal-800:focus { + background-color: #285e61; + } + + .md\:focus\:bg-teal-900:focus { + background-color: #234e52; + } + + .md\:focus\:bg-blue-100:focus { + background-color: #ebf8ff; + } + + .md\:focus\:bg-blue-200:focus { + background-color: #bee3f8; + } + + .md\:focus\:bg-blue-300:focus { + background-color: #90cdf4; + } + + .md\:focus\:bg-blue-400:focus { + background-color: #63b3ed; + } + + .md\:focus\:bg-blue-500:focus { + background-color: #4299e1; + } + + .md\:focus\:bg-blue-600:focus { + background-color: #3182ce; + } + + .md\:focus\:bg-blue-700:focus { + background-color: #2b6cb0; + } + + .md\:focus\:bg-blue-800:focus { + background-color: #2c5282; + } + + .md\:focus\:bg-blue-900:focus { + background-color: #2a4365; + } + + .md\:focus\:bg-indigo-100:focus { + background-color: #ebf4ff; + } + + .md\:focus\:bg-indigo-200:focus { + background-color: #c3dafe; + } + + .md\:focus\:bg-indigo-300:focus { + background-color: #a3bffa; + } + + .md\:focus\:bg-indigo-400:focus { + background-color: #7f9cf5; + } + + .md\:focus\:bg-indigo-500:focus { + background-color: #667eea; + } + + .md\:focus\:bg-indigo-600:focus { + background-color: #5a67d8; + } + + .md\:focus\:bg-indigo-700:focus { + background-color: #4c51bf; + } + + .md\:focus\:bg-indigo-800:focus { + background-color: #434190; + } + + .md\:focus\:bg-indigo-900:focus { + background-color: #3c366b; + } + + .md\:focus\:bg-purple-100:focus { + background-color: #faf5ff; + } + + .md\:focus\:bg-purple-200:focus { + background-color: #e9d8fd; + } + + .md\:focus\:bg-purple-300:focus { + background-color: #d6bcfa; + } + + .md\:focus\:bg-purple-400:focus { + background-color: #b794f4; + } + + .md\:focus\:bg-purple-500:focus { + background-color: #9f7aea; + } + + .md\:focus\:bg-purple-600:focus { + background-color: #805ad5; + } + + .md\:focus\:bg-purple-700:focus { + background-color: #6b46c1; + } + + .md\:focus\:bg-purple-800:focus { + background-color: #553c9a; + } + + .md\:focus\:bg-purple-900:focus { + background-color: #44337a; + } + + .md\:focus\:bg-pink-100:focus { + background-color: #fff5f7; + } + + .md\:focus\:bg-pink-200:focus { + background-color: #fed7e2; + } + + .md\:focus\:bg-pink-300:focus { + background-color: #fbb6ce; + } + + .md\:focus\:bg-pink-400:focus { + background-color: #f687b3; + } + + .md\:focus\:bg-pink-500:focus { + background-color: #ed64a6; + } + + .md\:focus\:bg-pink-600:focus { + background-color: #d53f8c; + } + + .md\:focus\:bg-pink-700:focus { + background-color: #b83280; + } + + .md\:focus\:bg-pink-800:focus { + background-color: #97266d; + } + + .md\:focus\:bg-pink-900:focus { + background-color: #702459; + } + + .md\:bg-bottom { + background-position: bottom; + } + + .md\:bg-center { + background-position: center; + } + + .md\:bg-left { + background-position: left; + } + + .md\:bg-left-bottom { + background-position: left bottom; + } + + .md\:bg-left-top { + background-position: left top; + } + + .md\:bg-right { + background-position: right; + } + + .md\:bg-right-bottom { + background-position: right bottom; + } + + .md\:bg-right-top { + background-position: right top; + } + + .md\:bg-top { + background-position: top; + } + + .md\:bg-repeat { + background-repeat: repeat; + } + + .md\:bg-no-repeat { + background-repeat: no-repeat; + } + + .md\:bg-repeat-x { + background-repeat: repeat-x; + } + + .md\:bg-repeat-y { + background-repeat: repeat-y; + } + + .md\:bg-repeat-round { + background-repeat: round; + } + + .md\:bg-repeat-space { + background-repeat: space; + } + + .md\:bg-auto { + background-size: auto; + } + + .md\:bg-cover { + background-size: cover; + } + + .md\:bg-contain { + background-size: contain; + } + + .md\:border-collapse { + border-collapse: collapse; + } + + .md\:border-separate { + border-collapse: separate; + } + + .md\:border-transparent { + border-color: transparent; + } + + .md\:border-current { + border-color: currentColor; + } + + .md\:border-black { + border-color: #000; + } + + .md\:border-white { + border-color: #fff; + } + + .md\:border-gray-100 { + border-color: #f7fafc; + } + + .md\:border-gray-200 { + border-color: #edf2f7; + } + + .md\:border-gray-300 { + border-color: #e2e8f0; + } + + .md\:border-gray-400 { + border-color: #cbd5e0; + } + + .md\:border-gray-500 { + border-color: #a0aec0; + } + + .md\:border-gray-600 { + border-color: #718096; + } + + .md\:border-gray-700 { + border-color: #4a5568; + } + + .md\:border-gray-800 { + border-color: #2d3748; + } + + .md\:border-gray-900 { + border-color: #1a202c; + } + + .md\:border-red-100 { + border-color: #fff5f5; + } + + .md\:border-red-200 { + border-color: #fed7d7; + } + + .md\:border-red-300 { + border-color: #feb2b2; + } + + .md\:border-red-400 { + border-color: #fc8181; + } + + .md\:border-red-500 { + border-color: #f56565; + } + + .md\:border-red-600 { + border-color: #e53e3e; + } + + .md\:border-red-700 { + border-color: #c53030; + } + + .md\:border-red-800 { + border-color: #9b2c2c; + } + + .md\:border-red-900 { + border-color: #742a2a; + } + + .md\:border-orange-100 { + border-color: #fffaf0; + } + + .md\:border-orange-200 { + border-color: #feebc8; + } + + .md\:border-orange-300 { + border-color: #fbd38d; + } + + .md\:border-orange-400 { + border-color: #f6ad55; + } + + .md\:border-orange-500 { + border-color: #ed8936; + } + + .md\:border-orange-600 { + border-color: #dd6b20; + } + + .md\:border-orange-700 { + border-color: #c05621; + } + + .md\:border-orange-800 { + border-color: #9c4221; + } + + .md\:border-orange-900 { + border-color: #7b341e; + } + + .md\:border-yellow-100 { + border-color: #fffff0; + } + + .md\:border-yellow-200 { + border-color: #fefcbf; + } + + .md\:border-yellow-300 { + border-color: #faf089; + } + + .md\:border-yellow-400 { + border-color: #f6e05e; + } + + .md\:border-yellow-500 { + border-color: #ecc94b; + } + + .md\:border-yellow-600 { + border-color: #d69e2e; + } + + .md\:border-yellow-700 { + border-color: #b7791f; + } + + .md\:border-yellow-800 { + border-color: #975a16; + } + + .md\:border-yellow-900 { + border-color: #744210; + } + + .md\:border-green-100 { + border-color: #f0fff4; + } + + .md\:border-green-200 { + border-color: #c6f6d5; + } + + .md\:border-green-300 { + border-color: #9ae6b4; + } + + .md\:border-green-400 { + border-color: #68d391; + } + + .md\:border-green-500 { + border-color: #48bb78; + } + + .md\:border-green-600 { + border-color: #38a169; + } + + .md\:border-green-700 { + border-color: #2f855a; + } + + .md\:border-green-800 { + border-color: #276749; + } + + .md\:border-green-900 { + border-color: #22543d; + } + + .md\:border-teal-100 { + border-color: #e6fffa; + } + + .md\:border-teal-200 { + border-color: #b2f5ea; + } + + .md\:border-teal-300 { + border-color: #81e6d9; + } + + .md\:border-teal-400 { + border-color: #4fd1c5; + } + + .md\:border-teal-500 { + border-color: #38b2ac; + } + + .md\:border-teal-600 { + border-color: #319795; + } + + .md\:border-teal-700 { + border-color: #2c7a7b; + } + + .md\:border-teal-800 { + border-color: #285e61; + } + + .md\:border-teal-900 { + border-color: #234e52; + } + + .md\:border-blue-100 { + border-color: #ebf8ff; + } + + .md\:border-blue-200 { + border-color: #bee3f8; + } + + .md\:border-blue-300 { + border-color: #90cdf4; + } + + .md\:border-blue-400 { + border-color: #63b3ed; + } + + .md\:border-blue-500 { + border-color: #4299e1; + } + + .md\:border-blue-600 { + border-color: #3182ce; + } + + .md\:border-blue-700 { + border-color: #2b6cb0; + } + + .md\:border-blue-800 { + border-color: #2c5282; + } + + .md\:border-blue-900 { + border-color: #2a4365; + } + + .md\:border-indigo-100 { + border-color: #ebf4ff; + } + + .md\:border-indigo-200 { + border-color: #c3dafe; + } + + .md\:border-indigo-300 { + border-color: #a3bffa; + } + + .md\:border-indigo-400 { + border-color: #7f9cf5; + } + + .md\:border-indigo-500 { + border-color: #667eea; + } + + .md\:border-indigo-600 { + border-color: #5a67d8; + } + + .md\:border-indigo-700 { + border-color: #4c51bf; + } + + .md\:border-indigo-800 { + border-color: #434190; + } + + .md\:border-indigo-900 { + border-color: #3c366b; + } + + .md\:border-purple-100 { + border-color: #faf5ff; + } + + .md\:border-purple-200 { + border-color: #e9d8fd; + } + + .md\:border-purple-300 { + border-color: #d6bcfa; + } + + .md\:border-purple-400 { + border-color: #b794f4; + } + + .md\:border-purple-500 { + border-color: #9f7aea; + } + + .md\:border-purple-600 { + border-color: #805ad5; + } + + .md\:border-purple-700 { + border-color: #6b46c1; + } + + .md\:border-purple-800 { + border-color: #553c9a; + } + + .md\:border-purple-900 { + border-color: #44337a; + } + + .md\:border-pink-100 { + border-color: #fff5f7; + } + + .md\:border-pink-200 { + border-color: #fed7e2; + } + + .md\:border-pink-300 { + border-color: #fbb6ce; + } + + .md\:border-pink-400 { + border-color: #f687b3; + } + + .md\:border-pink-500 { + border-color: #ed64a6; + } + + .md\:border-pink-600 { + border-color: #d53f8c; + } + + .md\:border-pink-700 { + border-color: #b83280; + } + + .md\:border-pink-800 { + border-color: #97266d; + } + + .md\:border-pink-900 { + border-color: #702459; + } + + .md\:hover\:border-transparent:hover { + border-color: transparent; + } + + .md\:hover\:border-current:hover { + border-color: currentColor; + } + + .md\:hover\:border-black:hover { + border-color: #000; + } + + .md\:hover\:border-white:hover { + border-color: #fff; + } + + .md\:hover\:border-gray-100:hover { + border-color: #f7fafc; + } + + .md\:hover\:border-gray-200:hover { + border-color: #edf2f7; + } + + .md\:hover\:border-gray-300:hover { + border-color: #e2e8f0; + } + + .md\:hover\:border-gray-400:hover { + border-color: #cbd5e0; + } + + .md\:hover\:border-gray-500:hover { + border-color: #a0aec0; + } + + .md\:hover\:border-gray-600:hover { + border-color: #718096; + } + + .md\:hover\:border-gray-700:hover { + border-color: #4a5568; + } + + .md\:hover\:border-gray-800:hover { + border-color: #2d3748; + } + + .md\:hover\:border-gray-900:hover { + border-color: #1a202c; + } + + .md\:hover\:border-red-100:hover { + border-color: #fff5f5; + } + + .md\:hover\:border-red-200:hover { + border-color: #fed7d7; + } + + .md\:hover\:border-red-300:hover { + border-color: #feb2b2; + } + + .md\:hover\:border-red-400:hover { + border-color: #fc8181; + } + + .md\:hover\:border-red-500:hover { + border-color: #f56565; + } + + .md\:hover\:border-red-600:hover { + border-color: #e53e3e; + } + + .md\:hover\:border-red-700:hover { + border-color: #c53030; + } + + .md\:hover\:border-red-800:hover { + border-color: #9b2c2c; + } + + .md\:hover\:border-red-900:hover { + border-color: #742a2a; + } + + .md\:hover\:border-orange-100:hover { + border-color: #fffaf0; + } + + .md\:hover\:border-orange-200:hover { + border-color: #feebc8; + } + + .md\:hover\:border-orange-300:hover { + border-color: #fbd38d; + } + + .md\:hover\:border-orange-400:hover { + border-color: #f6ad55; + } + + .md\:hover\:border-orange-500:hover { + border-color: #ed8936; + } + + .md\:hover\:border-orange-600:hover { + border-color: #dd6b20; + } + + .md\:hover\:border-orange-700:hover { + border-color: #c05621; + } + + .md\:hover\:border-orange-800:hover { + border-color: #9c4221; + } + + .md\:hover\:border-orange-900:hover { + border-color: #7b341e; + } + + .md\:hover\:border-yellow-100:hover { + border-color: #fffff0; + } + + .md\:hover\:border-yellow-200:hover { + border-color: #fefcbf; + } + + .md\:hover\:border-yellow-300:hover { + border-color: #faf089; + } + + .md\:hover\:border-yellow-400:hover { + border-color: #f6e05e; + } + + .md\:hover\:border-yellow-500:hover { + border-color: #ecc94b; + } + + .md\:hover\:border-yellow-600:hover { + border-color: #d69e2e; + } + + .md\:hover\:border-yellow-700:hover { + border-color: #b7791f; + } + + .md\:hover\:border-yellow-800:hover { + border-color: #975a16; + } + + .md\:hover\:border-yellow-900:hover { + border-color: #744210; + } + + .md\:hover\:border-green-100:hover { + border-color: #f0fff4; + } + + .md\:hover\:border-green-200:hover { + border-color: #c6f6d5; + } + + .md\:hover\:border-green-300:hover { + border-color: #9ae6b4; + } + + .md\:hover\:border-green-400:hover { + border-color: #68d391; + } + + .md\:hover\:border-green-500:hover { + border-color: #48bb78; + } + + .md\:hover\:border-green-600:hover { + border-color: #38a169; + } + + .md\:hover\:border-green-700:hover { + border-color: #2f855a; + } + + .md\:hover\:border-green-800:hover { + border-color: #276749; + } + + .md\:hover\:border-green-900:hover { + border-color: #22543d; + } + + .md\:hover\:border-teal-100:hover { + border-color: #e6fffa; + } + + .md\:hover\:border-teal-200:hover { + border-color: #b2f5ea; + } + + .md\:hover\:border-teal-300:hover { + border-color: #81e6d9; + } + + .md\:hover\:border-teal-400:hover { + border-color: #4fd1c5; + } + + .md\:hover\:border-teal-500:hover { + border-color: #38b2ac; + } + + .md\:hover\:border-teal-600:hover { + border-color: #319795; + } + + .md\:hover\:border-teal-700:hover { + border-color: #2c7a7b; + } + + .md\:hover\:border-teal-800:hover { + border-color: #285e61; + } + + .md\:hover\:border-teal-900:hover { + border-color: #234e52; + } + + .md\:hover\:border-blue-100:hover { + border-color: #ebf8ff; + } + + .md\:hover\:border-blue-200:hover { + border-color: #bee3f8; + } + + .md\:hover\:border-blue-300:hover { + border-color: #90cdf4; + } + + .md\:hover\:border-blue-400:hover { + border-color: #63b3ed; + } + + .md\:hover\:border-blue-500:hover { + border-color: #4299e1; + } + + .md\:hover\:border-blue-600:hover { + border-color: #3182ce; + } + + .md\:hover\:border-blue-700:hover { + border-color: #2b6cb0; + } + + .md\:hover\:border-blue-800:hover { + border-color: #2c5282; + } + + .md\:hover\:border-blue-900:hover { + border-color: #2a4365; + } + + .md\:hover\:border-indigo-100:hover { + border-color: #ebf4ff; + } + + .md\:hover\:border-indigo-200:hover { + border-color: #c3dafe; + } + + .md\:hover\:border-indigo-300:hover { + border-color: #a3bffa; + } + + .md\:hover\:border-indigo-400:hover { + border-color: #7f9cf5; + } + + .md\:hover\:border-indigo-500:hover { + border-color: #667eea; + } + + .md\:hover\:border-indigo-600:hover { + border-color: #5a67d8; + } + + .md\:hover\:border-indigo-700:hover { + border-color: #4c51bf; + } + + .md\:hover\:border-indigo-800:hover { + border-color: #434190; + } + + .md\:hover\:border-indigo-900:hover { + border-color: #3c366b; + } + + .md\:hover\:border-purple-100:hover { + border-color: #faf5ff; + } + + .md\:hover\:border-purple-200:hover { + border-color: #e9d8fd; + } + + .md\:hover\:border-purple-300:hover { + border-color: #d6bcfa; + } + + .md\:hover\:border-purple-400:hover { + border-color: #b794f4; + } + + .md\:hover\:border-purple-500:hover { + border-color: #9f7aea; + } + + .md\:hover\:border-purple-600:hover { + border-color: #805ad5; + } + + .md\:hover\:border-purple-700:hover { + border-color: #6b46c1; + } + + .md\:hover\:border-purple-800:hover { + border-color: #553c9a; + } + + .md\:hover\:border-purple-900:hover { + border-color: #44337a; + } + + .md\:hover\:border-pink-100:hover { + border-color: #fff5f7; + } + + .md\:hover\:border-pink-200:hover { + border-color: #fed7e2; + } + + .md\:hover\:border-pink-300:hover { + border-color: #fbb6ce; + } + + .md\:hover\:border-pink-400:hover { + border-color: #f687b3; + } + + .md\:hover\:border-pink-500:hover { + border-color: #ed64a6; + } + + .md\:hover\:border-pink-600:hover { + border-color: #d53f8c; + } + + .md\:hover\:border-pink-700:hover { + border-color: #b83280; + } + + .md\:hover\:border-pink-800:hover { + border-color: #97266d; + } + + .md\:hover\:border-pink-900:hover { + border-color: #702459; + } + + .md\:focus\:border-transparent:focus { + border-color: transparent; + } + + .md\:focus\:border-current:focus { + border-color: currentColor; + } + + .md\:focus\:border-black:focus { + border-color: #000; + } + + .md\:focus\:border-white:focus { + border-color: #fff; + } + + .md\:focus\:border-gray-100:focus { + border-color: #f7fafc; + } + + .md\:focus\:border-gray-200:focus { + border-color: #edf2f7; + } + + .md\:focus\:border-gray-300:focus { + border-color: #e2e8f0; + } + + .md\:focus\:border-gray-400:focus { + border-color: #cbd5e0; + } + + .md\:focus\:border-gray-500:focus { + border-color: #a0aec0; + } + + .md\:focus\:border-gray-600:focus { + border-color: #718096; + } + + .md\:focus\:border-gray-700:focus { + border-color: #4a5568; + } + + .md\:focus\:border-gray-800:focus { + border-color: #2d3748; + } + + .md\:focus\:border-gray-900:focus { + border-color: #1a202c; + } + + .md\:focus\:border-red-100:focus { + border-color: #fff5f5; + } + + .md\:focus\:border-red-200:focus { + border-color: #fed7d7; + } + + .md\:focus\:border-red-300:focus { + border-color: #feb2b2; + } + + .md\:focus\:border-red-400:focus { + border-color: #fc8181; + } + + .md\:focus\:border-red-500:focus { + border-color: #f56565; + } + + .md\:focus\:border-red-600:focus { + border-color: #e53e3e; + } + + .md\:focus\:border-red-700:focus { + border-color: #c53030; + } + + .md\:focus\:border-red-800:focus { + border-color: #9b2c2c; + } + + .md\:focus\:border-red-900:focus { + border-color: #742a2a; + } + + .md\:focus\:border-orange-100:focus { + border-color: #fffaf0; + } + + .md\:focus\:border-orange-200:focus { + border-color: #feebc8; + } + + .md\:focus\:border-orange-300:focus { + border-color: #fbd38d; + } + + .md\:focus\:border-orange-400:focus { + border-color: #f6ad55; + } + + .md\:focus\:border-orange-500:focus { + border-color: #ed8936; + } + + .md\:focus\:border-orange-600:focus { + border-color: #dd6b20; + } + + .md\:focus\:border-orange-700:focus { + border-color: #c05621; + } + + .md\:focus\:border-orange-800:focus { + border-color: #9c4221; + } + + .md\:focus\:border-orange-900:focus { + border-color: #7b341e; + } + + .md\:focus\:border-yellow-100:focus { + border-color: #fffff0; + } + + .md\:focus\:border-yellow-200:focus { + border-color: #fefcbf; + } + + .md\:focus\:border-yellow-300:focus { + border-color: #faf089; + } + + .md\:focus\:border-yellow-400:focus { + border-color: #f6e05e; + } + + .md\:focus\:border-yellow-500:focus { + border-color: #ecc94b; + } + + .md\:focus\:border-yellow-600:focus { + border-color: #d69e2e; + } + + .md\:focus\:border-yellow-700:focus { + border-color: #b7791f; + } + + .md\:focus\:border-yellow-800:focus { + border-color: #975a16; + } + + .md\:focus\:border-yellow-900:focus { + border-color: #744210; + } + + .md\:focus\:border-green-100:focus { + border-color: #f0fff4; + } + + .md\:focus\:border-green-200:focus { + border-color: #c6f6d5; + } + + .md\:focus\:border-green-300:focus { + border-color: #9ae6b4; + } + + .md\:focus\:border-green-400:focus { + border-color: #68d391; + } + + .md\:focus\:border-green-500:focus { + border-color: #48bb78; + } + + .md\:focus\:border-green-600:focus { + border-color: #38a169; + } + + .md\:focus\:border-green-700:focus { + border-color: #2f855a; + } + + .md\:focus\:border-green-800:focus { + border-color: #276749; + } + + .md\:focus\:border-green-900:focus { + border-color: #22543d; + } + + .md\:focus\:border-teal-100:focus { + border-color: #e6fffa; + } + + .md\:focus\:border-teal-200:focus { + border-color: #b2f5ea; + } + + .md\:focus\:border-teal-300:focus { + border-color: #81e6d9; + } + + .md\:focus\:border-teal-400:focus { + border-color: #4fd1c5; + } + + .md\:focus\:border-teal-500:focus { + border-color: #38b2ac; + } + + .md\:focus\:border-teal-600:focus { + border-color: #319795; + } + + .md\:focus\:border-teal-700:focus { + border-color: #2c7a7b; + } + + .md\:focus\:border-teal-800:focus { + border-color: #285e61; + } + + .md\:focus\:border-teal-900:focus { + border-color: #234e52; + } + + .md\:focus\:border-blue-100:focus { + border-color: #ebf8ff; + } + + .md\:focus\:border-blue-200:focus { + border-color: #bee3f8; + } + + .md\:focus\:border-blue-300:focus { + border-color: #90cdf4; + } + + .md\:focus\:border-blue-400:focus { + border-color: #63b3ed; + } + + .md\:focus\:border-blue-500:focus { + border-color: #4299e1; + } + + .md\:focus\:border-blue-600:focus { + border-color: #3182ce; + } + + .md\:focus\:border-blue-700:focus { + border-color: #2b6cb0; + } + + .md\:focus\:border-blue-800:focus { + border-color: #2c5282; + } + + .md\:focus\:border-blue-900:focus { + border-color: #2a4365; + } + + .md\:focus\:border-indigo-100:focus { + border-color: #ebf4ff; + } + + .md\:focus\:border-indigo-200:focus { + border-color: #c3dafe; + } + + .md\:focus\:border-indigo-300:focus { + border-color: #a3bffa; + } + + .md\:focus\:border-indigo-400:focus { + border-color: #7f9cf5; + } + + .md\:focus\:border-indigo-500:focus { + border-color: #667eea; + } + + .md\:focus\:border-indigo-600:focus { + border-color: #5a67d8; + } + + .md\:focus\:border-indigo-700:focus { + border-color: #4c51bf; + } + + .md\:focus\:border-indigo-800:focus { + border-color: #434190; + } + + .md\:focus\:border-indigo-900:focus { + border-color: #3c366b; + } + + .md\:focus\:border-purple-100:focus { + border-color: #faf5ff; + } + + .md\:focus\:border-purple-200:focus { + border-color: #e9d8fd; + } + + .md\:focus\:border-purple-300:focus { + border-color: #d6bcfa; + } + + .md\:focus\:border-purple-400:focus { + border-color: #b794f4; + } + + .md\:focus\:border-purple-500:focus { + border-color: #9f7aea; + } + + .md\:focus\:border-purple-600:focus { + border-color: #805ad5; + } + + .md\:focus\:border-purple-700:focus { + border-color: #6b46c1; + } + + .md\:focus\:border-purple-800:focus { + border-color: #553c9a; + } + + .md\:focus\:border-purple-900:focus { + border-color: #44337a; + } + + .md\:focus\:border-pink-100:focus { + border-color: #fff5f7; + } + + .md\:focus\:border-pink-200:focus { + border-color: #fed7e2; + } + + .md\:focus\:border-pink-300:focus { + border-color: #fbb6ce; + } + + .md\:focus\:border-pink-400:focus { + border-color: #f687b3; + } + + .md\:focus\:border-pink-500:focus { + border-color: #ed64a6; + } + + .md\:focus\:border-pink-600:focus { + border-color: #d53f8c; + } + + .md\:focus\:border-pink-700:focus { + border-color: #b83280; + } + + .md\:focus\:border-pink-800:focus { + border-color: #97266d; + } + + .md\:focus\:border-pink-900:focus { + border-color: #702459; + } + + .md\:rounded-none { + border-radius: 0; + } + + .md\:rounded-sm { + border-radius: 0.125rem; + } + + .md\:rounded { + border-radius: 0.25rem; + } + + .md\:rounded-md { + border-radius: 0.375rem; + } + + .md\:rounded-lg { + border-radius: 0.5rem; + } + + .md\:rounded-full { + border-radius: 9999px; + } + + .md\:rounded-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .md\:rounded-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .md\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .md\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .md\:rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; + } + + .md\:rounded-r-sm { + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; + } + + .md\:rounded-b-sm { + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .md\:rounded-l-sm { + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .md\:rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + } + + .md\:rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + } + + .md\:rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .md\:rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .md\:rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; + } + + .md\:rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; + } + + .md\:rounded-b-md { + border-bottom-right-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .md\:rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .md\:rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + .md\:rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + } + + .md\:rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .md\:rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .md\:rounded-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .md\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .md\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .md\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .md\:rounded-tl-none { + border-top-left-radius: 0; + } + + .md\:rounded-tr-none { + border-top-right-radius: 0; + } + + .md\:rounded-br-none { + border-bottom-right-radius: 0; + } + + .md\:rounded-bl-none { + border-bottom-left-radius: 0; + } + + .md\:rounded-tl-sm { + border-top-left-radius: 0.125rem; + } + + .md\:rounded-tr-sm { + border-top-right-radius: 0.125rem; + } + + .md\:rounded-br-sm { + border-bottom-right-radius: 0.125rem; + } + + .md\:rounded-bl-sm { + border-bottom-left-radius: 0.125rem; + } + + .md\:rounded-tl { + border-top-left-radius: 0.25rem; + } + + .md\:rounded-tr { + border-top-right-radius: 0.25rem; + } + + .md\:rounded-br { + border-bottom-right-radius: 0.25rem; + } + + .md\:rounded-bl { + border-bottom-left-radius: 0.25rem; + } + + .md\:rounded-tl-md { + border-top-left-radius: 0.375rem; + } + + .md\:rounded-tr-md { + border-top-right-radius: 0.375rem; + } + + .md\:rounded-br-md { + border-bottom-right-radius: 0.375rem; + } + + .md\:rounded-bl-md { + border-bottom-left-radius: 0.375rem; + } + + .md\:rounded-tl-lg { + border-top-left-radius: 0.5rem; + } + + .md\:rounded-tr-lg { + border-top-right-radius: 0.5rem; + } + + .md\:rounded-br-lg { + border-bottom-right-radius: 0.5rem; + } + + .md\:rounded-bl-lg { + border-bottom-left-radius: 0.5rem; + } + + .md\:rounded-tl-full { + border-top-left-radius: 9999px; + } + + .md\:rounded-tr-full { + border-top-right-radius: 9999px; + } + + .md\:rounded-br-full { + border-bottom-right-radius: 9999px; + } + + .md\:rounded-bl-full { + border-bottom-left-radius: 9999px; + } + + .md\:border-solid { + border-style: solid; + } + + .md\:border-dashed { + border-style: dashed; + } + + .md\:border-dotted { + border-style: dotted; + } + + .md\:border-double { + border-style: double; + } + + .md\:border-none { + border-style: none; + } + + .md\:border-0 { + border-width: 0; + } + + .md\:border-2 { + border-width: 2px; + } + + .md\:border-4 { + border-width: 4px; + } + + .md\:border-8 { + border-width: 8px; + } + + .md\:border { + border-width: 1px; + } + + .md\:border-t-0 { + border-top-width: 0; + } + + .md\:border-r-0 { + border-right-width: 0; + } + + .md\:border-b-0 { + border-bottom-width: 0; + } + + .md\:border-l-0 { + border-left-width: 0; + } + + .md\:border-t-2 { + border-top-width: 2px; + } + + .md\:border-r-2 { + border-right-width: 2px; + } + + .md\:border-b-2 { + border-bottom-width: 2px; + } + + .md\:border-l-2 { + border-left-width: 2px; + } + + .md\:border-t-4 { + border-top-width: 4px; + } + + .md\:border-r-4 { + border-right-width: 4px; + } + + .md\:border-b-4 { + border-bottom-width: 4px; + } + + .md\:border-l-4 { + border-left-width: 4px; + } + + .md\:border-t-8 { + border-top-width: 8px; + } + + .md\:border-r-8 { + border-right-width: 8px; + } + + .md\:border-b-8 { + border-bottom-width: 8px; + } + + .md\:border-l-8 { + border-left-width: 8px; + } + + .md\:border-t { + border-top-width: 1px; + } + + .md\:border-r { + border-right-width: 1px; + } + + .md\:border-b { + border-bottom-width: 1px; + } + + .md\:border-l { + border-left-width: 1px; + } + + .md\:box-border { + box-sizing: border-box; + } + + .md\:box-content { + box-sizing: content-box; + } + + .md\:cursor-auto { + cursor: auto; + } + + .md\:cursor-default { + cursor: default; + } + + .md\:cursor-pointer { + cursor: pointer; + } + + .md\:cursor-wait { + cursor: wait; + } + + .md\:cursor-text { + cursor: text; + } + + .md\:cursor-move { + cursor: move; + } + + .md\:cursor-not-allowed { + cursor: not-allowed; + } + + .md\:block { + display: block; + } + + .md\:inline-block { + display: inline-block; + } + + .md\:inline { + display: inline; + } + + .md\:flex { + display: flex; + } + + .md\:inline-flex { + display: inline-flex; + } + + .md\:table { + display: table; + } + + .md\:table-caption { + display: table-caption; + } + + .md\:table-cell { + display: table-cell; + } + + .md\:table-column { + display: table-column; + } + + .md\:table-column-group { + display: table-column-group; + } + + .md\:table-footer-group { + display: table-footer-group; + } + + .md\:table-header-group { + display: table-header-group; + } + + .md\:table-row-group { + display: table-row-group; + } + + .md\:table-row { + display: table-row; + } + + .md\:flow-root { + display: flow-root; + } + + .md\:grid { + display: grid; + } + + .md\:inline-grid { + display: inline-grid; + } + + .md\:hidden { + display: none; + } + + .md\:flex-row { + flex-direction: row; + } + + .md\:flex-row-reverse { + flex-direction: row-reverse; + } + + .md\:flex-col { + flex-direction: column; + } + + .md\:flex-col-reverse { + flex-direction: column-reverse; + } + + .md\:flex-wrap { + flex-wrap: wrap; + } + + .md\:flex-wrap-reverse { + flex-wrap: wrap-reverse; + } + + .md\:flex-no-wrap { + flex-wrap: nowrap; + } + + .md\:items-start { + align-items: flex-start; + } + + .md\:items-end { + align-items: flex-end; + } + + .md\:items-center { + align-items: center; + } + + .md\:items-baseline { + align-items: baseline; + } + + .md\:items-stretch { + align-items: stretch; + } + + .md\:self-auto { + align-self: auto; + } + + .md\:self-start { + align-self: flex-start; + } + + .md\:self-end { + align-self: flex-end; + } + + .md\:self-center { + align-self: center; + } + + .md\:self-stretch { + align-self: stretch; + } + + .md\:justify-start { + justify-content: flex-start; + } + + .md\:justify-end { + justify-content: flex-end; + } + + .md\:justify-center { + justify-content: center; + } + + .md\:justify-between { + justify-content: space-between; + } + + .md\:justify-around { + justify-content: space-around; + } + + .md\:justify-evenly { + justify-content: space-evenly; + } + + .md\:content-center { + align-content: center; + } + + .md\:content-start { + align-content: flex-start; + } + + .md\:content-end { + align-content: flex-end; + } + + .md\:content-between { + align-content: space-between; + } + + .md\:content-around { + align-content: space-around; + } + + .md\:flex-1 { + flex: 1 1 0%; + } + + .md\:flex-auto { + flex: 1 1 auto; + } + + .md\:flex-initial { + flex: 0 1 auto; + } + + .md\:flex-none { + flex: none; + } + + .md\:flex-grow-0 { + flex-grow: 0; + } + + .md\:flex-grow { + flex-grow: 1; + } + + .md\:flex-shrink-0 { + flex-shrink: 0; + } + + .md\:flex-shrink { + flex-shrink: 1; + } + + .md\:order-1 { + order: 1; + } + + .md\:order-2 { + order: 2; + } + + .md\:order-3 { + order: 3; + } + + .md\:order-4 { + order: 4; + } + + .md\:order-5 { + order: 5; + } + + .md\:order-6 { + order: 6; + } + + .md\:order-7 { + order: 7; + } + + .md\:order-8 { + order: 8; + } + + .md\:order-9 { + order: 9; + } + + .md\:order-10 { + order: 10; + } + + .md\:order-11 { + order: 11; + } + + .md\:order-12 { + order: 12; + } + + .md\:order-first { + order: -9999; + } + + .md\:order-last { + order: 9999; + } + + .md\:order-none { + order: 0; + } + + .md\:float-right { + float: right; + } + + .md\:float-left { + float: left; + } + + .md\:float-none { + float: none; + } + + .md\:clearfix:after { + content: ""; + display: table; + clear: both; + } + + .md\:clear-left { + clear: left; + } + + .md\:clear-right { + clear: right; + } + + .md\:clear-both { + clear: both; + } + + .md\:clear-none { + clear: none; + } + + .md\:font-sans { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + } + + .md\:font-serif { + font-family: Georgia, Cambria, "Times New Roman", Times, serif; + } + + .md\:font-mono { + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + } + + .md\:font-hairline { + font-weight: 100; + } + + .md\:font-thin { + font-weight: 200; + } + + .md\:font-light { + font-weight: 300; + } + + .md\:font-normal { + font-weight: 400; + } + + .md\:font-medium { + font-weight: 500; + } + + .md\:font-semibold { + font-weight: 600; + } + + .md\:font-bold { + font-weight: 700; + } + + .md\:font-extrabold { + font-weight: 800; + } + + .md\:font-black { + font-weight: 900; + } + + .md\:hover\:font-hairline:hover { + font-weight: 100; + } + + .md\:hover\:font-thin:hover { + font-weight: 200; + } + + .md\:hover\:font-light:hover { + font-weight: 300; + } + + .md\:hover\:font-normal:hover { + font-weight: 400; + } + + .md\:hover\:font-medium:hover { + font-weight: 500; + } + + .md\:hover\:font-semibold:hover { + font-weight: 600; + } + + .md\:hover\:font-bold:hover { + font-weight: 700; + } + + .md\:hover\:font-extrabold:hover { + font-weight: 800; + } + + .md\:hover\:font-black:hover { + font-weight: 900; + } + + .md\:focus\:font-hairline:focus { + font-weight: 100; + } + + .md\:focus\:font-thin:focus { + font-weight: 200; + } + + .md\:focus\:font-light:focus { + font-weight: 300; + } + + .md\:focus\:font-normal:focus { + font-weight: 400; + } + + .md\:focus\:font-medium:focus { + font-weight: 500; + } + + .md\:focus\:font-semibold:focus { + font-weight: 600; + } + + .md\:focus\:font-bold:focus { + font-weight: 700; + } + + .md\:focus\:font-extrabold:focus { + font-weight: 800; + } + + .md\:focus\:font-black:focus { + font-weight: 900; + } + + .md\:h-0 { + height: 0; + } + + .md\:h-1 { + height: 0.25rem; + } + + .md\:h-2 { + height: 0.5rem; + } + + .md\:h-3 { + height: 0.75rem; + } + + .md\:h-4 { + height: 1rem; + } + + .md\:h-5 { + height: 1.25rem; + } + + .md\:h-6 { + height: 1.5rem; + } + + .md\:h-8 { + height: 2rem; + } + + .md\:h-10 { + height: 2.5rem; + } + + .md\:h-12 { + height: 3rem; + } + + .md\:h-16 { + height: 4rem; + } + + .md\:h-20 { + height: 5rem; + } + + .md\:h-24 { + height: 6rem; + } + + .md\:h-32 { + height: 8rem; + } + + .md\:h-40 { + height: 10rem; + } + + .md\:h-48 { + height: 12rem; + } + + .md\:h-56 { + height: 14rem; + } + + .md\:h-64 { + height: 16rem; + } + + .md\:h-auto { + height: auto; + } + + .md\:h-px { + height: 1px; + } + + .md\:h-full { + height: 100%; + } + + .md\:h-screen { + height: 100vh; + } + + .md\:text-xs { + font-size: 0.75rem; + } + + .md\:text-sm { + font-size: 0.875rem; + } + + .md\:text-base { + font-size: 1rem; + } + + .md\:text-lg { + font-size: 1.125rem; + } + + .md\:text-xl { + font-size: 1.25rem; + } + + .md\:text-2xl { + font-size: 1.5rem; + } + + .md\:text-3xl { + font-size: 1.875rem; + } + + .md\:text-4xl { + font-size: 2.25rem; + } + + .md\:text-5xl { + font-size: 3rem; + } + + .md\:text-6xl { + font-size: 4rem; + } + + .md\:leading-3 { + line-height: .75rem; + } + + .md\:leading-4 { + line-height: 1rem; + } + + .md\:leading-5 { + line-height: 1.25rem; + } + + .md\:leading-6 { + line-height: 1.5rem; + } + + .md\:leading-7 { + line-height: 1.75rem; + } + + .md\:leading-8 { + line-height: 2rem; + } + + .md\:leading-9 { + line-height: 2.25rem; + } + + .md\:leading-10 { + line-height: 2.5rem; + } + + .md\:leading-none { + line-height: 1; + } + + .md\:leading-tight { + line-height: 1.25; + } + + .md\:leading-snug { + line-height: 1.375; + } + + .md\:leading-normal { + line-height: 1.5; + } + + .md\:leading-relaxed { + line-height: 1.625; + } + + .md\:leading-loose { + line-height: 2; + } + + .md\:list-inside { + list-style-position: inside; + } + + .md\:list-outside { + list-style-position: outside; + } + + .md\:list-none { + list-style-type: none; + } + + .md\:list-disc { + list-style-type: disc; + } + + .md\:list-decimal { + list-style-type: decimal; + } + + .md\:m-0 { + margin: 0; + } + + .md\:m-1 { + margin: 0.25rem; + } + + .md\:m-2 { + margin: 0.5rem; + } + + .md\:m-3 { + margin: 0.75rem; + } + + .md\:m-4 { + margin: 1rem; + } + + .md\:m-5 { + margin: 1.25rem; + } + + .md\:m-6 { + margin: 1.5rem; + } + + .md\:m-8 { + margin: 2rem; + } + + .md\:m-10 { + margin: 2.5rem; + } + + .md\:m-12 { + margin: 3rem; + } + + .md\:m-16 { + margin: 4rem; + } + + .md\:m-20 { + margin: 5rem; + } + + .md\:m-24 { + margin: 6rem; + } + + .md\:m-32 { + margin: 8rem; + } + + .md\:m-40 { + margin: 10rem; + } + + .md\:m-48 { + margin: 12rem; + } + + .md\:m-56 { + margin: 14rem; + } + + .md\:m-64 { + margin: 16rem; + } + + .md\:m-auto { + margin: auto; + } + + .md\:m-px { + margin: 1px; + } + + .md\:-m-1 { + margin: -0.25rem; + } + + .md\:-m-2 { + margin: -0.5rem; + } + + .md\:-m-3 { + margin: -0.75rem; + } + + .md\:-m-4 { + margin: -1rem; + } + + .md\:-m-5 { + margin: -1.25rem; + } + + .md\:-m-6 { + margin: -1.5rem; + } + + .md\:-m-8 { + margin: -2rem; + } + + .md\:-m-10 { + margin: -2.5rem; + } + + .md\:-m-12 { + margin: -3rem; + } + + .md\:-m-16 { + margin: -4rem; + } + + .md\:-m-20 { + margin: -5rem; + } + + .md\:-m-24 { + margin: -6rem; + } + + .md\:-m-32 { + margin: -8rem; + } + + .md\:-m-40 { + margin: -10rem; + } + + .md\:-m-48 { + margin: -12rem; + } + + .md\:-m-56 { + margin: -14rem; + } + + .md\:-m-64 { + margin: -16rem; + } + + .md\:-m-px { + margin: -1px; + } + + .md\:my-0 { + margin-top: 0; + margin-bottom: 0; + } + + .md\:mx-0 { + margin-left: 0; + margin-right: 0; + } + + .md\:my-1 { + margin-top: 0.25rem; + margin-bottom: 0.25rem; + } + + .md\:mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; + } + + .md\:my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; + } + + .md\:mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; + } + + .md\:my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; + } + + .md\:mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; + } + + .md\:my-4 { + margin-top: 1rem; + margin-bottom: 1rem; + } + + .md\:mx-4 { + margin-left: 1rem; + margin-right: 1rem; + } + + .md\:my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; + } + + .md\:mx-5 { + margin-left: 1.25rem; + margin-right: 1.25rem; + } + + .md\:my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + } + + .md\:mx-6 { + margin-left: 1.5rem; + margin-right: 1.5rem; + } + + .md\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .md\:mx-8 { + margin-left: 2rem; + margin-right: 2rem; + } + + .md\:my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; + } + + .md\:mx-10 { + margin-left: 2.5rem; + margin-right: 2.5rem; + } + + .md\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .md\:mx-12 { + margin-left: 3rem; + margin-right: 3rem; + } + + .md\:my-16 { + margin-top: 4rem; + margin-bottom: 4rem; + } + + .md\:mx-16 { + margin-left: 4rem; + margin-right: 4rem; + } + + .md\:my-20 { + margin-top: 5rem; + margin-bottom: 5rem; + } + + .md\:mx-20 { + margin-left: 5rem; + margin-right: 5rem; + } + + .md\:my-24 { + margin-top: 6rem; + margin-bottom: 6rem; + } + + .md\:mx-24 { + margin-left: 6rem; + margin-right: 6rem; + } + + .md\:my-32 { + margin-top: 8rem; + margin-bottom: 8rem; + } + + .md\:mx-32 { + margin-left: 8rem; + margin-right: 8rem; + } + + .md\:my-40 { + margin-top: 10rem; + margin-bottom: 10rem; + } + + .md\:mx-40 { + margin-left: 10rem; + margin-right: 10rem; + } + + .md\:my-48 { + margin-top: 12rem; + margin-bottom: 12rem; + } + + .md\:mx-48 { + margin-left: 12rem; + margin-right: 12rem; + } + + .md\:my-56 { + margin-top: 14rem; + margin-bottom: 14rem; + } + + .md\:mx-56 { + margin-left: 14rem; + margin-right: 14rem; + } + + .md\:my-64 { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .md\:mx-64 { + margin-left: 16rem; + margin-right: 16rem; + } + + .md\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .md\:mx-auto { + margin-left: auto; + margin-right: auto; + } + + .md\:my-px { + margin-top: 1px; + margin-bottom: 1px; + } + + .md\:mx-px { + margin-left: 1px; + margin-right: 1px; + } + + .md\:-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; + } + + .md\:-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; + } + + .md\:-my-2 { + margin-top: -0.5rem; + margin-bottom: -0.5rem; + } + + .md\:-mx-2 { + margin-left: -0.5rem; + margin-right: -0.5rem; + } + + .md\:-my-3 { + margin-top: -0.75rem; + margin-bottom: -0.75rem; + } + + .md\:-mx-3 { + margin-left: -0.75rem; + margin-right: -0.75rem; + } + + .md\:-my-4 { + margin-top: -1rem; + margin-bottom: -1rem; + } + + .md\:-mx-4 { + margin-left: -1rem; + margin-right: -1rem; + } + + .md\:-my-5 { + margin-top: -1.25rem; + margin-bottom: -1.25rem; + } + + .md\:-mx-5 { + margin-left: -1.25rem; + margin-right: -1.25rem; + } + + .md\:-my-6 { + margin-top: -1.5rem; + margin-bottom: -1.5rem; + } + + .md\:-mx-6 { + margin-left: -1.5rem; + margin-right: -1.5rem; + } + + .md\:-my-8 { + margin-top: -2rem; + margin-bottom: -2rem; + } + + .md\:-mx-8 { + margin-left: -2rem; + margin-right: -2rem; + } + + .md\:-my-10 { + margin-top: -2.5rem; + margin-bottom: -2.5rem; + } + + .md\:-mx-10 { + margin-left: -2.5rem; + margin-right: -2.5rem; + } + + .md\:-my-12 { + margin-top: -3rem; + margin-bottom: -3rem; + } + + .md\:-mx-12 { + margin-left: -3rem; + margin-right: -3rem; + } + + .md\:-my-16 { + margin-top: -4rem; + margin-bottom: -4rem; + } + + .md\:-mx-16 { + margin-left: -4rem; + margin-right: -4rem; + } + + .md\:-my-20 { + margin-top: -5rem; + margin-bottom: -5rem; + } + + .md\:-mx-20 { + margin-left: -5rem; + margin-right: -5rem; + } + + .md\:-my-24 { + margin-top: -6rem; + margin-bottom: -6rem; + } + + .md\:-mx-24 { + margin-left: -6rem; + margin-right: -6rem; + } + + .md\:-my-32 { + margin-top: -8rem; + margin-bottom: -8rem; + } + + .md\:-mx-32 { + margin-left: -8rem; + margin-right: -8rem; + } + + .md\:-my-40 { + margin-top: -10rem; + margin-bottom: -10rem; + } + + .md\:-mx-40 { + margin-left: -10rem; + margin-right: -10rem; + } + + .md\:-my-48 { + margin-top: -12rem; + margin-bottom: -12rem; + } + + .md\:-mx-48 { + margin-left: -12rem; + margin-right: -12rem; + } + + .md\:-my-56 { + margin-top: -14rem; + margin-bottom: -14rem; + } + + .md\:-mx-56 { + margin-left: -14rem; + margin-right: -14rem; + } + + .md\:-my-64 { + margin-top: -16rem; + margin-bottom: -16rem; + } + + .md\:-mx-64 { + margin-left: -16rem; + margin-right: -16rem; + } + + .md\:-my-px { + margin-top: -1px; + margin-bottom: -1px; + } + + .md\:-mx-px { + margin-left: -1px; + margin-right: -1px; + } + + .md\:mt-0 { + margin-top: 0; + } + + .md\:mr-0 { + margin-right: 0; + } + + .md\:mb-0 { + margin-bottom: 0; + } + + .md\:ml-0 { + margin-left: 0; + } + + .md\:mt-1 { + margin-top: 0.25rem; + } + + .md\:mr-1 { + margin-right: 0.25rem; + } + + .md\:mb-1 { + margin-bottom: 0.25rem; + } + + .md\:ml-1 { + margin-left: 0.25rem; + } + + .md\:mt-2 { + margin-top: 0.5rem; + } + + .md\:mr-2 { + margin-right: 0.5rem; + } + + .md\:mb-2 { + margin-bottom: 0.5rem; + } + + .md\:ml-2 { + margin-left: 0.5rem; + } + + .md\:mt-3 { + margin-top: 0.75rem; + } + + .md\:mr-3 { + margin-right: 0.75rem; + } + + .md\:mb-3 { + margin-bottom: 0.75rem; + } + + .md\:ml-3 { + margin-left: 0.75rem; + } + + .md\:mt-4 { + margin-top: 1rem; + } + + .md\:mr-4 { + margin-right: 1rem; + } + + .md\:mb-4 { + margin-bottom: 1rem; + } + + .md\:ml-4 { + margin-left: 1rem; + } + + .md\:mt-5 { + margin-top: 1.25rem; + } + + .md\:mr-5 { + margin-right: 1.25rem; + } + + .md\:mb-5 { + margin-bottom: 1.25rem; + } + + .md\:ml-5 { + margin-left: 1.25rem; + } + + .md\:mt-6 { + margin-top: 1.5rem; + } + + .md\:mr-6 { + margin-right: 1.5rem; + } + + .md\:mb-6 { + margin-bottom: 1.5rem; + } + + .md\:ml-6 { + margin-left: 1.5rem; + } + + .md\:mt-8 { + margin-top: 2rem; + } + + .md\:mr-8 { + margin-right: 2rem; + } + + .md\:mb-8 { + margin-bottom: 2rem; + } + + .md\:ml-8 { + margin-left: 2rem; + } + + .md\:mt-10 { + margin-top: 2.5rem; + } + + .md\:mr-10 { + margin-right: 2.5rem; + } + + .md\:mb-10 { + margin-bottom: 2.5rem; + } + + .md\:ml-10 { + margin-left: 2.5rem; + } + + .md\:mt-12 { + margin-top: 3rem; + } + + .md\:mr-12 { + margin-right: 3rem; + } + + .md\:mb-12 { + margin-bottom: 3rem; + } + + .md\:ml-12 { + margin-left: 3rem; + } + + .md\:mt-16 { + margin-top: 4rem; + } + + .md\:mr-16 { + margin-right: 4rem; + } + + .md\:mb-16 { + margin-bottom: 4rem; + } + + .md\:ml-16 { + margin-left: 4rem; + } + + .md\:mt-20 { + margin-top: 5rem; + } + + .md\:mr-20 { + margin-right: 5rem; + } + + .md\:mb-20 { + margin-bottom: 5rem; + } + + .md\:ml-20 { + margin-left: 5rem; + } + + .md\:mt-24 { + margin-top: 6rem; + } + + .md\:mr-24 { + margin-right: 6rem; + } + + .md\:mb-24 { + margin-bottom: 6rem; + } + + .md\:ml-24 { + margin-left: 6rem; + } + + .md\:mt-32 { + margin-top: 8rem; + } + + .md\:mr-32 { + margin-right: 8rem; + } + + .md\:mb-32 { + margin-bottom: 8rem; + } + + .md\:ml-32 { + margin-left: 8rem; + } + + .md\:mt-40 { + margin-top: 10rem; + } + + .md\:mr-40 { + margin-right: 10rem; + } + + .md\:mb-40 { + margin-bottom: 10rem; + } + + .md\:ml-40 { + margin-left: 10rem; + } + + .md\:mt-48 { + margin-top: 12rem; + } + + .md\:mr-48 { + margin-right: 12rem; + } + + .md\:mb-48 { + margin-bottom: 12rem; + } + + .md\:ml-48 { + margin-left: 12rem; + } + + .md\:mt-56 { + margin-top: 14rem; + } + + .md\:mr-56 { + margin-right: 14rem; + } + + .md\:mb-56 { + margin-bottom: 14rem; + } + + .md\:ml-56 { + margin-left: 14rem; + } + + .md\:mt-64 { + margin-top: 16rem; + } + + .md\:mr-64 { + margin-right: 16rem; + } + + .md\:mb-64 { + margin-bottom: 16rem; + } + + .md\:ml-64 { + margin-left: 16rem; + } + + .md\:mt-auto { + margin-top: auto; + } + + .md\:mr-auto { + margin-right: auto; + } + + .md\:mb-auto { + margin-bottom: auto; + } + + .md\:ml-auto { + margin-left: auto; + } + + .md\:mt-px { + margin-top: 1px; + } + + .md\:mr-px { + margin-right: 1px; + } + + .md\:mb-px { + margin-bottom: 1px; + } + + .md\:ml-px { + margin-left: 1px; + } + + .md\:-mt-1 { + margin-top: -0.25rem; + } + + .md\:-mr-1 { + margin-right: -0.25rem; + } + + .md\:-mb-1 { + margin-bottom: -0.25rem; + } + + .md\:-ml-1 { + margin-left: -0.25rem; + } + + .md\:-mt-2 { + margin-top: -0.5rem; + } + + .md\:-mr-2 { + margin-right: -0.5rem; + } + + .md\:-mb-2 { + margin-bottom: -0.5rem; + } + + .md\:-ml-2 { + margin-left: -0.5rem; + } + + .md\:-mt-3 { + margin-top: -0.75rem; + } + + .md\:-mr-3 { + margin-right: -0.75rem; + } + + .md\:-mb-3 { + margin-bottom: -0.75rem; + } + + .md\:-ml-3 { + margin-left: -0.75rem; + } + + .md\:-mt-4 { + margin-top: -1rem; + } + + .md\:-mr-4 { + margin-right: -1rem; + } + + .md\:-mb-4 { + margin-bottom: -1rem; + } + + .md\:-ml-4 { + margin-left: -1rem; + } + + .md\:-mt-5 { + margin-top: -1.25rem; + } + + .md\:-mr-5 { + margin-right: -1.25rem; + } + + .md\:-mb-5 { + margin-bottom: -1.25rem; + } + + .md\:-ml-5 { + margin-left: -1.25rem; + } + + .md\:-mt-6 { + margin-top: -1.5rem; + } + + .md\:-mr-6 { + margin-right: -1.5rem; + } + + .md\:-mb-6 { + margin-bottom: -1.5rem; + } + + .md\:-ml-6 { + margin-left: -1.5rem; + } + + .md\:-mt-8 { + margin-top: -2rem; + } + + .md\:-mr-8 { + margin-right: -2rem; + } + + .md\:-mb-8 { + margin-bottom: -2rem; + } + + .md\:-ml-8 { + margin-left: -2rem; + } + + .md\:-mt-10 { + margin-top: -2.5rem; + } + + .md\:-mr-10 { + margin-right: -2.5rem; + } + + .md\:-mb-10 { + margin-bottom: -2.5rem; + } + + .md\:-ml-10 { + margin-left: -2.5rem; + } + + .md\:-mt-12 { + margin-top: -3rem; + } + + .md\:-mr-12 { + margin-right: -3rem; + } + + .md\:-mb-12 { + margin-bottom: -3rem; + } + + .md\:-ml-12 { + margin-left: -3rem; + } + + .md\:-mt-16 { + margin-top: -4rem; + } + + .md\:-mr-16 { + margin-right: -4rem; + } + + .md\:-mb-16 { + margin-bottom: -4rem; + } + + .md\:-ml-16 { + margin-left: -4rem; + } + + .md\:-mt-20 { + margin-top: -5rem; + } + + .md\:-mr-20 { + margin-right: -5rem; + } + + .md\:-mb-20 { + margin-bottom: -5rem; + } + + .md\:-ml-20 { + margin-left: -5rem; + } + + .md\:-mt-24 { + margin-top: -6rem; + } + + .md\:-mr-24 { + margin-right: -6rem; + } + + .md\:-mb-24 { + margin-bottom: -6rem; + } + + .md\:-ml-24 { + margin-left: -6rem; + } + + .md\:-mt-32 { + margin-top: -8rem; + } + + .md\:-mr-32 { + margin-right: -8rem; + } + + .md\:-mb-32 { + margin-bottom: -8rem; + } + + .md\:-ml-32 { + margin-left: -8rem; + } + + .md\:-mt-40 { + margin-top: -10rem; + } + + .md\:-mr-40 { + margin-right: -10rem; + } + + .md\:-mb-40 { + margin-bottom: -10rem; + } + + .md\:-ml-40 { + margin-left: -10rem; + } + + .md\:-mt-48 { + margin-top: -12rem; + } + + .md\:-mr-48 { + margin-right: -12rem; + } + + .md\:-mb-48 { + margin-bottom: -12rem; + } + + .md\:-ml-48 { + margin-left: -12rem; + } + + .md\:-mt-56 { + margin-top: -14rem; + } + + .md\:-mr-56 { + margin-right: -14rem; + } + + .md\:-mb-56 { + margin-bottom: -14rem; + } + + .md\:-ml-56 { + margin-left: -14rem; + } + + .md\:-mt-64 { + margin-top: -16rem; + } + + .md\:-mr-64 { + margin-right: -16rem; + } + + .md\:-mb-64 { + margin-bottom: -16rem; + } + + .md\:-ml-64 { + margin-left: -16rem; + } + + .md\:-mt-px { + margin-top: -1px; + } + + .md\:-mr-px { + margin-right: -1px; + } + + .md\:-mb-px { + margin-bottom: -1px; + } + + .md\:-ml-px { + margin-left: -1px; + } + + .md\:max-h-full { + max-height: 100%; + } + + .md\:max-h-screen { + max-height: 100vh; + } + + .md\:max-w-none { + max-width: none; + } + + .md\:max-w-xs { + max-width: 20rem; + } + + .md\:max-w-sm { + max-width: 24rem; + } + + .md\:max-w-md { + max-width: 28rem; + } + + .md\:max-w-lg { + max-width: 32rem; + } + + .md\:max-w-xl { + max-width: 36rem; + } + + .md\:max-w-2xl { + max-width: 42rem; + } + + .md\:max-w-3xl { + max-width: 48rem; + } + + .md\:max-w-4xl { + max-width: 56rem; + } + + .md\:max-w-5xl { + max-width: 64rem; + } + + .md\:max-w-6xl { + max-width: 72rem; + } + + .md\:max-w-full { + max-width: 100%; + } + + .md\:max-w-screen-sm { + max-width: 640px; + } + + .md\:max-w-screen-md { + max-width: 768px; + } + + .md\:max-w-screen-lg { + max-width: 1024px; + } + + .md\:max-w-screen-xl { + max-width: 1280px; + } + + .md\:min-h-0 { + min-height: 0; + } + + .md\:min-h-full { + min-height: 100%; + } + + .md\:min-h-screen { + min-height: 100vh; + } + + .md\:min-w-0 { + min-width: 0; + } + + .md\:min-w-full { + min-width: 100%; + } + + .md\:object-contain { + object-fit: contain; + } + + .md\:object-cover { + object-fit: cover; + } + + .md\:object-fill { + object-fit: fill; + } + + .md\:object-none { + object-fit: none; + } + + .md\:object-scale-down { + object-fit: scale-down; + } + + .md\:object-bottom { + object-position: bottom; + } + + .md\:object-center { + object-position: center; + } + + .md\:object-left { + object-position: left; + } + + .md\:object-left-bottom { + object-position: left bottom; + } + + .md\:object-left-top { + object-position: left top; + } + + .md\:object-right { + object-position: right; + } + + .md\:object-right-bottom { + object-position: right bottom; + } + + .md\:object-right-top { + object-position: right top; + } + + .md\:object-top { + object-position: top; + } + + .md\:opacity-0 { + opacity: 0; + } + + .md\:opacity-25 { + opacity: 0.25; + } + + .md\:opacity-50 { + opacity: 0.5; + } + + .md\:opacity-75 { + opacity: 0.75; + } + + .md\:opacity-100 { + opacity: 1; + } + + .md\:hover\:opacity-0:hover { + opacity: 0; + } + + .md\:hover\:opacity-25:hover { + opacity: 0.25; + } + + .md\:hover\:opacity-50:hover { + opacity: 0.5; + } + + .md\:hover\:opacity-75:hover { + opacity: 0.75; + } + + .md\:hover\:opacity-100:hover { + opacity: 1; + } + + .md\:focus\:opacity-0:focus { + opacity: 0; + } + + .md\:focus\:opacity-25:focus { + opacity: 0.25; + } + + .md\:focus\:opacity-50:focus { + opacity: 0.5; + } + + .md\:focus\:opacity-75:focus { + opacity: 0.75; + } + + .md\:focus\:opacity-100:focus { + opacity: 1; + } + + .md\:outline-none { + outline: 0; + } + + .md\:focus\:outline-none:focus { + outline: 0; + } + + .md\:overflow-auto { + overflow: auto; + } + + .md\:overflow-hidden { + overflow: hidden; + } + + .md\:overflow-visible { + overflow: visible; + } + + .md\:overflow-scroll { + overflow: scroll; + } + + .md\:overflow-x-auto { + overflow-x: auto; + } + + .md\:overflow-y-auto { + overflow-y: auto; + } + + .md\:overflow-x-hidden { + overflow-x: hidden; + } + + .md\:overflow-y-hidden { + overflow-y: hidden; + } + + .md\:overflow-x-visible { + overflow-x: visible; + } + + .md\:overflow-y-visible { + overflow-y: visible; + } + + .md\:overflow-x-scroll { + overflow-x: scroll; + } + + .md\:overflow-y-scroll { + overflow-y: scroll; + } + + .md\:scrolling-touch { + -webkit-overflow-scrolling: touch; + } + + .md\:scrolling-auto { + -webkit-overflow-scrolling: auto; + } + + .md\:p-0 { + padding: 0; + } + + .md\:p-1 { + padding: 0.25rem; + } + + .md\:p-2 { + padding: 0.5rem; + } + + .md\:p-3 { + padding: 0.75rem; + } + + .md\:p-4 { + padding: 1rem; + } + + .md\:p-5 { + padding: 1.25rem; + } + + .md\:p-6 { + padding: 1.5rem; + } + + .md\:p-8 { + padding: 2rem; + } + + .md\:p-10 { + padding: 2.5rem; + } + + .md\:p-12 { + padding: 3rem; + } + + .md\:p-16 { + padding: 4rem; + } + + .md\:p-20 { + padding: 5rem; + } + + .md\:p-24 { + padding: 6rem; + } + + .md\:p-32 { + padding: 8rem; + } + + .md\:p-40 { + padding: 10rem; + } + + .md\:p-48 { + padding: 12rem; + } + + .md\:p-56 { + padding: 14rem; + } + + .md\:p-64 { + padding: 16rem; + } + + .md\:p-px { + padding: 1px; + } + + .md\:py-0 { + padding-top: 0; + padding-bottom: 0; + } + + .md\:px-0 { + padding-left: 0; + padding-right: 0; + } + + .md\:py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .md\:px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; + } + + .md\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .md\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .md\:py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + } + + .md\:px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; + } + + .md\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .md\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .md\:py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; + } + + .md\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .md\:py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; + } + + .md\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .md\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .md\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .md\:py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; + } + + .md\:px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; + } + + .md\:py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + + .md\:px-12 { + padding-left: 3rem; + padding-right: 3rem; + } + + .md\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .md\:px-16 { + padding-left: 4rem; + padding-right: 4rem; + } + + .md\:py-20 { + padding-top: 5rem; + padding-bottom: 5rem; + } + + .md\:px-20 { + padding-left: 5rem; + padding-right: 5rem; + } + + .md\:py-24 { + padding-top: 6rem; + padding-bottom: 6rem; + } + + .md\:px-24 { + padding-left: 6rem; + padding-right: 6rem; + } + + .md\:py-32 { + padding-top: 8rem; + padding-bottom: 8rem; + } + + .md\:px-32 { + padding-left: 8rem; + padding-right: 8rem; + } + + .md\:py-40 { + padding-top: 10rem; + padding-bottom: 10rem; + } + + .md\:px-40 { + padding-left: 10rem; + padding-right: 10rem; + } + + .md\:py-48 { + padding-top: 12rem; + padding-bottom: 12rem; + } + + .md\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .md\:py-56 { + padding-top: 14rem; + padding-bottom: 14rem; + } + + .md\:px-56 { + padding-left: 14rem; + padding-right: 14rem; + } + + .md\:py-64 { + padding-top: 16rem; + padding-bottom: 16rem; + } + + .md\:px-64 { + padding-left: 16rem; + padding-right: 16rem; + } + + .md\:py-px { + padding-top: 1px; + padding-bottom: 1px; + } + + .md\:px-px { + padding-left: 1px; + padding-right: 1px; + } + + .md\:pt-0 { + padding-top: 0; + } + + .md\:pr-0 { + padding-right: 0; + } + + .md\:pb-0 { + padding-bottom: 0; + } + + .md\:pl-0 { + padding-left: 0; + } + + .md\:pt-1 { + padding-top: 0.25rem; + } + + .md\:pr-1 { + padding-right: 0.25rem; + } + + .md\:pb-1 { + padding-bottom: 0.25rem; + } + + .md\:pl-1 { + padding-left: 0.25rem; + } + + .md\:pt-2 { + padding-top: 0.5rem; + } + + .md\:pr-2 { + padding-right: 0.5rem; + } + + .md\:pb-2 { + padding-bottom: 0.5rem; + } + + .md\:pl-2 { + padding-left: 0.5rem; + } + + .md\:pt-3 { + padding-top: 0.75rem; + } + + .md\:pr-3 { + padding-right: 0.75rem; + } + + .md\:pb-3 { + padding-bottom: 0.75rem; + } + + .md\:pl-3 { + padding-left: 0.75rem; + } + + .md\:pt-4 { + padding-top: 1rem; + } + + .md\:pr-4 { + padding-right: 1rem; + } + + .md\:pb-4 { + padding-bottom: 1rem; + } + + .md\:pl-4 { + padding-left: 1rem; + } + + .md\:pt-5 { + padding-top: 1.25rem; + } + + .md\:pr-5 { + padding-right: 1.25rem; + } + + .md\:pb-5 { + padding-bottom: 1.25rem; + } + + .md\:pl-5 { + padding-left: 1.25rem; + } + + .md\:pt-6 { + padding-top: 1.5rem; + } + + .md\:pr-6 { + padding-right: 1.5rem; + } + + .md\:pb-6 { + padding-bottom: 1.5rem; + } + + .md\:pl-6 { + padding-left: 1.5rem; + } + + .md\:pt-8 { + padding-top: 2rem; + } + + .md\:pr-8 { + padding-right: 2rem; + } + + .md\:pb-8 { + padding-bottom: 2rem; + } + + .md\:pl-8 { + padding-left: 2rem; + } + + .md\:pt-10 { + padding-top: 2.5rem; + } + + .md\:pr-10 { + padding-right: 2.5rem; + } + + .md\:pb-10 { + padding-bottom: 2.5rem; + } + + .md\:pl-10 { + padding-left: 2.5rem; + } + + .md\:pt-12 { + padding-top: 3rem; + } + + .md\:pr-12 { + padding-right: 3rem; + } + + .md\:pb-12 { + padding-bottom: 3rem; + } + + .md\:pl-12 { + padding-left: 3rem; + } + + .md\:pt-16 { + padding-top: 4rem; + } + + .md\:pr-16 { + padding-right: 4rem; + } + + .md\:pb-16 { + padding-bottom: 4rem; + } + + .md\:pl-16 { + padding-left: 4rem; + } + + .md\:pt-20 { + padding-top: 5rem; + } + + .md\:pr-20 { + padding-right: 5rem; + } + + .md\:pb-20 { + padding-bottom: 5rem; + } + + .md\:pl-20 { + padding-left: 5rem; + } + + .md\:pt-24 { + padding-top: 6rem; + } + + .md\:pr-24 { + padding-right: 6rem; + } + + .md\:pb-24 { + padding-bottom: 6rem; + } + + .md\:pl-24 { + padding-left: 6rem; + } + + .md\:pt-32 { + padding-top: 8rem; + } + + .md\:pr-32 { + padding-right: 8rem; + } + + .md\:pb-32 { + padding-bottom: 8rem; + } + + .md\:pl-32 { + padding-left: 8rem; + } + + .md\:pt-40 { + padding-top: 10rem; + } + + .md\:pr-40 { + padding-right: 10rem; + } + + .md\:pb-40 { + padding-bottom: 10rem; + } + + .md\:pl-40 { + padding-left: 10rem; + } + + .md\:pt-48 { + padding-top: 12rem; + } + + .md\:pr-48 { + padding-right: 12rem; + } + + .md\:pb-48 { + padding-bottom: 12rem; + } + + .md\:pl-48 { + padding-left: 12rem; + } + + .md\:pt-56 { + padding-top: 14rem; + } + + .md\:pr-56 { + padding-right: 14rem; + } + + .md\:pb-56 { + padding-bottom: 14rem; + } + + .md\:pl-56 { + padding-left: 14rem; + } + + .md\:pt-64 { + padding-top: 16rem; + } + + .md\:pr-64 { + padding-right: 16rem; + } + + .md\:pb-64 { + padding-bottom: 16rem; + } + + .md\:pl-64 { + padding-left: 16rem; + } + + .md\:pt-px { + padding-top: 1px; + } + + .md\:pr-px { + padding-right: 1px; + } + + .md\:pb-px { + padding-bottom: 1px; + } + + .md\:pl-px { + padding-left: 1px; + } + + .md\:placeholder-transparent::placeholder { + color: transparent; + } + + .md\:placeholder-current::placeholder { + color: currentColor; + } + + .md\:placeholder-black::placeholder { + color: #000; + } + + .md\:placeholder-white::placeholder { + color: #fff; + } + + .md\:placeholder-gray-100::placeholder { + color: #f7fafc; + } + + .md\:placeholder-gray-200::placeholder { + color: #edf2f7; + } + + .md\:placeholder-gray-300::placeholder { + color: #e2e8f0; + } + + .md\:placeholder-gray-400::placeholder { + color: #cbd5e0; + } + + .md\:placeholder-gray-500::placeholder { + color: #a0aec0; + } + + .md\:placeholder-gray-600::placeholder { + color: #718096; + } + + .md\:placeholder-gray-700::placeholder { + color: #4a5568; + } + + .md\:placeholder-gray-800::placeholder { + color: #2d3748; + } + + .md\:placeholder-gray-900::placeholder { + color: #1a202c; + } + + .md\:placeholder-red-100::placeholder { + color: #fff5f5; + } + + .md\:placeholder-red-200::placeholder { + color: #fed7d7; + } + + .md\:placeholder-red-300::placeholder { + color: #feb2b2; + } + + .md\:placeholder-red-400::placeholder { + color: #fc8181; + } + + .md\:placeholder-red-500::placeholder { + color: #f56565; + } + + .md\:placeholder-red-600::placeholder { + color: #e53e3e; + } + + .md\:placeholder-red-700::placeholder { + color: #c53030; + } + + .md\:placeholder-red-800::placeholder { + color: #9b2c2c; + } + + .md\:placeholder-red-900::placeholder { + color: #742a2a; + } + + .md\:placeholder-orange-100::placeholder { + color: #fffaf0; + } + + .md\:placeholder-orange-200::placeholder { + color: #feebc8; + } + + .md\:placeholder-orange-300::placeholder { + color: #fbd38d; + } + + .md\:placeholder-orange-400::placeholder { + color: #f6ad55; + } + + .md\:placeholder-orange-500::placeholder { + color: #ed8936; + } + + .md\:placeholder-orange-600::placeholder { + color: #dd6b20; + } + + .md\:placeholder-orange-700::placeholder { + color: #c05621; + } + + .md\:placeholder-orange-800::placeholder { + color: #9c4221; + } + + .md\:placeholder-orange-900::placeholder { + color: #7b341e; + } + + .md\:placeholder-yellow-100::placeholder { + color: #fffff0; + } + + .md\:placeholder-yellow-200::placeholder { + color: #fefcbf; + } + + .md\:placeholder-yellow-300::placeholder { + color: #faf089; + } + + .md\:placeholder-yellow-400::placeholder { + color: #f6e05e; + } + + .md\:placeholder-yellow-500::placeholder { + color: #ecc94b; + } + + .md\:placeholder-yellow-600::placeholder { + color: #d69e2e; + } + + .md\:placeholder-yellow-700::placeholder { + color: #b7791f; + } + + .md\:placeholder-yellow-800::placeholder { + color: #975a16; + } + + .md\:placeholder-yellow-900::placeholder { + color: #744210; + } + + .md\:placeholder-green-100::placeholder { + color: #f0fff4; + } + + .md\:placeholder-green-200::placeholder { + color: #c6f6d5; + } + + .md\:placeholder-green-300::placeholder { + color: #9ae6b4; + } + + .md\:placeholder-green-400::placeholder { + color: #68d391; + } + + .md\:placeholder-green-500::placeholder { + color: #48bb78; + } + + .md\:placeholder-green-600::placeholder { + color: #38a169; + } + + .md\:placeholder-green-700::placeholder { + color: #2f855a; + } + + .md\:placeholder-green-800::placeholder { + color: #276749; + } + + .md\:placeholder-green-900::placeholder { + color: #22543d; + } + + .md\:placeholder-teal-100::placeholder { + color: #e6fffa; + } + + .md\:placeholder-teal-200::placeholder { + color: #b2f5ea; + } + + .md\:placeholder-teal-300::placeholder { + color: #81e6d9; + } + + .md\:placeholder-teal-400::placeholder { + color: #4fd1c5; + } + + .md\:placeholder-teal-500::placeholder { + color: #38b2ac; + } + + .md\:placeholder-teal-600::placeholder { + color: #319795; + } + + .md\:placeholder-teal-700::placeholder { + color: #2c7a7b; + } + + .md\:placeholder-teal-800::placeholder { + color: #285e61; + } + + .md\:placeholder-teal-900::placeholder { + color: #234e52; + } + + .md\:placeholder-blue-100::placeholder { + color: #ebf8ff; + } + + .md\:placeholder-blue-200::placeholder { + color: #bee3f8; + } + + .md\:placeholder-blue-300::placeholder { + color: #90cdf4; + } + + .md\:placeholder-blue-400::placeholder { + color: #63b3ed; + } + + .md\:placeholder-blue-500::placeholder { + color: #4299e1; + } + + .md\:placeholder-blue-600::placeholder { + color: #3182ce; + } + + .md\:placeholder-blue-700::placeholder { + color: #2b6cb0; + } + + .md\:placeholder-blue-800::placeholder { + color: #2c5282; + } + + .md\:placeholder-blue-900::placeholder { + color: #2a4365; + } + + .md\:placeholder-indigo-100::placeholder { + color: #ebf4ff; + } + + .md\:placeholder-indigo-200::placeholder { + color: #c3dafe; + } + + .md\:placeholder-indigo-300::placeholder { + color: #a3bffa; + } + + .md\:placeholder-indigo-400::placeholder { + color: #7f9cf5; + } + + .md\:placeholder-indigo-500::placeholder { + color: #667eea; + } + + .md\:placeholder-indigo-600::placeholder { + color: #5a67d8; + } + + .md\:placeholder-indigo-700::placeholder { + color: #4c51bf; + } + + .md\:placeholder-indigo-800::placeholder { + color: #434190; + } + + .md\:placeholder-indigo-900::placeholder { + color: #3c366b; + } + + .md\:placeholder-purple-100::placeholder { + color: #faf5ff; + } + + .md\:placeholder-purple-200::placeholder { + color: #e9d8fd; + } + + .md\:placeholder-purple-300::placeholder { + color: #d6bcfa; + } + + .md\:placeholder-purple-400::placeholder { + color: #b794f4; + } + + .md\:placeholder-purple-500::placeholder { + color: #9f7aea; + } + + .md\:placeholder-purple-600::placeholder { + color: #805ad5; + } + + .md\:placeholder-purple-700::placeholder { + color: #6b46c1; + } + + .md\:placeholder-purple-800::placeholder { + color: #553c9a; + } + + .md\:placeholder-purple-900::placeholder { + color: #44337a; + } + + .md\:placeholder-pink-100::placeholder { + color: #fff5f7; + } + + .md\:placeholder-pink-200::placeholder { + color: #fed7e2; + } + + .md\:placeholder-pink-300::placeholder { + color: #fbb6ce; + } + + .md\:placeholder-pink-400::placeholder { + color: #f687b3; + } + + .md\:placeholder-pink-500::placeholder { + color: #ed64a6; + } + + .md\:placeholder-pink-600::placeholder { + color: #d53f8c; + } + + .md\:placeholder-pink-700::placeholder { + color: #b83280; + } + + .md\:placeholder-pink-800::placeholder { + color: #97266d; + } + + .md\:placeholder-pink-900::placeholder { + color: #702459; + } + + .md\:focus\:placeholder-transparent:focus::placeholder { + color: transparent; + } + + .md\:focus\:placeholder-current:focus::placeholder { + color: currentColor; + } + + .md\:focus\:placeholder-black:focus::placeholder { + color: #000; + } + + .md\:focus\:placeholder-white:focus::placeholder { + color: #fff; + } + + .md\:focus\:placeholder-gray-100:focus::placeholder { + color: #f7fafc; + } + + .md\:focus\:placeholder-gray-200:focus::placeholder { + color: #edf2f7; + } + + .md\:focus\:placeholder-gray-300:focus::placeholder { + color: #e2e8f0; + } + + .md\:focus\:placeholder-gray-400:focus::placeholder { + color: #cbd5e0; + } + + .md\:focus\:placeholder-gray-500:focus::placeholder { + color: #a0aec0; + } + + .md\:focus\:placeholder-gray-600:focus::placeholder { + color: #718096; + } + + .md\:focus\:placeholder-gray-700:focus::placeholder { + color: #4a5568; + } + + .md\:focus\:placeholder-gray-800:focus::placeholder { + color: #2d3748; + } + + .md\:focus\:placeholder-gray-900:focus::placeholder { + color: #1a202c; + } + + .md\:focus\:placeholder-red-100:focus::placeholder { + color: #fff5f5; + } + + .md\:focus\:placeholder-red-200:focus::placeholder { + color: #fed7d7; + } + + .md\:focus\:placeholder-red-300:focus::placeholder { + color: #feb2b2; + } + + .md\:focus\:placeholder-red-400:focus::placeholder { + color: #fc8181; + } + + .md\:focus\:placeholder-red-500:focus::placeholder { + color: #f56565; + } + + .md\:focus\:placeholder-red-600:focus::placeholder { + color: #e53e3e; + } + + .md\:focus\:placeholder-red-700:focus::placeholder { + color: #c53030; + } + + .md\:focus\:placeholder-red-800:focus::placeholder { + color: #9b2c2c; + } + + .md\:focus\:placeholder-red-900:focus::placeholder { + color: #742a2a; + } + + .md\:focus\:placeholder-orange-100:focus::placeholder { + color: #fffaf0; + } + + .md\:focus\:placeholder-orange-200:focus::placeholder { + color: #feebc8; + } + + .md\:focus\:placeholder-orange-300:focus::placeholder { + color: #fbd38d; + } + + .md\:focus\:placeholder-orange-400:focus::placeholder { + color: #f6ad55; + } + + .md\:focus\:placeholder-orange-500:focus::placeholder { + color: #ed8936; + } + + .md\:focus\:placeholder-orange-600:focus::placeholder { + color: #dd6b20; + } + + .md\:focus\:placeholder-orange-700:focus::placeholder { + color: #c05621; + } + + .md\:focus\:placeholder-orange-800:focus::placeholder { + color: #9c4221; + } + + .md\:focus\:placeholder-orange-900:focus::placeholder { + color: #7b341e; + } + + .md\:focus\:placeholder-yellow-100:focus::placeholder { + color: #fffff0; + } + + .md\:focus\:placeholder-yellow-200:focus::placeholder { + color: #fefcbf; + } + + .md\:focus\:placeholder-yellow-300:focus::placeholder { + color: #faf089; + } + + .md\:focus\:placeholder-yellow-400:focus::placeholder { + color: #f6e05e; + } + + .md\:focus\:placeholder-yellow-500:focus::placeholder { + color: #ecc94b; + } + + .md\:focus\:placeholder-yellow-600:focus::placeholder { + color: #d69e2e; + } + + .md\:focus\:placeholder-yellow-700:focus::placeholder { + color: #b7791f; + } + + .md\:focus\:placeholder-yellow-800:focus::placeholder { + color: #975a16; + } + + .md\:focus\:placeholder-yellow-900:focus::placeholder { + color: #744210; + } + + .md\:focus\:placeholder-green-100:focus::placeholder { + color: #f0fff4; + } + + .md\:focus\:placeholder-green-200:focus::placeholder { + color: #c6f6d5; + } + + .md\:focus\:placeholder-green-300:focus::placeholder { + color: #9ae6b4; + } + + .md\:focus\:placeholder-green-400:focus::placeholder { + color: #68d391; + } + + .md\:focus\:placeholder-green-500:focus::placeholder { + color: #48bb78; + } + + .md\:focus\:placeholder-green-600:focus::placeholder { + color: #38a169; + } + + .md\:focus\:placeholder-green-700:focus::placeholder { + color: #2f855a; + } + + .md\:focus\:placeholder-green-800:focus::placeholder { + color: #276749; + } + + .md\:focus\:placeholder-green-900:focus::placeholder { + color: #22543d; + } + + .md\:focus\:placeholder-teal-100:focus::placeholder { + color: #e6fffa; + } + + .md\:focus\:placeholder-teal-200:focus::placeholder { + color: #b2f5ea; + } + + .md\:focus\:placeholder-teal-300:focus::placeholder { + color: #81e6d9; + } + + .md\:focus\:placeholder-teal-400:focus::placeholder { + color: #4fd1c5; + } + + .md\:focus\:placeholder-teal-500:focus::placeholder { + color: #38b2ac; + } + + .md\:focus\:placeholder-teal-600:focus::placeholder { + color: #319795; + } + + .md\:focus\:placeholder-teal-700:focus::placeholder { + color: #2c7a7b; + } + + .md\:focus\:placeholder-teal-800:focus::placeholder { + color: #285e61; + } + + .md\:focus\:placeholder-teal-900:focus::placeholder { + color: #234e52; + } + + .md\:focus\:placeholder-blue-100:focus::placeholder { + color: #ebf8ff; + } + + .md\:focus\:placeholder-blue-200:focus::placeholder { + color: #bee3f8; + } + + .md\:focus\:placeholder-blue-300:focus::placeholder { + color: #90cdf4; + } + + .md\:focus\:placeholder-blue-400:focus::placeholder { + color: #63b3ed; + } + + .md\:focus\:placeholder-blue-500:focus::placeholder { + color: #4299e1; + } + + .md\:focus\:placeholder-blue-600:focus::placeholder { + color: #3182ce; + } + + .md\:focus\:placeholder-blue-700:focus::placeholder { + color: #2b6cb0; + } + + .md\:focus\:placeholder-blue-800:focus::placeholder { + color: #2c5282; + } + + .md\:focus\:placeholder-blue-900:focus::placeholder { + color: #2a4365; + } + + .md\:focus\:placeholder-indigo-100:focus::placeholder { + color: #ebf4ff; + } + + .md\:focus\:placeholder-indigo-200:focus::placeholder { + color: #c3dafe; + } + + .md\:focus\:placeholder-indigo-300:focus::placeholder { + color: #a3bffa; + } + + .md\:focus\:placeholder-indigo-400:focus::placeholder { + color: #7f9cf5; + } + + .md\:focus\:placeholder-indigo-500:focus::placeholder { + color: #667eea; + } + + .md\:focus\:placeholder-indigo-600:focus::placeholder { + color: #5a67d8; + } + + .md\:focus\:placeholder-indigo-700:focus::placeholder { + color: #4c51bf; + } + + .md\:focus\:placeholder-indigo-800:focus::placeholder { + color: #434190; + } + + .md\:focus\:placeholder-indigo-900:focus::placeholder { + color: #3c366b; + } + + .md\:focus\:placeholder-purple-100:focus::placeholder { + color: #faf5ff; + } + + .md\:focus\:placeholder-purple-200:focus::placeholder { + color: #e9d8fd; + } + + .md\:focus\:placeholder-purple-300:focus::placeholder { + color: #d6bcfa; + } + + .md\:focus\:placeholder-purple-400:focus::placeholder { + color: #b794f4; + } + + .md\:focus\:placeholder-purple-500:focus::placeholder { + color: #9f7aea; + } + + .md\:focus\:placeholder-purple-600:focus::placeholder { + color: #805ad5; + } + + .md\:focus\:placeholder-purple-700:focus::placeholder { + color: #6b46c1; + } + + .md\:focus\:placeholder-purple-800:focus::placeholder { + color: #553c9a; + } + + .md\:focus\:placeholder-purple-900:focus::placeholder { + color: #44337a; + } + + .md\:focus\:placeholder-pink-100:focus::placeholder { + color: #fff5f7; + } + + .md\:focus\:placeholder-pink-200:focus::placeholder { + color: #fed7e2; + } + + .md\:focus\:placeholder-pink-300:focus::placeholder { + color: #fbb6ce; + } + + .md\:focus\:placeholder-pink-400:focus::placeholder { + color: #f687b3; + } + + .md\:focus\:placeholder-pink-500:focus::placeholder { + color: #ed64a6; + } + + .md\:focus\:placeholder-pink-600:focus::placeholder { + color: #d53f8c; + } + + .md\:focus\:placeholder-pink-700:focus::placeholder { + color: #b83280; + } + + .md\:focus\:placeholder-pink-800:focus::placeholder { + color: #97266d; + } + + .md\:focus\:placeholder-pink-900:focus::placeholder { + color: #702459; + } + + .md\:pointer-events-none { + pointer-events: none; + } + + .md\:pointer-events-auto { + pointer-events: auto; + } + + .md\:static { + position: static; + } + + .md\:fixed { + position: fixed; + } + + .md\:absolute { + position: absolute; + } + + .md\:relative { + position: relative; + } + + .md\:sticky { + position: sticky; + } + + .md\:inset-0 { + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + .md\:inset-auto { + top: auto; + right: auto; + bottom: auto; + left: auto; + } + + .md\:inset-y-0 { + top: 0; + bottom: 0; + } + + .md\:inset-x-0 { + right: 0; + left: 0; + } + + .md\:inset-y-auto { + top: auto; + bottom: auto; + } + + .md\:inset-x-auto { + right: auto; + left: auto; + } + + .md\:top-0 { + top: 0; + } + + .md\:right-0 { + right: 0; + } + + .md\:bottom-0 { + bottom: 0; + } + + .md\:left-0 { + left: 0; + } + + .md\:top-auto { + top: auto; + } + + .md\:right-auto { + right: auto; + } + + .md\:bottom-auto { + bottom: auto; + } + + .md\:left-auto { + left: auto; + } + + .md\:resize-none { + resize: none; + } + + .md\:resize-y { + resize: vertical; + } + + .md\:resize-x { + resize: horizontal; + } + + .md\:resize { + resize: both; + } + + .md\:shadow-xs { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .md\:shadow-sm { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .md\:shadow { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .md\:shadow-md { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .md\:shadow-lg { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .md\:shadow-xl { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .md\:shadow-2xl { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .md\:shadow-inner { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .md\:shadow-outline { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .md\:shadow-none { + box-shadow: none; + } + + .md\:hover\:shadow-xs:hover { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .md\:hover\:shadow-sm:hover { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .md\:hover\:shadow:hover { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .md\:hover\:shadow-md:hover { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .md\:hover\:shadow-lg:hover { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .md\:hover\:shadow-xl:hover { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .md\:hover\:shadow-2xl:hover { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .md\:hover\:shadow-inner:hover { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .md\:hover\:shadow-outline:hover { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .md\:hover\:shadow-none:hover { + box-shadow: none; + } + + .md\:focus\:shadow-xs:focus { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .md\:focus\:shadow-sm:focus { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .md\:focus\:shadow:focus { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .md\:focus\:shadow-md:focus { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .md\:focus\:shadow-lg:focus { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .md\:focus\:shadow-xl:focus { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .md\:focus\:shadow-2xl:focus { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .md\:focus\:shadow-inner:focus { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .md\:focus\:shadow-outline:focus { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .md\:focus\:shadow-none:focus { + box-shadow: none; + } + + .md\:fill-current { + fill: currentColor; + } + + .md\:stroke-current { + stroke: currentColor; + } + + .md\:stroke-0 { + stroke-width: 0; + } + + .md\:stroke-1 { + stroke-width: 1; + } + + .md\:stroke-2 { + stroke-width: 2; + } + + .md\:table-auto { + table-layout: auto; + } + + .md\:table-fixed { + table-layout: fixed; + } + + .md\:text-left { + text-align: left; + } + + .md\:text-center { + text-align: center; + } + + .md\:text-right { + text-align: right; + } + + .md\:text-justify { + text-align: justify; + } + + .md\:text-transparent { + color: transparent; + } + + .md\:text-current { + color: currentColor; + } + + .md\:text-black { + color: #000; + } + + .md\:text-white { + color: #fff; + } + + .md\:text-gray-100 { + color: #f7fafc; + } + + .md\:text-gray-200 { + color: #edf2f7; + } + + .md\:text-gray-300 { + color: #e2e8f0; + } + + .md\:text-gray-400 { + color: #cbd5e0; + } + + .md\:text-gray-500 { + color: #a0aec0; + } + + .md\:text-gray-600 { + color: #718096; + } + + .md\:text-gray-700 { + color: #4a5568; + } + + .md\:text-gray-800 { + color: #2d3748; + } + + .md\:text-gray-900 { + color: #1a202c; + } + + .md\:text-red-100 { + color: #fff5f5; + } + + .md\:text-red-200 { + color: #fed7d7; + } + + .md\:text-red-300 { + color: #feb2b2; + } + + .md\:text-red-400 { + color: #fc8181; + } + + .md\:text-red-500 { + color: #f56565; + } + + .md\:text-red-600 { + color: #e53e3e; + } + + .md\:text-red-700 { + color: #c53030; + } + + .md\:text-red-800 { + color: #9b2c2c; + } + + .md\:text-red-900 { + color: #742a2a; + } + + .md\:text-orange-100 { + color: #fffaf0; + } + + .md\:text-orange-200 { + color: #feebc8; + } + + .md\:text-orange-300 { + color: #fbd38d; + } + + .md\:text-orange-400 { + color: #f6ad55; + } + + .md\:text-orange-500 { + color: #ed8936; + } + + .md\:text-orange-600 { + color: #dd6b20; + } + + .md\:text-orange-700 { + color: #c05621; + } + + .md\:text-orange-800 { + color: #9c4221; + } + + .md\:text-orange-900 { + color: #7b341e; + } + + .md\:text-yellow-100 { + color: #fffff0; + } + + .md\:text-yellow-200 { + color: #fefcbf; + } + + .md\:text-yellow-300 { + color: #faf089; + } + + .md\:text-yellow-400 { + color: #f6e05e; + } + + .md\:text-yellow-500 { + color: #ecc94b; + } + + .md\:text-yellow-600 { + color: #d69e2e; + } + + .md\:text-yellow-700 { + color: #b7791f; + } + + .md\:text-yellow-800 { + color: #975a16; + } + + .md\:text-yellow-900 { + color: #744210; + } + + .md\:text-green-100 { + color: #f0fff4; + } + + .md\:text-green-200 { + color: #c6f6d5; + } + + .md\:text-green-300 { + color: #9ae6b4; + } + + .md\:text-green-400 { + color: #68d391; + } + + .md\:text-green-500 { + color: #48bb78; + } + + .md\:text-green-600 { + color: #38a169; + } + + .md\:text-green-700 { + color: #2f855a; + } + + .md\:text-green-800 { + color: #276749; + } + + .md\:text-green-900 { + color: #22543d; + } + + .md\:text-teal-100 { + color: #e6fffa; + } + + .md\:text-teal-200 { + color: #b2f5ea; + } + + .md\:text-teal-300 { + color: #81e6d9; + } + + .md\:text-teal-400 { + color: #4fd1c5; + } + + .md\:text-teal-500 { + color: #38b2ac; + } + + .md\:text-teal-600 { + color: #319795; + } + + .md\:text-teal-700 { + color: #2c7a7b; + } + + .md\:text-teal-800 { + color: #285e61; + } + + .md\:text-teal-900 { + color: #234e52; + } + + .md\:text-blue-100 { + color: #ebf8ff; + } + + .md\:text-blue-200 { + color: #bee3f8; + } + + .md\:text-blue-300 { + color: #90cdf4; + } + + .md\:text-blue-400 { + color: #63b3ed; + } + + .md\:text-blue-500 { + color: #4299e1; + } + + .md\:text-blue-600 { + color: #3182ce; + } + + .md\:text-blue-700 { + color: #2b6cb0; + } + + .md\:text-blue-800 { + color: #2c5282; + } + + .md\:text-blue-900 { + color: #2a4365; + } + + .md\:text-indigo-100 { + color: #ebf4ff; + } + + .md\:text-indigo-200 { + color: #c3dafe; + } + + .md\:text-indigo-300 { + color: #a3bffa; + } + + .md\:text-indigo-400 { + color: #7f9cf5; + } + + .md\:text-indigo-500 { + color: #667eea; + } + + .md\:text-indigo-600 { + color: #5a67d8; + } + + .md\:text-indigo-700 { + color: #4c51bf; + } + + .md\:text-indigo-800 { + color: #434190; + } + + .md\:text-indigo-900 { + color: #3c366b; + } + + .md\:text-purple-100 { + color: #faf5ff; + } + + .md\:text-purple-200 { + color: #e9d8fd; + } + + .md\:text-purple-300 { + color: #d6bcfa; + } + + .md\:text-purple-400 { + color: #b794f4; + } + + .md\:text-purple-500 { + color: #9f7aea; + } + + .md\:text-purple-600 { + color: #805ad5; + } + + .md\:text-purple-700 { + color: #6b46c1; + } + + .md\:text-purple-800 { + color: #553c9a; + } + + .md\:text-purple-900 { + color: #44337a; + } + + .md\:text-pink-100 { + color: #fff5f7; + } + + .md\:text-pink-200 { + color: #fed7e2; + } + + .md\:text-pink-300 { + color: #fbb6ce; + } + + .md\:text-pink-400 { + color: #f687b3; + } + + .md\:text-pink-500 { + color: #ed64a6; + } + + .md\:text-pink-600 { + color: #d53f8c; + } + + .md\:text-pink-700 { + color: #b83280; + } + + .md\:text-pink-800 { + color: #97266d; + } + + .md\:text-pink-900 { + color: #702459; + } + + .md\:hover\:text-transparent:hover { + color: transparent; + } + + .md\:hover\:text-current:hover { + color: currentColor; + } + + .md\:hover\:text-black:hover { + color: #000; + } + + .md\:hover\:text-white:hover { + color: #fff; + } + + .md\:hover\:text-gray-100:hover { + color: #f7fafc; + } + + .md\:hover\:text-gray-200:hover { + color: #edf2f7; + } + + .md\:hover\:text-gray-300:hover { + color: #e2e8f0; + } + + .md\:hover\:text-gray-400:hover { + color: #cbd5e0; + } + + .md\:hover\:text-gray-500:hover { + color: #a0aec0; + } + + .md\:hover\:text-gray-600:hover { + color: #718096; + } + + .md\:hover\:text-gray-700:hover { + color: #4a5568; + } + + .md\:hover\:text-gray-800:hover { + color: #2d3748; + } + + .md\:hover\:text-gray-900:hover { + color: #1a202c; + } + + .md\:hover\:text-red-100:hover { + color: #fff5f5; + } + + .md\:hover\:text-red-200:hover { + color: #fed7d7; + } + + .md\:hover\:text-red-300:hover { + color: #feb2b2; + } + + .md\:hover\:text-red-400:hover { + color: #fc8181; + } + + .md\:hover\:text-red-500:hover { + color: #f56565; + } + + .md\:hover\:text-red-600:hover { + color: #e53e3e; + } + + .md\:hover\:text-red-700:hover { + color: #c53030; + } + + .md\:hover\:text-red-800:hover { + color: #9b2c2c; + } + + .md\:hover\:text-red-900:hover { + color: #742a2a; + } + + .md\:hover\:text-orange-100:hover { + color: #fffaf0; + } + + .md\:hover\:text-orange-200:hover { + color: #feebc8; + } + + .md\:hover\:text-orange-300:hover { + color: #fbd38d; + } + + .md\:hover\:text-orange-400:hover { + color: #f6ad55; + } + + .md\:hover\:text-orange-500:hover { + color: #ed8936; + } + + .md\:hover\:text-orange-600:hover { + color: #dd6b20; + } + + .md\:hover\:text-orange-700:hover { + color: #c05621; + } + + .md\:hover\:text-orange-800:hover { + color: #9c4221; + } + + .md\:hover\:text-orange-900:hover { + color: #7b341e; + } + + .md\:hover\:text-yellow-100:hover { + color: #fffff0; + } + + .md\:hover\:text-yellow-200:hover { + color: #fefcbf; + } + + .md\:hover\:text-yellow-300:hover { + color: #faf089; + } + + .md\:hover\:text-yellow-400:hover { + color: #f6e05e; + } + + .md\:hover\:text-yellow-500:hover { + color: #ecc94b; + } + + .md\:hover\:text-yellow-600:hover { + color: #d69e2e; + } + + .md\:hover\:text-yellow-700:hover { + color: #b7791f; + } + + .md\:hover\:text-yellow-800:hover { + color: #975a16; + } + + .md\:hover\:text-yellow-900:hover { + color: #744210; + } + + .md\:hover\:text-green-100:hover { + color: #f0fff4; + } + + .md\:hover\:text-green-200:hover { + color: #c6f6d5; + } + + .md\:hover\:text-green-300:hover { + color: #9ae6b4; + } + + .md\:hover\:text-green-400:hover { + color: #68d391; + } + + .md\:hover\:text-green-500:hover { + color: #48bb78; + } + + .md\:hover\:text-green-600:hover { + color: #38a169; + } + + .md\:hover\:text-green-700:hover { + color: #2f855a; + } + + .md\:hover\:text-green-800:hover { + color: #276749; + } + + .md\:hover\:text-green-900:hover { + color: #22543d; + } + + .md\:hover\:text-teal-100:hover { + color: #e6fffa; + } + + .md\:hover\:text-teal-200:hover { + color: #b2f5ea; + } + + .md\:hover\:text-teal-300:hover { + color: #81e6d9; + } + + .md\:hover\:text-teal-400:hover { + color: #4fd1c5; + } + + .md\:hover\:text-teal-500:hover { + color: #38b2ac; + } + + .md\:hover\:text-teal-600:hover { + color: #319795; + } + + .md\:hover\:text-teal-700:hover { + color: #2c7a7b; + } + + .md\:hover\:text-teal-800:hover { + color: #285e61; + } + + .md\:hover\:text-teal-900:hover { + color: #234e52; + } + + .md\:hover\:text-blue-100:hover { + color: #ebf8ff; + } + + .md\:hover\:text-blue-200:hover { + color: #bee3f8; + } + + .md\:hover\:text-blue-300:hover { + color: #90cdf4; + } + + .md\:hover\:text-blue-400:hover { + color: #63b3ed; + } + + .md\:hover\:text-blue-500:hover { + color: #4299e1; + } + + .md\:hover\:text-blue-600:hover { + color: #3182ce; + } + + .md\:hover\:text-blue-700:hover { + color: #2b6cb0; + } + + .md\:hover\:text-blue-800:hover { + color: #2c5282; + } + + .md\:hover\:text-blue-900:hover { + color: #2a4365; + } + + .md\:hover\:text-indigo-100:hover { + color: #ebf4ff; + } + + .md\:hover\:text-indigo-200:hover { + color: #c3dafe; + } + + .md\:hover\:text-indigo-300:hover { + color: #a3bffa; + } + + .md\:hover\:text-indigo-400:hover { + color: #7f9cf5; + } + + .md\:hover\:text-indigo-500:hover { + color: #667eea; + } + + .md\:hover\:text-indigo-600:hover { + color: #5a67d8; + } + + .md\:hover\:text-indigo-700:hover { + color: #4c51bf; + } + + .md\:hover\:text-indigo-800:hover { + color: #434190; + } + + .md\:hover\:text-indigo-900:hover { + color: #3c366b; + } + + .md\:hover\:text-purple-100:hover { + color: #faf5ff; + } + + .md\:hover\:text-purple-200:hover { + color: #e9d8fd; + } + + .md\:hover\:text-purple-300:hover { + color: #d6bcfa; + } + + .md\:hover\:text-purple-400:hover { + color: #b794f4; + } + + .md\:hover\:text-purple-500:hover { + color: #9f7aea; + } + + .md\:hover\:text-purple-600:hover { + color: #805ad5; + } + + .md\:hover\:text-purple-700:hover { + color: #6b46c1; + } + + .md\:hover\:text-purple-800:hover { + color: #553c9a; + } + + .md\:hover\:text-purple-900:hover { + color: #44337a; + } + + .md\:hover\:text-pink-100:hover { + color: #fff5f7; + } + + .md\:hover\:text-pink-200:hover { + color: #fed7e2; + } + + .md\:hover\:text-pink-300:hover { + color: #fbb6ce; + } + + .md\:hover\:text-pink-400:hover { + color: #f687b3; + } + + .md\:hover\:text-pink-500:hover { + color: #ed64a6; + } + + .md\:hover\:text-pink-600:hover { + color: #d53f8c; + } + + .md\:hover\:text-pink-700:hover { + color: #b83280; + } + + .md\:hover\:text-pink-800:hover { + color: #97266d; + } + + .md\:hover\:text-pink-900:hover { + color: #702459; + } + + .md\:focus\:text-transparent:focus { + color: transparent; + } + + .md\:focus\:text-current:focus { + color: currentColor; + } + + .md\:focus\:text-black:focus { + color: #000; + } + + .md\:focus\:text-white:focus { + color: #fff; + } + + .md\:focus\:text-gray-100:focus { + color: #f7fafc; + } + + .md\:focus\:text-gray-200:focus { + color: #edf2f7; + } + + .md\:focus\:text-gray-300:focus { + color: #e2e8f0; + } + + .md\:focus\:text-gray-400:focus { + color: #cbd5e0; + } + + .md\:focus\:text-gray-500:focus { + color: #a0aec0; + } + + .md\:focus\:text-gray-600:focus { + color: #718096; + } + + .md\:focus\:text-gray-700:focus { + color: #4a5568; + } + + .md\:focus\:text-gray-800:focus { + color: #2d3748; + } + + .md\:focus\:text-gray-900:focus { + color: #1a202c; + } + + .md\:focus\:text-red-100:focus { + color: #fff5f5; + } + + .md\:focus\:text-red-200:focus { + color: #fed7d7; + } + + .md\:focus\:text-red-300:focus { + color: #feb2b2; + } + + .md\:focus\:text-red-400:focus { + color: #fc8181; + } + + .md\:focus\:text-red-500:focus { + color: #f56565; + } + + .md\:focus\:text-red-600:focus { + color: #e53e3e; + } + + .md\:focus\:text-red-700:focus { + color: #c53030; + } + + .md\:focus\:text-red-800:focus { + color: #9b2c2c; + } + + .md\:focus\:text-red-900:focus { + color: #742a2a; + } + + .md\:focus\:text-orange-100:focus { + color: #fffaf0; + } + + .md\:focus\:text-orange-200:focus { + color: #feebc8; + } + + .md\:focus\:text-orange-300:focus { + color: #fbd38d; + } + + .md\:focus\:text-orange-400:focus { + color: #f6ad55; + } + + .md\:focus\:text-orange-500:focus { + color: #ed8936; + } + + .md\:focus\:text-orange-600:focus { + color: #dd6b20; + } + + .md\:focus\:text-orange-700:focus { + color: #c05621; + } + + .md\:focus\:text-orange-800:focus { + color: #9c4221; + } + + .md\:focus\:text-orange-900:focus { + color: #7b341e; + } + + .md\:focus\:text-yellow-100:focus { + color: #fffff0; + } + + .md\:focus\:text-yellow-200:focus { + color: #fefcbf; + } + + .md\:focus\:text-yellow-300:focus { + color: #faf089; + } + + .md\:focus\:text-yellow-400:focus { + color: #f6e05e; + } + + .md\:focus\:text-yellow-500:focus { + color: #ecc94b; + } + + .md\:focus\:text-yellow-600:focus { + color: #d69e2e; + } + + .md\:focus\:text-yellow-700:focus { + color: #b7791f; + } + + .md\:focus\:text-yellow-800:focus { + color: #975a16; + } + + .md\:focus\:text-yellow-900:focus { + color: #744210; + } + + .md\:focus\:text-green-100:focus { + color: #f0fff4; + } + + .md\:focus\:text-green-200:focus { + color: #c6f6d5; + } + + .md\:focus\:text-green-300:focus { + color: #9ae6b4; + } + + .md\:focus\:text-green-400:focus { + color: #68d391; + } + + .md\:focus\:text-green-500:focus { + color: #48bb78; + } + + .md\:focus\:text-green-600:focus { + color: #38a169; + } + + .md\:focus\:text-green-700:focus { + color: #2f855a; + } + + .md\:focus\:text-green-800:focus { + color: #276749; + } + + .md\:focus\:text-green-900:focus { + color: #22543d; + } + + .md\:focus\:text-teal-100:focus { + color: #e6fffa; + } + + .md\:focus\:text-teal-200:focus { + color: #b2f5ea; + } + + .md\:focus\:text-teal-300:focus { + color: #81e6d9; + } + + .md\:focus\:text-teal-400:focus { + color: #4fd1c5; + } + + .md\:focus\:text-teal-500:focus { + color: #38b2ac; + } + + .md\:focus\:text-teal-600:focus { + color: #319795; + } + + .md\:focus\:text-teal-700:focus { + color: #2c7a7b; + } + + .md\:focus\:text-teal-800:focus { + color: #285e61; + } + + .md\:focus\:text-teal-900:focus { + color: #234e52; + } + + .md\:focus\:text-blue-100:focus { + color: #ebf8ff; + } + + .md\:focus\:text-blue-200:focus { + color: #bee3f8; + } + + .md\:focus\:text-blue-300:focus { + color: #90cdf4; + } + + .md\:focus\:text-blue-400:focus { + color: #63b3ed; + } + + .md\:focus\:text-blue-500:focus { + color: #4299e1; + } + + .md\:focus\:text-blue-600:focus { + color: #3182ce; + } + + .md\:focus\:text-blue-700:focus { + color: #2b6cb0; + } + + .md\:focus\:text-blue-800:focus { + color: #2c5282; + } + + .md\:focus\:text-blue-900:focus { + color: #2a4365; + } + + .md\:focus\:text-indigo-100:focus { + color: #ebf4ff; + } + + .md\:focus\:text-indigo-200:focus { + color: #c3dafe; + } + + .md\:focus\:text-indigo-300:focus { + color: #a3bffa; + } + + .md\:focus\:text-indigo-400:focus { + color: #7f9cf5; + } + + .md\:focus\:text-indigo-500:focus { + color: #667eea; + } + + .md\:focus\:text-indigo-600:focus { + color: #5a67d8; + } + + .md\:focus\:text-indigo-700:focus { + color: #4c51bf; + } + + .md\:focus\:text-indigo-800:focus { + color: #434190; + } + + .md\:focus\:text-indigo-900:focus { + color: #3c366b; + } + + .md\:focus\:text-purple-100:focus { + color: #faf5ff; + } + + .md\:focus\:text-purple-200:focus { + color: #e9d8fd; + } + + .md\:focus\:text-purple-300:focus { + color: #d6bcfa; + } + + .md\:focus\:text-purple-400:focus { + color: #b794f4; + } + + .md\:focus\:text-purple-500:focus { + color: #9f7aea; + } + + .md\:focus\:text-purple-600:focus { + color: #805ad5; + } + + .md\:focus\:text-purple-700:focus { + color: #6b46c1; + } + + .md\:focus\:text-purple-800:focus { + color: #553c9a; + } + + .md\:focus\:text-purple-900:focus { + color: #44337a; + } + + .md\:focus\:text-pink-100:focus { + color: #fff5f7; + } + + .md\:focus\:text-pink-200:focus { + color: #fed7e2; + } + + .md\:focus\:text-pink-300:focus { + color: #fbb6ce; + } + + .md\:focus\:text-pink-400:focus { + color: #f687b3; + } + + .md\:focus\:text-pink-500:focus { + color: #ed64a6; + } + + .md\:focus\:text-pink-600:focus { + color: #d53f8c; + } + + .md\:focus\:text-pink-700:focus { + color: #b83280; + } + + .md\:focus\:text-pink-800:focus { + color: #97266d; + } + + .md\:focus\:text-pink-900:focus { + color: #702459; + } + + .md\:italic { + font-style: italic; + } + + .md\:not-italic { + font-style: normal; + } + + .md\:uppercase { + text-transform: uppercase; + } + + .md\:lowercase { + text-transform: lowercase; + } + + .md\:capitalize { + text-transform: capitalize; + } + + .md\:normal-case { + text-transform: none; + } + + .md\:underline { + text-decoration: underline; + } + + .md\:line-through { + text-decoration: line-through; + } + + .md\:no-underline { + text-decoration: none; + } + + .md\:hover\:underline:hover { + text-decoration: underline; + } + + .md\:hover\:line-through:hover { + text-decoration: line-through; + } + + .md\:hover\:no-underline:hover { + text-decoration: none; + } + + .md\:focus\:underline:focus { + text-decoration: underline; + } + + .md\:focus\:line-through:focus { + text-decoration: line-through; + } + + .md\:focus\:no-underline:focus { + text-decoration: none; + } + + .md\:antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + .md\:subpixel-antialiased { + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; + } + + .md\:tracking-tighter { + letter-spacing: -0.05em; + } + + .md\:tracking-tight { + letter-spacing: -0.025em; + } + + .md\:tracking-normal { + letter-spacing: 0; + } + + .md\:tracking-wide { + letter-spacing: 0.025em; + } + + .md\:tracking-wider { + letter-spacing: 0.05em; + } + + .md\:tracking-widest { + letter-spacing: 0.1em; + } + + .md\:select-none { + user-select: none; + } + + .md\:select-text { + user-select: text; + } + + .md\:select-all { + user-select: all; + } + + .md\:select-auto { + user-select: auto; + } + + .md\:align-baseline { + vertical-align: baseline; + } + + .md\:align-top { + vertical-align: top; + } + + .md\:align-middle { + vertical-align: middle; + } + + .md\:align-bottom { + vertical-align: bottom; + } + + .md\:align-text-top { + vertical-align: text-top; + } + + .md\:align-text-bottom { + vertical-align: text-bottom; + } + + .md\:visible { + visibility: visible; + } + + .md\:invisible { + visibility: hidden; + } + + .md\:whitespace-normal { + white-space: normal; + } + + .md\:whitespace-no-wrap { + white-space: nowrap; + } + + .md\:whitespace-pre { + white-space: pre; + } + + .md\:whitespace-pre-line { + white-space: pre-line; + } + + .md\:whitespace-pre-wrap { + white-space: pre-wrap; + } + + .md\:break-normal { + overflow-wrap: normal; + word-break: normal; + } + + .md\:break-words { + overflow-wrap: break-word; + } + + .md\:break-all { + word-break: break-all; + } + + .md\:truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .md\:w-0 { + width: 0; + } + + .md\:w-1 { + width: 0.25rem; + } + + .md\:w-2 { + width: 0.5rem; + } + + .md\:w-3 { + width: 0.75rem; + } + + .md\:w-4 { + width: 1rem; + } + + .md\:w-5 { + width: 1.25rem; + } + + .md\:w-6 { + width: 1.5rem; + } + + .md\:w-8 { + width: 2rem; + } + + .md\:w-10 { + width: 2.5rem; + } + + .md\:w-12 { + width: 3rem; + } + + .md\:w-16 { + width: 4rem; + } + + .md\:w-20 { + width: 5rem; + } + + .md\:w-24 { + width: 6rem; + } + + .md\:w-32 { + width: 8rem; + } + + .md\:w-40 { + width: 10rem; + } + + .md\:w-48 { + width: 12rem; + } + + .md\:w-56 { + width: 14rem; + } + + .md\:w-64 { + width: 16rem; + } + + .md\:w-auto { + width: auto; + } + + .md\:w-px { + width: 1px; + } + + .md\:w-1\/2 { + width: 50%; + } + + .md\:w-1\/3 { + width: 33.333333%; + } + + .md\:w-2\/3 { + width: 66.666667%; + } + + .md\:w-1\/4 { + width: 25%; + } + + .md\:w-2\/4 { + width: 50%; + } + + .md\:w-3\/4 { + width: 75%; + } + + .md\:w-1\/5 { + width: 20%; + } + + .md\:w-2\/5 { + width: 40%; + } + + .md\:w-3\/5 { + width: 60%; + } + + .md\:w-4\/5 { + width: 80%; + } + + .md\:w-1\/6 { + width: 16.666667%; + } + + .md\:w-2\/6 { + width: 33.333333%; + } + + .md\:w-3\/6 { + width: 50%; + } + + .md\:w-4\/6 { + width: 66.666667%; + } + + .md\:w-5\/6 { + width: 83.333333%; + } + + .md\:w-1\/12 { + width: 8.333333%; + } + + .md\:w-2\/12 { + width: 16.666667%; + } + + .md\:w-3\/12 { + width: 25%; + } + + .md\:w-4\/12 { + width: 33.333333%; + } + + .md\:w-5\/12 { + width: 41.666667%; + } + + .md\:w-6\/12 { + width: 50%; + } + + .md\:w-7\/12 { + width: 58.333333%; + } + + .md\:w-8\/12 { + width: 66.666667%; + } + + .md\:w-9\/12 { + width: 75%; + } + + .md\:w-10\/12 { + width: 83.333333%; + } + + .md\:w-11\/12 { + width: 91.666667%; + } + + .md\:w-full { + width: 100%; + } + + .md\:w-screen { + width: 100vw; + } + + .md\:z-0 { + z-index: 0; + } + + .md\:z-10 { + z-index: 10; + } + + .md\:z-20 { + z-index: 20; + } + + .md\:z-30 { + z-index: 30; + } + + .md\:z-40 { + z-index: 40; + } + + .md\:z-50 { + z-index: 50; + } + + .md\:z-auto { + z-index: auto; + } + + .md\:gap-0 { + grid-gap: 0; + gap: 0; + } + + .md\:gap-1 { + grid-gap: 0.25rem; + gap: 0.25rem; + } + + .md\:gap-2 { + grid-gap: 0.5rem; + gap: 0.5rem; + } + + .md\:gap-3 { + grid-gap: 0.75rem; + gap: 0.75rem; + } + + .md\:gap-4 { + grid-gap: 1rem; + gap: 1rem; + } + + .md\:gap-5 { + grid-gap: 1.25rem; + gap: 1.25rem; + } + + .md\:gap-6 { + grid-gap: 1.5rem; + gap: 1.5rem; + } + + .md\:gap-8 { + grid-gap: 2rem; + gap: 2rem; + } + + .md\:gap-10 { + grid-gap: 2.5rem; + gap: 2.5rem; + } + + .md\:gap-12 { + grid-gap: 3rem; + gap: 3rem; + } + + .md\:gap-16 { + grid-gap: 4rem; + gap: 4rem; + } + + .md\:gap-20 { + grid-gap: 5rem; + gap: 5rem; + } + + .md\:gap-24 { + grid-gap: 6rem; + gap: 6rem; + } + + .md\:gap-32 { + grid-gap: 8rem; + gap: 8rem; + } + + .md\:gap-40 { + grid-gap: 10rem; + gap: 10rem; + } + + .md\:gap-48 { + grid-gap: 12rem; + gap: 12rem; + } + + .md\:gap-56 { + grid-gap: 14rem; + gap: 14rem; + } + + .md\:gap-64 { + grid-gap: 16rem; + gap: 16rem; + } + + .md\:gap-px { + grid-gap: 1px; + gap: 1px; + } + + .md\:col-gap-0 { + grid-column-gap: 0; + column-gap: 0; + } + + .md\:col-gap-1 { + grid-column-gap: 0.25rem; + column-gap: 0.25rem; + } + + .md\:col-gap-2 { + grid-column-gap: 0.5rem; + column-gap: 0.5rem; + } + + .md\:col-gap-3 { + grid-column-gap: 0.75rem; + column-gap: 0.75rem; + } + + .md\:col-gap-4 { + grid-column-gap: 1rem; + column-gap: 1rem; + } + + .md\:col-gap-5 { + grid-column-gap: 1.25rem; + column-gap: 1.25rem; + } + + .md\:col-gap-6 { + grid-column-gap: 1.5rem; + column-gap: 1.5rem; + } + + .md\:col-gap-8 { + grid-column-gap: 2rem; + column-gap: 2rem; + } + + .md\:col-gap-10 { + grid-column-gap: 2.5rem; + column-gap: 2.5rem; + } + + .md\:col-gap-12 { + grid-column-gap: 3rem; + column-gap: 3rem; + } + + .md\:col-gap-16 { + grid-column-gap: 4rem; + column-gap: 4rem; + } + + .md\:col-gap-20 { + grid-column-gap: 5rem; + column-gap: 5rem; + } + + .md\:col-gap-24 { + grid-column-gap: 6rem; + column-gap: 6rem; + } + + .md\:col-gap-32 { + grid-column-gap: 8rem; + column-gap: 8rem; + } + + .md\:col-gap-40 { + grid-column-gap: 10rem; + column-gap: 10rem; + } + + .md\:col-gap-48 { + grid-column-gap: 12rem; + column-gap: 12rem; + } + + .md\:col-gap-56 { + grid-column-gap: 14rem; + column-gap: 14rem; + } + + .md\:col-gap-64 { + grid-column-gap: 16rem; + column-gap: 16rem; + } + + .md\:col-gap-px { + grid-column-gap: 1px; + column-gap: 1px; + } + + .md\:row-gap-0 { + grid-row-gap: 0; + row-gap: 0; + } + + .md\:row-gap-1 { + grid-row-gap: 0.25rem; + row-gap: 0.25rem; + } + + .md\:row-gap-2 { + grid-row-gap: 0.5rem; + row-gap: 0.5rem; + } + + .md\:row-gap-3 { + grid-row-gap: 0.75rem; + row-gap: 0.75rem; + } + + .md\:row-gap-4 { + grid-row-gap: 1rem; + row-gap: 1rem; + } + + .md\:row-gap-5 { + grid-row-gap: 1.25rem; + row-gap: 1.25rem; + } + + .md\:row-gap-6 { + grid-row-gap: 1.5rem; + row-gap: 1.5rem; + } + + .md\:row-gap-8 { + grid-row-gap: 2rem; + row-gap: 2rem; + } + + .md\:row-gap-10 { + grid-row-gap: 2.5rem; + row-gap: 2.5rem; + } + + .md\:row-gap-12 { + grid-row-gap: 3rem; + row-gap: 3rem; + } + + .md\:row-gap-16 { + grid-row-gap: 4rem; + row-gap: 4rem; + } + + .md\:row-gap-20 { + grid-row-gap: 5rem; + row-gap: 5rem; + } + + .md\:row-gap-24 { + grid-row-gap: 6rem; + row-gap: 6rem; + } + + .md\:row-gap-32 { + grid-row-gap: 8rem; + row-gap: 8rem; + } + + .md\:row-gap-40 { + grid-row-gap: 10rem; + row-gap: 10rem; + } + + .md\:row-gap-48 { + grid-row-gap: 12rem; + row-gap: 12rem; + } + + .md\:row-gap-56 { + grid-row-gap: 14rem; + row-gap: 14rem; + } + + .md\:row-gap-64 { + grid-row-gap: 16rem; + row-gap: 16rem; + } + + .md\:row-gap-px { + grid-row-gap: 1px; + row-gap: 1px; + } + + .md\:grid-flow-row { + grid-auto-flow: row; + } + + .md\:grid-flow-col { + grid-auto-flow: column; + } + + .md\:grid-flow-row-dense { + grid-auto-flow: row dense; + } + + .md\:grid-flow-col-dense { + grid-auto-flow: column dense; + } + + .md\:grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + + .md\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .md\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .md\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .md\:grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); + } + + .md\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .md\:grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); + } + + .md\:grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); + } + + .md\:grid-cols-9 { + grid-template-columns: repeat(9, minmax(0, 1fr)); + } + + .md\:grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); + } + + .md\:grid-cols-11 { + grid-template-columns: repeat(11, minmax(0, 1fr)); + } + + .md\:grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .md\:grid-cols-none { + grid-template-columns: none; + } + + .md\:col-auto { + grid-column: auto; + } + + .md\:col-span-1 { + grid-column: span 1 / span 1; + } + + .md\:col-span-2 { + grid-column: span 2 / span 2; + } + + .md\:col-span-3 { + grid-column: span 3 / span 3; + } + + .md\:col-span-4 { + grid-column: span 4 / span 4; + } + + .md\:col-span-5 { + grid-column: span 5 / span 5; + } + + .md\:col-span-6 { + grid-column: span 6 / span 6; + } + + .md\:col-span-7 { + grid-column: span 7 / span 7; + } + + .md\:col-span-8 { + grid-column: span 8 / span 8; + } + + .md\:col-span-9 { + grid-column: span 9 / span 9; + } + + .md\:col-span-10 { + grid-column: span 10 / span 10; + } + + .md\:col-span-11 { + grid-column: span 11 / span 11; + } + + .md\:col-span-12 { + grid-column: span 12 / span 12; + } + + .md\:col-start-1 { + grid-column-start: 1; + } + + .md\:col-start-2 { + grid-column-start: 2; + } + + .md\:col-start-3 { + grid-column-start: 3; + } + + .md\:col-start-4 { + grid-column-start: 4; + } + + .md\:col-start-5 { + grid-column-start: 5; + } + + .md\:col-start-6 { + grid-column-start: 6; + } + + .md\:col-start-7 { + grid-column-start: 7; + } + + .md\:col-start-8 { + grid-column-start: 8; + } + + .md\:col-start-9 { + grid-column-start: 9; + } + + .md\:col-start-10 { + grid-column-start: 10; + } + + .md\:col-start-11 { + grid-column-start: 11; + } + + .md\:col-start-12 { + grid-column-start: 12; + } + + .md\:col-start-13 { + grid-column-start: 13; + } + + .md\:col-start-auto { + grid-column-start: auto; + } + + .md\:col-end-1 { + grid-column-end: 1; + } + + .md\:col-end-2 { + grid-column-end: 2; + } + + .md\:col-end-3 { + grid-column-end: 3; + } + + .md\:col-end-4 { + grid-column-end: 4; + } + + .md\:col-end-5 { + grid-column-end: 5; + } + + .md\:col-end-6 { + grid-column-end: 6; + } + + .md\:col-end-7 { + grid-column-end: 7; + } + + .md\:col-end-8 { + grid-column-end: 8; + } + + .md\:col-end-9 { + grid-column-end: 9; + } + + .md\:col-end-10 { + grid-column-end: 10; + } + + .md\:col-end-11 { + grid-column-end: 11; + } + + .md\:col-end-12 { + grid-column-end: 12; + } + + .md\:col-end-13 { + grid-column-end: 13; + } + + .md\:col-end-auto { + grid-column-end: auto; + } + + .md\:grid-rows-1 { + grid-template-rows: repeat(1, minmax(0, 1fr)); + } + + .md\:grid-rows-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); + } + + .md\:grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); + } + + .md\:grid-rows-4 { + grid-template-rows: repeat(4, minmax(0, 1fr)); + } + + .md\:grid-rows-5 { + grid-template-rows: repeat(5, minmax(0, 1fr)); + } + + .md\:grid-rows-6 { + grid-template-rows: repeat(6, minmax(0, 1fr)); + } + + .md\:grid-rows-none { + grid-template-rows: none; + } + + .md\:row-auto { + grid-row: auto; + } + + .md\:row-span-1 { + grid-row: span 1 / span 1; + } + + .md\:row-span-2 { + grid-row: span 2 / span 2; + } + + .md\:row-span-3 { + grid-row: span 3 / span 3; + } + + .md\:row-span-4 { + grid-row: span 4 / span 4; + } + + .md\:row-span-5 { + grid-row: span 5 / span 5; + } + + .md\:row-span-6 { + grid-row: span 6 / span 6; + } + + .md\:row-start-1 { + grid-row-start: 1; + } + + .md\:row-start-2 { + grid-row-start: 2; + } + + .md\:row-start-3 { + grid-row-start: 3; + } + + .md\:row-start-4 { + grid-row-start: 4; + } + + .md\:row-start-5 { + grid-row-start: 5; + } + + .md\:row-start-6 { + grid-row-start: 6; + } + + .md\:row-start-7 { + grid-row-start: 7; + } + + .md\:row-start-auto { + grid-row-start: auto; + } + + .md\:row-end-1 { + grid-row-end: 1; + } + + .md\:row-end-2 { + grid-row-end: 2; + } + + .md\:row-end-3 { + grid-row-end: 3; + } + + .md\:row-end-4 { + grid-row-end: 4; + } + + .md\:row-end-5 { + grid-row-end: 5; + } + + .md\:row-end-6 { + grid-row-end: 6; + } + + .md\:row-end-7 { + grid-row-end: 7; + } + + .md\:row-end-auto { + grid-row-end: auto; + } + + .md\:transform { + --transform-translate-x: 0; + --transform-translate-y: 0; + --transform-rotate: 0; + --transform-skew-x: 0; + --transform-skew-y: 0; + --transform-scale-x: 1; + --transform-scale-y: 1; + transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y)); + } + + .md\:transform-none { + transform: none; + } + + .md\:origin-center { + transform-origin: center; + } + + .md\:origin-top { + transform-origin: top; + } + + .md\:origin-top-right { + transform-origin: top right; + } + + .md\:origin-right { + transform-origin: right; + } + + .md\:origin-bottom-right { + transform-origin: bottom right; + } + + .md\:origin-bottom { + transform-origin: bottom; + } + + .md\:origin-bottom-left { + transform-origin: bottom left; + } + + .md\:origin-left { + transform-origin: left; + } + + .md\:origin-top-left { + transform-origin: top left; + } + + .md\:scale-0 { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .md\:scale-50 { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .md\:scale-75 { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .md\:scale-90 { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .md\:scale-95 { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .md\:scale-100 { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .md\:scale-105 { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .md\:scale-110 { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .md\:scale-125 { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .md\:scale-150 { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .md\:scale-x-0 { + --transform-scale-x: 0; + } + + .md\:scale-x-50 { + --transform-scale-x: .5; + } + + .md\:scale-x-75 { + --transform-scale-x: .75; + } + + .md\:scale-x-90 { + --transform-scale-x: .9; + } + + .md\:scale-x-95 { + --transform-scale-x: .95; + } + + .md\:scale-x-100 { + --transform-scale-x: 1; + } + + .md\:scale-x-105 { + --transform-scale-x: 1.05; + } + + .md\:scale-x-110 { + --transform-scale-x: 1.1; + } + + .md\:scale-x-125 { + --transform-scale-x: 1.25; + } + + .md\:scale-x-150 { + --transform-scale-x: 1.5; + } + + .md\:scale-y-0 { + --transform-scale-y: 0; + } + + .md\:scale-y-50 { + --transform-scale-y: .5; + } + + .md\:scale-y-75 { + --transform-scale-y: .75; + } + + .md\:scale-y-90 { + --transform-scale-y: .9; + } + + .md\:scale-y-95 { + --transform-scale-y: .95; + } + + .md\:scale-y-100 { + --transform-scale-y: 1; + } + + .md\:scale-y-105 { + --transform-scale-y: 1.05; + } + + .md\:scale-y-110 { + --transform-scale-y: 1.1; + } + + .md\:scale-y-125 { + --transform-scale-y: 1.25; + } + + .md\:scale-y-150 { + --transform-scale-y: 1.5; + } + + .md\:hover\:scale-0:hover { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .md\:hover\:scale-50:hover { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .md\:hover\:scale-75:hover { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .md\:hover\:scale-90:hover { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .md\:hover\:scale-95:hover { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .md\:hover\:scale-100:hover { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .md\:hover\:scale-105:hover { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .md\:hover\:scale-110:hover { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .md\:hover\:scale-125:hover { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .md\:hover\:scale-150:hover { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .md\:hover\:scale-x-0:hover { + --transform-scale-x: 0; + } + + .md\:hover\:scale-x-50:hover { + --transform-scale-x: .5; + } + + .md\:hover\:scale-x-75:hover { + --transform-scale-x: .75; + } + + .md\:hover\:scale-x-90:hover { + --transform-scale-x: .9; + } + + .md\:hover\:scale-x-95:hover { + --transform-scale-x: .95; + } + + .md\:hover\:scale-x-100:hover { + --transform-scale-x: 1; + } + + .md\:hover\:scale-x-105:hover { + --transform-scale-x: 1.05; + } + + .md\:hover\:scale-x-110:hover { + --transform-scale-x: 1.1; + } + + .md\:hover\:scale-x-125:hover { + --transform-scale-x: 1.25; + } + + .md\:hover\:scale-x-150:hover { + --transform-scale-x: 1.5; + } + + .md\:hover\:scale-y-0:hover { + --transform-scale-y: 0; + } + + .md\:hover\:scale-y-50:hover { + --transform-scale-y: .5; + } + + .md\:hover\:scale-y-75:hover { + --transform-scale-y: .75; + } + + .md\:hover\:scale-y-90:hover { + --transform-scale-y: .9; + } + + .md\:hover\:scale-y-95:hover { + --transform-scale-y: .95; + } + + .md\:hover\:scale-y-100:hover { + --transform-scale-y: 1; + } + + .md\:hover\:scale-y-105:hover { + --transform-scale-y: 1.05; + } + + .md\:hover\:scale-y-110:hover { + --transform-scale-y: 1.1; + } + + .md\:hover\:scale-y-125:hover { + --transform-scale-y: 1.25; + } + + .md\:hover\:scale-y-150:hover { + --transform-scale-y: 1.5; + } + + .md\:focus\:scale-0:focus { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .md\:focus\:scale-50:focus { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .md\:focus\:scale-75:focus { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .md\:focus\:scale-90:focus { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .md\:focus\:scale-95:focus { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .md\:focus\:scale-100:focus { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .md\:focus\:scale-105:focus { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .md\:focus\:scale-110:focus { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .md\:focus\:scale-125:focus { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .md\:focus\:scale-150:focus { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .md\:focus\:scale-x-0:focus { + --transform-scale-x: 0; + } + + .md\:focus\:scale-x-50:focus { + --transform-scale-x: .5; + } + + .md\:focus\:scale-x-75:focus { + --transform-scale-x: .75; + } + + .md\:focus\:scale-x-90:focus { + --transform-scale-x: .9; + } + + .md\:focus\:scale-x-95:focus { + --transform-scale-x: .95; + } + + .md\:focus\:scale-x-100:focus { + --transform-scale-x: 1; + } + + .md\:focus\:scale-x-105:focus { + --transform-scale-x: 1.05; + } + + .md\:focus\:scale-x-110:focus { + --transform-scale-x: 1.1; + } + + .md\:focus\:scale-x-125:focus { + --transform-scale-x: 1.25; + } + + .md\:focus\:scale-x-150:focus { + --transform-scale-x: 1.5; + } + + .md\:focus\:scale-y-0:focus { + --transform-scale-y: 0; + } + + .md\:focus\:scale-y-50:focus { + --transform-scale-y: .5; + } + + .md\:focus\:scale-y-75:focus { + --transform-scale-y: .75; + } + + .md\:focus\:scale-y-90:focus { + --transform-scale-y: .9; + } + + .md\:focus\:scale-y-95:focus { + --transform-scale-y: .95; + } + + .md\:focus\:scale-y-100:focus { + --transform-scale-y: 1; + } + + .md\:focus\:scale-y-105:focus { + --transform-scale-y: 1.05; + } + + .md\:focus\:scale-y-110:focus { + --transform-scale-y: 1.1; + } + + .md\:focus\:scale-y-125:focus { + --transform-scale-y: 1.25; + } + + .md\:focus\:scale-y-150:focus { + --transform-scale-y: 1.5; + } + + .md\:rotate-0 { + --transform-rotate: 0; + } + + .md\:rotate-45 { + --transform-rotate: 45deg; + } + + .md\:rotate-90 { + --transform-rotate: 90deg; + } + + .md\:rotate-180 { + --transform-rotate: 180deg; + } + + .md\:-rotate-180 { + --transform-rotate: -180deg; + } + + .md\:-rotate-90 { + --transform-rotate: -90deg; + } + + .md\:-rotate-45 { + --transform-rotate: -45deg; + } + + .md\:hover\:rotate-0:hover { + --transform-rotate: 0; + } + + .md\:hover\:rotate-45:hover { + --transform-rotate: 45deg; + } + + .md\:hover\:rotate-90:hover { + --transform-rotate: 90deg; + } + + .md\:hover\:rotate-180:hover { + --transform-rotate: 180deg; + } + + .md\:hover\:-rotate-180:hover { + --transform-rotate: -180deg; + } + + .md\:hover\:-rotate-90:hover { + --transform-rotate: -90deg; + } + + .md\:hover\:-rotate-45:hover { + --transform-rotate: -45deg; + } + + .md\:focus\:rotate-0:focus { + --transform-rotate: 0; + } + + .md\:focus\:rotate-45:focus { + --transform-rotate: 45deg; + } + + .md\:focus\:rotate-90:focus { + --transform-rotate: 90deg; + } + + .md\:focus\:rotate-180:focus { + --transform-rotate: 180deg; + } + + .md\:focus\:-rotate-180:focus { + --transform-rotate: -180deg; + } + + .md\:focus\:-rotate-90:focus { + --transform-rotate: -90deg; + } + + .md\:focus\:-rotate-45:focus { + --transform-rotate: -45deg; + } + + .md\:translate-x-0 { + --transform-translate-x: 0; + } + + .md\:translate-x-1 { + --transform-translate-x: 0.25rem; + } + + .md\:translate-x-2 { + --transform-translate-x: 0.5rem; + } + + .md\:translate-x-3 { + --transform-translate-x: 0.75rem; + } + + .md\:translate-x-4 { + --transform-translate-x: 1rem; + } + + .md\:translate-x-5 { + --transform-translate-x: 1.25rem; + } + + .md\:translate-x-6 { + --transform-translate-x: 1.5rem; + } + + .md\:translate-x-8 { + --transform-translate-x: 2rem; + } + + .md\:translate-x-10 { + --transform-translate-x: 2.5rem; + } + + .md\:translate-x-12 { + --transform-translate-x: 3rem; + } + + .md\:translate-x-16 { + --transform-translate-x: 4rem; + } + + .md\:translate-x-20 { + --transform-translate-x: 5rem; + } + + .md\:translate-x-24 { + --transform-translate-x: 6rem; + } + + .md\:translate-x-32 { + --transform-translate-x: 8rem; + } + + .md\:translate-x-40 { + --transform-translate-x: 10rem; + } + + .md\:translate-x-48 { + --transform-translate-x: 12rem; + } + + .md\:translate-x-56 { + --transform-translate-x: 14rem; + } + + .md\:translate-x-64 { + --transform-translate-x: 16rem; + } + + .md\:translate-x-px { + --transform-translate-x: 1px; + } + + .md\:-translate-x-1 { + --transform-translate-x: -0.25rem; + } + + .md\:-translate-x-2 { + --transform-translate-x: -0.5rem; + } + + .md\:-translate-x-3 { + --transform-translate-x: -0.75rem; + } + + .md\:-translate-x-4 { + --transform-translate-x: -1rem; + } + + .md\:-translate-x-5 { + --transform-translate-x: -1.25rem; + } + + .md\:-translate-x-6 { + --transform-translate-x: -1.5rem; + } + + .md\:-translate-x-8 { + --transform-translate-x: -2rem; + } + + .md\:-translate-x-10 { + --transform-translate-x: -2.5rem; + } + + .md\:-translate-x-12 { + --transform-translate-x: -3rem; + } + + .md\:-translate-x-16 { + --transform-translate-x: -4rem; + } + + .md\:-translate-x-20 { + --transform-translate-x: -5rem; + } + + .md\:-translate-x-24 { + --transform-translate-x: -6rem; + } + + .md\:-translate-x-32 { + --transform-translate-x: -8rem; + } + + .md\:-translate-x-40 { + --transform-translate-x: -10rem; + } + + .md\:-translate-x-48 { + --transform-translate-x: -12rem; + } + + .md\:-translate-x-56 { + --transform-translate-x: -14rem; + } + + .md\:-translate-x-64 { + --transform-translate-x: -16rem; + } + + .md\:-translate-x-px { + --transform-translate-x: -1px; + } + + .md\:-translate-x-full { + --transform-translate-x: -100%; + } + + .md\:-translate-x-1\/2 { + --transform-translate-x: -50%; + } + + .md\:translate-x-1\/2 { + --transform-translate-x: 50%; + } + + .md\:translate-x-full { + --transform-translate-x: 100%; + } + + .md\:translate-y-0 { + --transform-translate-y: 0; + } + + .md\:translate-y-1 { + --transform-translate-y: 0.25rem; + } + + .md\:translate-y-2 { + --transform-translate-y: 0.5rem; + } + + .md\:translate-y-3 { + --transform-translate-y: 0.75rem; + } + + .md\:translate-y-4 { + --transform-translate-y: 1rem; + } + + .md\:translate-y-5 { + --transform-translate-y: 1.25rem; + } + + .md\:translate-y-6 { + --transform-translate-y: 1.5rem; + } + + .md\:translate-y-8 { + --transform-translate-y: 2rem; + } + + .md\:translate-y-10 { + --transform-translate-y: 2.5rem; + } + + .md\:translate-y-12 { + --transform-translate-y: 3rem; + } + + .md\:translate-y-16 { + --transform-translate-y: 4rem; + } + + .md\:translate-y-20 { + --transform-translate-y: 5rem; + } + + .md\:translate-y-24 { + --transform-translate-y: 6rem; + } + + .md\:translate-y-32 { + --transform-translate-y: 8rem; + } + + .md\:translate-y-40 { + --transform-translate-y: 10rem; + } + + .md\:translate-y-48 { + --transform-translate-y: 12rem; + } + + .md\:translate-y-56 { + --transform-translate-y: 14rem; + } + + .md\:translate-y-64 { + --transform-translate-y: 16rem; + } + + .md\:translate-y-px { + --transform-translate-y: 1px; + } + + .md\:-translate-y-1 { + --transform-translate-y: -0.25rem; + } + + .md\:-translate-y-2 { + --transform-translate-y: -0.5rem; + } + + .md\:-translate-y-3 { + --transform-translate-y: -0.75rem; + } + + .md\:-translate-y-4 { + --transform-translate-y: -1rem; + } + + .md\:-translate-y-5 { + --transform-translate-y: -1.25rem; + } + + .md\:-translate-y-6 { + --transform-translate-y: -1.5rem; + } + + .md\:-translate-y-8 { + --transform-translate-y: -2rem; + } + + .md\:-translate-y-10 { + --transform-translate-y: -2.5rem; + } + + .md\:-translate-y-12 { + --transform-translate-y: -3rem; + } + + .md\:-translate-y-16 { + --transform-translate-y: -4rem; + } + + .md\:-translate-y-20 { + --transform-translate-y: -5rem; + } + + .md\:-translate-y-24 { + --transform-translate-y: -6rem; + } + + .md\:-translate-y-32 { + --transform-translate-y: -8rem; + } + + .md\:-translate-y-40 { + --transform-translate-y: -10rem; + } + + .md\:-translate-y-48 { + --transform-translate-y: -12rem; + } + + .md\:-translate-y-56 { + --transform-translate-y: -14rem; + } + + .md\:-translate-y-64 { + --transform-translate-y: -16rem; + } + + .md\:-translate-y-px { + --transform-translate-y: -1px; + } + + .md\:-translate-y-full { + --transform-translate-y: -100%; + } + + .md\:-translate-y-1\/2 { + --transform-translate-y: -50%; + } + + .md\:translate-y-1\/2 { + --transform-translate-y: 50%; + } + + .md\:translate-y-full { + --transform-translate-y: 100%; + } + + .md\:hover\:translate-x-0:hover { + --transform-translate-x: 0; + } + + .md\:hover\:translate-x-1:hover { + --transform-translate-x: 0.25rem; + } + + .md\:hover\:translate-x-2:hover { + --transform-translate-x: 0.5rem; + } + + .md\:hover\:translate-x-3:hover { + --transform-translate-x: 0.75rem; + } + + .md\:hover\:translate-x-4:hover { + --transform-translate-x: 1rem; + } + + .md\:hover\:translate-x-5:hover { + --transform-translate-x: 1.25rem; + } + + .md\:hover\:translate-x-6:hover { + --transform-translate-x: 1.5rem; + } + + .md\:hover\:translate-x-8:hover { + --transform-translate-x: 2rem; + } + + .md\:hover\:translate-x-10:hover { + --transform-translate-x: 2.5rem; + } + + .md\:hover\:translate-x-12:hover { + --transform-translate-x: 3rem; + } + + .md\:hover\:translate-x-16:hover { + --transform-translate-x: 4rem; + } + + .md\:hover\:translate-x-20:hover { + --transform-translate-x: 5rem; + } + + .md\:hover\:translate-x-24:hover { + --transform-translate-x: 6rem; + } + + .md\:hover\:translate-x-32:hover { + --transform-translate-x: 8rem; + } + + .md\:hover\:translate-x-40:hover { + --transform-translate-x: 10rem; + } + + .md\:hover\:translate-x-48:hover { + --transform-translate-x: 12rem; + } + + .md\:hover\:translate-x-56:hover { + --transform-translate-x: 14rem; + } + + .md\:hover\:translate-x-64:hover { + --transform-translate-x: 16rem; + } + + .md\:hover\:translate-x-px:hover { + --transform-translate-x: 1px; + } + + .md\:hover\:-translate-x-1:hover { + --transform-translate-x: -0.25rem; + } + + .md\:hover\:-translate-x-2:hover { + --transform-translate-x: -0.5rem; + } + + .md\:hover\:-translate-x-3:hover { + --transform-translate-x: -0.75rem; + } + + .md\:hover\:-translate-x-4:hover { + --transform-translate-x: -1rem; + } + + .md\:hover\:-translate-x-5:hover { + --transform-translate-x: -1.25rem; + } + + .md\:hover\:-translate-x-6:hover { + --transform-translate-x: -1.5rem; + } + + .md\:hover\:-translate-x-8:hover { + --transform-translate-x: -2rem; + } + + .md\:hover\:-translate-x-10:hover { + --transform-translate-x: -2.5rem; + } + + .md\:hover\:-translate-x-12:hover { + --transform-translate-x: -3rem; + } + + .md\:hover\:-translate-x-16:hover { + --transform-translate-x: -4rem; + } + + .md\:hover\:-translate-x-20:hover { + --transform-translate-x: -5rem; + } + + .md\:hover\:-translate-x-24:hover { + --transform-translate-x: -6rem; + } + + .md\:hover\:-translate-x-32:hover { + --transform-translate-x: -8rem; + } + + .md\:hover\:-translate-x-40:hover { + --transform-translate-x: -10rem; + } + + .md\:hover\:-translate-x-48:hover { + --transform-translate-x: -12rem; + } + + .md\:hover\:-translate-x-56:hover { + --transform-translate-x: -14rem; + } + + .md\:hover\:-translate-x-64:hover { + --transform-translate-x: -16rem; + } + + .md\:hover\:-translate-x-px:hover { + --transform-translate-x: -1px; + } + + .md\:hover\:-translate-x-full:hover { + --transform-translate-x: -100%; + } + + .md\:hover\:-translate-x-1\/2:hover { + --transform-translate-x: -50%; + } + + .md\:hover\:translate-x-1\/2:hover { + --transform-translate-x: 50%; + } + + .md\:hover\:translate-x-full:hover { + --transform-translate-x: 100%; + } + + .md\:hover\:translate-y-0:hover { + --transform-translate-y: 0; + } + + .md\:hover\:translate-y-1:hover { + --transform-translate-y: 0.25rem; + } + + .md\:hover\:translate-y-2:hover { + --transform-translate-y: 0.5rem; + } + + .md\:hover\:translate-y-3:hover { + --transform-translate-y: 0.75rem; + } + + .md\:hover\:translate-y-4:hover { + --transform-translate-y: 1rem; + } + + .md\:hover\:translate-y-5:hover { + --transform-translate-y: 1.25rem; + } + + .md\:hover\:translate-y-6:hover { + --transform-translate-y: 1.5rem; + } + + .md\:hover\:translate-y-8:hover { + --transform-translate-y: 2rem; + } + + .md\:hover\:translate-y-10:hover { + --transform-translate-y: 2.5rem; + } + + .md\:hover\:translate-y-12:hover { + --transform-translate-y: 3rem; + } + + .md\:hover\:translate-y-16:hover { + --transform-translate-y: 4rem; + } + + .md\:hover\:translate-y-20:hover { + --transform-translate-y: 5rem; + } + + .md\:hover\:translate-y-24:hover { + --transform-translate-y: 6rem; + } + + .md\:hover\:translate-y-32:hover { + --transform-translate-y: 8rem; + } + + .md\:hover\:translate-y-40:hover { + --transform-translate-y: 10rem; + } + + .md\:hover\:translate-y-48:hover { + --transform-translate-y: 12rem; + } + + .md\:hover\:translate-y-56:hover { + --transform-translate-y: 14rem; + } + + .md\:hover\:translate-y-64:hover { + --transform-translate-y: 16rem; + } + + .md\:hover\:translate-y-px:hover { + --transform-translate-y: 1px; + } + + .md\:hover\:-translate-y-1:hover { + --transform-translate-y: -0.25rem; + } + + .md\:hover\:-translate-y-2:hover { + --transform-translate-y: -0.5rem; + } + + .md\:hover\:-translate-y-3:hover { + --transform-translate-y: -0.75rem; + } + + .md\:hover\:-translate-y-4:hover { + --transform-translate-y: -1rem; + } + + .md\:hover\:-translate-y-5:hover { + --transform-translate-y: -1.25rem; + } + + .md\:hover\:-translate-y-6:hover { + --transform-translate-y: -1.5rem; + } + + .md\:hover\:-translate-y-8:hover { + --transform-translate-y: -2rem; + } + + .md\:hover\:-translate-y-10:hover { + --transform-translate-y: -2.5rem; + } + + .md\:hover\:-translate-y-12:hover { + --transform-translate-y: -3rem; + } + + .md\:hover\:-translate-y-16:hover { + --transform-translate-y: -4rem; + } + + .md\:hover\:-translate-y-20:hover { + --transform-translate-y: -5rem; + } + + .md\:hover\:-translate-y-24:hover { + --transform-translate-y: -6rem; + } + + .md\:hover\:-translate-y-32:hover { + --transform-translate-y: -8rem; + } + + .md\:hover\:-translate-y-40:hover { + --transform-translate-y: -10rem; + } + + .md\:hover\:-translate-y-48:hover { + --transform-translate-y: -12rem; + } + + .md\:hover\:-translate-y-56:hover { + --transform-translate-y: -14rem; + } + + .md\:hover\:-translate-y-64:hover { + --transform-translate-y: -16rem; + } + + .md\:hover\:-translate-y-px:hover { + --transform-translate-y: -1px; + } + + .md\:hover\:-translate-y-full:hover { + --transform-translate-y: -100%; + } + + .md\:hover\:-translate-y-1\/2:hover { + --transform-translate-y: -50%; + } + + .md\:hover\:translate-y-1\/2:hover { + --transform-translate-y: 50%; + } + + .md\:hover\:translate-y-full:hover { + --transform-translate-y: 100%; + } + + .md\:focus\:translate-x-0:focus { + --transform-translate-x: 0; + } + + .md\:focus\:translate-x-1:focus { + --transform-translate-x: 0.25rem; + } + + .md\:focus\:translate-x-2:focus { + --transform-translate-x: 0.5rem; + } + + .md\:focus\:translate-x-3:focus { + --transform-translate-x: 0.75rem; + } + + .md\:focus\:translate-x-4:focus { + --transform-translate-x: 1rem; + } + + .md\:focus\:translate-x-5:focus { + --transform-translate-x: 1.25rem; + } + + .md\:focus\:translate-x-6:focus { + --transform-translate-x: 1.5rem; + } + + .md\:focus\:translate-x-8:focus { + --transform-translate-x: 2rem; + } + + .md\:focus\:translate-x-10:focus { + --transform-translate-x: 2.5rem; + } + + .md\:focus\:translate-x-12:focus { + --transform-translate-x: 3rem; + } + + .md\:focus\:translate-x-16:focus { + --transform-translate-x: 4rem; + } + + .md\:focus\:translate-x-20:focus { + --transform-translate-x: 5rem; + } + + .md\:focus\:translate-x-24:focus { + --transform-translate-x: 6rem; + } + + .md\:focus\:translate-x-32:focus { + --transform-translate-x: 8rem; + } + + .md\:focus\:translate-x-40:focus { + --transform-translate-x: 10rem; + } + + .md\:focus\:translate-x-48:focus { + --transform-translate-x: 12rem; + } + + .md\:focus\:translate-x-56:focus { + --transform-translate-x: 14rem; + } + + .md\:focus\:translate-x-64:focus { + --transform-translate-x: 16rem; + } + + .md\:focus\:translate-x-px:focus { + --transform-translate-x: 1px; + } + + .md\:focus\:-translate-x-1:focus { + --transform-translate-x: -0.25rem; + } + + .md\:focus\:-translate-x-2:focus { + --transform-translate-x: -0.5rem; + } + + .md\:focus\:-translate-x-3:focus { + --transform-translate-x: -0.75rem; + } + + .md\:focus\:-translate-x-4:focus { + --transform-translate-x: -1rem; + } + + .md\:focus\:-translate-x-5:focus { + --transform-translate-x: -1.25rem; + } + + .md\:focus\:-translate-x-6:focus { + --transform-translate-x: -1.5rem; + } + + .md\:focus\:-translate-x-8:focus { + --transform-translate-x: -2rem; + } + + .md\:focus\:-translate-x-10:focus { + --transform-translate-x: -2.5rem; + } + + .md\:focus\:-translate-x-12:focus { + --transform-translate-x: -3rem; + } + + .md\:focus\:-translate-x-16:focus { + --transform-translate-x: -4rem; + } + + .md\:focus\:-translate-x-20:focus { + --transform-translate-x: -5rem; + } + + .md\:focus\:-translate-x-24:focus { + --transform-translate-x: -6rem; + } + + .md\:focus\:-translate-x-32:focus { + --transform-translate-x: -8rem; + } + + .md\:focus\:-translate-x-40:focus { + --transform-translate-x: -10rem; + } + + .md\:focus\:-translate-x-48:focus { + --transform-translate-x: -12rem; + } + + .md\:focus\:-translate-x-56:focus { + --transform-translate-x: -14rem; + } + + .md\:focus\:-translate-x-64:focus { + --transform-translate-x: -16rem; + } + + .md\:focus\:-translate-x-px:focus { + --transform-translate-x: -1px; + } + + .md\:focus\:-translate-x-full:focus { + --transform-translate-x: -100%; + } + + .md\:focus\:-translate-x-1\/2:focus { + --transform-translate-x: -50%; + } + + .md\:focus\:translate-x-1\/2:focus { + --transform-translate-x: 50%; + } + + .md\:focus\:translate-x-full:focus { + --transform-translate-x: 100%; + } + + .md\:focus\:translate-y-0:focus { + --transform-translate-y: 0; + } + + .md\:focus\:translate-y-1:focus { + --transform-translate-y: 0.25rem; + } + + .md\:focus\:translate-y-2:focus { + --transform-translate-y: 0.5rem; + } + + .md\:focus\:translate-y-3:focus { + --transform-translate-y: 0.75rem; + } + + .md\:focus\:translate-y-4:focus { + --transform-translate-y: 1rem; + } + + .md\:focus\:translate-y-5:focus { + --transform-translate-y: 1.25rem; + } + + .md\:focus\:translate-y-6:focus { + --transform-translate-y: 1.5rem; + } + + .md\:focus\:translate-y-8:focus { + --transform-translate-y: 2rem; + } + + .md\:focus\:translate-y-10:focus { + --transform-translate-y: 2.5rem; + } + + .md\:focus\:translate-y-12:focus { + --transform-translate-y: 3rem; + } + + .md\:focus\:translate-y-16:focus { + --transform-translate-y: 4rem; + } + + .md\:focus\:translate-y-20:focus { + --transform-translate-y: 5rem; + } + + .md\:focus\:translate-y-24:focus { + --transform-translate-y: 6rem; + } + + .md\:focus\:translate-y-32:focus { + --transform-translate-y: 8rem; + } + + .md\:focus\:translate-y-40:focus { + --transform-translate-y: 10rem; + } + + .md\:focus\:translate-y-48:focus { + --transform-translate-y: 12rem; + } + + .md\:focus\:translate-y-56:focus { + --transform-translate-y: 14rem; + } + + .md\:focus\:translate-y-64:focus { + --transform-translate-y: 16rem; + } + + .md\:focus\:translate-y-px:focus { + --transform-translate-y: 1px; + } + + .md\:focus\:-translate-y-1:focus { + --transform-translate-y: -0.25rem; + } + + .md\:focus\:-translate-y-2:focus { + --transform-translate-y: -0.5rem; + } + + .md\:focus\:-translate-y-3:focus { + --transform-translate-y: -0.75rem; + } + + .md\:focus\:-translate-y-4:focus { + --transform-translate-y: -1rem; + } + + .md\:focus\:-translate-y-5:focus { + --transform-translate-y: -1.25rem; + } + + .md\:focus\:-translate-y-6:focus { + --transform-translate-y: -1.5rem; + } + + .md\:focus\:-translate-y-8:focus { + --transform-translate-y: -2rem; + } + + .md\:focus\:-translate-y-10:focus { + --transform-translate-y: -2.5rem; + } + + .md\:focus\:-translate-y-12:focus { + --transform-translate-y: -3rem; + } + + .md\:focus\:-translate-y-16:focus { + --transform-translate-y: -4rem; + } + + .md\:focus\:-translate-y-20:focus { + --transform-translate-y: -5rem; + } + + .md\:focus\:-translate-y-24:focus { + --transform-translate-y: -6rem; + } + + .md\:focus\:-translate-y-32:focus { + --transform-translate-y: -8rem; + } + + .md\:focus\:-translate-y-40:focus { + --transform-translate-y: -10rem; + } + + .md\:focus\:-translate-y-48:focus { + --transform-translate-y: -12rem; + } + + .md\:focus\:-translate-y-56:focus { + --transform-translate-y: -14rem; + } + + .md\:focus\:-translate-y-64:focus { + --transform-translate-y: -16rem; + } + + .md\:focus\:-translate-y-px:focus { + --transform-translate-y: -1px; + } + + .md\:focus\:-translate-y-full:focus { + --transform-translate-y: -100%; + } + + .md\:focus\:-translate-y-1\/2:focus { + --transform-translate-y: -50%; + } + + .md\:focus\:translate-y-1\/2:focus { + --transform-translate-y: 50%; + } + + .md\:focus\:translate-y-full:focus { + --transform-translate-y: 100%; + } + + .md\:skew-x-0 { + --transform-skew-x: 0; + } + + .md\:skew-x-3 { + --transform-skew-x: 3deg; + } + + .md\:skew-x-6 { + --transform-skew-x: 6deg; + } + + .md\:skew-x-12 { + --transform-skew-x: 12deg; + } + + .md\:-skew-x-12 { + --transform-skew-x: -12deg; + } + + .md\:-skew-x-6 { + --transform-skew-x: -6deg; + } + + .md\:-skew-x-3 { + --transform-skew-x: -3deg; + } + + .md\:skew-y-0 { + --transform-skew-y: 0; + } + + .md\:skew-y-3 { + --transform-skew-y: 3deg; + } + + .md\:skew-y-6 { + --transform-skew-y: 6deg; + } + + .md\:skew-y-12 { + --transform-skew-y: 12deg; + } + + .md\:-skew-y-12 { + --transform-skew-y: -12deg; + } + + .md\:-skew-y-6 { + --transform-skew-y: -6deg; + } + + .md\:-skew-y-3 { + --transform-skew-y: -3deg; + } + + .md\:hover\:skew-x-0:hover { + --transform-skew-x: 0; + } + + .md\:hover\:skew-x-3:hover { + --transform-skew-x: 3deg; + } + + .md\:hover\:skew-x-6:hover { + --transform-skew-x: 6deg; + } + + .md\:hover\:skew-x-12:hover { + --transform-skew-x: 12deg; + } + + .md\:hover\:-skew-x-12:hover { + --transform-skew-x: -12deg; + } + + .md\:hover\:-skew-x-6:hover { + --transform-skew-x: -6deg; + } + + .md\:hover\:-skew-x-3:hover { + --transform-skew-x: -3deg; + } + + .md\:hover\:skew-y-0:hover { + --transform-skew-y: 0; + } + + .md\:hover\:skew-y-3:hover { + --transform-skew-y: 3deg; + } + + .md\:hover\:skew-y-6:hover { + --transform-skew-y: 6deg; + } + + .md\:hover\:skew-y-12:hover { + --transform-skew-y: 12deg; + } + + .md\:hover\:-skew-y-12:hover { + --transform-skew-y: -12deg; + } + + .md\:hover\:-skew-y-6:hover { + --transform-skew-y: -6deg; + } + + .md\:hover\:-skew-y-3:hover { + --transform-skew-y: -3deg; + } + + .md\:focus\:skew-x-0:focus { + --transform-skew-x: 0; + } + + .md\:focus\:skew-x-3:focus { + --transform-skew-x: 3deg; + } + + .md\:focus\:skew-x-6:focus { + --transform-skew-x: 6deg; + } + + .md\:focus\:skew-x-12:focus { + --transform-skew-x: 12deg; + } + + .md\:focus\:-skew-x-12:focus { + --transform-skew-x: -12deg; + } + + .md\:focus\:-skew-x-6:focus { + --transform-skew-x: -6deg; + } + + .md\:focus\:-skew-x-3:focus { + --transform-skew-x: -3deg; + } + + .md\:focus\:skew-y-0:focus { + --transform-skew-y: 0; + } + + .md\:focus\:skew-y-3:focus { + --transform-skew-y: 3deg; + } + + .md\:focus\:skew-y-6:focus { + --transform-skew-y: 6deg; + } + + .md\:focus\:skew-y-12:focus { + --transform-skew-y: 12deg; + } + + .md\:focus\:-skew-y-12:focus { + --transform-skew-y: -12deg; + } + + .md\:focus\:-skew-y-6:focus { + --transform-skew-y: -6deg; + } + + .md\:focus\:-skew-y-3:focus { + --transform-skew-y: -3deg; + } + + .md\:transition-none { + transition-property: none; + } + + .md\:transition-all { + transition-property: all; + } + + .md\:transition { + transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; + } + + .md\:transition-colors { + transition-property: background-color, border-color, color, fill, stroke; + } + + .md\:transition-opacity { + transition-property: opacity; + } + + .md\:transition-shadow { + transition-property: box-shadow; + } + + .md\:transition-transform { + transition-property: transform; + } + + .md\:ease-linear { + transition-timing-function: linear; + } + + .md\:ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); + } + + .md\:ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + + .md\:ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + } + + .md\:duration-75 { + transition-duration: 75ms; + } + + .md\:duration-100 { + transition-duration: 100ms; + } + + .md\:duration-150 { + transition-duration: 150ms; + } + + .md\:duration-200 { + transition-duration: 200ms; + } + + .md\:duration-300 { + transition-duration: 300ms; + } + + .md\:duration-500 { + transition-duration: 500ms; + } + + .md\:duration-700 { + transition-duration: 700ms; + } + + .md\:duration-1000 { + transition-duration: 1000ms; + } + + .md\:delay-75 { + transition-delay: 75ms; + } + + .md\:delay-100 { + transition-delay: 100ms; + } + + .md\:delay-150 { + transition-delay: 150ms; + } + + .md\:delay-200 { + transition-delay: 200ms; + } + + .md\:delay-300 { + transition-delay: 300ms; + } + + .md\:delay-500 { + transition-delay: 500ms; + } + + .md\:delay-700 { + transition-delay: 700ms; + } + + .md\:delay-1000 { + transition-delay: 1000ms; + } + + .md\:example { + font-weight: 700; + color: #f56565; + } +} + +@media (min-width: 1024px) { + .lg\:space-y-0 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0px * var(--space-y-reverse)); + } + + .lg\:space-x-0 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0px * var(--space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.25rem * var(--space-y-reverse)); + } + + .lg\:space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.25rem * var(--space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.5rem * var(--space-y-reverse)); + } + + .lg\:space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.5rem * var(--space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.75rem * var(--space-y-reverse)); + } + + .lg\:space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.75rem * var(--space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1rem * var(--space-y-reverse)); + } + + .lg\:space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1rem * var(--space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.25rem * var(--space-y-reverse)); + } + + .lg\:space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.25rem * var(--space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.5rem * var(--space-y-reverse)); + } + + .lg\:space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.5rem * var(--space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2rem * var(--space-y-reverse)); + } + + .lg\:space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2rem * var(--space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2.5rem * var(--space-y-reverse)); + } + + .lg\:space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2.5rem * var(--space-x-reverse)); + margin-left: calc(2.5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(3rem * var(--space-y-reverse)); + } + + .lg\:space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(3rem * var(--space-x-reverse)); + margin-left: calc(3rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(4rem * var(--space-y-reverse)); + } + + .lg\:space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(4rem * var(--space-x-reverse)); + margin-left: calc(4rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(5rem * var(--space-y-reverse)); + } + + .lg\:space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(5rem * var(--space-x-reverse)); + margin-left: calc(5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(6rem * var(--space-y-reverse)); + } + + .lg\:space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(6rem * var(--space-x-reverse)); + margin-left: calc(6rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(8rem * var(--space-y-reverse)); + } + + .lg\:space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(8rem * var(--space-x-reverse)); + margin-left: calc(8rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(10rem * var(--space-y-reverse)); + } + + .lg\:space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(10rem * var(--space-x-reverse)); + margin-left: calc(10rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(12rem * var(--space-y-reverse)); + } + + .lg\:space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(12rem * var(--space-x-reverse)); + margin-left: calc(12rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(14rem * var(--space-y-reverse)); + } + + .lg\:space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(14rem * var(--space-x-reverse)); + margin-left: calc(14rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(16rem * var(--space-y-reverse)); + } + + .lg\:space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(16rem * var(--space-x-reverse)); + margin-left: calc(16rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1px * var(--space-y-reverse)); + } + + .lg\:space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1px * var(--space-x-reverse)); + margin-left: calc(1px * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.25rem * var(--space-y-reverse)); + } + + .lg\:-space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.25rem * var(--space-x-reverse)); + margin-left: calc(-0.25rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.5rem * var(--space-y-reverse)); + } + + .lg\:-space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.5rem * var(--space-x-reverse)); + margin-left: calc(-0.5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.75rem * var(--space-y-reverse)); + } + + .lg\:-space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1rem * var(--space-y-reverse)); + } + + .lg\:-space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1rem * var(--space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.25rem * var(--space-y-reverse)); + } + + .lg\:-space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.25rem * var(--space-x-reverse)); + margin-left: calc(-1.25rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.5rem * var(--space-y-reverse)); + } + + .lg\:-space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.5rem * var(--space-x-reverse)); + margin-left: calc(-1.5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2rem * var(--space-y-reverse)); + } + + .lg\:-space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2rem * var(--space-x-reverse)); + margin-left: calc(-2rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2.5rem * var(--space-y-reverse)); + } + + .lg\:-space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2.5rem * var(--space-x-reverse)); + margin-left: calc(-2.5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-3rem * var(--space-y-reverse)); + } + + .lg\:-space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-3rem * var(--space-x-reverse)); + margin-left: calc(-3rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-4rem * var(--space-y-reverse)); + } + + .lg\:-space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-4rem * var(--space-x-reverse)); + margin-left: calc(-4rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-5rem * var(--space-y-reverse)); + } + + .lg\:-space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-5rem * var(--space-x-reverse)); + margin-left: calc(-5rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-6rem * var(--space-y-reverse)); + } + + .lg\:-space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-6rem * var(--space-x-reverse)); + margin-left: calc(-6rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-8rem * var(--space-y-reverse)); + } + + .lg\:-space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-8rem * var(--space-x-reverse)); + margin-left: calc(-8rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-10rem * var(--space-y-reverse)); + } + + .lg\:-space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-10rem * var(--space-x-reverse)); + margin-left: calc(-10rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-12rem * var(--space-y-reverse)); + } + + .lg\:-space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-12rem * var(--space-x-reverse)); + margin-left: calc(-12rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-14rem * var(--space-y-reverse)); + } + + .lg\:-space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-14rem * var(--space-x-reverse)); + margin-left: calc(-14rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-16rem * var(--space-y-reverse)); + } + + .lg\:-space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-16rem * var(--space-x-reverse)); + margin-left: calc(-16rem * calc(1 - var(--space-x-reverse))); + } + + .lg\:-space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1px * var(--space-y-reverse)); + } + + .lg\:-space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1px * var(--space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--space-x-reverse))); + } + + .lg\:space-y-reverse > :not(template) ~ :not(template) { + --space-y-reverse: 1; + } + + .lg\:space-x-reverse > :not(template) ~ :not(template) { + --space-x-reverse: 1; + } + + .lg\:divide-y-0 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(0px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(0px * var(--divide-y-reverse)); + } + + .lg\:divide-x-0 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(0px * var(--divide-x-reverse)); + border-left-width: calc(0px * calc(1 - var(--divide-x-reverse))); + } + + .lg\:divide-y-2 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(2px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(2px * var(--divide-y-reverse)); + } + + .lg\:divide-x-2 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(2px * var(--divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--divide-x-reverse))); + } + + .lg\:divide-y-4 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(4px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(4px * var(--divide-y-reverse)); + } + + .lg\:divide-x-4 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(4px * var(--divide-x-reverse)); + border-left-width: calc(4px * calc(1 - var(--divide-x-reverse))); + } + + .lg\:divide-y-8 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(8px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(8px * var(--divide-y-reverse)); + } + + .lg\:divide-x-8 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(8px * var(--divide-x-reverse)); + border-left-width: calc(8px * calc(1 - var(--divide-x-reverse))); + } + + .lg\:divide-y > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(1px * var(--divide-y-reverse)); + } + + .lg\:divide-x > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(1px * var(--divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--divide-x-reverse))); + } + + .lg\:divide-y-reverse > :not(template) ~ :not(template) { + --divide-y-reverse: 1; + } + + .lg\:divide-x-reverse > :not(template) ~ :not(template) { + --divide-x-reverse: 1; + } + + .lg\:divide-transparent > :not(template) ~ :not(template) { + border-color: transparent; + } + + .lg\:divide-current > :not(template) ~ :not(template) { + border-color: currentColor; + } + + .lg\:divide-black > :not(template) ~ :not(template) { + border-color: #000; + } + + .lg\:divide-white > :not(template) ~ :not(template) { + border-color: #fff; + } + + .lg\:divide-gray-100 > :not(template) ~ :not(template) { + border-color: #f7fafc; + } + + .lg\:divide-gray-200 > :not(template) ~ :not(template) { + border-color: #edf2f7; + } + + .lg\:divide-gray-300 > :not(template) ~ :not(template) { + border-color: #e2e8f0; + } + + .lg\:divide-gray-400 > :not(template) ~ :not(template) { + border-color: #cbd5e0; + } + + .lg\:divide-gray-500 > :not(template) ~ :not(template) { + border-color: #a0aec0; + } + + .lg\:divide-gray-600 > :not(template) ~ :not(template) { + border-color: #718096; + } + + .lg\:divide-gray-700 > :not(template) ~ :not(template) { + border-color: #4a5568; + } + + .lg\:divide-gray-800 > :not(template) ~ :not(template) { + border-color: #2d3748; + } + + .lg\:divide-gray-900 > :not(template) ~ :not(template) { + border-color: #1a202c; + } + + .lg\:divide-red-100 > :not(template) ~ :not(template) { + border-color: #fff5f5; + } + + .lg\:divide-red-200 > :not(template) ~ :not(template) { + border-color: #fed7d7; + } + + .lg\:divide-red-300 > :not(template) ~ :not(template) { + border-color: #feb2b2; + } + + .lg\:divide-red-400 > :not(template) ~ :not(template) { + border-color: #fc8181; + } + + .lg\:divide-red-500 > :not(template) ~ :not(template) { + border-color: #f56565; + } + + .lg\:divide-red-600 > :not(template) ~ :not(template) { + border-color: #e53e3e; + } + + .lg\:divide-red-700 > :not(template) ~ :not(template) { + border-color: #c53030; + } + + .lg\:divide-red-800 > :not(template) ~ :not(template) { + border-color: #9b2c2c; + } + + .lg\:divide-red-900 > :not(template) ~ :not(template) { + border-color: #742a2a; + } + + .lg\:divide-orange-100 > :not(template) ~ :not(template) { + border-color: #fffaf0; + } + + .lg\:divide-orange-200 > :not(template) ~ :not(template) { + border-color: #feebc8; + } + + .lg\:divide-orange-300 > :not(template) ~ :not(template) { + border-color: #fbd38d; + } + + .lg\:divide-orange-400 > :not(template) ~ :not(template) { + border-color: #f6ad55; + } + + .lg\:divide-orange-500 > :not(template) ~ :not(template) { + border-color: #ed8936; + } + + .lg\:divide-orange-600 > :not(template) ~ :not(template) { + border-color: #dd6b20; + } + + .lg\:divide-orange-700 > :not(template) ~ :not(template) { + border-color: #c05621; + } + + .lg\:divide-orange-800 > :not(template) ~ :not(template) { + border-color: #9c4221; + } + + .lg\:divide-orange-900 > :not(template) ~ :not(template) { + border-color: #7b341e; + } + + .lg\:divide-yellow-100 > :not(template) ~ :not(template) { + border-color: #fffff0; + } + + .lg\:divide-yellow-200 > :not(template) ~ :not(template) { + border-color: #fefcbf; + } + + .lg\:divide-yellow-300 > :not(template) ~ :not(template) { + border-color: #faf089; + } + + .lg\:divide-yellow-400 > :not(template) ~ :not(template) { + border-color: #f6e05e; + } + + .lg\:divide-yellow-500 > :not(template) ~ :not(template) { + border-color: #ecc94b; + } + + .lg\:divide-yellow-600 > :not(template) ~ :not(template) { + border-color: #d69e2e; + } + + .lg\:divide-yellow-700 > :not(template) ~ :not(template) { + border-color: #b7791f; + } + + .lg\:divide-yellow-800 > :not(template) ~ :not(template) { + border-color: #975a16; + } + + .lg\:divide-yellow-900 > :not(template) ~ :not(template) { + border-color: #744210; + } + + .lg\:divide-green-100 > :not(template) ~ :not(template) { + border-color: #f0fff4; + } + + .lg\:divide-green-200 > :not(template) ~ :not(template) { + border-color: #c6f6d5; + } + + .lg\:divide-green-300 > :not(template) ~ :not(template) { + border-color: #9ae6b4; + } + + .lg\:divide-green-400 > :not(template) ~ :not(template) { + border-color: #68d391; + } + + .lg\:divide-green-500 > :not(template) ~ :not(template) { + border-color: #48bb78; + } + + .lg\:divide-green-600 > :not(template) ~ :not(template) { + border-color: #38a169; + } + + .lg\:divide-green-700 > :not(template) ~ :not(template) { + border-color: #2f855a; + } + + .lg\:divide-green-800 > :not(template) ~ :not(template) { + border-color: #276749; + } + + .lg\:divide-green-900 > :not(template) ~ :not(template) { + border-color: #22543d; + } + + .lg\:divide-teal-100 > :not(template) ~ :not(template) { + border-color: #e6fffa; + } + + .lg\:divide-teal-200 > :not(template) ~ :not(template) { + border-color: #b2f5ea; + } + + .lg\:divide-teal-300 > :not(template) ~ :not(template) { + border-color: #81e6d9; + } + + .lg\:divide-teal-400 > :not(template) ~ :not(template) { + border-color: #4fd1c5; + } + + .lg\:divide-teal-500 > :not(template) ~ :not(template) { + border-color: #38b2ac; + } + + .lg\:divide-teal-600 > :not(template) ~ :not(template) { + border-color: #319795; + } + + .lg\:divide-teal-700 > :not(template) ~ :not(template) { + border-color: #2c7a7b; + } + + .lg\:divide-teal-800 > :not(template) ~ :not(template) { + border-color: #285e61; + } + + .lg\:divide-teal-900 > :not(template) ~ :not(template) { + border-color: #234e52; + } + + .lg\:divide-blue-100 > :not(template) ~ :not(template) { + border-color: #ebf8ff; + } + + .lg\:divide-blue-200 > :not(template) ~ :not(template) { + border-color: #bee3f8; + } + + .lg\:divide-blue-300 > :not(template) ~ :not(template) { + border-color: #90cdf4; + } + + .lg\:divide-blue-400 > :not(template) ~ :not(template) { + border-color: #63b3ed; + } + + .lg\:divide-blue-500 > :not(template) ~ :not(template) { + border-color: #4299e1; + } + + .lg\:divide-blue-600 > :not(template) ~ :not(template) { + border-color: #3182ce; + } + + .lg\:divide-blue-700 > :not(template) ~ :not(template) { + border-color: #2b6cb0; + } + + .lg\:divide-blue-800 > :not(template) ~ :not(template) { + border-color: #2c5282; + } + + .lg\:divide-blue-900 > :not(template) ~ :not(template) { + border-color: #2a4365; + } + + .lg\:divide-indigo-100 > :not(template) ~ :not(template) { + border-color: #ebf4ff; + } + + .lg\:divide-indigo-200 > :not(template) ~ :not(template) { + border-color: #c3dafe; + } + + .lg\:divide-indigo-300 > :not(template) ~ :not(template) { + border-color: #a3bffa; + } + + .lg\:divide-indigo-400 > :not(template) ~ :not(template) { + border-color: #7f9cf5; + } + + .lg\:divide-indigo-500 > :not(template) ~ :not(template) { + border-color: #667eea; + } + + .lg\:divide-indigo-600 > :not(template) ~ :not(template) { + border-color: #5a67d8; + } + + .lg\:divide-indigo-700 > :not(template) ~ :not(template) { + border-color: #4c51bf; + } + + .lg\:divide-indigo-800 > :not(template) ~ :not(template) { + border-color: #434190; + } + + .lg\:divide-indigo-900 > :not(template) ~ :not(template) { + border-color: #3c366b; + } + + .lg\:divide-purple-100 > :not(template) ~ :not(template) { + border-color: #faf5ff; + } + + .lg\:divide-purple-200 > :not(template) ~ :not(template) { + border-color: #e9d8fd; + } + + .lg\:divide-purple-300 > :not(template) ~ :not(template) { + border-color: #d6bcfa; + } + + .lg\:divide-purple-400 > :not(template) ~ :not(template) { + border-color: #b794f4; + } + + .lg\:divide-purple-500 > :not(template) ~ :not(template) { + border-color: #9f7aea; + } + + .lg\:divide-purple-600 > :not(template) ~ :not(template) { + border-color: #805ad5; + } + + .lg\:divide-purple-700 > :not(template) ~ :not(template) { + border-color: #6b46c1; + } + + .lg\:divide-purple-800 > :not(template) ~ :not(template) { + border-color: #553c9a; + } + + .lg\:divide-purple-900 > :not(template) ~ :not(template) { + border-color: #44337a; + } + + .lg\:divide-pink-100 > :not(template) ~ :not(template) { + border-color: #fff5f7; + } + + .lg\:divide-pink-200 > :not(template) ~ :not(template) { + border-color: #fed7e2; + } + + .lg\:divide-pink-300 > :not(template) ~ :not(template) { + border-color: #fbb6ce; + } + + .lg\:divide-pink-400 > :not(template) ~ :not(template) { + border-color: #f687b3; + } + + .lg\:divide-pink-500 > :not(template) ~ :not(template) { + border-color: #ed64a6; + } + + .lg\:divide-pink-600 > :not(template) ~ :not(template) { + border-color: #d53f8c; + } + + .lg\:divide-pink-700 > :not(template) ~ :not(template) { + border-color: #b83280; + } + + .lg\:divide-pink-800 > :not(template) ~ :not(template) { + border-color: #97266d; + } + + .lg\:divide-pink-900 > :not(template) ~ :not(template) { + border-color: #702459; + } + + .lg\: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; + } + + .lg\:not-sr-only { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .lg\:focus\:sr-only:focus { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + } + + .lg\:focus\:not-sr-only:focus { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .lg\:appearance-none { + appearance: none; + } + + .lg\:bg-fixed { + background-attachment: fixed; + } + + .lg\:bg-local { + background-attachment: local; + } + + .lg\:bg-scroll { + background-attachment: scroll; + } + + .lg\:bg-transparent { + background-color: transparent; + } + + .lg\:bg-current { + background-color: currentColor; + } + + .lg\:bg-black { + background-color: #000; + } + + .lg\:bg-white { + background-color: #fff; + } + + .lg\:bg-gray-100 { + background-color: #f7fafc; + } + + .lg\:bg-gray-200 { + background-color: #edf2f7; + } + + .lg\:bg-gray-300 { + background-color: #e2e8f0; + } + + .lg\:bg-gray-400 { + background-color: #cbd5e0; + } + + .lg\:bg-gray-500 { + background-color: #a0aec0; + } + + .lg\:bg-gray-600 { + background-color: #718096; + } + + .lg\:bg-gray-700 { + background-color: #4a5568; + } + + .lg\:bg-gray-800 { + background-color: #2d3748; + } + + .lg\:bg-gray-900 { + background-color: #1a202c; + } + + .lg\:bg-red-100 { + background-color: #fff5f5; + } + + .lg\:bg-red-200 { + background-color: #fed7d7; + } + + .lg\:bg-red-300 { + background-color: #feb2b2; + } + + .lg\:bg-red-400 { + background-color: #fc8181; + } + + .lg\:bg-red-500 { + background-color: #f56565; + } + + .lg\:bg-red-600 { + background-color: #e53e3e; + } + + .lg\:bg-red-700 { + background-color: #c53030; + } + + .lg\:bg-red-800 { + background-color: #9b2c2c; + } + + .lg\:bg-red-900 { + background-color: #742a2a; + } + + .lg\:bg-orange-100 { + background-color: #fffaf0; + } + + .lg\:bg-orange-200 { + background-color: #feebc8; + } + + .lg\:bg-orange-300 { + background-color: #fbd38d; + } + + .lg\:bg-orange-400 { + background-color: #f6ad55; + } + + .lg\:bg-orange-500 { + background-color: #ed8936; + } + + .lg\:bg-orange-600 { + background-color: #dd6b20; + } + + .lg\:bg-orange-700 { + background-color: #c05621; + } + + .lg\:bg-orange-800 { + background-color: #9c4221; + } + + .lg\:bg-orange-900 { + background-color: #7b341e; + } + + .lg\:bg-yellow-100 { + background-color: #fffff0; + } + + .lg\:bg-yellow-200 { + background-color: #fefcbf; + } + + .lg\:bg-yellow-300 { + background-color: #faf089; + } + + .lg\:bg-yellow-400 { + background-color: #f6e05e; + } + + .lg\:bg-yellow-500 { + background-color: #ecc94b; + } + + .lg\:bg-yellow-600 { + background-color: #d69e2e; + } + + .lg\:bg-yellow-700 { + background-color: #b7791f; + } + + .lg\:bg-yellow-800 { + background-color: #975a16; + } + + .lg\:bg-yellow-900 { + background-color: #744210; + } + + .lg\:bg-green-100 { + background-color: #f0fff4; + } + + .lg\:bg-green-200 { + background-color: #c6f6d5; + } + + .lg\:bg-green-300 { + background-color: #9ae6b4; + } + + .lg\:bg-green-400 { + background-color: #68d391; + } + + .lg\:bg-green-500 { + background-color: #48bb78; + } + + .lg\:bg-green-600 { + background-color: #38a169; + } + + .lg\:bg-green-700 { + background-color: #2f855a; + } + + .lg\:bg-green-800 { + background-color: #276749; + } + + .lg\:bg-green-900 { + background-color: #22543d; + } + + .lg\:bg-teal-100 { + background-color: #e6fffa; + } + + .lg\:bg-teal-200 { + background-color: #b2f5ea; + } + + .lg\:bg-teal-300 { + background-color: #81e6d9; + } + + .lg\:bg-teal-400 { + background-color: #4fd1c5; + } + + .lg\:bg-teal-500 { + background-color: #38b2ac; + } + + .lg\:bg-teal-600 { + background-color: #319795; + } + + .lg\:bg-teal-700 { + background-color: #2c7a7b; + } + + .lg\:bg-teal-800 { + background-color: #285e61; + } + + .lg\:bg-teal-900 { + background-color: #234e52; + } + + .lg\:bg-blue-100 { + background-color: #ebf8ff; + } + + .lg\:bg-blue-200 { + background-color: #bee3f8; + } + + .lg\:bg-blue-300 { + background-color: #90cdf4; + } + + .lg\:bg-blue-400 { + background-color: #63b3ed; + } + + .lg\:bg-blue-500 { + background-color: #4299e1; + } + + .lg\:bg-blue-600 { + background-color: #3182ce; + } + + .lg\:bg-blue-700 { + background-color: #2b6cb0; + } + + .lg\:bg-blue-800 { + background-color: #2c5282; + } + + .lg\:bg-blue-900 { + background-color: #2a4365; + } + + .lg\:bg-indigo-100 { + background-color: #ebf4ff; + } + + .lg\:bg-indigo-200 { + background-color: #c3dafe; + } + + .lg\:bg-indigo-300 { + background-color: #a3bffa; + } + + .lg\:bg-indigo-400 { + background-color: #7f9cf5; + } + + .lg\:bg-indigo-500 { + background-color: #667eea; + } + + .lg\:bg-indigo-600 { + background-color: #5a67d8; + } + + .lg\:bg-indigo-700 { + background-color: #4c51bf; + } + + .lg\:bg-indigo-800 { + background-color: #434190; + } + + .lg\:bg-indigo-900 { + background-color: #3c366b; + } + + .lg\:bg-purple-100 { + background-color: #faf5ff; + } + + .lg\:bg-purple-200 { + background-color: #e9d8fd; + } + + .lg\:bg-purple-300 { + background-color: #d6bcfa; + } + + .lg\:bg-purple-400 { + background-color: #b794f4; + } + + .lg\:bg-purple-500 { + background-color: #9f7aea; + } + + .lg\:bg-purple-600 { + background-color: #805ad5; + } + + .lg\:bg-purple-700 { + background-color: #6b46c1; + } + + .lg\:bg-purple-800 { + background-color: #553c9a; + } + + .lg\:bg-purple-900 { + background-color: #44337a; + } + + .lg\:bg-pink-100 { + background-color: #fff5f7; + } + + .lg\:bg-pink-200 { + background-color: #fed7e2; + } + + .lg\:bg-pink-300 { + background-color: #fbb6ce; + } + + .lg\:bg-pink-400 { + background-color: #f687b3; + } + + .lg\:bg-pink-500 { + background-color: #ed64a6; + } + + .lg\:bg-pink-600 { + background-color: #d53f8c; + } + + .lg\:bg-pink-700 { + background-color: #b83280; + } + + .lg\:bg-pink-800 { + background-color: #97266d; + } + + .lg\:bg-pink-900 { + background-color: #702459; + } + + .lg\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .lg\:hover\:bg-current:hover { + background-color: currentColor; + } + + .lg\:hover\:bg-black:hover { + background-color: #000; + } + + .lg\:hover\:bg-white:hover { + background-color: #fff; + } + + .lg\:hover\:bg-gray-100:hover { + background-color: #f7fafc; + } + + .lg\:hover\:bg-gray-200:hover { + background-color: #edf2f7; + } + + .lg\:hover\:bg-gray-300:hover { + background-color: #e2e8f0; + } + + .lg\:hover\:bg-gray-400:hover { + background-color: #cbd5e0; + } + + .lg\:hover\:bg-gray-500:hover { + background-color: #a0aec0; + } + + .lg\:hover\:bg-gray-600:hover { + background-color: #718096; + } + + .lg\:hover\:bg-gray-700:hover { + background-color: #4a5568; + } + + .lg\:hover\:bg-gray-800:hover { + background-color: #2d3748; + } + + .lg\:hover\:bg-gray-900:hover { + background-color: #1a202c; + } + + .lg\:hover\:bg-red-100:hover { + background-color: #fff5f5; + } + + .lg\:hover\:bg-red-200:hover { + background-color: #fed7d7; + } + + .lg\:hover\:bg-red-300:hover { + background-color: #feb2b2; + } + + .lg\:hover\:bg-red-400:hover { + background-color: #fc8181; + } + + .lg\:hover\:bg-red-500:hover { + background-color: #f56565; + } + + .lg\:hover\:bg-red-600:hover { + background-color: #e53e3e; + } + + .lg\:hover\:bg-red-700:hover { + background-color: #c53030; + } + + .lg\:hover\:bg-red-800:hover { + background-color: #9b2c2c; + } + + .lg\:hover\:bg-red-900:hover { + background-color: #742a2a; + } + + .lg\:hover\:bg-orange-100:hover { + background-color: #fffaf0; + } + + .lg\:hover\:bg-orange-200:hover { + background-color: #feebc8; + } + + .lg\:hover\:bg-orange-300:hover { + background-color: #fbd38d; + } + + .lg\:hover\:bg-orange-400:hover { + background-color: #f6ad55; + } + + .lg\:hover\:bg-orange-500:hover { + background-color: #ed8936; + } + + .lg\:hover\:bg-orange-600:hover { + background-color: #dd6b20; + } + + .lg\:hover\:bg-orange-700:hover { + background-color: #c05621; + } + + .lg\:hover\:bg-orange-800:hover { + background-color: #9c4221; + } + + .lg\:hover\:bg-orange-900:hover { + background-color: #7b341e; + } + + .lg\:hover\:bg-yellow-100:hover { + background-color: #fffff0; + } + + .lg\:hover\:bg-yellow-200:hover { + background-color: #fefcbf; + } + + .lg\:hover\:bg-yellow-300:hover { + background-color: #faf089; + } + + .lg\:hover\:bg-yellow-400:hover { + background-color: #f6e05e; + } + + .lg\:hover\:bg-yellow-500:hover { + background-color: #ecc94b; + } + + .lg\:hover\:bg-yellow-600:hover { + background-color: #d69e2e; + } + + .lg\:hover\:bg-yellow-700:hover { + background-color: #b7791f; + } + + .lg\:hover\:bg-yellow-800:hover { + background-color: #975a16; + } + + .lg\:hover\:bg-yellow-900:hover { + background-color: #744210; + } + + .lg\:hover\:bg-green-100:hover { + background-color: #f0fff4; + } + + .lg\:hover\:bg-green-200:hover { + background-color: #c6f6d5; + } + + .lg\:hover\:bg-green-300:hover { + background-color: #9ae6b4; + } + + .lg\:hover\:bg-green-400:hover { + background-color: #68d391; + } + + .lg\:hover\:bg-green-500:hover { + background-color: #48bb78; + } + + .lg\:hover\:bg-green-600:hover { + background-color: #38a169; + } + + .lg\:hover\:bg-green-700:hover { + background-color: #2f855a; + } + + .lg\:hover\:bg-green-800:hover { + background-color: #276749; + } + + .lg\:hover\:bg-green-900:hover { + background-color: #22543d; + } + + .lg\:hover\:bg-teal-100:hover { + background-color: #e6fffa; + } + + .lg\:hover\:bg-teal-200:hover { + background-color: #b2f5ea; + } + + .lg\:hover\:bg-teal-300:hover { + background-color: #81e6d9; + } + + .lg\:hover\:bg-teal-400:hover { + background-color: #4fd1c5; + } + + .lg\:hover\:bg-teal-500:hover { + background-color: #38b2ac; + } + + .lg\:hover\:bg-teal-600:hover { + background-color: #319795; + } + + .lg\:hover\:bg-teal-700:hover { + background-color: #2c7a7b; + } + + .lg\:hover\:bg-teal-800:hover { + background-color: #285e61; + } + + .lg\:hover\:bg-teal-900:hover { + background-color: #234e52; + } + + .lg\:hover\:bg-blue-100:hover { + background-color: #ebf8ff; + } + + .lg\:hover\:bg-blue-200:hover { + background-color: #bee3f8; + } + + .lg\:hover\:bg-blue-300:hover { + background-color: #90cdf4; + } + + .lg\:hover\:bg-blue-400:hover { + background-color: #63b3ed; + } + + .lg\:hover\:bg-blue-500:hover { + background-color: #4299e1; + } + + .lg\:hover\:bg-blue-600:hover { + background-color: #3182ce; + } + + .lg\:hover\:bg-blue-700:hover { + background-color: #2b6cb0; + } + + .lg\:hover\:bg-blue-800:hover { + background-color: #2c5282; + } + + .lg\:hover\:bg-blue-900:hover { + background-color: #2a4365; + } + + .lg\:hover\:bg-indigo-100:hover { + background-color: #ebf4ff; + } + + .lg\:hover\:bg-indigo-200:hover { + background-color: #c3dafe; + } + + .lg\:hover\:bg-indigo-300:hover { + background-color: #a3bffa; + } + + .lg\:hover\:bg-indigo-400:hover { + background-color: #7f9cf5; + } + + .lg\:hover\:bg-indigo-500:hover { + background-color: #667eea; + } + + .lg\:hover\:bg-indigo-600:hover { + background-color: #5a67d8; + } + + .lg\:hover\:bg-indigo-700:hover { + background-color: #4c51bf; + } + + .lg\:hover\:bg-indigo-800:hover { + background-color: #434190; + } + + .lg\:hover\:bg-indigo-900:hover { + background-color: #3c366b; + } + + .lg\:hover\:bg-purple-100:hover { + background-color: #faf5ff; + } + + .lg\:hover\:bg-purple-200:hover { + background-color: #e9d8fd; + } + + .lg\:hover\:bg-purple-300:hover { + background-color: #d6bcfa; + } + + .lg\:hover\:bg-purple-400:hover { + background-color: #b794f4; + } + + .lg\:hover\:bg-purple-500:hover { + background-color: #9f7aea; + } + + .lg\:hover\:bg-purple-600:hover { + background-color: #805ad5; + } + + .lg\:hover\:bg-purple-700:hover { + background-color: #6b46c1; + } + + .lg\:hover\:bg-purple-800:hover { + background-color: #553c9a; + } + + .lg\:hover\:bg-purple-900:hover { + background-color: #44337a; + } + + .lg\:hover\:bg-pink-100:hover { + background-color: #fff5f7; + } + + .lg\:hover\:bg-pink-200:hover { + background-color: #fed7e2; + } + + .lg\:hover\:bg-pink-300:hover { + background-color: #fbb6ce; + } + + .lg\:hover\:bg-pink-400:hover { + background-color: #f687b3; + } + + .lg\:hover\:bg-pink-500:hover { + background-color: #ed64a6; + } + + .lg\:hover\:bg-pink-600:hover { + background-color: #d53f8c; + } + + .lg\:hover\:bg-pink-700:hover { + background-color: #b83280; + } + + .lg\:hover\:bg-pink-800:hover { + background-color: #97266d; + } + + .lg\:hover\:bg-pink-900:hover { + background-color: #702459; + } + + .lg\:focus\:bg-transparent:focus { + background-color: transparent; + } + + .lg\:focus\:bg-current:focus { + background-color: currentColor; + } + + .lg\:focus\:bg-black:focus { + background-color: #000; + } + + .lg\:focus\:bg-white:focus { + background-color: #fff; + } + + .lg\:focus\:bg-gray-100:focus { + background-color: #f7fafc; + } + + .lg\:focus\:bg-gray-200:focus { + background-color: #edf2f7; + } + + .lg\:focus\:bg-gray-300:focus { + background-color: #e2e8f0; + } + + .lg\:focus\:bg-gray-400:focus { + background-color: #cbd5e0; + } + + .lg\:focus\:bg-gray-500:focus { + background-color: #a0aec0; + } + + .lg\:focus\:bg-gray-600:focus { + background-color: #718096; + } + + .lg\:focus\:bg-gray-700:focus { + background-color: #4a5568; + } + + .lg\:focus\:bg-gray-800:focus { + background-color: #2d3748; + } + + .lg\:focus\:bg-gray-900:focus { + background-color: #1a202c; + } + + .lg\:focus\:bg-red-100:focus { + background-color: #fff5f5; + } + + .lg\:focus\:bg-red-200:focus { + background-color: #fed7d7; + } + + .lg\:focus\:bg-red-300:focus { + background-color: #feb2b2; + } + + .lg\:focus\:bg-red-400:focus { + background-color: #fc8181; + } + + .lg\:focus\:bg-red-500:focus { + background-color: #f56565; + } + + .lg\:focus\:bg-red-600:focus { + background-color: #e53e3e; + } + + .lg\:focus\:bg-red-700:focus { + background-color: #c53030; + } + + .lg\:focus\:bg-red-800:focus { + background-color: #9b2c2c; + } + + .lg\:focus\:bg-red-900:focus { + background-color: #742a2a; + } + + .lg\:focus\:bg-orange-100:focus { + background-color: #fffaf0; + } + + .lg\:focus\:bg-orange-200:focus { + background-color: #feebc8; + } + + .lg\:focus\:bg-orange-300:focus { + background-color: #fbd38d; + } + + .lg\:focus\:bg-orange-400:focus { + background-color: #f6ad55; + } + + .lg\:focus\:bg-orange-500:focus { + background-color: #ed8936; + } + + .lg\:focus\:bg-orange-600:focus { + background-color: #dd6b20; + } + + .lg\:focus\:bg-orange-700:focus { + background-color: #c05621; + } + + .lg\:focus\:bg-orange-800:focus { + background-color: #9c4221; + } + + .lg\:focus\:bg-orange-900:focus { + background-color: #7b341e; + } + + .lg\:focus\:bg-yellow-100:focus { + background-color: #fffff0; + } + + .lg\:focus\:bg-yellow-200:focus { + background-color: #fefcbf; + } + + .lg\:focus\:bg-yellow-300:focus { + background-color: #faf089; + } + + .lg\:focus\:bg-yellow-400:focus { + background-color: #f6e05e; + } + + .lg\:focus\:bg-yellow-500:focus { + background-color: #ecc94b; + } + + .lg\:focus\:bg-yellow-600:focus { + background-color: #d69e2e; + } + + .lg\:focus\:bg-yellow-700:focus { + background-color: #b7791f; + } + + .lg\:focus\:bg-yellow-800:focus { + background-color: #975a16; + } + + .lg\:focus\:bg-yellow-900:focus { + background-color: #744210; + } + + .lg\:focus\:bg-green-100:focus { + background-color: #f0fff4; + } + + .lg\:focus\:bg-green-200:focus { + background-color: #c6f6d5; + } + + .lg\:focus\:bg-green-300:focus { + background-color: #9ae6b4; + } + + .lg\:focus\:bg-green-400:focus { + background-color: #68d391; + } + + .lg\:focus\:bg-green-500:focus { + background-color: #48bb78; + } + + .lg\:focus\:bg-green-600:focus { + background-color: #38a169; + } + + .lg\:focus\:bg-green-700:focus { + background-color: #2f855a; + } + + .lg\:focus\:bg-green-800:focus { + background-color: #276749; + } + + .lg\:focus\:bg-green-900:focus { + background-color: #22543d; + } + + .lg\:focus\:bg-teal-100:focus { + background-color: #e6fffa; + } + + .lg\:focus\:bg-teal-200:focus { + background-color: #b2f5ea; + } + + .lg\:focus\:bg-teal-300:focus { + background-color: #81e6d9; + } + + .lg\:focus\:bg-teal-400:focus { + background-color: #4fd1c5; + } + + .lg\:focus\:bg-teal-500:focus { + background-color: #38b2ac; + } + + .lg\:focus\:bg-teal-600:focus { + background-color: #319795; + } + + .lg\:focus\:bg-teal-700:focus { + background-color: #2c7a7b; + } + + .lg\:focus\:bg-teal-800:focus { + background-color: #285e61; + } + + .lg\:focus\:bg-teal-900:focus { + background-color: #234e52; + } + + .lg\:focus\:bg-blue-100:focus { + background-color: #ebf8ff; + } + + .lg\:focus\:bg-blue-200:focus { + background-color: #bee3f8; + } + + .lg\:focus\:bg-blue-300:focus { + background-color: #90cdf4; + } + + .lg\:focus\:bg-blue-400:focus { + background-color: #63b3ed; + } + + .lg\:focus\:bg-blue-500:focus { + background-color: #4299e1; + } + + .lg\:focus\:bg-blue-600:focus { + background-color: #3182ce; + } + + .lg\:focus\:bg-blue-700:focus { + background-color: #2b6cb0; + } + + .lg\:focus\:bg-blue-800:focus { + background-color: #2c5282; + } + + .lg\:focus\:bg-blue-900:focus { + background-color: #2a4365; + } + + .lg\:focus\:bg-indigo-100:focus { + background-color: #ebf4ff; + } + + .lg\:focus\:bg-indigo-200:focus { + background-color: #c3dafe; + } + + .lg\:focus\:bg-indigo-300:focus { + background-color: #a3bffa; + } + + .lg\:focus\:bg-indigo-400:focus { + background-color: #7f9cf5; + } + + .lg\:focus\:bg-indigo-500:focus { + background-color: #667eea; + } + + .lg\:focus\:bg-indigo-600:focus { + background-color: #5a67d8; + } + + .lg\:focus\:bg-indigo-700:focus { + background-color: #4c51bf; + } + + .lg\:focus\:bg-indigo-800:focus { + background-color: #434190; + } + + .lg\:focus\:bg-indigo-900:focus { + background-color: #3c366b; + } + + .lg\:focus\:bg-purple-100:focus { + background-color: #faf5ff; + } + + .lg\:focus\:bg-purple-200:focus { + background-color: #e9d8fd; + } + + .lg\:focus\:bg-purple-300:focus { + background-color: #d6bcfa; + } + + .lg\:focus\:bg-purple-400:focus { + background-color: #b794f4; + } + + .lg\:focus\:bg-purple-500:focus { + background-color: #9f7aea; + } + + .lg\:focus\:bg-purple-600:focus { + background-color: #805ad5; + } + + .lg\:focus\:bg-purple-700:focus { + background-color: #6b46c1; + } + + .lg\:focus\:bg-purple-800:focus { + background-color: #553c9a; + } + + .lg\:focus\:bg-purple-900:focus { + background-color: #44337a; + } + + .lg\:focus\:bg-pink-100:focus { + background-color: #fff5f7; + } + + .lg\:focus\:bg-pink-200:focus { + background-color: #fed7e2; + } + + .lg\:focus\:bg-pink-300:focus { + background-color: #fbb6ce; + } + + .lg\:focus\:bg-pink-400:focus { + background-color: #f687b3; + } + + .lg\:focus\:bg-pink-500:focus { + background-color: #ed64a6; + } + + .lg\:focus\:bg-pink-600:focus { + background-color: #d53f8c; + } + + .lg\:focus\:bg-pink-700:focus { + background-color: #b83280; + } + + .lg\:focus\:bg-pink-800:focus { + background-color: #97266d; + } + + .lg\:focus\:bg-pink-900:focus { + background-color: #702459; + } + + .lg\:bg-bottom { + background-position: bottom; + } + + .lg\:bg-center { + background-position: center; + } + + .lg\:bg-left { + background-position: left; + } + + .lg\:bg-left-bottom { + background-position: left bottom; + } + + .lg\:bg-left-top { + background-position: left top; + } + + .lg\:bg-right { + background-position: right; + } + + .lg\:bg-right-bottom { + background-position: right bottom; + } + + .lg\:bg-right-top { + background-position: right top; + } + + .lg\:bg-top { + background-position: top; + } + + .lg\:bg-repeat { + background-repeat: repeat; + } + + .lg\:bg-no-repeat { + background-repeat: no-repeat; + } + + .lg\:bg-repeat-x { + background-repeat: repeat-x; + } + + .lg\:bg-repeat-y { + background-repeat: repeat-y; + } + + .lg\:bg-repeat-round { + background-repeat: round; + } + + .lg\:bg-repeat-space { + background-repeat: space; + } + + .lg\:bg-auto { + background-size: auto; + } + + .lg\:bg-cover { + background-size: cover; + } + + .lg\:bg-contain { + background-size: contain; + } + + .lg\:border-collapse { + border-collapse: collapse; + } + + .lg\:border-separate { + border-collapse: separate; + } + + .lg\:border-transparent { + border-color: transparent; + } + + .lg\:border-current { + border-color: currentColor; + } + + .lg\:border-black { + border-color: #000; + } + + .lg\:border-white { + border-color: #fff; + } + + .lg\:border-gray-100 { + border-color: #f7fafc; + } + + .lg\:border-gray-200 { + border-color: #edf2f7; + } + + .lg\:border-gray-300 { + border-color: #e2e8f0; + } + + .lg\:border-gray-400 { + border-color: #cbd5e0; + } + + .lg\:border-gray-500 { + border-color: #a0aec0; + } + + .lg\:border-gray-600 { + border-color: #718096; + } + + .lg\:border-gray-700 { + border-color: #4a5568; + } + + .lg\:border-gray-800 { + border-color: #2d3748; + } + + .lg\:border-gray-900 { + border-color: #1a202c; + } + + .lg\:border-red-100 { + border-color: #fff5f5; + } + + .lg\:border-red-200 { + border-color: #fed7d7; + } + + .lg\:border-red-300 { + border-color: #feb2b2; + } + + .lg\:border-red-400 { + border-color: #fc8181; + } + + .lg\:border-red-500 { + border-color: #f56565; + } + + .lg\:border-red-600 { + border-color: #e53e3e; + } + + .lg\:border-red-700 { + border-color: #c53030; + } + + .lg\:border-red-800 { + border-color: #9b2c2c; + } + + .lg\:border-red-900 { + border-color: #742a2a; + } + + .lg\:border-orange-100 { + border-color: #fffaf0; + } + + .lg\:border-orange-200 { + border-color: #feebc8; + } + + .lg\:border-orange-300 { + border-color: #fbd38d; + } + + .lg\:border-orange-400 { + border-color: #f6ad55; + } + + .lg\:border-orange-500 { + border-color: #ed8936; + } + + .lg\:border-orange-600 { + border-color: #dd6b20; + } + + .lg\:border-orange-700 { + border-color: #c05621; + } + + .lg\:border-orange-800 { + border-color: #9c4221; + } + + .lg\:border-orange-900 { + border-color: #7b341e; + } + + .lg\:border-yellow-100 { + border-color: #fffff0; + } + + .lg\:border-yellow-200 { + border-color: #fefcbf; + } + + .lg\:border-yellow-300 { + border-color: #faf089; + } + + .lg\:border-yellow-400 { + border-color: #f6e05e; + } + + .lg\:border-yellow-500 { + border-color: #ecc94b; + } + + .lg\:border-yellow-600 { + border-color: #d69e2e; + } + + .lg\:border-yellow-700 { + border-color: #b7791f; + } + + .lg\:border-yellow-800 { + border-color: #975a16; + } + + .lg\:border-yellow-900 { + border-color: #744210; + } + + .lg\:border-green-100 { + border-color: #f0fff4; + } + + .lg\:border-green-200 { + border-color: #c6f6d5; + } + + .lg\:border-green-300 { + border-color: #9ae6b4; + } + + .lg\:border-green-400 { + border-color: #68d391; + } + + .lg\:border-green-500 { + border-color: #48bb78; + } + + .lg\:border-green-600 { + border-color: #38a169; + } + + .lg\:border-green-700 { + border-color: #2f855a; + } + + .lg\:border-green-800 { + border-color: #276749; + } + + .lg\:border-green-900 { + border-color: #22543d; + } + + .lg\:border-teal-100 { + border-color: #e6fffa; + } + + .lg\:border-teal-200 { + border-color: #b2f5ea; + } + + .lg\:border-teal-300 { + border-color: #81e6d9; + } + + .lg\:border-teal-400 { + border-color: #4fd1c5; + } + + .lg\:border-teal-500 { + border-color: #38b2ac; + } + + .lg\:border-teal-600 { + border-color: #319795; + } + + .lg\:border-teal-700 { + border-color: #2c7a7b; + } + + .lg\:border-teal-800 { + border-color: #285e61; + } + + .lg\:border-teal-900 { + border-color: #234e52; + } + + .lg\:border-blue-100 { + border-color: #ebf8ff; + } + + .lg\:border-blue-200 { + border-color: #bee3f8; + } + + .lg\:border-blue-300 { + border-color: #90cdf4; + } + + .lg\:border-blue-400 { + border-color: #63b3ed; + } + + .lg\:border-blue-500 { + border-color: #4299e1; + } + + .lg\:border-blue-600 { + border-color: #3182ce; + } + + .lg\:border-blue-700 { + border-color: #2b6cb0; + } + + .lg\:border-blue-800 { + border-color: #2c5282; + } + + .lg\:border-blue-900 { + border-color: #2a4365; + } + + .lg\:border-indigo-100 { + border-color: #ebf4ff; + } + + .lg\:border-indigo-200 { + border-color: #c3dafe; + } + + .lg\:border-indigo-300 { + border-color: #a3bffa; + } + + .lg\:border-indigo-400 { + border-color: #7f9cf5; + } + + .lg\:border-indigo-500 { + border-color: #667eea; + } + + .lg\:border-indigo-600 { + border-color: #5a67d8; + } + + .lg\:border-indigo-700 { + border-color: #4c51bf; + } + + .lg\:border-indigo-800 { + border-color: #434190; + } + + .lg\:border-indigo-900 { + border-color: #3c366b; + } + + .lg\:border-purple-100 { + border-color: #faf5ff; + } + + .lg\:border-purple-200 { + border-color: #e9d8fd; + } + + .lg\:border-purple-300 { + border-color: #d6bcfa; + } + + .lg\:border-purple-400 { + border-color: #b794f4; + } + + .lg\:border-purple-500 { + border-color: #9f7aea; + } + + .lg\:border-purple-600 { + border-color: #805ad5; + } + + .lg\:border-purple-700 { + border-color: #6b46c1; + } + + .lg\:border-purple-800 { + border-color: #553c9a; + } + + .lg\:border-purple-900 { + border-color: #44337a; + } + + .lg\:border-pink-100 { + border-color: #fff5f7; + } + + .lg\:border-pink-200 { + border-color: #fed7e2; + } + + .lg\:border-pink-300 { + border-color: #fbb6ce; + } + + .lg\:border-pink-400 { + border-color: #f687b3; + } + + .lg\:border-pink-500 { + border-color: #ed64a6; + } + + .lg\:border-pink-600 { + border-color: #d53f8c; + } + + .lg\:border-pink-700 { + border-color: #b83280; + } + + .lg\:border-pink-800 { + border-color: #97266d; + } + + .lg\:border-pink-900 { + border-color: #702459; + } + + .lg\:hover\:border-transparent:hover { + border-color: transparent; + } + + .lg\:hover\:border-current:hover { + border-color: currentColor; + } + + .lg\:hover\:border-black:hover { + border-color: #000; + } + + .lg\:hover\:border-white:hover { + border-color: #fff; + } + + .lg\:hover\:border-gray-100:hover { + border-color: #f7fafc; + } + + .lg\:hover\:border-gray-200:hover { + border-color: #edf2f7; + } + + .lg\:hover\:border-gray-300:hover { + border-color: #e2e8f0; + } + + .lg\:hover\:border-gray-400:hover { + border-color: #cbd5e0; + } + + .lg\:hover\:border-gray-500:hover { + border-color: #a0aec0; + } + + .lg\:hover\:border-gray-600:hover { + border-color: #718096; + } + + .lg\:hover\:border-gray-700:hover { + border-color: #4a5568; + } + + .lg\:hover\:border-gray-800:hover { + border-color: #2d3748; + } + + .lg\:hover\:border-gray-900:hover { + border-color: #1a202c; + } + + .lg\:hover\:border-red-100:hover { + border-color: #fff5f5; + } + + .lg\:hover\:border-red-200:hover { + border-color: #fed7d7; + } + + .lg\:hover\:border-red-300:hover { + border-color: #feb2b2; + } + + .lg\:hover\:border-red-400:hover { + border-color: #fc8181; + } + + .lg\:hover\:border-red-500:hover { + border-color: #f56565; + } + + .lg\:hover\:border-red-600:hover { + border-color: #e53e3e; + } + + .lg\:hover\:border-red-700:hover { + border-color: #c53030; + } + + .lg\:hover\:border-red-800:hover { + border-color: #9b2c2c; + } + + .lg\:hover\:border-red-900:hover { + border-color: #742a2a; + } + + .lg\:hover\:border-orange-100:hover { + border-color: #fffaf0; + } + + .lg\:hover\:border-orange-200:hover { + border-color: #feebc8; + } + + .lg\:hover\:border-orange-300:hover { + border-color: #fbd38d; + } + + .lg\:hover\:border-orange-400:hover { + border-color: #f6ad55; + } + + .lg\:hover\:border-orange-500:hover { + border-color: #ed8936; + } + + .lg\:hover\:border-orange-600:hover { + border-color: #dd6b20; + } + + .lg\:hover\:border-orange-700:hover { + border-color: #c05621; + } + + .lg\:hover\:border-orange-800:hover { + border-color: #9c4221; + } + + .lg\:hover\:border-orange-900:hover { + border-color: #7b341e; + } + + .lg\:hover\:border-yellow-100:hover { + border-color: #fffff0; + } + + .lg\:hover\:border-yellow-200:hover { + border-color: #fefcbf; + } + + .lg\:hover\:border-yellow-300:hover { + border-color: #faf089; + } + + .lg\:hover\:border-yellow-400:hover { + border-color: #f6e05e; + } + + .lg\:hover\:border-yellow-500:hover { + border-color: #ecc94b; + } + + .lg\:hover\:border-yellow-600:hover { + border-color: #d69e2e; + } + + .lg\:hover\:border-yellow-700:hover { + border-color: #b7791f; + } + + .lg\:hover\:border-yellow-800:hover { + border-color: #975a16; + } + + .lg\:hover\:border-yellow-900:hover { + border-color: #744210; + } + + .lg\:hover\:border-green-100:hover { + border-color: #f0fff4; + } + + .lg\:hover\:border-green-200:hover { + border-color: #c6f6d5; + } + + .lg\:hover\:border-green-300:hover { + border-color: #9ae6b4; + } + + .lg\:hover\:border-green-400:hover { + border-color: #68d391; + } + + .lg\:hover\:border-green-500:hover { + border-color: #48bb78; + } + + .lg\:hover\:border-green-600:hover { + border-color: #38a169; + } + + .lg\:hover\:border-green-700:hover { + border-color: #2f855a; + } + + .lg\:hover\:border-green-800:hover { + border-color: #276749; + } + + .lg\:hover\:border-green-900:hover { + border-color: #22543d; + } + + .lg\:hover\:border-teal-100:hover { + border-color: #e6fffa; + } + + .lg\:hover\:border-teal-200:hover { + border-color: #b2f5ea; + } + + .lg\:hover\:border-teal-300:hover { + border-color: #81e6d9; + } + + .lg\:hover\:border-teal-400:hover { + border-color: #4fd1c5; + } + + .lg\:hover\:border-teal-500:hover { + border-color: #38b2ac; + } + + .lg\:hover\:border-teal-600:hover { + border-color: #319795; + } + + .lg\:hover\:border-teal-700:hover { + border-color: #2c7a7b; + } + + .lg\:hover\:border-teal-800:hover { + border-color: #285e61; + } + + .lg\:hover\:border-teal-900:hover { + border-color: #234e52; + } + + .lg\:hover\:border-blue-100:hover { + border-color: #ebf8ff; + } + + .lg\:hover\:border-blue-200:hover { + border-color: #bee3f8; + } + + .lg\:hover\:border-blue-300:hover { + border-color: #90cdf4; + } + + .lg\:hover\:border-blue-400:hover { + border-color: #63b3ed; + } + + .lg\:hover\:border-blue-500:hover { + border-color: #4299e1; + } + + .lg\:hover\:border-blue-600:hover { + border-color: #3182ce; + } + + .lg\:hover\:border-blue-700:hover { + border-color: #2b6cb0; + } + + .lg\:hover\:border-blue-800:hover { + border-color: #2c5282; + } + + .lg\:hover\:border-blue-900:hover { + border-color: #2a4365; + } + + .lg\:hover\:border-indigo-100:hover { + border-color: #ebf4ff; + } + + .lg\:hover\:border-indigo-200:hover { + border-color: #c3dafe; + } + + .lg\:hover\:border-indigo-300:hover { + border-color: #a3bffa; + } + + .lg\:hover\:border-indigo-400:hover { + border-color: #7f9cf5; + } + + .lg\:hover\:border-indigo-500:hover { + border-color: #667eea; + } + + .lg\:hover\:border-indigo-600:hover { + border-color: #5a67d8; + } + + .lg\:hover\:border-indigo-700:hover { + border-color: #4c51bf; + } + + .lg\:hover\:border-indigo-800:hover { + border-color: #434190; + } + + .lg\:hover\:border-indigo-900:hover { + border-color: #3c366b; + } + + .lg\:hover\:border-purple-100:hover { + border-color: #faf5ff; + } + + .lg\:hover\:border-purple-200:hover { + border-color: #e9d8fd; + } + + .lg\:hover\:border-purple-300:hover { + border-color: #d6bcfa; + } + + .lg\:hover\:border-purple-400:hover { + border-color: #b794f4; + } + + .lg\:hover\:border-purple-500:hover { + border-color: #9f7aea; + } + + .lg\:hover\:border-purple-600:hover { + border-color: #805ad5; + } + + .lg\:hover\:border-purple-700:hover { + border-color: #6b46c1; + } + + .lg\:hover\:border-purple-800:hover { + border-color: #553c9a; + } + + .lg\:hover\:border-purple-900:hover { + border-color: #44337a; + } + + .lg\:hover\:border-pink-100:hover { + border-color: #fff5f7; + } + + .lg\:hover\:border-pink-200:hover { + border-color: #fed7e2; + } + + .lg\:hover\:border-pink-300:hover { + border-color: #fbb6ce; + } + + .lg\:hover\:border-pink-400:hover { + border-color: #f687b3; + } + + .lg\:hover\:border-pink-500:hover { + border-color: #ed64a6; + } + + .lg\:hover\:border-pink-600:hover { + border-color: #d53f8c; + } + + .lg\:hover\:border-pink-700:hover { + border-color: #b83280; + } + + .lg\:hover\:border-pink-800:hover { + border-color: #97266d; + } + + .lg\:hover\:border-pink-900:hover { + border-color: #702459; + } + + .lg\:focus\:border-transparent:focus { + border-color: transparent; + } + + .lg\:focus\:border-current:focus { + border-color: currentColor; + } + + .lg\:focus\:border-black:focus { + border-color: #000; + } + + .lg\:focus\:border-white:focus { + border-color: #fff; + } + + .lg\:focus\:border-gray-100:focus { + border-color: #f7fafc; + } + + .lg\:focus\:border-gray-200:focus { + border-color: #edf2f7; + } + + .lg\:focus\:border-gray-300:focus { + border-color: #e2e8f0; + } + + .lg\:focus\:border-gray-400:focus { + border-color: #cbd5e0; + } + + .lg\:focus\:border-gray-500:focus { + border-color: #a0aec0; + } + + .lg\:focus\:border-gray-600:focus { + border-color: #718096; + } + + .lg\:focus\:border-gray-700:focus { + border-color: #4a5568; + } + + .lg\:focus\:border-gray-800:focus { + border-color: #2d3748; + } + + .lg\:focus\:border-gray-900:focus { + border-color: #1a202c; + } + + .lg\:focus\:border-red-100:focus { + border-color: #fff5f5; + } + + .lg\:focus\:border-red-200:focus { + border-color: #fed7d7; + } + + .lg\:focus\:border-red-300:focus { + border-color: #feb2b2; + } + + .lg\:focus\:border-red-400:focus { + border-color: #fc8181; + } + + .lg\:focus\:border-red-500:focus { + border-color: #f56565; + } + + .lg\:focus\:border-red-600:focus { + border-color: #e53e3e; + } + + .lg\:focus\:border-red-700:focus { + border-color: #c53030; + } + + .lg\:focus\:border-red-800:focus { + border-color: #9b2c2c; + } + + .lg\:focus\:border-red-900:focus { + border-color: #742a2a; + } + + .lg\:focus\:border-orange-100:focus { + border-color: #fffaf0; + } + + .lg\:focus\:border-orange-200:focus { + border-color: #feebc8; + } + + .lg\:focus\:border-orange-300:focus { + border-color: #fbd38d; + } + + .lg\:focus\:border-orange-400:focus { + border-color: #f6ad55; + } + + .lg\:focus\:border-orange-500:focus { + border-color: #ed8936; + } + + .lg\:focus\:border-orange-600:focus { + border-color: #dd6b20; + } + + .lg\:focus\:border-orange-700:focus { + border-color: #c05621; + } + + .lg\:focus\:border-orange-800:focus { + border-color: #9c4221; + } + + .lg\:focus\:border-orange-900:focus { + border-color: #7b341e; + } + + .lg\:focus\:border-yellow-100:focus { + border-color: #fffff0; + } + + .lg\:focus\:border-yellow-200:focus { + border-color: #fefcbf; + } + + .lg\:focus\:border-yellow-300:focus { + border-color: #faf089; + } + + .lg\:focus\:border-yellow-400:focus { + border-color: #f6e05e; + } + + .lg\:focus\:border-yellow-500:focus { + border-color: #ecc94b; + } + + .lg\:focus\:border-yellow-600:focus { + border-color: #d69e2e; + } + + .lg\:focus\:border-yellow-700:focus { + border-color: #b7791f; + } + + .lg\:focus\:border-yellow-800:focus { + border-color: #975a16; + } + + .lg\:focus\:border-yellow-900:focus { + border-color: #744210; + } + + .lg\:focus\:border-green-100:focus { + border-color: #f0fff4; + } + + .lg\:focus\:border-green-200:focus { + border-color: #c6f6d5; + } + + .lg\:focus\:border-green-300:focus { + border-color: #9ae6b4; + } + + .lg\:focus\:border-green-400:focus { + border-color: #68d391; + } + + .lg\:focus\:border-green-500:focus { + border-color: #48bb78; + } + + .lg\:focus\:border-green-600:focus { + border-color: #38a169; + } + + .lg\:focus\:border-green-700:focus { + border-color: #2f855a; + } + + .lg\:focus\:border-green-800:focus { + border-color: #276749; + } + + .lg\:focus\:border-green-900:focus { + border-color: #22543d; + } + + .lg\:focus\:border-teal-100:focus { + border-color: #e6fffa; + } + + .lg\:focus\:border-teal-200:focus { + border-color: #b2f5ea; + } + + .lg\:focus\:border-teal-300:focus { + border-color: #81e6d9; + } + + .lg\:focus\:border-teal-400:focus { + border-color: #4fd1c5; + } + + .lg\:focus\:border-teal-500:focus { + border-color: #38b2ac; + } + + .lg\:focus\:border-teal-600:focus { + border-color: #319795; + } + + .lg\:focus\:border-teal-700:focus { + border-color: #2c7a7b; + } + + .lg\:focus\:border-teal-800:focus { + border-color: #285e61; + } + + .lg\:focus\:border-teal-900:focus { + border-color: #234e52; + } + + .lg\:focus\:border-blue-100:focus { + border-color: #ebf8ff; + } + + .lg\:focus\:border-blue-200:focus { + border-color: #bee3f8; + } + + .lg\:focus\:border-blue-300:focus { + border-color: #90cdf4; + } + + .lg\:focus\:border-blue-400:focus { + border-color: #63b3ed; + } + + .lg\:focus\:border-blue-500:focus { + border-color: #4299e1; + } + + .lg\:focus\:border-blue-600:focus { + border-color: #3182ce; + } + + .lg\:focus\:border-blue-700:focus { + border-color: #2b6cb0; + } + + .lg\:focus\:border-blue-800:focus { + border-color: #2c5282; + } + + .lg\:focus\:border-blue-900:focus { + border-color: #2a4365; + } + + .lg\:focus\:border-indigo-100:focus { + border-color: #ebf4ff; + } + + .lg\:focus\:border-indigo-200:focus { + border-color: #c3dafe; + } + + .lg\:focus\:border-indigo-300:focus { + border-color: #a3bffa; + } + + .lg\:focus\:border-indigo-400:focus { + border-color: #7f9cf5; + } + + .lg\:focus\:border-indigo-500:focus { + border-color: #667eea; + } + + .lg\:focus\:border-indigo-600:focus { + border-color: #5a67d8; + } + + .lg\:focus\:border-indigo-700:focus { + border-color: #4c51bf; + } + + .lg\:focus\:border-indigo-800:focus { + border-color: #434190; + } + + .lg\:focus\:border-indigo-900:focus { + border-color: #3c366b; + } + + .lg\:focus\:border-purple-100:focus { + border-color: #faf5ff; + } + + .lg\:focus\:border-purple-200:focus { + border-color: #e9d8fd; + } + + .lg\:focus\:border-purple-300:focus { + border-color: #d6bcfa; + } + + .lg\:focus\:border-purple-400:focus { + border-color: #b794f4; + } + + .lg\:focus\:border-purple-500:focus { + border-color: #9f7aea; + } + + .lg\:focus\:border-purple-600:focus { + border-color: #805ad5; + } + + .lg\:focus\:border-purple-700:focus { + border-color: #6b46c1; + } + + .lg\:focus\:border-purple-800:focus { + border-color: #553c9a; + } + + .lg\:focus\:border-purple-900:focus { + border-color: #44337a; + } + + .lg\:focus\:border-pink-100:focus { + border-color: #fff5f7; + } + + .lg\:focus\:border-pink-200:focus { + border-color: #fed7e2; + } + + .lg\:focus\:border-pink-300:focus { + border-color: #fbb6ce; + } + + .lg\:focus\:border-pink-400:focus { + border-color: #f687b3; + } + + .lg\:focus\:border-pink-500:focus { + border-color: #ed64a6; + } + + .lg\:focus\:border-pink-600:focus { + border-color: #d53f8c; + } + + .lg\:focus\:border-pink-700:focus { + border-color: #b83280; + } + + .lg\:focus\:border-pink-800:focus { + border-color: #97266d; + } + + .lg\:focus\:border-pink-900:focus { + border-color: #702459; + } + + .lg\:rounded-none { + border-radius: 0; + } + + .lg\:rounded-sm { + border-radius: 0.125rem; + } + + .lg\:rounded { + border-radius: 0.25rem; + } + + .lg\:rounded-md { + border-radius: 0.375rem; + } + + .lg\:rounded-lg { + border-radius: 0.5rem; + } + + .lg\:rounded-full { + border-radius: 9999px; + } + + .lg\:rounded-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .lg\:rounded-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .lg\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .lg\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .lg\:rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; + } + + .lg\:rounded-r-sm { + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; + } + + .lg\:rounded-b-sm { + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .lg\:rounded-l-sm { + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .lg\:rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + } + + .lg\:rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + } + + .lg\:rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .lg\:rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .lg\:rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; + } + + .lg\:rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; + } + + .lg\:rounded-b-md { + border-bottom-right-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .lg\:rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .lg\:rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + .lg\:rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + } + + .lg\:rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .lg\:rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .lg\:rounded-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .lg\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .lg\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .lg\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .lg\:rounded-tl-none { + border-top-left-radius: 0; + } + + .lg\:rounded-tr-none { + border-top-right-radius: 0; + } + + .lg\:rounded-br-none { + border-bottom-right-radius: 0; + } + + .lg\:rounded-bl-none { + border-bottom-left-radius: 0; + } + + .lg\:rounded-tl-sm { + border-top-left-radius: 0.125rem; + } + + .lg\:rounded-tr-sm { + border-top-right-radius: 0.125rem; + } + + .lg\:rounded-br-sm { + border-bottom-right-radius: 0.125rem; + } + + .lg\:rounded-bl-sm { + border-bottom-left-radius: 0.125rem; + } + + .lg\:rounded-tl { + border-top-left-radius: 0.25rem; + } + + .lg\:rounded-tr { + border-top-right-radius: 0.25rem; + } + + .lg\:rounded-br { + border-bottom-right-radius: 0.25rem; + } + + .lg\:rounded-bl { + border-bottom-left-radius: 0.25rem; + } + + .lg\:rounded-tl-md { + border-top-left-radius: 0.375rem; + } + + .lg\:rounded-tr-md { + border-top-right-radius: 0.375rem; + } + + .lg\:rounded-br-md { + border-bottom-right-radius: 0.375rem; + } + + .lg\:rounded-bl-md { + border-bottom-left-radius: 0.375rem; + } + + .lg\:rounded-tl-lg { + border-top-left-radius: 0.5rem; + } + + .lg\:rounded-tr-lg { + border-top-right-radius: 0.5rem; + } + + .lg\:rounded-br-lg { + border-bottom-right-radius: 0.5rem; + } + + .lg\:rounded-bl-lg { + border-bottom-left-radius: 0.5rem; + } + + .lg\:rounded-tl-full { + border-top-left-radius: 9999px; + } + + .lg\:rounded-tr-full { + border-top-right-radius: 9999px; + } + + .lg\:rounded-br-full { + border-bottom-right-radius: 9999px; + } + + .lg\:rounded-bl-full { + border-bottom-left-radius: 9999px; + } + + .lg\:border-solid { + border-style: solid; + } + + .lg\:border-dashed { + border-style: dashed; + } + + .lg\:border-dotted { + border-style: dotted; + } + + .lg\:border-double { + border-style: double; + } + + .lg\:border-none { + border-style: none; + } + + .lg\:border-0 { + border-width: 0; + } + + .lg\:border-2 { + border-width: 2px; + } + + .lg\:border-4 { + border-width: 4px; + } + + .lg\:border-8 { + border-width: 8px; + } + + .lg\:border { + border-width: 1px; + } + + .lg\:border-t-0 { + border-top-width: 0; + } + + .lg\:border-r-0 { + border-right-width: 0; + } + + .lg\:border-b-0 { + border-bottom-width: 0; + } + + .lg\:border-l-0 { + border-left-width: 0; + } + + .lg\:border-t-2 { + border-top-width: 2px; + } + + .lg\:border-r-2 { + border-right-width: 2px; + } + + .lg\:border-b-2 { + border-bottom-width: 2px; + } + + .lg\:border-l-2 { + border-left-width: 2px; + } + + .lg\:border-t-4 { + border-top-width: 4px; + } + + .lg\:border-r-4 { + border-right-width: 4px; + } + + .lg\:border-b-4 { + border-bottom-width: 4px; + } + + .lg\:border-l-4 { + border-left-width: 4px; + } + + .lg\:border-t-8 { + border-top-width: 8px; + } + + .lg\:border-r-8 { + border-right-width: 8px; + } + + .lg\:border-b-8 { + border-bottom-width: 8px; + } + + .lg\:border-l-8 { + border-left-width: 8px; + } + + .lg\:border-t { + border-top-width: 1px; + } + + .lg\:border-r { + border-right-width: 1px; + } + + .lg\:border-b { + border-bottom-width: 1px; + } + + .lg\:border-l { + border-left-width: 1px; + } + + .lg\:box-border { + box-sizing: border-box; + } + + .lg\:box-content { + box-sizing: content-box; + } + + .lg\:cursor-auto { + cursor: auto; + } + + .lg\:cursor-default { + cursor: default; + } + + .lg\:cursor-pointer { + cursor: pointer; + } + + .lg\:cursor-wait { + cursor: wait; + } + + .lg\:cursor-text { + cursor: text; + } + + .lg\:cursor-move { + cursor: move; + } + + .lg\:cursor-not-allowed { + cursor: not-allowed; + } + + .lg\:block { + display: block; + } + + .lg\:inline-block { + display: inline-block; + } + + .lg\:inline { + display: inline; + } + + .lg\:flex { + display: flex; + } + + .lg\:inline-flex { + display: inline-flex; + } + + .lg\:table { + display: table; + } + + .lg\:table-caption { + display: table-caption; + } + + .lg\:table-cell { + display: table-cell; + } + + .lg\:table-column { + display: table-column; + } + + .lg\:table-column-group { + display: table-column-group; + } + + .lg\:table-footer-group { + display: table-footer-group; + } + + .lg\:table-header-group { + display: table-header-group; + } + + .lg\:table-row-group { + display: table-row-group; + } + + .lg\:table-row { + display: table-row; + } + + .lg\:flow-root { + display: flow-root; + } + + .lg\:grid { + display: grid; + } + + .lg\:inline-grid { + display: inline-grid; + } + + .lg\:hidden { + display: none; + } + + .lg\:flex-row { + flex-direction: row; + } + + .lg\:flex-row-reverse { + flex-direction: row-reverse; + } + + .lg\:flex-col { + flex-direction: column; + } + + .lg\:flex-col-reverse { + flex-direction: column-reverse; + } + + .lg\:flex-wrap { + flex-wrap: wrap; + } + + .lg\:flex-wrap-reverse { + flex-wrap: wrap-reverse; + } + + .lg\:flex-no-wrap { + flex-wrap: nowrap; + } + + .lg\:items-start { + align-items: flex-start; + } + + .lg\:items-end { + align-items: flex-end; + } + + .lg\:items-center { + align-items: center; + } + + .lg\:items-baseline { + align-items: baseline; + } + + .lg\:items-stretch { + align-items: stretch; + } + + .lg\:self-auto { + align-self: auto; + } + + .lg\:self-start { + align-self: flex-start; + } + + .lg\:self-end { + align-self: flex-end; + } + + .lg\:self-center { + align-self: center; + } + + .lg\:self-stretch { + align-self: stretch; + } + + .lg\:justify-start { + justify-content: flex-start; + } + + .lg\:justify-end { + justify-content: flex-end; + } + + .lg\:justify-center { + justify-content: center; + } + + .lg\:justify-between { + justify-content: space-between; + } + + .lg\:justify-around { + justify-content: space-around; + } + + .lg\:justify-evenly { + justify-content: space-evenly; + } + + .lg\:content-center { + align-content: center; + } + + .lg\:content-start { + align-content: flex-start; + } + + .lg\:content-end { + align-content: flex-end; + } + + .lg\:content-between { + align-content: space-between; + } + + .lg\:content-around { + align-content: space-around; + } + + .lg\:flex-1 { + flex: 1 1 0%; + } + + .lg\:flex-auto { + flex: 1 1 auto; + } + + .lg\:flex-initial { + flex: 0 1 auto; + } + + .lg\:flex-none { + flex: none; + } + + .lg\:flex-grow-0 { + flex-grow: 0; + } + + .lg\:flex-grow { + flex-grow: 1; + } + + .lg\:flex-shrink-0 { + flex-shrink: 0; + } + + .lg\:flex-shrink { + flex-shrink: 1; + } + + .lg\:order-1 { + order: 1; + } + + .lg\:order-2 { + order: 2; + } + + .lg\:order-3 { + order: 3; + } + + .lg\:order-4 { + order: 4; + } + + .lg\:order-5 { + order: 5; + } + + .lg\:order-6 { + order: 6; + } + + .lg\:order-7 { + order: 7; + } + + .lg\:order-8 { + order: 8; + } + + .lg\:order-9 { + order: 9; + } + + .lg\:order-10 { + order: 10; + } + + .lg\:order-11 { + order: 11; + } + + .lg\:order-12 { + order: 12; + } + + .lg\:order-first { + order: -9999; + } + + .lg\:order-last { + order: 9999; + } + + .lg\:order-none { + order: 0; + } + + .lg\:float-right { + float: right; + } + + .lg\:float-left { + float: left; + } + + .lg\:float-none { + float: none; + } + + .lg\:clearfix:after { + content: ""; + display: table; + clear: both; + } + + .lg\:clear-left { + clear: left; + } + + .lg\:clear-right { + clear: right; + } + + .lg\:clear-both { + clear: both; + } + + .lg\:clear-none { + clear: none; + } + + .lg\:font-sans { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + } + + .lg\:font-serif { + font-family: Georgia, Cambria, "Times New Roman", Times, serif; + } + + .lg\:font-mono { + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + } + + .lg\:font-hairline { + font-weight: 100; + } + + .lg\:font-thin { + font-weight: 200; + } + + .lg\:font-light { + font-weight: 300; + } + + .lg\:font-normal { + font-weight: 400; + } + + .lg\:font-medium { + font-weight: 500; + } + + .lg\:font-semibold { + font-weight: 600; + } + + .lg\:font-bold { + font-weight: 700; + } + + .lg\:font-extrabold { + font-weight: 800; + } + + .lg\:font-black { + font-weight: 900; + } + + .lg\:hover\:font-hairline:hover { + font-weight: 100; + } + + .lg\:hover\:font-thin:hover { + font-weight: 200; + } + + .lg\:hover\:font-light:hover { + font-weight: 300; + } + + .lg\:hover\:font-normal:hover { + font-weight: 400; + } + + .lg\:hover\:font-medium:hover { + font-weight: 500; + } + + .lg\:hover\:font-semibold:hover { + font-weight: 600; + } + + .lg\:hover\:font-bold:hover { + font-weight: 700; + } + + .lg\:hover\:font-extrabold:hover { + font-weight: 800; + } + + .lg\:hover\:font-black:hover { + font-weight: 900; + } + + .lg\:focus\:font-hairline:focus { + font-weight: 100; + } + + .lg\:focus\:font-thin:focus { + font-weight: 200; + } + + .lg\:focus\:font-light:focus { + font-weight: 300; + } + + .lg\:focus\:font-normal:focus { + font-weight: 400; + } + + .lg\:focus\:font-medium:focus { + font-weight: 500; + } + + .lg\:focus\:font-semibold:focus { + font-weight: 600; + } + + .lg\:focus\:font-bold:focus { + font-weight: 700; + } + + .lg\:focus\:font-extrabold:focus { + font-weight: 800; + } + + .lg\:focus\:font-black:focus { + font-weight: 900; + } + + .lg\:h-0 { + height: 0; + } + + .lg\:h-1 { + height: 0.25rem; + } + + .lg\:h-2 { + height: 0.5rem; + } + + .lg\:h-3 { + height: 0.75rem; + } + + .lg\:h-4 { + height: 1rem; + } + + .lg\:h-5 { + height: 1.25rem; + } + + .lg\:h-6 { + height: 1.5rem; + } + + .lg\:h-8 { + height: 2rem; + } + + .lg\:h-10 { + height: 2.5rem; + } + + .lg\:h-12 { + height: 3rem; + } + + .lg\:h-16 { + height: 4rem; + } + + .lg\:h-20 { + height: 5rem; + } + + .lg\:h-24 { + height: 6rem; + } + + .lg\:h-32 { + height: 8rem; + } + + .lg\:h-40 { + height: 10rem; + } + + .lg\:h-48 { + height: 12rem; + } + + .lg\:h-56 { + height: 14rem; + } + + .lg\:h-64 { + height: 16rem; + } + + .lg\:h-auto { + height: auto; + } + + .lg\:h-px { + height: 1px; + } + + .lg\:h-full { + height: 100%; + } + + .lg\:h-screen { + height: 100vh; + } + + .lg\:text-xs { + font-size: 0.75rem; + } + + .lg\:text-sm { + font-size: 0.875rem; + } + + .lg\:text-base { + font-size: 1rem; + } + + .lg\:text-lg { + font-size: 1.125rem; + } + + .lg\:text-xl { + font-size: 1.25rem; + } + + .lg\:text-2xl { + font-size: 1.5rem; + } + + .lg\:text-3xl { + font-size: 1.875rem; + } + + .lg\:text-4xl { + font-size: 2.25rem; + } + + .lg\:text-5xl { + font-size: 3rem; + } + + .lg\:text-6xl { + font-size: 4rem; + } + + .lg\:leading-3 { + line-height: .75rem; + } + + .lg\:leading-4 { + line-height: 1rem; + } + + .lg\:leading-5 { + line-height: 1.25rem; + } + + .lg\:leading-6 { + line-height: 1.5rem; + } + + .lg\:leading-7 { + line-height: 1.75rem; + } + + .lg\:leading-8 { + line-height: 2rem; + } + + .lg\:leading-9 { + line-height: 2.25rem; + } + + .lg\:leading-10 { + line-height: 2.5rem; + } + + .lg\:leading-none { + line-height: 1; + } + + .lg\:leading-tight { + line-height: 1.25; + } + + .lg\:leading-snug { + line-height: 1.375; + } + + .lg\:leading-normal { + line-height: 1.5; + } + + .lg\:leading-relaxed { + line-height: 1.625; + } + + .lg\:leading-loose { + line-height: 2; + } + + .lg\:list-inside { + list-style-position: inside; + } + + .lg\:list-outside { + list-style-position: outside; + } + + .lg\:list-none { + list-style-type: none; + } + + .lg\:list-disc { + list-style-type: disc; + } + + .lg\:list-decimal { + list-style-type: decimal; + } + + .lg\:m-0 { + margin: 0; + } + + .lg\:m-1 { + margin: 0.25rem; + } + + .lg\:m-2 { + margin: 0.5rem; + } + + .lg\:m-3 { + margin: 0.75rem; + } + + .lg\:m-4 { + margin: 1rem; + } + + .lg\:m-5 { + margin: 1.25rem; + } + + .lg\:m-6 { + margin: 1.5rem; + } + + .lg\:m-8 { + margin: 2rem; + } + + .lg\:m-10 { + margin: 2.5rem; + } + + .lg\:m-12 { + margin: 3rem; + } + + .lg\:m-16 { + margin: 4rem; + } + + .lg\:m-20 { + margin: 5rem; + } + + .lg\:m-24 { + margin: 6rem; + } + + .lg\:m-32 { + margin: 8rem; + } + + .lg\:m-40 { + margin: 10rem; + } + + .lg\:m-48 { + margin: 12rem; + } + + .lg\:m-56 { + margin: 14rem; + } + + .lg\:m-64 { + margin: 16rem; + } + + .lg\:m-auto { + margin: auto; + } + + .lg\:m-px { + margin: 1px; + } + + .lg\:-m-1 { + margin: -0.25rem; + } + + .lg\:-m-2 { + margin: -0.5rem; + } + + .lg\:-m-3 { + margin: -0.75rem; + } + + .lg\:-m-4 { + margin: -1rem; + } + + .lg\:-m-5 { + margin: -1.25rem; + } + + .lg\:-m-6 { + margin: -1.5rem; + } + + .lg\:-m-8 { + margin: -2rem; + } + + .lg\:-m-10 { + margin: -2.5rem; + } + + .lg\:-m-12 { + margin: -3rem; + } + + .lg\:-m-16 { + margin: -4rem; + } + + .lg\:-m-20 { + margin: -5rem; + } + + .lg\:-m-24 { + margin: -6rem; + } + + .lg\:-m-32 { + margin: -8rem; + } + + .lg\:-m-40 { + margin: -10rem; + } + + .lg\:-m-48 { + margin: -12rem; + } + + .lg\:-m-56 { + margin: -14rem; + } + + .lg\:-m-64 { + margin: -16rem; + } + + .lg\:-m-px { + margin: -1px; + } + + .lg\:my-0 { + margin-top: 0; + margin-bottom: 0; + } + + .lg\:mx-0 { + margin-left: 0; + margin-right: 0; + } + + .lg\:my-1 { + margin-top: 0.25rem; + margin-bottom: 0.25rem; + } + + .lg\:mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; + } + + .lg\:my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; + } + + .lg\:mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; + } + + .lg\:my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; + } + + .lg\:mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; + } + + .lg\:my-4 { + margin-top: 1rem; + margin-bottom: 1rem; + } + + .lg\:mx-4 { + margin-left: 1rem; + margin-right: 1rem; + } + + .lg\:my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; + } + + .lg\:mx-5 { + margin-left: 1.25rem; + margin-right: 1.25rem; + } + + .lg\:my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + } + + .lg\:mx-6 { + margin-left: 1.5rem; + margin-right: 1.5rem; + } + + .lg\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .lg\:mx-8 { + margin-left: 2rem; + margin-right: 2rem; + } + + .lg\:my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; + } + + .lg\:mx-10 { + margin-left: 2.5rem; + margin-right: 2.5rem; + } + + .lg\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .lg\:mx-12 { + margin-left: 3rem; + margin-right: 3rem; + } + + .lg\:my-16 { + margin-top: 4rem; + margin-bottom: 4rem; + } + + .lg\:mx-16 { + margin-left: 4rem; + margin-right: 4rem; + } + + .lg\:my-20 { + margin-top: 5rem; + margin-bottom: 5rem; + } + + .lg\:mx-20 { + margin-left: 5rem; + margin-right: 5rem; + } + + .lg\:my-24 { + margin-top: 6rem; + margin-bottom: 6rem; + } + + .lg\:mx-24 { + margin-left: 6rem; + margin-right: 6rem; + } + + .lg\:my-32 { + margin-top: 8rem; + margin-bottom: 8rem; + } + + .lg\:mx-32 { + margin-left: 8rem; + margin-right: 8rem; + } + + .lg\:my-40 { + margin-top: 10rem; + margin-bottom: 10rem; + } + + .lg\:mx-40 { + margin-left: 10rem; + margin-right: 10rem; + } + + .lg\:my-48 { + margin-top: 12rem; + margin-bottom: 12rem; + } + + .lg\:mx-48 { + margin-left: 12rem; + margin-right: 12rem; + } + + .lg\:my-56 { + margin-top: 14rem; + margin-bottom: 14rem; + } + + .lg\:mx-56 { + margin-left: 14rem; + margin-right: 14rem; + } + + .lg\:my-64 { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .lg\:mx-64 { + margin-left: 16rem; + margin-right: 16rem; + } + + .lg\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .lg\:mx-auto { + margin-left: auto; + margin-right: auto; + } + + .lg\:my-px { + margin-top: 1px; + margin-bottom: 1px; + } + + .lg\:mx-px { + margin-left: 1px; + margin-right: 1px; + } + + .lg\:-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; + } + + .lg\:-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; + } + + .lg\:-my-2 { + margin-top: -0.5rem; + margin-bottom: -0.5rem; + } + + .lg\:-mx-2 { + margin-left: -0.5rem; + margin-right: -0.5rem; + } + + .lg\:-my-3 { + margin-top: -0.75rem; + margin-bottom: -0.75rem; + } + + .lg\:-mx-3 { + margin-left: -0.75rem; + margin-right: -0.75rem; + } + + .lg\:-my-4 { + margin-top: -1rem; + margin-bottom: -1rem; + } + + .lg\:-mx-4 { + margin-left: -1rem; + margin-right: -1rem; + } + + .lg\:-my-5 { + margin-top: -1.25rem; + margin-bottom: -1.25rem; + } + + .lg\:-mx-5 { + margin-left: -1.25rem; + margin-right: -1.25rem; + } + + .lg\:-my-6 { + margin-top: -1.5rem; + margin-bottom: -1.5rem; + } + + .lg\:-mx-6 { + margin-left: -1.5rem; + margin-right: -1.5rem; + } + + .lg\:-my-8 { + margin-top: -2rem; + margin-bottom: -2rem; + } + + .lg\:-mx-8 { + margin-left: -2rem; + margin-right: -2rem; + } + + .lg\:-my-10 { + margin-top: -2.5rem; + margin-bottom: -2.5rem; + } + + .lg\:-mx-10 { + margin-left: -2.5rem; + margin-right: -2.5rem; + } + + .lg\:-my-12 { + margin-top: -3rem; + margin-bottom: -3rem; + } + + .lg\:-mx-12 { + margin-left: -3rem; + margin-right: -3rem; + } + + .lg\:-my-16 { + margin-top: -4rem; + margin-bottom: -4rem; + } + + .lg\:-mx-16 { + margin-left: -4rem; + margin-right: -4rem; + } + + .lg\:-my-20 { + margin-top: -5rem; + margin-bottom: -5rem; + } + + .lg\:-mx-20 { + margin-left: -5rem; + margin-right: -5rem; + } + + .lg\:-my-24 { + margin-top: -6rem; + margin-bottom: -6rem; + } + + .lg\:-mx-24 { + margin-left: -6rem; + margin-right: -6rem; + } + + .lg\:-my-32 { + margin-top: -8rem; + margin-bottom: -8rem; + } + + .lg\:-mx-32 { + margin-left: -8rem; + margin-right: -8rem; + } + + .lg\:-my-40 { + margin-top: -10rem; + margin-bottom: -10rem; + } + + .lg\:-mx-40 { + margin-left: -10rem; + margin-right: -10rem; + } + + .lg\:-my-48 { + margin-top: -12rem; + margin-bottom: -12rem; + } + + .lg\:-mx-48 { + margin-left: -12rem; + margin-right: -12rem; + } + + .lg\:-my-56 { + margin-top: -14rem; + margin-bottom: -14rem; + } + + .lg\:-mx-56 { + margin-left: -14rem; + margin-right: -14rem; + } + + .lg\:-my-64 { + margin-top: -16rem; + margin-bottom: -16rem; + } + + .lg\:-mx-64 { + margin-left: -16rem; + margin-right: -16rem; + } + + .lg\:-my-px { + margin-top: -1px; + margin-bottom: -1px; + } + + .lg\:-mx-px { + margin-left: -1px; + margin-right: -1px; + } + + .lg\:mt-0 { + margin-top: 0; + } + + .lg\:mr-0 { + margin-right: 0; + } + + .lg\:mb-0 { + margin-bottom: 0; + } + + .lg\:ml-0 { + margin-left: 0; + } + + .lg\:mt-1 { + margin-top: 0.25rem; + } + + .lg\:mr-1 { + margin-right: 0.25rem; + } + + .lg\:mb-1 { + margin-bottom: 0.25rem; + } + + .lg\:ml-1 { + margin-left: 0.25rem; + } + + .lg\:mt-2 { + margin-top: 0.5rem; + } + + .lg\:mr-2 { + margin-right: 0.5rem; + } + + .lg\:mb-2 { + margin-bottom: 0.5rem; + } + + .lg\:ml-2 { + margin-left: 0.5rem; + } + + .lg\:mt-3 { + margin-top: 0.75rem; + } + + .lg\:mr-3 { + margin-right: 0.75rem; + } + + .lg\:mb-3 { + margin-bottom: 0.75rem; + } + + .lg\:ml-3 { + margin-left: 0.75rem; + } + + .lg\:mt-4 { + margin-top: 1rem; + } + + .lg\:mr-4 { + margin-right: 1rem; + } + + .lg\:mb-4 { + margin-bottom: 1rem; + } + + .lg\:ml-4 { + margin-left: 1rem; + } + + .lg\:mt-5 { + margin-top: 1.25rem; + } + + .lg\:mr-5 { + margin-right: 1.25rem; + } + + .lg\:mb-5 { + margin-bottom: 1.25rem; + } + + .lg\:ml-5 { + margin-left: 1.25rem; + } + + .lg\:mt-6 { + margin-top: 1.5rem; + } + + .lg\:mr-6 { + margin-right: 1.5rem; + } + + .lg\:mb-6 { + margin-bottom: 1.5rem; + } + + .lg\:ml-6 { + margin-left: 1.5rem; + } + + .lg\:mt-8 { + margin-top: 2rem; + } + + .lg\:mr-8 { + margin-right: 2rem; + } + + .lg\:mb-8 { + margin-bottom: 2rem; + } + + .lg\:ml-8 { + margin-left: 2rem; + } + + .lg\:mt-10 { + margin-top: 2.5rem; + } + + .lg\:mr-10 { + margin-right: 2.5rem; + } + + .lg\:mb-10 { + margin-bottom: 2.5rem; + } + + .lg\:ml-10 { + margin-left: 2.5rem; + } + + .lg\:mt-12 { + margin-top: 3rem; + } + + .lg\:mr-12 { + margin-right: 3rem; + } + + .lg\:mb-12 { + margin-bottom: 3rem; + } + + .lg\:ml-12 { + margin-left: 3rem; + } + + .lg\:mt-16 { + margin-top: 4rem; + } + + .lg\:mr-16 { + margin-right: 4rem; + } + + .lg\:mb-16 { + margin-bottom: 4rem; + } + + .lg\:ml-16 { + margin-left: 4rem; + } + + .lg\:mt-20 { + margin-top: 5rem; + } + + .lg\:mr-20 { + margin-right: 5rem; + } + + .lg\:mb-20 { + margin-bottom: 5rem; + } + + .lg\:ml-20 { + margin-left: 5rem; + } + + .lg\:mt-24 { + margin-top: 6rem; + } + + .lg\:mr-24 { + margin-right: 6rem; + } + + .lg\:mb-24 { + margin-bottom: 6rem; + } + + .lg\:ml-24 { + margin-left: 6rem; + } + + .lg\:mt-32 { + margin-top: 8rem; + } + + .lg\:mr-32 { + margin-right: 8rem; + } + + .lg\:mb-32 { + margin-bottom: 8rem; + } + + .lg\:ml-32 { + margin-left: 8rem; + } + + .lg\:mt-40 { + margin-top: 10rem; + } + + .lg\:mr-40 { + margin-right: 10rem; + } + + .lg\:mb-40 { + margin-bottom: 10rem; + } + + .lg\:ml-40 { + margin-left: 10rem; + } + + .lg\:mt-48 { + margin-top: 12rem; + } + + .lg\:mr-48 { + margin-right: 12rem; + } + + .lg\:mb-48 { + margin-bottom: 12rem; + } + + .lg\:ml-48 { + margin-left: 12rem; + } + + .lg\:mt-56 { + margin-top: 14rem; + } + + .lg\:mr-56 { + margin-right: 14rem; + } + + .lg\:mb-56 { + margin-bottom: 14rem; + } + + .lg\:ml-56 { + margin-left: 14rem; + } + + .lg\:mt-64 { + margin-top: 16rem; + } + + .lg\:mr-64 { + margin-right: 16rem; + } + + .lg\:mb-64 { + margin-bottom: 16rem; + } + + .lg\:ml-64 { + margin-left: 16rem; + } + + .lg\:mt-auto { + margin-top: auto; + } + + .lg\:mr-auto { + margin-right: auto; + } + + .lg\:mb-auto { + margin-bottom: auto; + } + + .lg\:ml-auto { + margin-left: auto; + } + + .lg\:mt-px { + margin-top: 1px; + } + + .lg\:mr-px { + margin-right: 1px; + } + + .lg\:mb-px { + margin-bottom: 1px; + } + + .lg\:ml-px { + margin-left: 1px; + } + + .lg\:-mt-1 { + margin-top: -0.25rem; + } + + .lg\:-mr-1 { + margin-right: -0.25rem; + } + + .lg\:-mb-1 { + margin-bottom: -0.25rem; + } + + .lg\:-ml-1 { + margin-left: -0.25rem; + } + + .lg\:-mt-2 { + margin-top: -0.5rem; + } + + .lg\:-mr-2 { + margin-right: -0.5rem; + } + + .lg\:-mb-2 { + margin-bottom: -0.5rem; + } + + .lg\:-ml-2 { + margin-left: -0.5rem; + } + + .lg\:-mt-3 { + margin-top: -0.75rem; + } + + .lg\:-mr-3 { + margin-right: -0.75rem; + } + + .lg\:-mb-3 { + margin-bottom: -0.75rem; + } + + .lg\:-ml-3 { + margin-left: -0.75rem; + } + + .lg\:-mt-4 { + margin-top: -1rem; + } + + .lg\:-mr-4 { + margin-right: -1rem; + } + + .lg\:-mb-4 { + margin-bottom: -1rem; + } + + .lg\:-ml-4 { + margin-left: -1rem; + } + + .lg\:-mt-5 { + margin-top: -1.25rem; + } + + .lg\:-mr-5 { + margin-right: -1.25rem; + } + + .lg\:-mb-5 { + margin-bottom: -1.25rem; + } + + .lg\:-ml-5 { + margin-left: -1.25rem; + } + + .lg\:-mt-6 { + margin-top: -1.5rem; + } + + .lg\:-mr-6 { + margin-right: -1.5rem; + } + + .lg\:-mb-6 { + margin-bottom: -1.5rem; + } + + .lg\:-ml-6 { + margin-left: -1.5rem; + } + + .lg\:-mt-8 { + margin-top: -2rem; + } + + .lg\:-mr-8 { + margin-right: -2rem; + } + + .lg\:-mb-8 { + margin-bottom: -2rem; + } + + .lg\:-ml-8 { + margin-left: -2rem; + } + + .lg\:-mt-10 { + margin-top: -2.5rem; + } + + .lg\:-mr-10 { + margin-right: -2.5rem; + } + + .lg\:-mb-10 { + margin-bottom: -2.5rem; + } + + .lg\:-ml-10 { + margin-left: -2.5rem; + } + + .lg\:-mt-12 { + margin-top: -3rem; + } + + .lg\:-mr-12 { + margin-right: -3rem; + } + + .lg\:-mb-12 { + margin-bottom: -3rem; + } + + .lg\:-ml-12 { + margin-left: -3rem; + } + + .lg\:-mt-16 { + margin-top: -4rem; + } + + .lg\:-mr-16 { + margin-right: -4rem; + } + + .lg\:-mb-16 { + margin-bottom: -4rem; + } + + .lg\:-ml-16 { + margin-left: -4rem; + } + + .lg\:-mt-20 { + margin-top: -5rem; + } + + .lg\:-mr-20 { + margin-right: -5rem; + } + + .lg\:-mb-20 { + margin-bottom: -5rem; + } + + .lg\:-ml-20 { + margin-left: -5rem; + } + + .lg\:-mt-24 { + margin-top: -6rem; + } + + .lg\:-mr-24 { + margin-right: -6rem; + } + + .lg\:-mb-24 { + margin-bottom: -6rem; + } + + .lg\:-ml-24 { + margin-left: -6rem; + } + + .lg\:-mt-32 { + margin-top: -8rem; + } + + .lg\:-mr-32 { + margin-right: -8rem; + } + + .lg\:-mb-32 { + margin-bottom: -8rem; + } + + .lg\:-ml-32 { + margin-left: -8rem; + } + + .lg\:-mt-40 { + margin-top: -10rem; + } + + .lg\:-mr-40 { + margin-right: -10rem; + } + + .lg\:-mb-40 { + margin-bottom: -10rem; + } + + .lg\:-ml-40 { + margin-left: -10rem; + } + + .lg\:-mt-48 { + margin-top: -12rem; + } + + .lg\:-mr-48 { + margin-right: -12rem; + } + + .lg\:-mb-48 { + margin-bottom: -12rem; + } + + .lg\:-ml-48 { + margin-left: -12rem; + } + + .lg\:-mt-56 { + margin-top: -14rem; + } + + .lg\:-mr-56 { + margin-right: -14rem; + } + + .lg\:-mb-56 { + margin-bottom: -14rem; + } + + .lg\:-ml-56 { + margin-left: -14rem; + } + + .lg\:-mt-64 { + margin-top: -16rem; + } + + .lg\:-mr-64 { + margin-right: -16rem; + } + + .lg\:-mb-64 { + margin-bottom: -16rem; + } + + .lg\:-ml-64 { + margin-left: -16rem; + } + + .lg\:-mt-px { + margin-top: -1px; + } + + .lg\:-mr-px { + margin-right: -1px; + } + + .lg\:-mb-px { + margin-bottom: -1px; + } + + .lg\:-ml-px { + margin-left: -1px; + } + + .lg\:max-h-full { + max-height: 100%; + } + + .lg\:max-h-screen { + max-height: 100vh; + } + + .lg\:max-w-none { + max-width: none; + } + + .lg\:max-w-xs { + max-width: 20rem; + } + + .lg\:max-w-sm { + max-width: 24rem; + } + + .lg\:max-w-md { + max-width: 28rem; + } + + .lg\:max-w-lg { + max-width: 32rem; + } + + .lg\:max-w-xl { + max-width: 36rem; + } + + .lg\:max-w-2xl { + max-width: 42rem; + } + + .lg\:max-w-3xl { + max-width: 48rem; + } + + .lg\:max-w-4xl { + max-width: 56rem; + } + + .lg\:max-w-5xl { + max-width: 64rem; + } + + .lg\:max-w-6xl { + max-width: 72rem; + } + + .lg\:max-w-full { + max-width: 100%; + } + + .lg\:max-w-screen-sm { + max-width: 640px; + } + + .lg\:max-w-screen-md { + max-width: 768px; + } + + .lg\:max-w-screen-lg { + max-width: 1024px; + } + + .lg\:max-w-screen-xl { + max-width: 1280px; + } + + .lg\:min-h-0 { + min-height: 0; + } + + .lg\:min-h-full { + min-height: 100%; + } + + .lg\:min-h-screen { + min-height: 100vh; + } + + .lg\:min-w-0 { + min-width: 0; + } + + .lg\:min-w-full { + min-width: 100%; + } + + .lg\:object-contain { + object-fit: contain; + } + + .lg\:object-cover { + object-fit: cover; + } + + .lg\:object-fill { + object-fit: fill; + } + + .lg\:object-none { + object-fit: none; + } + + .lg\:object-scale-down { + object-fit: scale-down; + } + + .lg\:object-bottom { + object-position: bottom; + } + + .lg\:object-center { + object-position: center; + } + + .lg\:object-left { + object-position: left; + } + + .lg\:object-left-bottom { + object-position: left bottom; + } + + .lg\:object-left-top { + object-position: left top; + } + + .lg\:object-right { + object-position: right; + } + + .lg\:object-right-bottom { + object-position: right bottom; + } + + .lg\:object-right-top { + object-position: right top; + } + + .lg\:object-top { + object-position: top; + } + + .lg\:opacity-0 { + opacity: 0; + } + + .lg\:opacity-25 { + opacity: 0.25; + } + + .lg\:opacity-50 { + opacity: 0.5; + } + + .lg\:opacity-75 { + opacity: 0.75; + } + + .lg\:opacity-100 { + opacity: 1; + } + + .lg\:hover\:opacity-0:hover { + opacity: 0; + } + + .lg\:hover\:opacity-25:hover { + opacity: 0.25; + } + + .lg\:hover\:opacity-50:hover { + opacity: 0.5; + } + + .lg\:hover\:opacity-75:hover { + opacity: 0.75; + } + + .lg\:hover\:opacity-100:hover { + opacity: 1; + } + + .lg\:focus\:opacity-0:focus { + opacity: 0; + } + + .lg\:focus\:opacity-25:focus { + opacity: 0.25; + } + + .lg\:focus\:opacity-50:focus { + opacity: 0.5; + } + + .lg\:focus\:opacity-75:focus { + opacity: 0.75; + } + + .lg\:focus\:opacity-100:focus { + opacity: 1; + } + + .lg\:outline-none { + outline: 0; + } + + .lg\:focus\:outline-none:focus { + outline: 0; + } + + .lg\:overflow-auto { + overflow: auto; + } + + .lg\:overflow-hidden { + overflow: hidden; + } + + .lg\:overflow-visible { + overflow: visible; + } + + .lg\:overflow-scroll { + overflow: scroll; + } + + .lg\:overflow-x-auto { + overflow-x: auto; + } + + .lg\:overflow-y-auto { + overflow-y: auto; + } + + .lg\:overflow-x-hidden { + overflow-x: hidden; + } + + .lg\:overflow-y-hidden { + overflow-y: hidden; + } + + .lg\:overflow-x-visible { + overflow-x: visible; + } + + .lg\:overflow-y-visible { + overflow-y: visible; + } + + .lg\:overflow-x-scroll { + overflow-x: scroll; + } + + .lg\:overflow-y-scroll { + overflow-y: scroll; + } + + .lg\:scrolling-touch { + -webkit-overflow-scrolling: touch; + } + + .lg\:scrolling-auto { + -webkit-overflow-scrolling: auto; + } + + .lg\:p-0 { + padding: 0; + } + + .lg\:p-1 { + padding: 0.25rem; + } + + .lg\:p-2 { + padding: 0.5rem; + } + + .lg\:p-3 { + padding: 0.75rem; + } + + .lg\:p-4 { + padding: 1rem; + } + + .lg\:p-5 { + padding: 1.25rem; + } + + .lg\:p-6 { + padding: 1.5rem; + } + + .lg\:p-8 { + padding: 2rem; + } + + .lg\:p-10 { + padding: 2.5rem; + } + + .lg\:p-12 { + padding: 3rem; + } + + .lg\:p-16 { + padding: 4rem; + } + + .lg\:p-20 { + padding: 5rem; + } + + .lg\:p-24 { + padding: 6rem; + } + + .lg\:p-32 { + padding: 8rem; + } + + .lg\:p-40 { + padding: 10rem; + } + + .lg\:p-48 { + padding: 12rem; + } + + .lg\:p-56 { + padding: 14rem; + } + + .lg\:p-64 { + padding: 16rem; + } + + .lg\:p-px { + padding: 1px; + } + + .lg\:py-0 { + padding-top: 0; + padding-bottom: 0; + } + + .lg\:px-0 { + padding-left: 0; + padding-right: 0; + } + + .lg\:py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .lg\:px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; + } + + .lg\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .lg\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .lg\:py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + } + + .lg\:px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; + } + + .lg\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .lg\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .lg\:py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; + } + + .lg\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .lg\:py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; + } + + .lg\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .lg\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .lg\:py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; + } + + .lg\:px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; + } + + .lg\:py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + + .lg\:px-12 { + padding-left: 3rem; + padding-right: 3rem; + } + + .lg\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .lg\:px-16 { + padding-left: 4rem; + padding-right: 4rem; + } + + .lg\:py-20 { + padding-top: 5rem; + padding-bottom: 5rem; + } + + .lg\:px-20 { + padding-left: 5rem; + padding-right: 5rem; + } + + .lg\:py-24 { + padding-top: 6rem; + padding-bottom: 6rem; + } + + .lg\:px-24 { + padding-left: 6rem; + padding-right: 6rem; + } + + .lg\:py-32 { + padding-top: 8rem; + padding-bottom: 8rem; + } + + .lg\:px-32 { + padding-left: 8rem; + padding-right: 8rem; + } + + .lg\:py-40 { + padding-top: 10rem; + padding-bottom: 10rem; + } + + .lg\:px-40 { + padding-left: 10rem; + padding-right: 10rem; + } + + .lg\:py-48 { + padding-top: 12rem; + padding-bottom: 12rem; + } + + .lg\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .lg\:py-56 { + padding-top: 14rem; + padding-bottom: 14rem; + } + + .lg\:px-56 { + padding-left: 14rem; + padding-right: 14rem; + } + + .lg\:py-64 { + padding-top: 16rem; + padding-bottom: 16rem; + } + + .lg\:px-64 { + padding-left: 16rem; + padding-right: 16rem; + } + + .lg\:py-px { + padding-top: 1px; + padding-bottom: 1px; + } + + .lg\:px-px { + padding-left: 1px; + padding-right: 1px; + } + + .lg\:pt-0 { + padding-top: 0; + } + + .lg\:pr-0 { + padding-right: 0; + } + + .lg\:pb-0 { + padding-bottom: 0; + } + + .lg\:pl-0 { + padding-left: 0; + } + + .lg\:pt-1 { + padding-top: 0.25rem; + } + + .lg\:pr-1 { + padding-right: 0.25rem; + } + + .lg\:pb-1 { + padding-bottom: 0.25rem; + } + + .lg\:pl-1 { + padding-left: 0.25rem; + } + + .lg\:pt-2 { + padding-top: 0.5rem; + } + + .lg\:pr-2 { + padding-right: 0.5rem; + } + + .lg\:pb-2 { + padding-bottom: 0.5rem; + } + + .lg\:pl-2 { + padding-left: 0.5rem; + } + + .lg\:pt-3 { + padding-top: 0.75rem; + } + + .lg\:pr-3 { + padding-right: 0.75rem; + } + + .lg\:pb-3 { + padding-bottom: 0.75rem; + } + + .lg\:pl-3 { + padding-left: 0.75rem; + } + + .lg\:pt-4 { + padding-top: 1rem; + } + + .lg\:pr-4 { + padding-right: 1rem; + } + + .lg\:pb-4 { + padding-bottom: 1rem; + } + + .lg\:pl-4 { + padding-left: 1rem; + } + + .lg\:pt-5 { + padding-top: 1.25rem; + } + + .lg\:pr-5 { + padding-right: 1.25rem; + } + + .lg\:pb-5 { + padding-bottom: 1.25rem; + } + + .lg\:pl-5 { + padding-left: 1.25rem; + } + + .lg\:pt-6 { + padding-top: 1.5rem; + } + + .lg\:pr-6 { + padding-right: 1.5rem; + } + + .lg\:pb-6 { + padding-bottom: 1.5rem; + } + + .lg\:pl-6 { + padding-left: 1.5rem; + } + + .lg\:pt-8 { + padding-top: 2rem; + } + + .lg\:pr-8 { + padding-right: 2rem; + } + + .lg\:pb-8 { + padding-bottom: 2rem; + } + + .lg\:pl-8 { + padding-left: 2rem; + } + + .lg\:pt-10 { + padding-top: 2.5rem; + } + + .lg\:pr-10 { + padding-right: 2.5rem; + } + + .lg\:pb-10 { + padding-bottom: 2.5rem; + } + + .lg\:pl-10 { + padding-left: 2.5rem; + } + + .lg\:pt-12 { + padding-top: 3rem; + } + + .lg\:pr-12 { + padding-right: 3rem; + } + + .lg\:pb-12 { + padding-bottom: 3rem; + } + + .lg\:pl-12 { + padding-left: 3rem; + } + + .lg\:pt-16 { + padding-top: 4rem; + } + + .lg\:pr-16 { + padding-right: 4rem; + } + + .lg\:pb-16 { + padding-bottom: 4rem; + } + + .lg\:pl-16 { + padding-left: 4rem; + } + + .lg\:pt-20 { + padding-top: 5rem; + } + + .lg\:pr-20 { + padding-right: 5rem; + } + + .lg\:pb-20 { + padding-bottom: 5rem; + } + + .lg\:pl-20 { + padding-left: 5rem; + } + + .lg\:pt-24 { + padding-top: 6rem; + } + + .lg\:pr-24 { + padding-right: 6rem; + } + + .lg\:pb-24 { + padding-bottom: 6rem; + } + + .lg\:pl-24 { + padding-left: 6rem; + } + + .lg\:pt-32 { + padding-top: 8rem; + } + + .lg\:pr-32 { + padding-right: 8rem; + } + + .lg\:pb-32 { + padding-bottom: 8rem; + } + + .lg\:pl-32 { + padding-left: 8rem; + } + + .lg\:pt-40 { + padding-top: 10rem; + } + + .lg\:pr-40 { + padding-right: 10rem; + } + + .lg\:pb-40 { + padding-bottom: 10rem; + } + + .lg\:pl-40 { + padding-left: 10rem; + } + + .lg\:pt-48 { + padding-top: 12rem; + } + + .lg\:pr-48 { + padding-right: 12rem; + } + + .lg\:pb-48 { + padding-bottom: 12rem; + } + + .lg\:pl-48 { + padding-left: 12rem; + } + + .lg\:pt-56 { + padding-top: 14rem; + } + + .lg\:pr-56 { + padding-right: 14rem; + } + + .lg\:pb-56 { + padding-bottom: 14rem; + } + + .lg\:pl-56 { + padding-left: 14rem; + } + + .lg\:pt-64 { + padding-top: 16rem; + } + + .lg\:pr-64 { + padding-right: 16rem; + } + + .lg\:pb-64 { + padding-bottom: 16rem; + } + + .lg\:pl-64 { + padding-left: 16rem; + } + + .lg\:pt-px { + padding-top: 1px; + } + + .lg\:pr-px { + padding-right: 1px; + } + + .lg\:pb-px { + padding-bottom: 1px; + } + + .lg\:pl-px { + padding-left: 1px; + } + + .lg\:placeholder-transparent::placeholder { + color: transparent; + } + + .lg\:placeholder-current::placeholder { + color: currentColor; + } + + .lg\:placeholder-black::placeholder { + color: #000; + } + + .lg\:placeholder-white::placeholder { + color: #fff; + } + + .lg\:placeholder-gray-100::placeholder { + color: #f7fafc; + } + + .lg\:placeholder-gray-200::placeholder { + color: #edf2f7; + } + + .lg\:placeholder-gray-300::placeholder { + color: #e2e8f0; + } + + .lg\:placeholder-gray-400::placeholder { + color: #cbd5e0; + } + + .lg\:placeholder-gray-500::placeholder { + color: #a0aec0; + } + + .lg\:placeholder-gray-600::placeholder { + color: #718096; + } + + .lg\:placeholder-gray-700::placeholder { + color: #4a5568; + } + + .lg\:placeholder-gray-800::placeholder { + color: #2d3748; + } + + .lg\:placeholder-gray-900::placeholder { + color: #1a202c; + } + + .lg\:placeholder-red-100::placeholder { + color: #fff5f5; + } + + .lg\:placeholder-red-200::placeholder { + color: #fed7d7; + } + + .lg\:placeholder-red-300::placeholder { + color: #feb2b2; + } + + .lg\:placeholder-red-400::placeholder { + color: #fc8181; + } + + .lg\:placeholder-red-500::placeholder { + color: #f56565; + } + + .lg\:placeholder-red-600::placeholder { + color: #e53e3e; + } + + .lg\:placeholder-red-700::placeholder { + color: #c53030; + } + + .lg\:placeholder-red-800::placeholder { + color: #9b2c2c; + } + + .lg\:placeholder-red-900::placeholder { + color: #742a2a; + } + + .lg\:placeholder-orange-100::placeholder { + color: #fffaf0; + } + + .lg\:placeholder-orange-200::placeholder { + color: #feebc8; + } + + .lg\:placeholder-orange-300::placeholder { + color: #fbd38d; + } + + .lg\:placeholder-orange-400::placeholder { + color: #f6ad55; + } + + .lg\:placeholder-orange-500::placeholder { + color: #ed8936; + } + + .lg\:placeholder-orange-600::placeholder { + color: #dd6b20; + } + + .lg\:placeholder-orange-700::placeholder { + color: #c05621; + } + + .lg\:placeholder-orange-800::placeholder { + color: #9c4221; + } + + .lg\:placeholder-orange-900::placeholder { + color: #7b341e; + } + + .lg\:placeholder-yellow-100::placeholder { + color: #fffff0; + } + + .lg\:placeholder-yellow-200::placeholder { + color: #fefcbf; + } + + .lg\:placeholder-yellow-300::placeholder { + color: #faf089; + } + + .lg\:placeholder-yellow-400::placeholder { + color: #f6e05e; + } + + .lg\:placeholder-yellow-500::placeholder { + color: #ecc94b; + } + + .lg\:placeholder-yellow-600::placeholder { + color: #d69e2e; + } + + .lg\:placeholder-yellow-700::placeholder { + color: #b7791f; + } + + .lg\:placeholder-yellow-800::placeholder { + color: #975a16; + } + + .lg\:placeholder-yellow-900::placeholder { + color: #744210; + } + + .lg\:placeholder-green-100::placeholder { + color: #f0fff4; + } + + .lg\:placeholder-green-200::placeholder { + color: #c6f6d5; + } + + .lg\:placeholder-green-300::placeholder { + color: #9ae6b4; + } + + .lg\:placeholder-green-400::placeholder { + color: #68d391; + } + + .lg\:placeholder-green-500::placeholder { + color: #48bb78; + } + + .lg\:placeholder-green-600::placeholder { + color: #38a169; + } + + .lg\:placeholder-green-700::placeholder { + color: #2f855a; + } + + .lg\:placeholder-green-800::placeholder { + color: #276749; + } + + .lg\:placeholder-green-900::placeholder { + color: #22543d; + } + + .lg\:placeholder-teal-100::placeholder { + color: #e6fffa; + } + + .lg\:placeholder-teal-200::placeholder { + color: #b2f5ea; + } + + .lg\:placeholder-teal-300::placeholder { + color: #81e6d9; + } + + .lg\:placeholder-teal-400::placeholder { + color: #4fd1c5; + } + + .lg\:placeholder-teal-500::placeholder { + color: #38b2ac; + } + + .lg\:placeholder-teal-600::placeholder { + color: #319795; + } + + .lg\:placeholder-teal-700::placeholder { + color: #2c7a7b; + } + + .lg\:placeholder-teal-800::placeholder { + color: #285e61; + } + + .lg\:placeholder-teal-900::placeholder { + color: #234e52; + } + + .lg\:placeholder-blue-100::placeholder { + color: #ebf8ff; + } + + .lg\:placeholder-blue-200::placeholder { + color: #bee3f8; + } + + .lg\:placeholder-blue-300::placeholder { + color: #90cdf4; + } + + .lg\:placeholder-blue-400::placeholder { + color: #63b3ed; + } + + .lg\:placeholder-blue-500::placeholder { + color: #4299e1; + } + + .lg\:placeholder-blue-600::placeholder { + color: #3182ce; + } + + .lg\:placeholder-blue-700::placeholder { + color: #2b6cb0; + } + + .lg\:placeholder-blue-800::placeholder { + color: #2c5282; + } + + .lg\:placeholder-blue-900::placeholder { + color: #2a4365; + } + + .lg\:placeholder-indigo-100::placeholder { + color: #ebf4ff; + } + + .lg\:placeholder-indigo-200::placeholder { + color: #c3dafe; + } + + .lg\:placeholder-indigo-300::placeholder { + color: #a3bffa; + } + + .lg\:placeholder-indigo-400::placeholder { + color: #7f9cf5; + } + + .lg\:placeholder-indigo-500::placeholder { + color: #667eea; + } + + .lg\:placeholder-indigo-600::placeholder { + color: #5a67d8; + } + + .lg\:placeholder-indigo-700::placeholder { + color: #4c51bf; + } + + .lg\:placeholder-indigo-800::placeholder { + color: #434190; + } + + .lg\:placeholder-indigo-900::placeholder { + color: #3c366b; + } + + .lg\:placeholder-purple-100::placeholder { + color: #faf5ff; + } + + .lg\:placeholder-purple-200::placeholder { + color: #e9d8fd; + } + + .lg\:placeholder-purple-300::placeholder { + color: #d6bcfa; + } + + .lg\:placeholder-purple-400::placeholder { + color: #b794f4; + } + + .lg\:placeholder-purple-500::placeholder { + color: #9f7aea; + } + + .lg\:placeholder-purple-600::placeholder { + color: #805ad5; + } + + .lg\:placeholder-purple-700::placeholder { + color: #6b46c1; + } + + .lg\:placeholder-purple-800::placeholder { + color: #553c9a; + } + + .lg\:placeholder-purple-900::placeholder { + color: #44337a; + } + + .lg\:placeholder-pink-100::placeholder { + color: #fff5f7; + } + + .lg\:placeholder-pink-200::placeholder { + color: #fed7e2; + } + + .lg\:placeholder-pink-300::placeholder { + color: #fbb6ce; + } + + .lg\:placeholder-pink-400::placeholder { + color: #f687b3; + } + + .lg\:placeholder-pink-500::placeholder { + color: #ed64a6; + } + + .lg\:placeholder-pink-600::placeholder { + color: #d53f8c; + } + + .lg\:placeholder-pink-700::placeholder { + color: #b83280; + } + + .lg\:placeholder-pink-800::placeholder { + color: #97266d; + } + + .lg\:placeholder-pink-900::placeholder { + color: #702459; + } + + .lg\:focus\:placeholder-transparent:focus::placeholder { + color: transparent; + } + + .lg\:focus\:placeholder-current:focus::placeholder { + color: currentColor; + } + + .lg\:focus\:placeholder-black:focus::placeholder { + color: #000; + } + + .lg\:focus\:placeholder-white:focus::placeholder { + color: #fff; + } + + .lg\:focus\:placeholder-gray-100:focus::placeholder { + color: #f7fafc; + } + + .lg\:focus\:placeholder-gray-200:focus::placeholder { + color: #edf2f7; + } + + .lg\:focus\:placeholder-gray-300:focus::placeholder { + color: #e2e8f0; + } + + .lg\:focus\:placeholder-gray-400:focus::placeholder { + color: #cbd5e0; + } + + .lg\:focus\:placeholder-gray-500:focus::placeholder { + color: #a0aec0; + } + + .lg\:focus\:placeholder-gray-600:focus::placeholder { + color: #718096; + } + + .lg\:focus\:placeholder-gray-700:focus::placeholder { + color: #4a5568; + } + + .lg\:focus\:placeholder-gray-800:focus::placeholder { + color: #2d3748; + } + + .lg\:focus\:placeholder-gray-900:focus::placeholder { + color: #1a202c; + } + + .lg\:focus\:placeholder-red-100:focus::placeholder { + color: #fff5f5; + } + + .lg\:focus\:placeholder-red-200:focus::placeholder { + color: #fed7d7; + } + + .lg\:focus\:placeholder-red-300:focus::placeholder { + color: #feb2b2; + } + + .lg\:focus\:placeholder-red-400:focus::placeholder { + color: #fc8181; + } + + .lg\:focus\:placeholder-red-500:focus::placeholder { + color: #f56565; + } + + .lg\:focus\:placeholder-red-600:focus::placeholder { + color: #e53e3e; + } + + .lg\:focus\:placeholder-red-700:focus::placeholder { + color: #c53030; + } + + .lg\:focus\:placeholder-red-800:focus::placeholder { + color: #9b2c2c; + } + + .lg\:focus\:placeholder-red-900:focus::placeholder { + color: #742a2a; + } + + .lg\:focus\:placeholder-orange-100:focus::placeholder { + color: #fffaf0; + } + + .lg\:focus\:placeholder-orange-200:focus::placeholder { + color: #feebc8; + } + + .lg\:focus\:placeholder-orange-300:focus::placeholder { + color: #fbd38d; + } + + .lg\:focus\:placeholder-orange-400:focus::placeholder { + color: #f6ad55; + } + + .lg\:focus\:placeholder-orange-500:focus::placeholder { + color: #ed8936; + } + + .lg\:focus\:placeholder-orange-600:focus::placeholder { + color: #dd6b20; + } + + .lg\:focus\:placeholder-orange-700:focus::placeholder { + color: #c05621; + } + + .lg\:focus\:placeholder-orange-800:focus::placeholder { + color: #9c4221; + } + + .lg\:focus\:placeholder-orange-900:focus::placeholder { + color: #7b341e; + } + + .lg\:focus\:placeholder-yellow-100:focus::placeholder { + color: #fffff0; + } + + .lg\:focus\:placeholder-yellow-200:focus::placeholder { + color: #fefcbf; + } + + .lg\:focus\:placeholder-yellow-300:focus::placeholder { + color: #faf089; + } + + .lg\:focus\:placeholder-yellow-400:focus::placeholder { + color: #f6e05e; + } + + .lg\:focus\:placeholder-yellow-500:focus::placeholder { + color: #ecc94b; + } + + .lg\:focus\:placeholder-yellow-600:focus::placeholder { + color: #d69e2e; + } + + .lg\:focus\:placeholder-yellow-700:focus::placeholder { + color: #b7791f; + } + + .lg\:focus\:placeholder-yellow-800:focus::placeholder { + color: #975a16; + } + + .lg\:focus\:placeholder-yellow-900:focus::placeholder { + color: #744210; + } + + .lg\:focus\:placeholder-green-100:focus::placeholder { + color: #f0fff4; + } + + .lg\:focus\:placeholder-green-200:focus::placeholder { + color: #c6f6d5; + } + + .lg\:focus\:placeholder-green-300:focus::placeholder { + color: #9ae6b4; + } + + .lg\:focus\:placeholder-green-400:focus::placeholder { + color: #68d391; + } + + .lg\:focus\:placeholder-green-500:focus::placeholder { + color: #48bb78; + } + + .lg\:focus\:placeholder-green-600:focus::placeholder { + color: #38a169; + } + + .lg\:focus\:placeholder-green-700:focus::placeholder { + color: #2f855a; + } + + .lg\:focus\:placeholder-green-800:focus::placeholder { + color: #276749; + } + + .lg\:focus\:placeholder-green-900:focus::placeholder { + color: #22543d; + } + + .lg\:focus\:placeholder-teal-100:focus::placeholder { + color: #e6fffa; + } + + .lg\:focus\:placeholder-teal-200:focus::placeholder { + color: #b2f5ea; + } + + .lg\:focus\:placeholder-teal-300:focus::placeholder { + color: #81e6d9; + } + + .lg\:focus\:placeholder-teal-400:focus::placeholder { + color: #4fd1c5; + } + + .lg\:focus\:placeholder-teal-500:focus::placeholder { + color: #38b2ac; + } + + .lg\:focus\:placeholder-teal-600:focus::placeholder { + color: #319795; + } + + .lg\:focus\:placeholder-teal-700:focus::placeholder { + color: #2c7a7b; + } + + .lg\:focus\:placeholder-teal-800:focus::placeholder { + color: #285e61; + } + + .lg\:focus\:placeholder-teal-900:focus::placeholder { + color: #234e52; + } + + .lg\:focus\:placeholder-blue-100:focus::placeholder { + color: #ebf8ff; + } + + .lg\:focus\:placeholder-blue-200:focus::placeholder { + color: #bee3f8; + } + + .lg\:focus\:placeholder-blue-300:focus::placeholder { + color: #90cdf4; + } + + .lg\:focus\:placeholder-blue-400:focus::placeholder { + color: #63b3ed; + } + + .lg\:focus\:placeholder-blue-500:focus::placeholder { + color: #4299e1; + } + + .lg\:focus\:placeholder-blue-600:focus::placeholder { + color: #3182ce; + } + + .lg\:focus\:placeholder-blue-700:focus::placeholder { + color: #2b6cb0; + } + + .lg\:focus\:placeholder-blue-800:focus::placeholder { + color: #2c5282; + } + + .lg\:focus\:placeholder-blue-900:focus::placeholder { + color: #2a4365; + } + + .lg\:focus\:placeholder-indigo-100:focus::placeholder { + color: #ebf4ff; + } + + .lg\:focus\:placeholder-indigo-200:focus::placeholder { + color: #c3dafe; + } + + .lg\:focus\:placeholder-indigo-300:focus::placeholder { + color: #a3bffa; + } + + .lg\:focus\:placeholder-indigo-400:focus::placeholder { + color: #7f9cf5; + } + + .lg\:focus\:placeholder-indigo-500:focus::placeholder { + color: #667eea; + } + + .lg\:focus\:placeholder-indigo-600:focus::placeholder { + color: #5a67d8; + } + + .lg\:focus\:placeholder-indigo-700:focus::placeholder { + color: #4c51bf; + } + + .lg\:focus\:placeholder-indigo-800:focus::placeholder { + color: #434190; + } + + .lg\:focus\:placeholder-indigo-900:focus::placeholder { + color: #3c366b; + } + + .lg\:focus\:placeholder-purple-100:focus::placeholder { + color: #faf5ff; + } + + .lg\:focus\:placeholder-purple-200:focus::placeholder { + color: #e9d8fd; + } + + .lg\:focus\:placeholder-purple-300:focus::placeholder { + color: #d6bcfa; + } + + .lg\:focus\:placeholder-purple-400:focus::placeholder { + color: #b794f4; + } + + .lg\:focus\:placeholder-purple-500:focus::placeholder { + color: #9f7aea; + } + + .lg\:focus\:placeholder-purple-600:focus::placeholder { + color: #805ad5; + } + + .lg\:focus\:placeholder-purple-700:focus::placeholder { + color: #6b46c1; + } + + .lg\:focus\:placeholder-purple-800:focus::placeholder { + color: #553c9a; + } + + .lg\:focus\:placeholder-purple-900:focus::placeholder { + color: #44337a; + } + + .lg\:focus\:placeholder-pink-100:focus::placeholder { + color: #fff5f7; + } + + .lg\:focus\:placeholder-pink-200:focus::placeholder { + color: #fed7e2; + } + + .lg\:focus\:placeholder-pink-300:focus::placeholder { + color: #fbb6ce; + } + + .lg\:focus\:placeholder-pink-400:focus::placeholder { + color: #f687b3; + } + + .lg\:focus\:placeholder-pink-500:focus::placeholder { + color: #ed64a6; + } + + .lg\:focus\:placeholder-pink-600:focus::placeholder { + color: #d53f8c; + } + + .lg\:focus\:placeholder-pink-700:focus::placeholder { + color: #b83280; + } + + .lg\:focus\:placeholder-pink-800:focus::placeholder { + color: #97266d; + } + + .lg\:focus\:placeholder-pink-900:focus::placeholder { + color: #702459; + } + + .lg\:pointer-events-none { + pointer-events: none; + } + + .lg\:pointer-events-auto { + pointer-events: auto; + } + + .lg\:static { + position: static; + } + + .lg\:fixed { + position: fixed; + } + + .lg\:absolute { + position: absolute; + } + + .lg\:relative { + position: relative; + } + + .lg\:sticky { + position: sticky; + } + + .lg\:inset-0 { + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + .lg\:inset-auto { + top: auto; + right: auto; + bottom: auto; + left: auto; + } + + .lg\:inset-y-0 { + top: 0; + bottom: 0; + } + + .lg\:inset-x-0 { + right: 0; + left: 0; + } + + .lg\:inset-y-auto { + top: auto; + bottom: auto; + } + + .lg\:inset-x-auto { + right: auto; + left: auto; + } + + .lg\:top-0 { + top: 0; + } + + .lg\:right-0 { + right: 0; + } + + .lg\:bottom-0 { + bottom: 0; + } + + .lg\:left-0 { + left: 0; + } + + .lg\:top-auto { + top: auto; + } + + .lg\:right-auto { + right: auto; + } + + .lg\:bottom-auto { + bottom: auto; + } + + .lg\:left-auto { + left: auto; + } + + .lg\:resize-none { + resize: none; + } + + .lg\:resize-y { + resize: vertical; + } + + .lg\:resize-x { + resize: horizontal; + } + + .lg\:resize { + resize: both; + } + + .lg\:shadow-xs { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .lg\:shadow-sm { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .lg\:shadow { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .lg\:shadow-md { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .lg\:shadow-lg { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .lg\:shadow-xl { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .lg\:shadow-2xl { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .lg\:shadow-inner { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .lg\:shadow-outline { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .lg\:shadow-none { + box-shadow: none; + } + + .lg\:hover\:shadow-xs:hover { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .lg\:hover\:shadow-sm:hover { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .lg\:hover\:shadow:hover { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .lg\:hover\:shadow-md:hover { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .lg\:hover\:shadow-lg:hover { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .lg\:hover\:shadow-xl:hover { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .lg\:hover\:shadow-2xl:hover { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .lg\:hover\:shadow-inner:hover { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .lg\:hover\:shadow-outline:hover { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .lg\:hover\:shadow-none:hover { + box-shadow: none; + } + + .lg\:focus\:shadow-xs:focus { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .lg\:focus\:shadow-sm:focus { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .lg\:focus\:shadow:focus { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .lg\:focus\:shadow-md:focus { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .lg\:focus\:shadow-lg:focus { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .lg\:focus\:shadow-xl:focus { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .lg\:focus\:shadow-2xl:focus { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .lg\:focus\:shadow-inner:focus { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .lg\:focus\:shadow-outline:focus { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .lg\:focus\:shadow-none:focus { + box-shadow: none; + } + + .lg\:fill-current { + fill: currentColor; + } + + .lg\:stroke-current { + stroke: currentColor; + } + + .lg\:stroke-0 { + stroke-width: 0; + } + + .lg\:stroke-1 { + stroke-width: 1; + } + + .lg\:stroke-2 { + stroke-width: 2; + } + + .lg\:table-auto { + table-layout: auto; + } + + .lg\:table-fixed { + table-layout: fixed; + } + + .lg\:text-left { + text-align: left; + } + + .lg\:text-center { + text-align: center; + } + + .lg\:text-right { + text-align: right; + } + + .lg\:text-justify { + text-align: justify; + } + + .lg\:text-transparent { + color: transparent; + } + + .lg\:text-current { + color: currentColor; + } + + .lg\:text-black { + color: #000; + } + + .lg\:text-white { + color: #fff; + } + + .lg\:text-gray-100 { + color: #f7fafc; + } + + .lg\:text-gray-200 { + color: #edf2f7; + } + + .lg\:text-gray-300 { + color: #e2e8f0; + } + + .lg\:text-gray-400 { + color: #cbd5e0; + } + + .lg\:text-gray-500 { + color: #a0aec0; + } + + .lg\:text-gray-600 { + color: #718096; + } + + .lg\:text-gray-700 { + color: #4a5568; + } + + .lg\:text-gray-800 { + color: #2d3748; + } + + .lg\:text-gray-900 { + color: #1a202c; + } + + .lg\:text-red-100 { + color: #fff5f5; + } + + .lg\:text-red-200 { + color: #fed7d7; + } + + .lg\:text-red-300 { + color: #feb2b2; + } + + .lg\:text-red-400 { + color: #fc8181; + } + + .lg\:text-red-500 { + color: #f56565; + } + + .lg\:text-red-600 { + color: #e53e3e; + } + + .lg\:text-red-700 { + color: #c53030; + } + + .lg\:text-red-800 { + color: #9b2c2c; + } + + .lg\:text-red-900 { + color: #742a2a; + } + + .lg\:text-orange-100 { + color: #fffaf0; + } + + .lg\:text-orange-200 { + color: #feebc8; + } + + .lg\:text-orange-300 { + color: #fbd38d; + } + + .lg\:text-orange-400 { + color: #f6ad55; + } + + .lg\:text-orange-500 { + color: #ed8936; + } + + .lg\:text-orange-600 { + color: #dd6b20; + } + + .lg\:text-orange-700 { + color: #c05621; + } + + .lg\:text-orange-800 { + color: #9c4221; + } + + .lg\:text-orange-900 { + color: #7b341e; + } + + .lg\:text-yellow-100 { + color: #fffff0; + } + + .lg\:text-yellow-200 { + color: #fefcbf; + } + + .lg\:text-yellow-300 { + color: #faf089; + } + + .lg\:text-yellow-400 { + color: #f6e05e; + } + + .lg\:text-yellow-500 { + color: #ecc94b; + } + + .lg\:text-yellow-600 { + color: #d69e2e; + } + + .lg\:text-yellow-700 { + color: #b7791f; + } + + .lg\:text-yellow-800 { + color: #975a16; + } + + .lg\:text-yellow-900 { + color: #744210; + } + + .lg\:text-green-100 { + color: #f0fff4; + } + + .lg\:text-green-200 { + color: #c6f6d5; + } + + .lg\:text-green-300 { + color: #9ae6b4; + } + + .lg\:text-green-400 { + color: #68d391; + } + + .lg\:text-green-500 { + color: #48bb78; + } + + .lg\:text-green-600 { + color: #38a169; + } + + .lg\:text-green-700 { + color: #2f855a; + } + + .lg\:text-green-800 { + color: #276749; + } + + .lg\:text-green-900 { + color: #22543d; + } + + .lg\:text-teal-100 { + color: #e6fffa; + } + + .lg\:text-teal-200 { + color: #b2f5ea; + } + + .lg\:text-teal-300 { + color: #81e6d9; + } + + .lg\:text-teal-400 { + color: #4fd1c5; + } + + .lg\:text-teal-500 { + color: #38b2ac; + } + + .lg\:text-teal-600 { + color: #319795; + } + + .lg\:text-teal-700 { + color: #2c7a7b; + } + + .lg\:text-teal-800 { + color: #285e61; + } + + .lg\:text-teal-900 { + color: #234e52; + } + + .lg\:text-blue-100 { + color: #ebf8ff; + } + + .lg\:text-blue-200 { + color: #bee3f8; + } + + .lg\:text-blue-300 { + color: #90cdf4; + } + + .lg\:text-blue-400 { + color: #63b3ed; + } + + .lg\:text-blue-500 { + color: #4299e1; + } + + .lg\:text-blue-600 { + color: #3182ce; + } + + .lg\:text-blue-700 { + color: #2b6cb0; + } + + .lg\:text-blue-800 { + color: #2c5282; + } + + .lg\:text-blue-900 { + color: #2a4365; + } + + .lg\:text-indigo-100 { + color: #ebf4ff; + } + + .lg\:text-indigo-200 { + color: #c3dafe; + } + + .lg\:text-indigo-300 { + color: #a3bffa; + } + + .lg\:text-indigo-400 { + color: #7f9cf5; + } + + .lg\:text-indigo-500 { + color: #667eea; + } + + .lg\:text-indigo-600 { + color: #5a67d8; + } + + .lg\:text-indigo-700 { + color: #4c51bf; + } + + .lg\:text-indigo-800 { + color: #434190; + } + + .lg\:text-indigo-900 { + color: #3c366b; + } + + .lg\:text-purple-100 { + color: #faf5ff; + } + + .lg\:text-purple-200 { + color: #e9d8fd; + } + + .lg\:text-purple-300 { + color: #d6bcfa; + } + + .lg\:text-purple-400 { + color: #b794f4; + } + + .lg\:text-purple-500 { + color: #9f7aea; + } + + .lg\:text-purple-600 { + color: #805ad5; + } + + .lg\:text-purple-700 { + color: #6b46c1; + } + + .lg\:text-purple-800 { + color: #553c9a; + } + + .lg\:text-purple-900 { + color: #44337a; + } + + .lg\:text-pink-100 { + color: #fff5f7; + } + + .lg\:text-pink-200 { + color: #fed7e2; + } + + .lg\:text-pink-300 { + color: #fbb6ce; + } + + .lg\:text-pink-400 { + color: #f687b3; + } + + .lg\:text-pink-500 { + color: #ed64a6; + } + + .lg\:text-pink-600 { + color: #d53f8c; + } + + .lg\:text-pink-700 { + color: #b83280; + } + + .lg\:text-pink-800 { + color: #97266d; + } + + .lg\:text-pink-900 { + color: #702459; + } + + .lg\:hover\:text-transparent:hover { + color: transparent; + } + + .lg\:hover\:text-current:hover { + color: currentColor; + } + + .lg\:hover\:text-black:hover { + color: #000; + } + + .lg\:hover\:text-white:hover { + color: #fff; + } + + .lg\:hover\:text-gray-100:hover { + color: #f7fafc; + } + + .lg\:hover\:text-gray-200:hover { + color: #edf2f7; + } + + .lg\:hover\:text-gray-300:hover { + color: #e2e8f0; + } + + .lg\:hover\:text-gray-400:hover { + color: #cbd5e0; + } + + .lg\:hover\:text-gray-500:hover { + color: #a0aec0; + } + + .lg\:hover\:text-gray-600:hover { + color: #718096; + } + + .lg\:hover\:text-gray-700:hover { + color: #4a5568; + } + + .lg\:hover\:text-gray-800:hover { + color: #2d3748; + } + + .lg\:hover\:text-gray-900:hover { + color: #1a202c; + } + + .lg\:hover\:text-red-100:hover { + color: #fff5f5; + } + + .lg\:hover\:text-red-200:hover { + color: #fed7d7; + } + + .lg\:hover\:text-red-300:hover { + color: #feb2b2; + } + + .lg\:hover\:text-red-400:hover { + color: #fc8181; + } + + .lg\:hover\:text-red-500:hover { + color: #f56565; + } + + .lg\:hover\:text-red-600:hover { + color: #e53e3e; + } + + .lg\:hover\:text-red-700:hover { + color: #c53030; + } + + .lg\:hover\:text-red-800:hover { + color: #9b2c2c; + } + + .lg\:hover\:text-red-900:hover { + color: #742a2a; + } + + .lg\:hover\:text-orange-100:hover { + color: #fffaf0; + } + + .lg\:hover\:text-orange-200:hover { + color: #feebc8; + } + + .lg\:hover\:text-orange-300:hover { + color: #fbd38d; + } + + .lg\:hover\:text-orange-400:hover { + color: #f6ad55; + } + + .lg\:hover\:text-orange-500:hover { + color: #ed8936; + } + + .lg\:hover\:text-orange-600:hover { + color: #dd6b20; + } + + .lg\:hover\:text-orange-700:hover { + color: #c05621; + } + + .lg\:hover\:text-orange-800:hover { + color: #9c4221; + } + + .lg\:hover\:text-orange-900:hover { + color: #7b341e; + } + + .lg\:hover\:text-yellow-100:hover { + color: #fffff0; + } + + .lg\:hover\:text-yellow-200:hover { + color: #fefcbf; + } + + .lg\:hover\:text-yellow-300:hover { + color: #faf089; + } + + .lg\:hover\:text-yellow-400:hover { + color: #f6e05e; + } + + .lg\:hover\:text-yellow-500:hover { + color: #ecc94b; + } + + .lg\:hover\:text-yellow-600:hover { + color: #d69e2e; + } + + .lg\:hover\:text-yellow-700:hover { + color: #b7791f; + } + + .lg\:hover\:text-yellow-800:hover { + color: #975a16; + } + + .lg\:hover\:text-yellow-900:hover { + color: #744210; + } + + .lg\:hover\:text-green-100:hover { + color: #f0fff4; + } + + .lg\:hover\:text-green-200:hover { + color: #c6f6d5; + } + + .lg\:hover\:text-green-300:hover { + color: #9ae6b4; + } + + .lg\:hover\:text-green-400:hover { + color: #68d391; + } + + .lg\:hover\:text-green-500:hover { + color: #48bb78; + } + + .lg\:hover\:text-green-600:hover { + color: #38a169; + } + + .lg\:hover\:text-green-700:hover { + color: #2f855a; + } + + .lg\:hover\:text-green-800:hover { + color: #276749; + } + + .lg\:hover\:text-green-900:hover { + color: #22543d; + } + + .lg\:hover\:text-teal-100:hover { + color: #e6fffa; + } + + .lg\:hover\:text-teal-200:hover { + color: #b2f5ea; + } + + .lg\:hover\:text-teal-300:hover { + color: #81e6d9; + } + + .lg\:hover\:text-teal-400:hover { + color: #4fd1c5; + } + + .lg\:hover\:text-teal-500:hover { + color: #38b2ac; + } + + .lg\:hover\:text-teal-600:hover { + color: #319795; + } + + .lg\:hover\:text-teal-700:hover { + color: #2c7a7b; + } + + .lg\:hover\:text-teal-800:hover { + color: #285e61; + } + + .lg\:hover\:text-teal-900:hover { + color: #234e52; + } + + .lg\:hover\:text-blue-100:hover { + color: #ebf8ff; + } + + .lg\:hover\:text-blue-200:hover { + color: #bee3f8; + } + + .lg\:hover\:text-blue-300:hover { + color: #90cdf4; + } + + .lg\:hover\:text-blue-400:hover { + color: #63b3ed; + } + + .lg\:hover\:text-blue-500:hover { + color: #4299e1; + } + + .lg\:hover\:text-blue-600:hover { + color: #3182ce; + } + + .lg\:hover\:text-blue-700:hover { + color: #2b6cb0; + } + + .lg\:hover\:text-blue-800:hover { + color: #2c5282; + } + + .lg\:hover\:text-blue-900:hover { + color: #2a4365; + } + + .lg\:hover\:text-indigo-100:hover { + color: #ebf4ff; + } + + .lg\:hover\:text-indigo-200:hover { + color: #c3dafe; + } + + .lg\:hover\:text-indigo-300:hover { + color: #a3bffa; + } + + .lg\:hover\:text-indigo-400:hover { + color: #7f9cf5; + } + + .lg\:hover\:text-indigo-500:hover { + color: #667eea; + } + + .lg\:hover\:text-indigo-600:hover { + color: #5a67d8; + } + + .lg\:hover\:text-indigo-700:hover { + color: #4c51bf; + } + + .lg\:hover\:text-indigo-800:hover { + color: #434190; + } + + .lg\:hover\:text-indigo-900:hover { + color: #3c366b; + } + + .lg\:hover\:text-purple-100:hover { + color: #faf5ff; + } + + .lg\:hover\:text-purple-200:hover { + color: #e9d8fd; + } + + .lg\:hover\:text-purple-300:hover { + color: #d6bcfa; + } + + .lg\:hover\:text-purple-400:hover { + color: #b794f4; + } + + .lg\:hover\:text-purple-500:hover { + color: #9f7aea; + } + + .lg\:hover\:text-purple-600:hover { + color: #805ad5; + } + + .lg\:hover\:text-purple-700:hover { + color: #6b46c1; + } + + .lg\:hover\:text-purple-800:hover { + color: #553c9a; + } + + .lg\:hover\:text-purple-900:hover { + color: #44337a; + } + + .lg\:hover\:text-pink-100:hover { + color: #fff5f7; + } + + .lg\:hover\:text-pink-200:hover { + color: #fed7e2; + } + + .lg\:hover\:text-pink-300:hover { + color: #fbb6ce; + } + + .lg\:hover\:text-pink-400:hover { + color: #f687b3; + } + + .lg\:hover\:text-pink-500:hover { + color: #ed64a6; + } + + .lg\:hover\:text-pink-600:hover { + color: #d53f8c; + } + + .lg\:hover\:text-pink-700:hover { + color: #b83280; + } + + .lg\:hover\:text-pink-800:hover { + color: #97266d; + } + + .lg\:hover\:text-pink-900:hover { + color: #702459; + } + + .lg\:focus\:text-transparent:focus { + color: transparent; + } + + .lg\:focus\:text-current:focus { + color: currentColor; + } + + .lg\:focus\:text-black:focus { + color: #000; + } + + .lg\:focus\:text-white:focus { + color: #fff; + } + + .lg\:focus\:text-gray-100:focus { + color: #f7fafc; + } + + .lg\:focus\:text-gray-200:focus { + color: #edf2f7; + } + + .lg\:focus\:text-gray-300:focus { + color: #e2e8f0; + } + + .lg\:focus\:text-gray-400:focus { + color: #cbd5e0; + } + + .lg\:focus\:text-gray-500:focus { + color: #a0aec0; + } + + .lg\:focus\:text-gray-600:focus { + color: #718096; + } + + .lg\:focus\:text-gray-700:focus { + color: #4a5568; + } + + .lg\:focus\:text-gray-800:focus { + color: #2d3748; + } + + .lg\:focus\:text-gray-900:focus { + color: #1a202c; + } + + .lg\:focus\:text-red-100:focus { + color: #fff5f5; + } + + .lg\:focus\:text-red-200:focus { + color: #fed7d7; + } + + .lg\:focus\:text-red-300:focus { + color: #feb2b2; + } + + .lg\:focus\:text-red-400:focus { + color: #fc8181; + } + + .lg\:focus\:text-red-500:focus { + color: #f56565; + } + + .lg\:focus\:text-red-600:focus { + color: #e53e3e; + } + + .lg\:focus\:text-red-700:focus { + color: #c53030; + } + + .lg\:focus\:text-red-800:focus { + color: #9b2c2c; + } + + .lg\:focus\:text-red-900:focus { + color: #742a2a; + } + + .lg\:focus\:text-orange-100:focus { + color: #fffaf0; + } + + .lg\:focus\:text-orange-200:focus { + color: #feebc8; + } + + .lg\:focus\:text-orange-300:focus { + color: #fbd38d; + } + + .lg\:focus\:text-orange-400:focus { + color: #f6ad55; + } + + .lg\:focus\:text-orange-500:focus { + color: #ed8936; + } + + .lg\:focus\:text-orange-600:focus { + color: #dd6b20; + } + + .lg\:focus\:text-orange-700:focus { + color: #c05621; + } + + .lg\:focus\:text-orange-800:focus { + color: #9c4221; + } + + .lg\:focus\:text-orange-900:focus { + color: #7b341e; + } + + .lg\:focus\:text-yellow-100:focus { + color: #fffff0; + } + + .lg\:focus\:text-yellow-200:focus { + color: #fefcbf; + } + + .lg\:focus\:text-yellow-300:focus { + color: #faf089; + } + + .lg\:focus\:text-yellow-400:focus { + color: #f6e05e; + } + + .lg\:focus\:text-yellow-500:focus { + color: #ecc94b; + } + + .lg\:focus\:text-yellow-600:focus { + color: #d69e2e; + } + + .lg\:focus\:text-yellow-700:focus { + color: #b7791f; + } + + .lg\:focus\:text-yellow-800:focus { + color: #975a16; + } + + .lg\:focus\:text-yellow-900:focus { + color: #744210; + } + + .lg\:focus\:text-green-100:focus { + color: #f0fff4; + } + + .lg\:focus\:text-green-200:focus { + color: #c6f6d5; + } + + .lg\:focus\:text-green-300:focus { + color: #9ae6b4; + } + + .lg\:focus\:text-green-400:focus { + color: #68d391; + } + + .lg\:focus\:text-green-500:focus { + color: #48bb78; + } + + .lg\:focus\:text-green-600:focus { + color: #38a169; + } + + .lg\:focus\:text-green-700:focus { + color: #2f855a; + } + + .lg\:focus\:text-green-800:focus { + color: #276749; + } + + .lg\:focus\:text-green-900:focus { + color: #22543d; + } + + .lg\:focus\:text-teal-100:focus { + color: #e6fffa; + } + + .lg\:focus\:text-teal-200:focus { + color: #b2f5ea; + } + + .lg\:focus\:text-teal-300:focus { + color: #81e6d9; + } + + .lg\:focus\:text-teal-400:focus { + color: #4fd1c5; + } + + .lg\:focus\:text-teal-500:focus { + color: #38b2ac; + } + + .lg\:focus\:text-teal-600:focus { + color: #319795; + } + + .lg\:focus\:text-teal-700:focus { + color: #2c7a7b; + } + + .lg\:focus\:text-teal-800:focus { + color: #285e61; + } + + .lg\:focus\:text-teal-900:focus { + color: #234e52; + } + + .lg\:focus\:text-blue-100:focus { + color: #ebf8ff; + } + + .lg\:focus\:text-blue-200:focus { + color: #bee3f8; + } + + .lg\:focus\:text-blue-300:focus { + color: #90cdf4; + } + + .lg\:focus\:text-blue-400:focus { + color: #63b3ed; + } + + .lg\:focus\:text-blue-500:focus { + color: #4299e1; + } + + .lg\:focus\:text-blue-600:focus { + color: #3182ce; + } + + .lg\:focus\:text-blue-700:focus { + color: #2b6cb0; + } + + .lg\:focus\:text-blue-800:focus { + color: #2c5282; + } + + .lg\:focus\:text-blue-900:focus { + color: #2a4365; + } + + .lg\:focus\:text-indigo-100:focus { + color: #ebf4ff; + } + + .lg\:focus\:text-indigo-200:focus { + color: #c3dafe; + } + + .lg\:focus\:text-indigo-300:focus { + color: #a3bffa; + } + + .lg\:focus\:text-indigo-400:focus { + color: #7f9cf5; + } + + .lg\:focus\:text-indigo-500:focus { + color: #667eea; + } + + .lg\:focus\:text-indigo-600:focus { + color: #5a67d8; + } + + .lg\:focus\:text-indigo-700:focus { + color: #4c51bf; + } + + .lg\:focus\:text-indigo-800:focus { + color: #434190; + } + + .lg\:focus\:text-indigo-900:focus { + color: #3c366b; + } + + .lg\:focus\:text-purple-100:focus { + color: #faf5ff; + } + + .lg\:focus\:text-purple-200:focus { + color: #e9d8fd; + } + + .lg\:focus\:text-purple-300:focus { + color: #d6bcfa; + } + + .lg\:focus\:text-purple-400:focus { + color: #b794f4; + } + + .lg\:focus\:text-purple-500:focus { + color: #9f7aea; + } + + .lg\:focus\:text-purple-600:focus { + color: #805ad5; + } + + .lg\:focus\:text-purple-700:focus { + color: #6b46c1; + } + + .lg\:focus\:text-purple-800:focus { + color: #553c9a; + } + + .lg\:focus\:text-purple-900:focus { + color: #44337a; + } + + .lg\:focus\:text-pink-100:focus { + color: #fff5f7; + } + + .lg\:focus\:text-pink-200:focus { + color: #fed7e2; + } + + .lg\:focus\:text-pink-300:focus { + color: #fbb6ce; + } + + .lg\:focus\:text-pink-400:focus { + color: #f687b3; + } + + .lg\:focus\:text-pink-500:focus { + color: #ed64a6; + } + + .lg\:focus\:text-pink-600:focus { + color: #d53f8c; + } + + .lg\:focus\:text-pink-700:focus { + color: #b83280; + } + + .lg\:focus\:text-pink-800:focus { + color: #97266d; + } + + .lg\:focus\:text-pink-900:focus { + color: #702459; + } + + .lg\:italic { + font-style: italic; + } + + .lg\:not-italic { + font-style: normal; + } + + .lg\:uppercase { + text-transform: uppercase; + } + + .lg\:lowercase { + text-transform: lowercase; + } + + .lg\:capitalize { + text-transform: capitalize; + } + + .lg\:normal-case { + text-transform: none; + } + + .lg\:underline { + text-decoration: underline; + } + + .lg\:line-through { + text-decoration: line-through; + } + + .lg\:no-underline { + text-decoration: none; + } + + .lg\:hover\:underline:hover { + text-decoration: underline; + } + + .lg\:hover\:line-through:hover { + text-decoration: line-through; + } + + .lg\:hover\:no-underline:hover { + text-decoration: none; + } + + .lg\:focus\:underline:focus { + text-decoration: underline; + } + + .lg\:focus\:line-through:focus { + text-decoration: line-through; + } + + .lg\:focus\:no-underline:focus { + text-decoration: none; + } + + .lg\:antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + .lg\:subpixel-antialiased { + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; + } + + .lg\:tracking-tighter { + letter-spacing: -0.05em; + } + + .lg\:tracking-tight { + letter-spacing: -0.025em; + } + + .lg\:tracking-normal { + letter-spacing: 0; + } + + .lg\:tracking-wide { + letter-spacing: 0.025em; + } + + .lg\:tracking-wider { + letter-spacing: 0.05em; + } + + .lg\:tracking-widest { + letter-spacing: 0.1em; + } + + .lg\:select-none { + user-select: none; + } + + .lg\:select-text { + user-select: text; + } + + .lg\:select-all { + user-select: all; + } + + .lg\:select-auto { + user-select: auto; + } + + .lg\:align-baseline { + vertical-align: baseline; + } + + .lg\:align-top { + vertical-align: top; + } + + .lg\:align-middle { + vertical-align: middle; + } + + .lg\:align-bottom { + vertical-align: bottom; + } + + .lg\:align-text-top { + vertical-align: text-top; + } + + .lg\:align-text-bottom { + vertical-align: text-bottom; + } + + .lg\:visible { + visibility: visible; + } + + .lg\:invisible { + visibility: hidden; + } + + .lg\:whitespace-normal { + white-space: normal; + } + + .lg\:whitespace-no-wrap { + white-space: nowrap; + } + + .lg\:whitespace-pre { + white-space: pre; + } + + .lg\:whitespace-pre-line { + white-space: pre-line; + } + + .lg\:whitespace-pre-wrap { + white-space: pre-wrap; + } + + .lg\:break-normal { + overflow-wrap: normal; + word-break: normal; + } + + .lg\:break-words { + overflow-wrap: break-word; + } + + .lg\:break-all { + word-break: break-all; + } + + .lg\:truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .lg\:w-0 { + width: 0; + } + + .lg\:w-1 { + width: 0.25rem; + } + + .lg\:w-2 { + width: 0.5rem; + } + + .lg\:w-3 { + width: 0.75rem; + } + + .lg\:w-4 { + width: 1rem; + } + + .lg\:w-5 { + width: 1.25rem; + } + + .lg\:w-6 { + width: 1.5rem; + } + + .lg\:w-8 { + width: 2rem; + } + + .lg\:w-10 { + width: 2.5rem; + } + + .lg\:w-12 { + width: 3rem; + } + + .lg\:w-16 { + width: 4rem; + } + + .lg\:w-20 { + width: 5rem; + } + + .lg\:w-24 { + width: 6rem; + } + + .lg\:w-32 { + width: 8rem; + } + + .lg\:w-40 { + width: 10rem; + } + + .lg\:w-48 { + width: 12rem; + } + + .lg\:w-56 { + width: 14rem; + } + + .lg\:w-64 { + width: 16rem; + } + + .lg\:w-auto { + width: auto; + } + + .lg\:w-px { + width: 1px; + } + + .lg\:w-1\/2 { + width: 50%; + } + + .lg\:w-1\/3 { + width: 33.333333%; + } + + .lg\:w-2\/3 { + width: 66.666667%; + } + + .lg\:w-1\/4 { + width: 25%; + } + + .lg\:w-2\/4 { + width: 50%; + } + + .lg\:w-3\/4 { + width: 75%; + } + + .lg\:w-1\/5 { + width: 20%; + } + + .lg\:w-2\/5 { + width: 40%; + } + + .lg\:w-3\/5 { + width: 60%; + } + + .lg\:w-4\/5 { + width: 80%; + } + + .lg\:w-1\/6 { + width: 16.666667%; + } + + .lg\:w-2\/6 { + width: 33.333333%; + } + + .lg\:w-3\/6 { + width: 50%; + } + + .lg\:w-4\/6 { + width: 66.666667%; + } + + .lg\:w-5\/6 { + width: 83.333333%; + } + + .lg\:w-1\/12 { + width: 8.333333%; + } + + .lg\:w-2\/12 { + width: 16.666667%; + } + + .lg\:w-3\/12 { + width: 25%; + } + + .lg\:w-4\/12 { + width: 33.333333%; + } + + .lg\:w-5\/12 { + width: 41.666667%; + } + + .lg\:w-6\/12 { + width: 50%; + } + + .lg\:w-7\/12 { + width: 58.333333%; + } + + .lg\:w-8\/12 { + width: 66.666667%; + } + + .lg\:w-9\/12 { + width: 75%; + } + + .lg\:w-10\/12 { + width: 83.333333%; + } + + .lg\:w-11\/12 { + width: 91.666667%; + } + + .lg\:w-full { + width: 100%; + } + + .lg\:w-screen { + width: 100vw; + } + + .lg\:z-0 { + z-index: 0; + } + + .lg\:z-10 { + z-index: 10; + } + + .lg\:z-20 { + z-index: 20; + } + + .lg\:z-30 { + z-index: 30; + } + + .lg\:z-40 { + z-index: 40; + } + + .lg\:z-50 { + z-index: 50; + } + + .lg\:z-auto { + z-index: auto; + } + + .lg\:gap-0 { + grid-gap: 0; + gap: 0; + } + + .lg\:gap-1 { + grid-gap: 0.25rem; + gap: 0.25rem; + } + + .lg\:gap-2 { + grid-gap: 0.5rem; + gap: 0.5rem; + } + + .lg\:gap-3 { + grid-gap: 0.75rem; + gap: 0.75rem; + } + + .lg\:gap-4 { + grid-gap: 1rem; + gap: 1rem; + } + + .lg\:gap-5 { + grid-gap: 1.25rem; + gap: 1.25rem; + } + + .lg\:gap-6 { + grid-gap: 1.5rem; + gap: 1.5rem; + } + + .lg\:gap-8 { + grid-gap: 2rem; + gap: 2rem; + } + + .lg\:gap-10 { + grid-gap: 2.5rem; + gap: 2.5rem; + } + + .lg\:gap-12 { + grid-gap: 3rem; + gap: 3rem; + } + + .lg\:gap-16 { + grid-gap: 4rem; + gap: 4rem; + } + + .lg\:gap-20 { + grid-gap: 5rem; + gap: 5rem; + } + + .lg\:gap-24 { + grid-gap: 6rem; + gap: 6rem; + } + + .lg\:gap-32 { + grid-gap: 8rem; + gap: 8rem; + } + + .lg\:gap-40 { + grid-gap: 10rem; + gap: 10rem; + } + + .lg\:gap-48 { + grid-gap: 12rem; + gap: 12rem; + } + + .lg\:gap-56 { + grid-gap: 14rem; + gap: 14rem; + } + + .lg\:gap-64 { + grid-gap: 16rem; + gap: 16rem; + } + + .lg\:gap-px { + grid-gap: 1px; + gap: 1px; + } + + .lg\:col-gap-0 { + grid-column-gap: 0; + column-gap: 0; + } + + .lg\:col-gap-1 { + grid-column-gap: 0.25rem; + column-gap: 0.25rem; + } + + .lg\:col-gap-2 { + grid-column-gap: 0.5rem; + column-gap: 0.5rem; + } + + .lg\:col-gap-3 { + grid-column-gap: 0.75rem; + column-gap: 0.75rem; + } + + .lg\:col-gap-4 { + grid-column-gap: 1rem; + column-gap: 1rem; + } + + .lg\:col-gap-5 { + grid-column-gap: 1.25rem; + column-gap: 1.25rem; + } + + .lg\:col-gap-6 { + grid-column-gap: 1.5rem; + column-gap: 1.5rem; + } + + .lg\:col-gap-8 { + grid-column-gap: 2rem; + column-gap: 2rem; + } + + .lg\:col-gap-10 { + grid-column-gap: 2.5rem; + column-gap: 2.5rem; + } + + .lg\:col-gap-12 { + grid-column-gap: 3rem; + column-gap: 3rem; + } + + .lg\:col-gap-16 { + grid-column-gap: 4rem; + column-gap: 4rem; + } + + .lg\:col-gap-20 { + grid-column-gap: 5rem; + column-gap: 5rem; + } + + .lg\:col-gap-24 { + grid-column-gap: 6rem; + column-gap: 6rem; + } + + .lg\:col-gap-32 { + grid-column-gap: 8rem; + column-gap: 8rem; + } + + .lg\:col-gap-40 { + grid-column-gap: 10rem; + column-gap: 10rem; + } + + .lg\:col-gap-48 { + grid-column-gap: 12rem; + column-gap: 12rem; + } + + .lg\:col-gap-56 { + grid-column-gap: 14rem; + column-gap: 14rem; + } + + .lg\:col-gap-64 { + grid-column-gap: 16rem; + column-gap: 16rem; + } + + .lg\:col-gap-px { + grid-column-gap: 1px; + column-gap: 1px; + } + + .lg\:row-gap-0 { + grid-row-gap: 0; + row-gap: 0; + } + + .lg\:row-gap-1 { + grid-row-gap: 0.25rem; + row-gap: 0.25rem; + } + + .lg\:row-gap-2 { + grid-row-gap: 0.5rem; + row-gap: 0.5rem; + } + + .lg\:row-gap-3 { + grid-row-gap: 0.75rem; + row-gap: 0.75rem; + } + + .lg\:row-gap-4 { + grid-row-gap: 1rem; + row-gap: 1rem; + } + + .lg\:row-gap-5 { + grid-row-gap: 1.25rem; + row-gap: 1.25rem; + } + + .lg\:row-gap-6 { + grid-row-gap: 1.5rem; + row-gap: 1.5rem; + } + + .lg\:row-gap-8 { + grid-row-gap: 2rem; + row-gap: 2rem; + } + + .lg\:row-gap-10 { + grid-row-gap: 2.5rem; + row-gap: 2.5rem; + } + + .lg\:row-gap-12 { + grid-row-gap: 3rem; + row-gap: 3rem; + } + + .lg\:row-gap-16 { + grid-row-gap: 4rem; + row-gap: 4rem; + } + + .lg\:row-gap-20 { + grid-row-gap: 5rem; + row-gap: 5rem; + } + + .lg\:row-gap-24 { + grid-row-gap: 6rem; + row-gap: 6rem; + } + + .lg\:row-gap-32 { + grid-row-gap: 8rem; + row-gap: 8rem; + } + + .lg\:row-gap-40 { + grid-row-gap: 10rem; + row-gap: 10rem; + } + + .lg\:row-gap-48 { + grid-row-gap: 12rem; + row-gap: 12rem; + } + + .lg\:row-gap-56 { + grid-row-gap: 14rem; + row-gap: 14rem; + } + + .lg\:row-gap-64 { + grid-row-gap: 16rem; + row-gap: 16rem; + } + + .lg\:row-gap-px { + grid-row-gap: 1px; + row-gap: 1px; + } + + .lg\:grid-flow-row { + grid-auto-flow: row; + } + + .lg\:grid-flow-col { + grid-auto-flow: column; + } + + .lg\:grid-flow-row-dense { + grid-auto-flow: row dense; + } + + .lg\:grid-flow-col-dense { + grid-auto-flow: column dense; + } + + .lg\:grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + + .lg\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .lg\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .lg\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .lg\:grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); + } + + .lg\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .lg\:grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); + } + + .lg\:grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); + } + + .lg\:grid-cols-9 { + grid-template-columns: repeat(9, minmax(0, 1fr)); + } + + .lg\:grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); + } + + .lg\:grid-cols-11 { + grid-template-columns: repeat(11, minmax(0, 1fr)); + } + + .lg\:grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .lg\:grid-cols-none { + grid-template-columns: none; + } + + .lg\:col-auto { + grid-column: auto; + } + + .lg\:col-span-1 { + grid-column: span 1 / span 1; + } + + .lg\:col-span-2 { + grid-column: span 2 / span 2; + } + + .lg\:col-span-3 { + grid-column: span 3 / span 3; + } + + .lg\:col-span-4 { + grid-column: span 4 / span 4; + } + + .lg\:col-span-5 { + grid-column: span 5 / span 5; + } + + .lg\:col-span-6 { + grid-column: span 6 / span 6; + } + + .lg\:col-span-7 { + grid-column: span 7 / span 7; + } + + .lg\:col-span-8 { + grid-column: span 8 / span 8; + } + + .lg\:col-span-9 { + grid-column: span 9 / span 9; + } + + .lg\:col-span-10 { + grid-column: span 10 / span 10; + } + + .lg\:col-span-11 { + grid-column: span 11 / span 11; + } + + .lg\:col-span-12 { + grid-column: span 12 / span 12; + } + + .lg\:col-start-1 { + grid-column-start: 1; + } + + .lg\:col-start-2 { + grid-column-start: 2; + } + + .lg\:col-start-3 { + grid-column-start: 3; + } + + .lg\:col-start-4 { + grid-column-start: 4; + } + + .lg\:col-start-5 { + grid-column-start: 5; + } + + .lg\:col-start-6 { + grid-column-start: 6; + } + + .lg\:col-start-7 { + grid-column-start: 7; + } + + .lg\:col-start-8 { + grid-column-start: 8; + } + + .lg\:col-start-9 { + grid-column-start: 9; + } + + .lg\:col-start-10 { + grid-column-start: 10; + } + + .lg\:col-start-11 { + grid-column-start: 11; + } + + .lg\:col-start-12 { + grid-column-start: 12; + } + + .lg\:col-start-13 { + grid-column-start: 13; + } + + .lg\:col-start-auto { + grid-column-start: auto; + } + + .lg\:col-end-1 { + grid-column-end: 1; + } + + .lg\:col-end-2 { + grid-column-end: 2; + } + + .lg\:col-end-3 { + grid-column-end: 3; + } + + .lg\:col-end-4 { + grid-column-end: 4; + } + + .lg\:col-end-5 { + grid-column-end: 5; + } + + .lg\:col-end-6 { + grid-column-end: 6; + } + + .lg\:col-end-7 { + grid-column-end: 7; + } + + .lg\:col-end-8 { + grid-column-end: 8; + } + + .lg\:col-end-9 { + grid-column-end: 9; + } + + .lg\:col-end-10 { + grid-column-end: 10; + } + + .lg\:col-end-11 { + grid-column-end: 11; + } + + .lg\:col-end-12 { + grid-column-end: 12; + } + + .lg\:col-end-13 { + grid-column-end: 13; + } + + .lg\:col-end-auto { + grid-column-end: auto; + } + + .lg\:grid-rows-1 { + grid-template-rows: repeat(1, minmax(0, 1fr)); + } + + .lg\:grid-rows-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); + } + + .lg\:grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); + } + + .lg\:grid-rows-4 { + grid-template-rows: repeat(4, minmax(0, 1fr)); + } + + .lg\:grid-rows-5 { + grid-template-rows: repeat(5, minmax(0, 1fr)); + } + + .lg\:grid-rows-6 { + grid-template-rows: repeat(6, minmax(0, 1fr)); + } + + .lg\:grid-rows-none { + grid-template-rows: none; + } + + .lg\:row-auto { + grid-row: auto; + } + + .lg\:row-span-1 { + grid-row: span 1 / span 1; + } + + .lg\:row-span-2 { + grid-row: span 2 / span 2; + } + + .lg\:row-span-3 { + grid-row: span 3 / span 3; + } + + .lg\:row-span-4 { + grid-row: span 4 / span 4; + } + + .lg\:row-span-5 { + grid-row: span 5 / span 5; + } + + .lg\:row-span-6 { + grid-row: span 6 / span 6; + } + + .lg\:row-start-1 { + grid-row-start: 1; + } + + .lg\:row-start-2 { + grid-row-start: 2; + } + + .lg\:row-start-3 { + grid-row-start: 3; + } + + .lg\:row-start-4 { + grid-row-start: 4; + } + + .lg\:row-start-5 { + grid-row-start: 5; + } + + .lg\:row-start-6 { + grid-row-start: 6; + } + + .lg\:row-start-7 { + grid-row-start: 7; + } + + .lg\:row-start-auto { + grid-row-start: auto; + } + + .lg\:row-end-1 { + grid-row-end: 1; + } + + .lg\:row-end-2 { + grid-row-end: 2; + } + + .lg\:row-end-3 { + grid-row-end: 3; + } + + .lg\:row-end-4 { + grid-row-end: 4; + } + + .lg\:row-end-5 { + grid-row-end: 5; + } + + .lg\:row-end-6 { + grid-row-end: 6; + } + + .lg\:row-end-7 { + grid-row-end: 7; + } + + .lg\:row-end-auto { + grid-row-end: auto; + } + + .lg\:transform { + --transform-translate-x: 0; + --transform-translate-y: 0; + --transform-rotate: 0; + --transform-skew-x: 0; + --transform-skew-y: 0; + --transform-scale-x: 1; + --transform-scale-y: 1; + transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y)); + } + + .lg\:transform-none { + transform: none; + } + + .lg\:origin-center { + transform-origin: center; + } + + .lg\:origin-top { + transform-origin: top; + } + + .lg\:origin-top-right { + transform-origin: top right; + } + + .lg\:origin-right { + transform-origin: right; + } + + .lg\:origin-bottom-right { + transform-origin: bottom right; + } + + .lg\:origin-bottom { + transform-origin: bottom; + } + + .lg\:origin-bottom-left { + transform-origin: bottom left; + } + + .lg\:origin-left { + transform-origin: left; + } + + .lg\:origin-top-left { + transform-origin: top left; + } + + .lg\:scale-0 { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .lg\:scale-50 { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .lg\:scale-75 { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .lg\:scale-90 { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .lg\:scale-95 { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .lg\:scale-100 { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .lg\:scale-105 { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .lg\:scale-110 { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .lg\:scale-125 { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .lg\:scale-150 { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .lg\:scale-x-0 { + --transform-scale-x: 0; + } + + .lg\:scale-x-50 { + --transform-scale-x: .5; + } + + .lg\:scale-x-75 { + --transform-scale-x: .75; + } + + .lg\:scale-x-90 { + --transform-scale-x: .9; + } + + .lg\:scale-x-95 { + --transform-scale-x: .95; + } + + .lg\:scale-x-100 { + --transform-scale-x: 1; + } + + .lg\:scale-x-105 { + --transform-scale-x: 1.05; + } + + .lg\:scale-x-110 { + --transform-scale-x: 1.1; + } + + .lg\:scale-x-125 { + --transform-scale-x: 1.25; + } + + .lg\:scale-x-150 { + --transform-scale-x: 1.5; + } + + .lg\:scale-y-0 { + --transform-scale-y: 0; + } + + .lg\:scale-y-50 { + --transform-scale-y: .5; + } + + .lg\:scale-y-75 { + --transform-scale-y: .75; + } + + .lg\:scale-y-90 { + --transform-scale-y: .9; + } + + .lg\:scale-y-95 { + --transform-scale-y: .95; + } + + .lg\:scale-y-100 { + --transform-scale-y: 1; + } + + .lg\:scale-y-105 { + --transform-scale-y: 1.05; + } + + .lg\:scale-y-110 { + --transform-scale-y: 1.1; + } + + .lg\:scale-y-125 { + --transform-scale-y: 1.25; + } + + .lg\:scale-y-150 { + --transform-scale-y: 1.5; + } + + .lg\:hover\:scale-0:hover { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .lg\:hover\:scale-50:hover { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .lg\:hover\:scale-75:hover { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .lg\:hover\:scale-90:hover { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .lg\:hover\:scale-95:hover { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .lg\:hover\:scale-100:hover { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .lg\:hover\:scale-105:hover { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .lg\:hover\:scale-110:hover { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .lg\:hover\:scale-125:hover { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .lg\:hover\:scale-150:hover { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .lg\:hover\:scale-x-0:hover { + --transform-scale-x: 0; + } + + .lg\:hover\:scale-x-50:hover { + --transform-scale-x: .5; + } + + .lg\:hover\:scale-x-75:hover { + --transform-scale-x: .75; + } + + .lg\:hover\:scale-x-90:hover { + --transform-scale-x: .9; + } + + .lg\:hover\:scale-x-95:hover { + --transform-scale-x: .95; + } + + .lg\:hover\:scale-x-100:hover { + --transform-scale-x: 1; + } + + .lg\:hover\:scale-x-105:hover { + --transform-scale-x: 1.05; + } + + .lg\:hover\:scale-x-110:hover { + --transform-scale-x: 1.1; + } + + .lg\:hover\:scale-x-125:hover { + --transform-scale-x: 1.25; + } + + .lg\:hover\:scale-x-150:hover { + --transform-scale-x: 1.5; + } + + .lg\:hover\:scale-y-0:hover { + --transform-scale-y: 0; + } + + .lg\:hover\:scale-y-50:hover { + --transform-scale-y: .5; + } + + .lg\:hover\:scale-y-75:hover { + --transform-scale-y: .75; + } + + .lg\:hover\:scale-y-90:hover { + --transform-scale-y: .9; + } + + .lg\:hover\:scale-y-95:hover { + --transform-scale-y: .95; + } + + .lg\:hover\:scale-y-100:hover { + --transform-scale-y: 1; + } + + .lg\:hover\:scale-y-105:hover { + --transform-scale-y: 1.05; + } + + .lg\:hover\:scale-y-110:hover { + --transform-scale-y: 1.1; + } + + .lg\:hover\:scale-y-125:hover { + --transform-scale-y: 1.25; + } + + .lg\:hover\:scale-y-150:hover { + --transform-scale-y: 1.5; + } + + .lg\:focus\:scale-0:focus { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .lg\:focus\:scale-50:focus { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .lg\:focus\:scale-75:focus { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .lg\:focus\:scale-90:focus { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .lg\:focus\:scale-95:focus { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .lg\:focus\:scale-100:focus { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .lg\:focus\:scale-105:focus { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .lg\:focus\:scale-110:focus { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .lg\:focus\:scale-125:focus { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .lg\:focus\:scale-150:focus { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .lg\:focus\:scale-x-0:focus { + --transform-scale-x: 0; + } + + .lg\:focus\:scale-x-50:focus { + --transform-scale-x: .5; + } + + .lg\:focus\:scale-x-75:focus { + --transform-scale-x: .75; + } + + .lg\:focus\:scale-x-90:focus { + --transform-scale-x: .9; + } + + .lg\:focus\:scale-x-95:focus { + --transform-scale-x: .95; + } + + .lg\:focus\:scale-x-100:focus { + --transform-scale-x: 1; + } + + .lg\:focus\:scale-x-105:focus { + --transform-scale-x: 1.05; + } + + .lg\:focus\:scale-x-110:focus { + --transform-scale-x: 1.1; + } + + .lg\:focus\:scale-x-125:focus { + --transform-scale-x: 1.25; + } + + .lg\:focus\:scale-x-150:focus { + --transform-scale-x: 1.5; + } + + .lg\:focus\:scale-y-0:focus { + --transform-scale-y: 0; + } + + .lg\:focus\:scale-y-50:focus { + --transform-scale-y: .5; + } + + .lg\:focus\:scale-y-75:focus { + --transform-scale-y: .75; + } + + .lg\:focus\:scale-y-90:focus { + --transform-scale-y: .9; + } + + .lg\:focus\:scale-y-95:focus { + --transform-scale-y: .95; + } + + .lg\:focus\:scale-y-100:focus { + --transform-scale-y: 1; + } + + .lg\:focus\:scale-y-105:focus { + --transform-scale-y: 1.05; + } + + .lg\:focus\:scale-y-110:focus { + --transform-scale-y: 1.1; + } + + .lg\:focus\:scale-y-125:focus { + --transform-scale-y: 1.25; + } + + .lg\:focus\:scale-y-150:focus { + --transform-scale-y: 1.5; + } + + .lg\:rotate-0 { + --transform-rotate: 0; + } + + .lg\:rotate-45 { + --transform-rotate: 45deg; + } + + .lg\:rotate-90 { + --transform-rotate: 90deg; + } + + .lg\:rotate-180 { + --transform-rotate: 180deg; + } + + .lg\:-rotate-180 { + --transform-rotate: -180deg; + } + + .lg\:-rotate-90 { + --transform-rotate: -90deg; + } + + .lg\:-rotate-45 { + --transform-rotate: -45deg; + } + + .lg\:hover\:rotate-0:hover { + --transform-rotate: 0; + } + + .lg\:hover\:rotate-45:hover { + --transform-rotate: 45deg; + } + + .lg\:hover\:rotate-90:hover { + --transform-rotate: 90deg; + } + + .lg\:hover\:rotate-180:hover { + --transform-rotate: 180deg; + } + + .lg\:hover\:-rotate-180:hover { + --transform-rotate: -180deg; + } + + .lg\:hover\:-rotate-90:hover { + --transform-rotate: -90deg; + } + + .lg\:hover\:-rotate-45:hover { + --transform-rotate: -45deg; + } + + .lg\:focus\:rotate-0:focus { + --transform-rotate: 0; + } + + .lg\:focus\:rotate-45:focus { + --transform-rotate: 45deg; + } + + .lg\:focus\:rotate-90:focus { + --transform-rotate: 90deg; + } + + .lg\:focus\:rotate-180:focus { + --transform-rotate: 180deg; + } + + .lg\:focus\:-rotate-180:focus { + --transform-rotate: -180deg; + } + + .lg\:focus\:-rotate-90:focus { + --transform-rotate: -90deg; + } + + .lg\:focus\:-rotate-45:focus { + --transform-rotate: -45deg; + } + + .lg\:translate-x-0 { + --transform-translate-x: 0; + } + + .lg\:translate-x-1 { + --transform-translate-x: 0.25rem; + } + + .lg\:translate-x-2 { + --transform-translate-x: 0.5rem; + } + + .lg\:translate-x-3 { + --transform-translate-x: 0.75rem; + } + + .lg\:translate-x-4 { + --transform-translate-x: 1rem; + } + + .lg\:translate-x-5 { + --transform-translate-x: 1.25rem; + } + + .lg\:translate-x-6 { + --transform-translate-x: 1.5rem; + } + + .lg\:translate-x-8 { + --transform-translate-x: 2rem; + } + + .lg\:translate-x-10 { + --transform-translate-x: 2.5rem; + } + + .lg\:translate-x-12 { + --transform-translate-x: 3rem; + } + + .lg\:translate-x-16 { + --transform-translate-x: 4rem; + } + + .lg\:translate-x-20 { + --transform-translate-x: 5rem; + } + + .lg\:translate-x-24 { + --transform-translate-x: 6rem; + } + + .lg\:translate-x-32 { + --transform-translate-x: 8rem; + } + + .lg\:translate-x-40 { + --transform-translate-x: 10rem; + } + + .lg\:translate-x-48 { + --transform-translate-x: 12rem; + } + + .lg\:translate-x-56 { + --transform-translate-x: 14rem; + } + + .lg\:translate-x-64 { + --transform-translate-x: 16rem; + } + + .lg\:translate-x-px { + --transform-translate-x: 1px; + } + + .lg\:-translate-x-1 { + --transform-translate-x: -0.25rem; + } + + .lg\:-translate-x-2 { + --transform-translate-x: -0.5rem; + } + + .lg\:-translate-x-3 { + --transform-translate-x: -0.75rem; + } + + .lg\:-translate-x-4 { + --transform-translate-x: -1rem; + } + + .lg\:-translate-x-5 { + --transform-translate-x: -1.25rem; + } + + .lg\:-translate-x-6 { + --transform-translate-x: -1.5rem; + } + + .lg\:-translate-x-8 { + --transform-translate-x: -2rem; + } + + .lg\:-translate-x-10 { + --transform-translate-x: -2.5rem; + } + + .lg\:-translate-x-12 { + --transform-translate-x: -3rem; + } + + .lg\:-translate-x-16 { + --transform-translate-x: -4rem; + } + + .lg\:-translate-x-20 { + --transform-translate-x: -5rem; + } + + .lg\:-translate-x-24 { + --transform-translate-x: -6rem; + } + + .lg\:-translate-x-32 { + --transform-translate-x: -8rem; + } + + .lg\:-translate-x-40 { + --transform-translate-x: -10rem; + } + + .lg\:-translate-x-48 { + --transform-translate-x: -12rem; + } + + .lg\:-translate-x-56 { + --transform-translate-x: -14rem; + } + + .lg\:-translate-x-64 { + --transform-translate-x: -16rem; + } + + .lg\:-translate-x-px { + --transform-translate-x: -1px; + } + + .lg\:-translate-x-full { + --transform-translate-x: -100%; + } + + .lg\:-translate-x-1\/2 { + --transform-translate-x: -50%; + } + + .lg\:translate-x-1\/2 { + --transform-translate-x: 50%; + } + + .lg\:translate-x-full { + --transform-translate-x: 100%; + } + + .lg\:translate-y-0 { + --transform-translate-y: 0; + } + + .lg\:translate-y-1 { + --transform-translate-y: 0.25rem; + } + + .lg\:translate-y-2 { + --transform-translate-y: 0.5rem; + } + + .lg\:translate-y-3 { + --transform-translate-y: 0.75rem; + } + + .lg\:translate-y-4 { + --transform-translate-y: 1rem; + } + + .lg\:translate-y-5 { + --transform-translate-y: 1.25rem; + } + + .lg\:translate-y-6 { + --transform-translate-y: 1.5rem; + } + + .lg\:translate-y-8 { + --transform-translate-y: 2rem; + } + + .lg\:translate-y-10 { + --transform-translate-y: 2.5rem; + } + + .lg\:translate-y-12 { + --transform-translate-y: 3rem; + } + + .lg\:translate-y-16 { + --transform-translate-y: 4rem; + } + + .lg\:translate-y-20 { + --transform-translate-y: 5rem; + } + + .lg\:translate-y-24 { + --transform-translate-y: 6rem; + } + + .lg\:translate-y-32 { + --transform-translate-y: 8rem; + } + + .lg\:translate-y-40 { + --transform-translate-y: 10rem; + } + + .lg\:translate-y-48 { + --transform-translate-y: 12rem; + } + + .lg\:translate-y-56 { + --transform-translate-y: 14rem; + } + + .lg\:translate-y-64 { + --transform-translate-y: 16rem; + } + + .lg\:translate-y-px { + --transform-translate-y: 1px; + } + + .lg\:-translate-y-1 { + --transform-translate-y: -0.25rem; + } + + .lg\:-translate-y-2 { + --transform-translate-y: -0.5rem; + } + + .lg\:-translate-y-3 { + --transform-translate-y: -0.75rem; + } + + .lg\:-translate-y-4 { + --transform-translate-y: -1rem; + } + + .lg\:-translate-y-5 { + --transform-translate-y: -1.25rem; + } + + .lg\:-translate-y-6 { + --transform-translate-y: -1.5rem; + } + + .lg\:-translate-y-8 { + --transform-translate-y: -2rem; + } + + .lg\:-translate-y-10 { + --transform-translate-y: -2.5rem; + } + + .lg\:-translate-y-12 { + --transform-translate-y: -3rem; + } + + .lg\:-translate-y-16 { + --transform-translate-y: -4rem; + } + + .lg\:-translate-y-20 { + --transform-translate-y: -5rem; + } + + .lg\:-translate-y-24 { + --transform-translate-y: -6rem; + } + + .lg\:-translate-y-32 { + --transform-translate-y: -8rem; + } + + .lg\:-translate-y-40 { + --transform-translate-y: -10rem; + } + + .lg\:-translate-y-48 { + --transform-translate-y: -12rem; + } + + .lg\:-translate-y-56 { + --transform-translate-y: -14rem; + } + + .lg\:-translate-y-64 { + --transform-translate-y: -16rem; + } + + .lg\:-translate-y-px { + --transform-translate-y: -1px; + } + + .lg\:-translate-y-full { + --transform-translate-y: -100%; + } + + .lg\:-translate-y-1\/2 { + --transform-translate-y: -50%; + } + + .lg\:translate-y-1\/2 { + --transform-translate-y: 50%; + } + + .lg\:translate-y-full { + --transform-translate-y: 100%; + } + + .lg\:hover\:translate-x-0:hover { + --transform-translate-x: 0; + } + + .lg\:hover\:translate-x-1:hover { + --transform-translate-x: 0.25rem; + } + + .lg\:hover\:translate-x-2:hover { + --transform-translate-x: 0.5rem; + } + + .lg\:hover\:translate-x-3:hover { + --transform-translate-x: 0.75rem; + } + + .lg\:hover\:translate-x-4:hover { + --transform-translate-x: 1rem; + } + + .lg\:hover\:translate-x-5:hover { + --transform-translate-x: 1.25rem; + } + + .lg\:hover\:translate-x-6:hover { + --transform-translate-x: 1.5rem; + } + + .lg\:hover\:translate-x-8:hover { + --transform-translate-x: 2rem; + } + + .lg\:hover\:translate-x-10:hover { + --transform-translate-x: 2.5rem; + } + + .lg\:hover\:translate-x-12:hover { + --transform-translate-x: 3rem; + } + + .lg\:hover\:translate-x-16:hover { + --transform-translate-x: 4rem; + } + + .lg\:hover\:translate-x-20:hover { + --transform-translate-x: 5rem; + } + + .lg\:hover\:translate-x-24:hover { + --transform-translate-x: 6rem; + } + + .lg\:hover\:translate-x-32:hover { + --transform-translate-x: 8rem; + } + + .lg\:hover\:translate-x-40:hover { + --transform-translate-x: 10rem; + } + + .lg\:hover\:translate-x-48:hover { + --transform-translate-x: 12rem; + } + + .lg\:hover\:translate-x-56:hover { + --transform-translate-x: 14rem; + } + + .lg\:hover\:translate-x-64:hover { + --transform-translate-x: 16rem; + } + + .lg\:hover\:translate-x-px:hover { + --transform-translate-x: 1px; + } + + .lg\:hover\:-translate-x-1:hover { + --transform-translate-x: -0.25rem; + } + + .lg\:hover\:-translate-x-2:hover { + --transform-translate-x: -0.5rem; + } + + .lg\:hover\:-translate-x-3:hover { + --transform-translate-x: -0.75rem; + } + + .lg\:hover\:-translate-x-4:hover { + --transform-translate-x: -1rem; + } + + .lg\:hover\:-translate-x-5:hover { + --transform-translate-x: -1.25rem; + } + + .lg\:hover\:-translate-x-6:hover { + --transform-translate-x: -1.5rem; + } + + .lg\:hover\:-translate-x-8:hover { + --transform-translate-x: -2rem; + } + + .lg\:hover\:-translate-x-10:hover { + --transform-translate-x: -2.5rem; + } + + .lg\:hover\:-translate-x-12:hover { + --transform-translate-x: -3rem; + } + + .lg\:hover\:-translate-x-16:hover { + --transform-translate-x: -4rem; + } + + .lg\:hover\:-translate-x-20:hover { + --transform-translate-x: -5rem; + } + + .lg\:hover\:-translate-x-24:hover { + --transform-translate-x: -6rem; + } + + .lg\:hover\:-translate-x-32:hover { + --transform-translate-x: -8rem; + } + + .lg\:hover\:-translate-x-40:hover { + --transform-translate-x: -10rem; + } + + .lg\:hover\:-translate-x-48:hover { + --transform-translate-x: -12rem; + } + + .lg\:hover\:-translate-x-56:hover { + --transform-translate-x: -14rem; + } + + .lg\:hover\:-translate-x-64:hover { + --transform-translate-x: -16rem; + } + + .lg\:hover\:-translate-x-px:hover { + --transform-translate-x: -1px; + } + + .lg\:hover\:-translate-x-full:hover { + --transform-translate-x: -100%; + } + + .lg\:hover\:-translate-x-1\/2:hover { + --transform-translate-x: -50%; + } + + .lg\:hover\:translate-x-1\/2:hover { + --transform-translate-x: 50%; + } + + .lg\:hover\:translate-x-full:hover { + --transform-translate-x: 100%; + } + + .lg\:hover\:translate-y-0:hover { + --transform-translate-y: 0; + } + + .lg\:hover\:translate-y-1:hover { + --transform-translate-y: 0.25rem; + } + + .lg\:hover\:translate-y-2:hover { + --transform-translate-y: 0.5rem; + } + + .lg\:hover\:translate-y-3:hover { + --transform-translate-y: 0.75rem; + } + + .lg\:hover\:translate-y-4:hover { + --transform-translate-y: 1rem; + } + + .lg\:hover\:translate-y-5:hover { + --transform-translate-y: 1.25rem; + } + + .lg\:hover\:translate-y-6:hover { + --transform-translate-y: 1.5rem; + } + + .lg\:hover\:translate-y-8:hover { + --transform-translate-y: 2rem; + } + + .lg\:hover\:translate-y-10:hover { + --transform-translate-y: 2.5rem; + } + + .lg\:hover\:translate-y-12:hover { + --transform-translate-y: 3rem; + } + + .lg\:hover\:translate-y-16:hover { + --transform-translate-y: 4rem; + } + + .lg\:hover\:translate-y-20:hover { + --transform-translate-y: 5rem; + } + + .lg\:hover\:translate-y-24:hover { + --transform-translate-y: 6rem; + } + + .lg\:hover\:translate-y-32:hover { + --transform-translate-y: 8rem; + } + + .lg\:hover\:translate-y-40:hover { + --transform-translate-y: 10rem; + } + + .lg\:hover\:translate-y-48:hover { + --transform-translate-y: 12rem; + } + + .lg\:hover\:translate-y-56:hover { + --transform-translate-y: 14rem; + } + + .lg\:hover\:translate-y-64:hover { + --transform-translate-y: 16rem; + } + + .lg\:hover\:translate-y-px:hover { + --transform-translate-y: 1px; + } + + .lg\:hover\:-translate-y-1:hover { + --transform-translate-y: -0.25rem; + } + + .lg\:hover\:-translate-y-2:hover { + --transform-translate-y: -0.5rem; + } + + .lg\:hover\:-translate-y-3:hover { + --transform-translate-y: -0.75rem; + } + + .lg\:hover\:-translate-y-4:hover { + --transform-translate-y: -1rem; + } + + .lg\:hover\:-translate-y-5:hover { + --transform-translate-y: -1.25rem; + } + + .lg\:hover\:-translate-y-6:hover { + --transform-translate-y: -1.5rem; + } + + .lg\:hover\:-translate-y-8:hover { + --transform-translate-y: -2rem; + } + + .lg\:hover\:-translate-y-10:hover { + --transform-translate-y: -2.5rem; + } + + .lg\:hover\:-translate-y-12:hover { + --transform-translate-y: -3rem; + } + + .lg\:hover\:-translate-y-16:hover { + --transform-translate-y: -4rem; + } + + .lg\:hover\:-translate-y-20:hover { + --transform-translate-y: -5rem; + } + + .lg\:hover\:-translate-y-24:hover { + --transform-translate-y: -6rem; + } + + .lg\:hover\:-translate-y-32:hover { + --transform-translate-y: -8rem; + } + + .lg\:hover\:-translate-y-40:hover { + --transform-translate-y: -10rem; + } + + .lg\:hover\:-translate-y-48:hover { + --transform-translate-y: -12rem; + } + + .lg\:hover\:-translate-y-56:hover { + --transform-translate-y: -14rem; + } + + .lg\:hover\:-translate-y-64:hover { + --transform-translate-y: -16rem; + } + + .lg\:hover\:-translate-y-px:hover { + --transform-translate-y: -1px; + } + + .lg\:hover\:-translate-y-full:hover { + --transform-translate-y: -100%; + } + + .lg\:hover\:-translate-y-1\/2:hover { + --transform-translate-y: -50%; + } + + .lg\:hover\:translate-y-1\/2:hover { + --transform-translate-y: 50%; + } + + .lg\:hover\:translate-y-full:hover { + --transform-translate-y: 100%; + } + + .lg\:focus\:translate-x-0:focus { + --transform-translate-x: 0; + } + + .lg\:focus\:translate-x-1:focus { + --transform-translate-x: 0.25rem; + } + + .lg\:focus\:translate-x-2:focus { + --transform-translate-x: 0.5rem; + } + + .lg\:focus\:translate-x-3:focus { + --transform-translate-x: 0.75rem; + } + + .lg\:focus\:translate-x-4:focus { + --transform-translate-x: 1rem; + } + + .lg\:focus\:translate-x-5:focus { + --transform-translate-x: 1.25rem; + } + + .lg\:focus\:translate-x-6:focus { + --transform-translate-x: 1.5rem; + } + + .lg\:focus\:translate-x-8:focus { + --transform-translate-x: 2rem; + } + + .lg\:focus\:translate-x-10:focus { + --transform-translate-x: 2.5rem; + } + + .lg\:focus\:translate-x-12:focus { + --transform-translate-x: 3rem; + } + + .lg\:focus\:translate-x-16:focus { + --transform-translate-x: 4rem; + } + + .lg\:focus\:translate-x-20:focus { + --transform-translate-x: 5rem; + } + + .lg\:focus\:translate-x-24:focus { + --transform-translate-x: 6rem; + } + + .lg\:focus\:translate-x-32:focus { + --transform-translate-x: 8rem; + } + + .lg\:focus\:translate-x-40:focus { + --transform-translate-x: 10rem; + } + + .lg\:focus\:translate-x-48:focus { + --transform-translate-x: 12rem; + } + + .lg\:focus\:translate-x-56:focus { + --transform-translate-x: 14rem; + } + + .lg\:focus\:translate-x-64:focus { + --transform-translate-x: 16rem; + } + + .lg\:focus\:translate-x-px:focus { + --transform-translate-x: 1px; + } + + .lg\:focus\:-translate-x-1:focus { + --transform-translate-x: -0.25rem; + } + + .lg\:focus\:-translate-x-2:focus { + --transform-translate-x: -0.5rem; + } + + .lg\:focus\:-translate-x-3:focus { + --transform-translate-x: -0.75rem; + } + + .lg\:focus\:-translate-x-4:focus { + --transform-translate-x: -1rem; + } + + .lg\:focus\:-translate-x-5:focus { + --transform-translate-x: -1.25rem; + } + + .lg\:focus\:-translate-x-6:focus { + --transform-translate-x: -1.5rem; + } + + .lg\:focus\:-translate-x-8:focus { + --transform-translate-x: -2rem; + } + + .lg\:focus\:-translate-x-10:focus { + --transform-translate-x: -2.5rem; + } + + .lg\:focus\:-translate-x-12:focus { + --transform-translate-x: -3rem; + } + + .lg\:focus\:-translate-x-16:focus { + --transform-translate-x: -4rem; + } + + .lg\:focus\:-translate-x-20:focus { + --transform-translate-x: -5rem; + } + + .lg\:focus\:-translate-x-24:focus { + --transform-translate-x: -6rem; + } + + .lg\:focus\:-translate-x-32:focus { + --transform-translate-x: -8rem; + } + + .lg\:focus\:-translate-x-40:focus { + --transform-translate-x: -10rem; + } + + .lg\:focus\:-translate-x-48:focus { + --transform-translate-x: -12rem; + } + + .lg\:focus\:-translate-x-56:focus { + --transform-translate-x: -14rem; + } + + .lg\:focus\:-translate-x-64:focus { + --transform-translate-x: -16rem; + } + + .lg\:focus\:-translate-x-px:focus { + --transform-translate-x: -1px; + } + + .lg\:focus\:-translate-x-full:focus { + --transform-translate-x: -100%; + } + + .lg\:focus\:-translate-x-1\/2:focus { + --transform-translate-x: -50%; + } + + .lg\:focus\:translate-x-1\/2:focus { + --transform-translate-x: 50%; + } + + .lg\:focus\:translate-x-full:focus { + --transform-translate-x: 100%; + } + + .lg\:focus\:translate-y-0:focus { + --transform-translate-y: 0; + } + + .lg\:focus\:translate-y-1:focus { + --transform-translate-y: 0.25rem; + } + + .lg\:focus\:translate-y-2:focus { + --transform-translate-y: 0.5rem; + } + + .lg\:focus\:translate-y-3:focus { + --transform-translate-y: 0.75rem; + } + + .lg\:focus\:translate-y-4:focus { + --transform-translate-y: 1rem; + } + + .lg\:focus\:translate-y-5:focus { + --transform-translate-y: 1.25rem; + } + + .lg\:focus\:translate-y-6:focus { + --transform-translate-y: 1.5rem; + } + + .lg\:focus\:translate-y-8:focus { + --transform-translate-y: 2rem; + } + + .lg\:focus\:translate-y-10:focus { + --transform-translate-y: 2.5rem; + } + + .lg\:focus\:translate-y-12:focus { + --transform-translate-y: 3rem; + } + + .lg\:focus\:translate-y-16:focus { + --transform-translate-y: 4rem; + } + + .lg\:focus\:translate-y-20:focus { + --transform-translate-y: 5rem; + } + + .lg\:focus\:translate-y-24:focus { + --transform-translate-y: 6rem; + } + + .lg\:focus\:translate-y-32:focus { + --transform-translate-y: 8rem; + } + + .lg\:focus\:translate-y-40:focus { + --transform-translate-y: 10rem; + } + + .lg\:focus\:translate-y-48:focus { + --transform-translate-y: 12rem; + } + + .lg\:focus\:translate-y-56:focus { + --transform-translate-y: 14rem; + } + + .lg\:focus\:translate-y-64:focus { + --transform-translate-y: 16rem; + } + + .lg\:focus\:translate-y-px:focus { + --transform-translate-y: 1px; + } + + .lg\:focus\:-translate-y-1:focus { + --transform-translate-y: -0.25rem; + } + + .lg\:focus\:-translate-y-2:focus { + --transform-translate-y: -0.5rem; + } + + .lg\:focus\:-translate-y-3:focus { + --transform-translate-y: -0.75rem; + } + + .lg\:focus\:-translate-y-4:focus { + --transform-translate-y: -1rem; + } + + .lg\:focus\:-translate-y-5:focus { + --transform-translate-y: -1.25rem; + } + + .lg\:focus\:-translate-y-6:focus { + --transform-translate-y: -1.5rem; + } + + .lg\:focus\:-translate-y-8:focus { + --transform-translate-y: -2rem; + } + + .lg\:focus\:-translate-y-10:focus { + --transform-translate-y: -2.5rem; + } + + .lg\:focus\:-translate-y-12:focus { + --transform-translate-y: -3rem; + } + + .lg\:focus\:-translate-y-16:focus { + --transform-translate-y: -4rem; + } + + .lg\:focus\:-translate-y-20:focus { + --transform-translate-y: -5rem; + } + + .lg\:focus\:-translate-y-24:focus { + --transform-translate-y: -6rem; + } + + .lg\:focus\:-translate-y-32:focus { + --transform-translate-y: -8rem; + } + + .lg\:focus\:-translate-y-40:focus { + --transform-translate-y: -10rem; + } + + .lg\:focus\:-translate-y-48:focus { + --transform-translate-y: -12rem; + } + + .lg\:focus\:-translate-y-56:focus { + --transform-translate-y: -14rem; + } + + .lg\:focus\:-translate-y-64:focus { + --transform-translate-y: -16rem; + } + + .lg\:focus\:-translate-y-px:focus { + --transform-translate-y: -1px; + } + + .lg\:focus\:-translate-y-full:focus { + --transform-translate-y: -100%; + } + + .lg\:focus\:-translate-y-1\/2:focus { + --transform-translate-y: -50%; + } + + .lg\:focus\:translate-y-1\/2:focus { + --transform-translate-y: 50%; + } + + .lg\:focus\:translate-y-full:focus { + --transform-translate-y: 100%; + } + + .lg\:skew-x-0 { + --transform-skew-x: 0; + } + + .lg\:skew-x-3 { + --transform-skew-x: 3deg; + } + + .lg\:skew-x-6 { + --transform-skew-x: 6deg; + } + + .lg\:skew-x-12 { + --transform-skew-x: 12deg; + } + + .lg\:-skew-x-12 { + --transform-skew-x: -12deg; + } + + .lg\:-skew-x-6 { + --transform-skew-x: -6deg; + } + + .lg\:-skew-x-3 { + --transform-skew-x: -3deg; + } + + .lg\:skew-y-0 { + --transform-skew-y: 0; + } + + .lg\:skew-y-3 { + --transform-skew-y: 3deg; + } + + .lg\:skew-y-6 { + --transform-skew-y: 6deg; + } + + .lg\:skew-y-12 { + --transform-skew-y: 12deg; + } + + .lg\:-skew-y-12 { + --transform-skew-y: -12deg; + } + + .lg\:-skew-y-6 { + --transform-skew-y: -6deg; + } + + .lg\:-skew-y-3 { + --transform-skew-y: -3deg; + } + + .lg\:hover\:skew-x-0:hover { + --transform-skew-x: 0; + } + + .lg\:hover\:skew-x-3:hover { + --transform-skew-x: 3deg; + } + + .lg\:hover\:skew-x-6:hover { + --transform-skew-x: 6deg; + } + + .lg\:hover\:skew-x-12:hover { + --transform-skew-x: 12deg; + } + + .lg\:hover\:-skew-x-12:hover { + --transform-skew-x: -12deg; + } + + .lg\:hover\:-skew-x-6:hover { + --transform-skew-x: -6deg; + } + + .lg\:hover\:-skew-x-3:hover { + --transform-skew-x: -3deg; + } + + .lg\:hover\:skew-y-0:hover { + --transform-skew-y: 0; + } + + .lg\:hover\:skew-y-3:hover { + --transform-skew-y: 3deg; + } + + .lg\:hover\:skew-y-6:hover { + --transform-skew-y: 6deg; + } + + .lg\:hover\:skew-y-12:hover { + --transform-skew-y: 12deg; + } + + .lg\:hover\:-skew-y-12:hover { + --transform-skew-y: -12deg; + } + + .lg\:hover\:-skew-y-6:hover { + --transform-skew-y: -6deg; + } + + .lg\:hover\:-skew-y-3:hover { + --transform-skew-y: -3deg; + } + + .lg\:focus\:skew-x-0:focus { + --transform-skew-x: 0; + } + + .lg\:focus\:skew-x-3:focus { + --transform-skew-x: 3deg; + } + + .lg\:focus\:skew-x-6:focus { + --transform-skew-x: 6deg; + } + + .lg\:focus\:skew-x-12:focus { + --transform-skew-x: 12deg; + } + + .lg\:focus\:-skew-x-12:focus { + --transform-skew-x: -12deg; + } + + .lg\:focus\:-skew-x-6:focus { + --transform-skew-x: -6deg; + } + + .lg\:focus\:-skew-x-3:focus { + --transform-skew-x: -3deg; + } + + .lg\:focus\:skew-y-0:focus { + --transform-skew-y: 0; + } + + .lg\:focus\:skew-y-3:focus { + --transform-skew-y: 3deg; + } + + .lg\:focus\:skew-y-6:focus { + --transform-skew-y: 6deg; + } + + .lg\:focus\:skew-y-12:focus { + --transform-skew-y: 12deg; + } + + .lg\:focus\:-skew-y-12:focus { + --transform-skew-y: -12deg; + } + + .lg\:focus\:-skew-y-6:focus { + --transform-skew-y: -6deg; + } + + .lg\:focus\:-skew-y-3:focus { + --transform-skew-y: -3deg; + } + + .lg\:transition-none { + transition-property: none; + } + + .lg\:transition-all { + transition-property: all; + } + + .lg\:transition { + transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; + } + + .lg\:transition-colors { + transition-property: background-color, border-color, color, fill, stroke; + } + + .lg\:transition-opacity { + transition-property: opacity; + } + + .lg\:transition-shadow { + transition-property: box-shadow; + } + + .lg\:transition-transform { + transition-property: transform; + } + + .lg\:ease-linear { + transition-timing-function: linear; + } + + .lg\:ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); + } + + .lg\:ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + + .lg\:ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + } + + .lg\:duration-75 { + transition-duration: 75ms; + } + + .lg\:duration-100 { + transition-duration: 100ms; + } + + .lg\:duration-150 { + transition-duration: 150ms; + } + + .lg\:duration-200 { + transition-duration: 200ms; + } + + .lg\:duration-300 { + transition-duration: 300ms; + } + + .lg\:duration-500 { + transition-duration: 500ms; + } + + .lg\:duration-700 { + transition-duration: 700ms; + } + + .lg\:duration-1000 { + transition-duration: 1000ms; + } + + .lg\:delay-75 { + transition-delay: 75ms; + } + + .lg\:delay-100 { + transition-delay: 100ms; + } + + .lg\:delay-150 { + transition-delay: 150ms; + } + + .lg\:delay-200 { + transition-delay: 200ms; + } + + .lg\:delay-300 { + transition-delay: 300ms; + } + + .lg\:delay-500 { + transition-delay: 500ms; + } + + .lg\:delay-700 { + transition-delay: 700ms; + } + + .lg\:delay-1000 { + transition-delay: 1000ms; + } + + .lg\:example { + font-weight: 700; + color: #f56565; + } +} + +@media (min-width: 1280px) { + .xl\:space-y-0 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0px * var(--space-y-reverse)); + } + + .xl\:space-x-0 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0px * var(--space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.25rem * var(--space-y-reverse)); + } + + .xl\:space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.25rem * var(--space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.5rem * var(--space-y-reverse)); + } + + .xl\:space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.5rem * var(--space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(0.75rem * var(--space-y-reverse)); + } + + .xl\:space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(0.75rem * var(--space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1rem * var(--space-y-reverse)); + } + + .xl\:space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1rem * var(--space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.25rem * var(--space-y-reverse)); + } + + .xl\:space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.25rem * var(--space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1.5rem * var(--space-y-reverse)); + } + + .xl\:space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1.5rem * var(--space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2rem * var(--space-y-reverse)); + } + + .xl\:space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2rem * var(--space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(2.5rem * var(--space-y-reverse)); + } + + .xl\:space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(2.5rem * var(--space-x-reverse)); + margin-left: calc(2.5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(3rem * var(--space-y-reverse)); + } + + .xl\:space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(3rem * var(--space-x-reverse)); + margin-left: calc(3rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(4rem * var(--space-y-reverse)); + } + + .xl\:space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(4rem * var(--space-x-reverse)); + margin-left: calc(4rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(5rem * var(--space-y-reverse)); + } + + .xl\:space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(5rem * var(--space-x-reverse)); + margin-left: calc(5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(6rem * var(--space-y-reverse)); + } + + .xl\:space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(6rem * var(--space-x-reverse)); + margin-left: calc(6rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(8rem * var(--space-y-reverse)); + } + + .xl\:space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(8rem * var(--space-x-reverse)); + margin-left: calc(8rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(10rem * var(--space-y-reverse)); + } + + .xl\:space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(10rem * var(--space-x-reverse)); + margin-left: calc(10rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(12rem * var(--space-y-reverse)); + } + + .xl\:space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(12rem * var(--space-x-reverse)); + margin-left: calc(12rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(14rem * var(--space-y-reverse)); + } + + .xl\:space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(14rem * var(--space-x-reverse)); + margin-left: calc(14rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(16rem * var(--space-y-reverse)); + } + + .xl\:space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(16rem * var(--space-x-reverse)); + margin-left: calc(16rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(1px * var(--space-y-reverse)); + } + + .xl\:space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(1px * var(--space-x-reverse)); + margin-left: calc(1px * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-1 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.25rem * var(--space-y-reverse)); + } + + .xl\:-space-x-1 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.25rem * var(--space-x-reverse)); + margin-left: calc(-0.25rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-2 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.5rem * var(--space-y-reverse)); + } + + .xl\:-space-x-2 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.5rem * var(--space-x-reverse)); + margin-left: calc(-0.5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-3 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-0.75rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-0.75rem * var(--space-y-reverse)); + } + + .xl\:-space-x-3 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-4 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1rem * var(--space-y-reverse)); + } + + .xl\:-space-x-4 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1rem * var(--space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-5 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.25rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.25rem * var(--space-y-reverse)); + } + + .xl\:-space-x-5 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.25rem * var(--space-x-reverse)); + margin-left: calc(-1.25rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-6 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1.5rem * var(--space-y-reverse)); + } + + .xl\:-space-x-6 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1.5rem * var(--space-x-reverse)); + margin-left: calc(-1.5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-8 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2rem * var(--space-y-reverse)); + } + + .xl\:-space-x-8 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2rem * var(--space-x-reverse)); + margin-left: calc(-2rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-10 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-2.5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-2.5rem * var(--space-y-reverse)); + } + + .xl\:-space-x-10 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-2.5rem * var(--space-x-reverse)); + margin-left: calc(-2.5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-12 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-3rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-3rem * var(--space-y-reverse)); + } + + .xl\:-space-x-12 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-3rem * var(--space-x-reverse)); + margin-left: calc(-3rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-16 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-4rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-4rem * var(--space-y-reverse)); + } + + .xl\:-space-x-16 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-4rem * var(--space-x-reverse)); + margin-left: calc(-4rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-20 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-5rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-5rem * var(--space-y-reverse)); + } + + .xl\:-space-x-20 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-5rem * var(--space-x-reverse)); + margin-left: calc(-5rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-24 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-6rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-6rem * var(--space-y-reverse)); + } + + .xl\:-space-x-24 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-6rem * var(--space-x-reverse)); + margin-left: calc(-6rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-32 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-8rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-8rem * var(--space-y-reverse)); + } + + .xl\:-space-x-32 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-8rem * var(--space-x-reverse)); + margin-left: calc(-8rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-40 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-10rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-10rem * var(--space-y-reverse)); + } + + .xl\:-space-x-40 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-10rem * var(--space-x-reverse)); + margin-left: calc(-10rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-48 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-12rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-12rem * var(--space-y-reverse)); + } + + .xl\:-space-x-48 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-12rem * var(--space-x-reverse)); + margin-left: calc(-12rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-56 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-14rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-14rem * var(--space-y-reverse)); + } + + .xl\:-space-x-56 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-14rem * var(--space-x-reverse)); + margin-left: calc(-14rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-64 > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-16rem * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-16rem * var(--space-y-reverse)); + } + + .xl\:-space-x-64 > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-16rem * var(--space-x-reverse)); + margin-left: calc(-16rem * calc(1 - var(--space-x-reverse))); + } + + .xl\:-space-y-px > :not(template) ~ :not(template) { + --space-y-reverse: 0; + margin-top: calc(-1px * calc(1 - var(--space-y-reverse))); + margin-bottom: calc(-1px * var(--space-y-reverse)); + } + + .xl\:-space-x-px > :not(template) ~ :not(template) { + --space-x-reverse: 0; + margin-right: calc(-1px * var(--space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--space-x-reverse))); + } + + .xl\:space-y-reverse > :not(template) ~ :not(template) { + --space-y-reverse: 1; + } + + .xl\:space-x-reverse > :not(template) ~ :not(template) { + --space-x-reverse: 1; + } + + .xl\:divide-y-0 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(0px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(0px * var(--divide-y-reverse)); + } + + .xl\:divide-x-0 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(0px * var(--divide-x-reverse)); + border-left-width: calc(0px * calc(1 - var(--divide-x-reverse))); + } + + .xl\:divide-y-2 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(2px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(2px * var(--divide-y-reverse)); + } + + .xl\:divide-x-2 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(2px * var(--divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--divide-x-reverse))); + } + + .xl\:divide-y-4 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(4px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(4px * var(--divide-y-reverse)); + } + + .xl\:divide-x-4 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(4px * var(--divide-x-reverse)); + border-left-width: calc(4px * calc(1 - var(--divide-x-reverse))); + } + + .xl\:divide-y-8 > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(8px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(8px * var(--divide-y-reverse)); + } + + .xl\:divide-x-8 > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(8px * var(--divide-x-reverse)); + border-left-width: calc(8px * calc(1 - var(--divide-x-reverse))); + } + + .xl\:divide-y > :not(template) ~ :not(template) { + --divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--divide-y-reverse))); + border-bottom-width: calc(1px * var(--divide-y-reverse)); + } + + .xl\:divide-x > :not(template) ~ :not(template) { + --divide-x-reverse: 0; + border-right-width: calc(1px * var(--divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--divide-x-reverse))); + } + + .xl\:divide-y-reverse > :not(template) ~ :not(template) { + --divide-y-reverse: 1; + } + + .xl\:divide-x-reverse > :not(template) ~ :not(template) { + --divide-x-reverse: 1; + } + + .xl\:divide-transparent > :not(template) ~ :not(template) { + border-color: transparent; + } + + .xl\:divide-current > :not(template) ~ :not(template) { + border-color: currentColor; + } + + .xl\:divide-black > :not(template) ~ :not(template) { + border-color: #000; + } + + .xl\:divide-white > :not(template) ~ :not(template) { + border-color: #fff; + } + + .xl\:divide-gray-100 > :not(template) ~ :not(template) { + border-color: #f7fafc; + } + + .xl\:divide-gray-200 > :not(template) ~ :not(template) { + border-color: #edf2f7; + } + + .xl\:divide-gray-300 > :not(template) ~ :not(template) { + border-color: #e2e8f0; + } + + .xl\:divide-gray-400 > :not(template) ~ :not(template) { + border-color: #cbd5e0; + } + + .xl\:divide-gray-500 > :not(template) ~ :not(template) { + border-color: #a0aec0; + } + + .xl\:divide-gray-600 > :not(template) ~ :not(template) { + border-color: #718096; + } + + .xl\:divide-gray-700 > :not(template) ~ :not(template) { + border-color: #4a5568; + } + + .xl\:divide-gray-800 > :not(template) ~ :not(template) { + border-color: #2d3748; + } + + .xl\:divide-gray-900 > :not(template) ~ :not(template) { + border-color: #1a202c; + } + + .xl\:divide-red-100 > :not(template) ~ :not(template) { + border-color: #fff5f5; + } + + .xl\:divide-red-200 > :not(template) ~ :not(template) { + border-color: #fed7d7; + } + + .xl\:divide-red-300 > :not(template) ~ :not(template) { + border-color: #feb2b2; + } + + .xl\:divide-red-400 > :not(template) ~ :not(template) { + border-color: #fc8181; + } + + .xl\:divide-red-500 > :not(template) ~ :not(template) { + border-color: #f56565; + } + + .xl\:divide-red-600 > :not(template) ~ :not(template) { + border-color: #e53e3e; + } + + .xl\:divide-red-700 > :not(template) ~ :not(template) { + border-color: #c53030; + } + + .xl\:divide-red-800 > :not(template) ~ :not(template) { + border-color: #9b2c2c; + } + + .xl\:divide-red-900 > :not(template) ~ :not(template) { + border-color: #742a2a; + } + + .xl\:divide-orange-100 > :not(template) ~ :not(template) { + border-color: #fffaf0; + } + + .xl\:divide-orange-200 > :not(template) ~ :not(template) { + border-color: #feebc8; + } + + .xl\:divide-orange-300 > :not(template) ~ :not(template) { + border-color: #fbd38d; + } + + .xl\:divide-orange-400 > :not(template) ~ :not(template) { + border-color: #f6ad55; + } + + .xl\:divide-orange-500 > :not(template) ~ :not(template) { + border-color: #ed8936; + } + + .xl\:divide-orange-600 > :not(template) ~ :not(template) { + border-color: #dd6b20; + } + + .xl\:divide-orange-700 > :not(template) ~ :not(template) { + border-color: #c05621; + } + + .xl\:divide-orange-800 > :not(template) ~ :not(template) { + border-color: #9c4221; + } + + .xl\:divide-orange-900 > :not(template) ~ :not(template) { + border-color: #7b341e; + } + + .xl\:divide-yellow-100 > :not(template) ~ :not(template) { + border-color: #fffff0; + } + + .xl\:divide-yellow-200 > :not(template) ~ :not(template) { + border-color: #fefcbf; + } + + .xl\:divide-yellow-300 > :not(template) ~ :not(template) { + border-color: #faf089; + } + + .xl\:divide-yellow-400 > :not(template) ~ :not(template) { + border-color: #f6e05e; + } + + .xl\:divide-yellow-500 > :not(template) ~ :not(template) { + border-color: #ecc94b; + } + + .xl\:divide-yellow-600 > :not(template) ~ :not(template) { + border-color: #d69e2e; + } + + .xl\:divide-yellow-700 > :not(template) ~ :not(template) { + border-color: #b7791f; + } + + .xl\:divide-yellow-800 > :not(template) ~ :not(template) { + border-color: #975a16; + } + + .xl\:divide-yellow-900 > :not(template) ~ :not(template) { + border-color: #744210; + } + + .xl\:divide-green-100 > :not(template) ~ :not(template) { + border-color: #f0fff4; + } + + .xl\:divide-green-200 > :not(template) ~ :not(template) { + border-color: #c6f6d5; + } + + .xl\:divide-green-300 > :not(template) ~ :not(template) { + border-color: #9ae6b4; + } + + .xl\:divide-green-400 > :not(template) ~ :not(template) { + border-color: #68d391; + } + + .xl\:divide-green-500 > :not(template) ~ :not(template) { + border-color: #48bb78; + } + + .xl\:divide-green-600 > :not(template) ~ :not(template) { + border-color: #38a169; + } + + .xl\:divide-green-700 > :not(template) ~ :not(template) { + border-color: #2f855a; + } + + .xl\:divide-green-800 > :not(template) ~ :not(template) { + border-color: #276749; + } + + .xl\:divide-green-900 > :not(template) ~ :not(template) { + border-color: #22543d; + } + + .xl\:divide-teal-100 > :not(template) ~ :not(template) { + border-color: #e6fffa; + } + + .xl\:divide-teal-200 > :not(template) ~ :not(template) { + border-color: #b2f5ea; + } + + .xl\:divide-teal-300 > :not(template) ~ :not(template) { + border-color: #81e6d9; + } + + .xl\:divide-teal-400 > :not(template) ~ :not(template) { + border-color: #4fd1c5; + } + + .xl\:divide-teal-500 > :not(template) ~ :not(template) { + border-color: #38b2ac; + } + + .xl\:divide-teal-600 > :not(template) ~ :not(template) { + border-color: #319795; + } + + .xl\:divide-teal-700 > :not(template) ~ :not(template) { + border-color: #2c7a7b; + } + + .xl\:divide-teal-800 > :not(template) ~ :not(template) { + border-color: #285e61; + } + + .xl\:divide-teal-900 > :not(template) ~ :not(template) { + border-color: #234e52; + } + + .xl\:divide-blue-100 > :not(template) ~ :not(template) { + border-color: #ebf8ff; + } + + .xl\:divide-blue-200 > :not(template) ~ :not(template) { + border-color: #bee3f8; + } + + .xl\:divide-blue-300 > :not(template) ~ :not(template) { + border-color: #90cdf4; + } + + .xl\:divide-blue-400 > :not(template) ~ :not(template) { + border-color: #63b3ed; + } + + .xl\:divide-blue-500 > :not(template) ~ :not(template) { + border-color: #4299e1; + } + + .xl\:divide-blue-600 > :not(template) ~ :not(template) { + border-color: #3182ce; + } + + .xl\:divide-blue-700 > :not(template) ~ :not(template) { + border-color: #2b6cb0; + } + + .xl\:divide-blue-800 > :not(template) ~ :not(template) { + border-color: #2c5282; + } + + .xl\:divide-blue-900 > :not(template) ~ :not(template) { + border-color: #2a4365; + } + + .xl\:divide-indigo-100 > :not(template) ~ :not(template) { + border-color: #ebf4ff; + } + + .xl\:divide-indigo-200 > :not(template) ~ :not(template) { + border-color: #c3dafe; + } + + .xl\:divide-indigo-300 > :not(template) ~ :not(template) { + border-color: #a3bffa; + } + + .xl\:divide-indigo-400 > :not(template) ~ :not(template) { + border-color: #7f9cf5; + } + + .xl\:divide-indigo-500 > :not(template) ~ :not(template) { + border-color: #667eea; + } + + .xl\:divide-indigo-600 > :not(template) ~ :not(template) { + border-color: #5a67d8; + } + + .xl\:divide-indigo-700 > :not(template) ~ :not(template) { + border-color: #4c51bf; + } + + .xl\:divide-indigo-800 > :not(template) ~ :not(template) { + border-color: #434190; + } + + .xl\:divide-indigo-900 > :not(template) ~ :not(template) { + border-color: #3c366b; + } + + .xl\:divide-purple-100 > :not(template) ~ :not(template) { + border-color: #faf5ff; + } + + .xl\:divide-purple-200 > :not(template) ~ :not(template) { + border-color: #e9d8fd; + } + + .xl\:divide-purple-300 > :not(template) ~ :not(template) { + border-color: #d6bcfa; + } + + .xl\:divide-purple-400 > :not(template) ~ :not(template) { + border-color: #b794f4; + } + + .xl\:divide-purple-500 > :not(template) ~ :not(template) { + border-color: #9f7aea; + } + + .xl\:divide-purple-600 > :not(template) ~ :not(template) { + border-color: #805ad5; + } + + .xl\:divide-purple-700 > :not(template) ~ :not(template) { + border-color: #6b46c1; + } + + .xl\:divide-purple-800 > :not(template) ~ :not(template) { + border-color: #553c9a; + } + + .xl\:divide-purple-900 > :not(template) ~ :not(template) { + border-color: #44337a; + } + + .xl\:divide-pink-100 > :not(template) ~ :not(template) { + border-color: #fff5f7; + } + + .xl\:divide-pink-200 > :not(template) ~ :not(template) { + border-color: #fed7e2; + } + + .xl\:divide-pink-300 > :not(template) ~ :not(template) { + border-color: #fbb6ce; + } + + .xl\:divide-pink-400 > :not(template) ~ :not(template) { + border-color: #f687b3; + } + + .xl\:divide-pink-500 > :not(template) ~ :not(template) { + border-color: #ed64a6; + } + + .xl\:divide-pink-600 > :not(template) ~ :not(template) { + border-color: #d53f8c; + } + + .xl\:divide-pink-700 > :not(template) ~ :not(template) { + border-color: #b83280; + } + + .xl\:divide-pink-800 > :not(template) ~ :not(template) { + border-color: #97266d; + } + + .xl\:divide-pink-900 > :not(template) ~ :not(template) { + border-color: #702459; + } + + .xl\: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; + } + + .xl\:not-sr-only { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .xl\:focus\:sr-only:focus { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + } + + .xl\:focus\:not-sr-only:focus { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; + } + + .xl\:appearance-none { + appearance: none; + } + + .xl\:bg-fixed { + background-attachment: fixed; + } + + .xl\:bg-local { + background-attachment: local; + } + + .xl\:bg-scroll { + background-attachment: scroll; + } + + .xl\:bg-transparent { + background-color: transparent; + } + + .xl\:bg-current { + background-color: currentColor; + } + + .xl\:bg-black { + background-color: #000; + } + + .xl\:bg-white { + background-color: #fff; + } + + .xl\:bg-gray-100 { + background-color: #f7fafc; + } + + .xl\:bg-gray-200 { + background-color: #edf2f7; + } + + .xl\:bg-gray-300 { + background-color: #e2e8f0; + } + + .xl\:bg-gray-400 { + background-color: #cbd5e0; + } + + .xl\:bg-gray-500 { + background-color: #a0aec0; + } + + .xl\:bg-gray-600 { + background-color: #718096; + } + + .xl\:bg-gray-700 { + background-color: #4a5568; + } + + .xl\:bg-gray-800 { + background-color: #2d3748; + } + + .xl\:bg-gray-900 { + background-color: #1a202c; + } + + .xl\:bg-red-100 { + background-color: #fff5f5; + } + + .xl\:bg-red-200 { + background-color: #fed7d7; + } + + .xl\:bg-red-300 { + background-color: #feb2b2; + } + + .xl\:bg-red-400 { + background-color: #fc8181; + } + + .xl\:bg-red-500 { + background-color: #f56565; + } + + .xl\:bg-red-600 { + background-color: #e53e3e; + } + + .xl\:bg-red-700 { + background-color: #c53030; + } + + .xl\:bg-red-800 { + background-color: #9b2c2c; + } + + .xl\:bg-red-900 { + background-color: #742a2a; + } + + .xl\:bg-orange-100 { + background-color: #fffaf0; + } + + .xl\:bg-orange-200 { + background-color: #feebc8; + } + + .xl\:bg-orange-300 { + background-color: #fbd38d; + } + + .xl\:bg-orange-400 { + background-color: #f6ad55; + } + + .xl\:bg-orange-500 { + background-color: #ed8936; + } + + .xl\:bg-orange-600 { + background-color: #dd6b20; + } + + .xl\:bg-orange-700 { + background-color: #c05621; + } + + .xl\:bg-orange-800 { + background-color: #9c4221; + } + + .xl\:bg-orange-900 { + background-color: #7b341e; + } + + .xl\:bg-yellow-100 { + background-color: #fffff0; + } + + .xl\:bg-yellow-200 { + background-color: #fefcbf; + } + + .xl\:bg-yellow-300 { + background-color: #faf089; + } + + .xl\:bg-yellow-400 { + background-color: #f6e05e; + } + + .xl\:bg-yellow-500 { + background-color: #ecc94b; + } + + .xl\:bg-yellow-600 { + background-color: #d69e2e; + } + + .xl\:bg-yellow-700 { + background-color: #b7791f; + } + + .xl\:bg-yellow-800 { + background-color: #975a16; + } + + .xl\:bg-yellow-900 { + background-color: #744210; + } + + .xl\:bg-green-100 { + background-color: #f0fff4; + } + + .xl\:bg-green-200 { + background-color: #c6f6d5; + } + + .xl\:bg-green-300 { + background-color: #9ae6b4; + } + + .xl\:bg-green-400 { + background-color: #68d391; + } + + .xl\:bg-green-500 { + background-color: #48bb78; + } + + .xl\:bg-green-600 { + background-color: #38a169; + } + + .xl\:bg-green-700 { + background-color: #2f855a; + } + + .xl\:bg-green-800 { + background-color: #276749; + } + + .xl\:bg-green-900 { + background-color: #22543d; + } + + .xl\:bg-teal-100 { + background-color: #e6fffa; + } + + .xl\:bg-teal-200 { + background-color: #b2f5ea; + } + + .xl\:bg-teal-300 { + background-color: #81e6d9; + } + + .xl\:bg-teal-400 { + background-color: #4fd1c5; + } + + .xl\:bg-teal-500 { + background-color: #38b2ac; + } + + .xl\:bg-teal-600 { + background-color: #319795; + } + + .xl\:bg-teal-700 { + background-color: #2c7a7b; + } + + .xl\:bg-teal-800 { + background-color: #285e61; + } + + .xl\:bg-teal-900 { + background-color: #234e52; + } + + .xl\:bg-blue-100 { + background-color: #ebf8ff; + } + + .xl\:bg-blue-200 { + background-color: #bee3f8; + } + + .xl\:bg-blue-300 { + background-color: #90cdf4; + } + + .xl\:bg-blue-400 { + background-color: #63b3ed; + } + + .xl\:bg-blue-500 { + background-color: #4299e1; + } + + .xl\:bg-blue-600 { + background-color: #3182ce; + } + + .xl\:bg-blue-700 { + background-color: #2b6cb0; + } + + .xl\:bg-blue-800 { + background-color: #2c5282; + } + + .xl\:bg-blue-900 { + background-color: #2a4365; + } + + .xl\:bg-indigo-100 { + background-color: #ebf4ff; + } + + .xl\:bg-indigo-200 { + background-color: #c3dafe; + } + + .xl\:bg-indigo-300 { + background-color: #a3bffa; + } + + .xl\:bg-indigo-400 { + background-color: #7f9cf5; + } + + .xl\:bg-indigo-500 { + background-color: #667eea; + } + + .xl\:bg-indigo-600 { + background-color: #5a67d8; + } + + .xl\:bg-indigo-700 { + background-color: #4c51bf; + } + + .xl\:bg-indigo-800 { + background-color: #434190; + } + + .xl\:bg-indigo-900 { + background-color: #3c366b; + } + + .xl\:bg-purple-100 { + background-color: #faf5ff; + } + + .xl\:bg-purple-200 { + background-color: #e9d8fd; + } + + .xl\:bg-purple-300 { + background-color: #d6bcfa; + } + + .xl\:bg-purple-400 { + background-color: #b794f4; + } + + .xl\:bg-purple-500 { + background-color: #9f7aea; + } + + .xl\:bg-purple-600 { + background-color: #805ad5; + } + + .xl\:bg-purple-700 { + background-color: #6b46c1; + } + + .xl\:bg-purple-800 { + background-color: #553c9a; + } + + .xl\:bg-purple-900 { + background-color: #44337a; + } + + .xl\:bg-pink-100 { + background-color: #fff5f7; + } + + .xl\:bg-pink-200 { + background-color: #fed7e2; + } + + .xl\:bg-pink-300 { + background-color: #fbb6ce; + } + + .xl\:bg-pink-400 { + background-color: #f687b3; + } + + .xl\:bg-pink-500 { + background-color: #ed64a6; + } + + .xl\:bg-pink-600 { + background-color: #d53f8c; + } + + .xl\:bg-pink-700 { + background-color: #b83280; + } + + .xl\:bg-pink-800 { + background-color: #97266d; + } + + .xl\:bg-pink-900 { + background-color: #702459; + } + + .xl\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .xl\:hover\:bg-current:hover { + background-color: currentColor; + } + + .xl\:hover\:bg-black:hover { + background-color: #000; + } + + .xl\:hover\:bg-white:hover { + background-color: #fff; + } + + .xl\:hover\:bg-gray-100:hover { + background-color: #f7fafc; + } + + .xl\:hover\:bg-gray-200:hover { + background-color: #edf2f7; + } + + .xl\:hover\:bg-gray-300:hover { + background-color: #e2e8f0; + } + + .xl\:hover\:bg-gray-400:hover { + background-color: #cbd5e0; + } + + .xl\:hover\:bg-gray-500:hover { + background-color: #a0aec0; + } + + .xl\:hover\:bg-gray-600:hover { + background-color: #718096; + } + + .xl\:hover\:bg-gray-700:hover { + background-color: #4a5568; + } + + .xl\:hover\:bg-gray-800:hover { + background-color: #2d3748; + } + + .xl\:hover\:bg-gray-900:hover { + background-color: #1a202c; + } + + .xl\:hover\:bg-red-100:hover { + background-color: #fff5f5; + } + + .xl\:hover\:bg-red-200:hover { + background-color: #fed7d7; + } + + .xl\:hover\:bg-red-300:hover { + background-color: #feb2b2; + } + + .xl\:hover\:bg-red-400:hover { + background-color: #fc8181; + } + + .xl\:hover\:bg-red-500:hover { + background-color: #f56565; + } + + .xl\:hover\:bg-red-600:hover { + background-color: #e53e3e; + } + + .xl\:hover\:bg-red-700:hover { + background-color: #c53030; + } + + .xl\:hover\:bg-red-800:hover { + background-color: #9b2c2c; + } + + .xl\:hover\:bg-red-900:hover { + background-color: #742a2a; + } + + .xl\:hover\:bg-orange-100:hover { + background-color: #fffaf0; + } + + .xl\:hover\:bg-orange-200:hover { + background-color: #feebc8; + } + + .xl\:hover\:bg-orange-300:hover { + background-color: #fbd38d; + } + + .xl\:hover\:bg-orange-400:hover { + background-color: #f6ad55; + } + + .xl\:hover\:bg-orange-500:hover { + background-color: #ed8936; + } + + .xl\:hover\:bg-orange-600:hover { + background-color: #dd6b20; + } + + .xl\:hover\:bg-orange-700:hover { + background-color: #c05621; + } + + .xl\:hover\:bg-orange-800:hover { + background-color: #9c4221; + } + + .xl\:hover\:bg-orange-900:hover { + background-color: #7b341e; + } + + .xl\:hover\:bg-yellow-100:hover { + background-color: #fffff0; + } + + .xl\:hover\:bg-yellow-200:hover { + background-color: #fefcbf; + } + + .xl\:hover\:bg-yellow-300:hover { + background-color: #faf089; + } + + .xl\:hover\:bg-yellow-400:hover { + background-color: #f6e05e; + } + + .xl\:hover\:bg-yellow-500:hover { + background-color: #ecc94b; + } + + .xl\:hover\:bg-yellow-600:hover { + background-color: #d69e2e; + } + + .xl\:hover\:bg-yellow-700:hover { + background-color: #b7791f; + } + + .xl\:hover\:bg-yellow-800:hover { + background-color: #975a16; + } + + .xl\:hover\:bg-yellow-900:hover { + background-color: #744210; + } + + .xl\:hover\:bg-green-100:hover { + background-color: #f0fff4; + } + + .xl\:hover\:bg-green-200:hover { + background-color: #c6f6d5; + } + + .xl\:hover\:bg-green-300:hover { + background-color: #9ae6b4; + } + + .xl\:hover\:bg-green-400:hover { + background-color: #68d391; + } + + .xl\:hover\:bg-green-500:hover { + background-color: #48bb78; + } + + .xl\:hover\:bg-green-600:hover { + background-color: #38a169; + } + + .xl\:hover\:bg-green-700:hover { + background-color: #2f855a; + } + + .xl\:hover\:bg-green-800:hover { + background-color: #276749; + } + + .xl\:hover\:bg-green-900:hover { + background-color: #22543d; + } + + .xl\:hover\:bg-teal-100:hover { + background-color: #e6fffa; + } + + .xl\:hover\:bg-teal-200:hover { + background-color: #b2f5ea; + } + + .xl\:hover\:bg-teal-300:hover { + background-color: #81e6d9; + } + + .xl\:hover\:bg-teal-400:hover { + background-color: #4fd1c5; + } + + .xl\:hover\:bg-teal-500:hover { + background-color: #38b2ac; + } + + .xl\:hover\:bg-teal-600:hover { + background-color: #319795; + } + + .xl\:hover\:bg-teal-700:hover { + background-color: #2c7a7b; + } + + .xl\:hover\:bg-teal-800:hover { + background-color: #285e61; + } + + .xl\:hover\:bg-teal-900:hover { + background-color: #234e52; + } + + .xl\:hover\:bg-blue-100:hover { + background-color: #ebf8ff; + } + + .xl\:hover\:bg-blue-200:hover { + background-color: #bee3f8; + } + + .xl\:hover\:bg-blue-300:hover { + background-color: #90cdf4; + } + + .xl\:hover\:bg-blue-400:hover { + background-color: #63b3ed; + } + + .xl\:hover\:bg-blue-500:hover { + background-color: #4299e1; + } + + .xl\:hover\:bg-blue-600:hover { + background-color: #3182ce; + } + + .xl\:hover\:bg-blue-700:hover { + background-color: #2b6cb0; + } + + .xl\:hover\:bg-blue-800:hover { + background-color: #2c5282; + } + + .xl\:hover\:bg-blue-900:hover { + background-color: #2a4365; + } + + .xl\:hover\:bg-indigo-100:hover { + background-color: #ebf4ff; + } + + .xl\:hover\:bg-indigo-200:hover { + background-color: #c3dafe; + } + + .xl\:hover\:bg-indigo-300:hover { + background-color: #a3bffa; + } + + .xl\:hover\:bg-indigo-400:hover { + background-color: #7f9cf5; + } + + .xl\:hover\:bg-indigo-500:hover { + background-color: #667eea; + } + + .xl\:hover\:bg-indigo-600:hover { + background-color: #5a67d8; + } + + .xl\:hover\:bg-indigo-700:hover { + background-color: #4c51bf; + } + + .xl\:hover\:bg-indigo-800:hover { + background-color: #434190; + } + + .xl\:hover\:bg-indigo-900:hover { + background-color: #3c366b; + } + + .xl\:hover\:bg-purple-100:hover { + background-color: #faf5ff; + } + + .xl\:hover\:bg-purple-200:hover { + background-color: #e9d8fd; + } + + .xl\:hover\:bg-purple-300:hover { + background-color: #d6bcfa; + } + + .xl\:hover\:bg-purple-400:hover { + background-color: #b794f4; + } + + .xl\:hover\:bg-purple-500:hover { + background-color: #9f7aea; + } + + .xl\:hover\:bg-purple-600:hover { + background-color: #805ad5; + } + + .xl\:hover\:bg-purple-700:hover { + background-color: #6b46c1; + } + + .xl\:hover\:bg-purple-800:hover { + background-color: #553c9a; + } + + .xl\:hover\:bg-purple-900:hover { + background-color: #44337a; + } + + .xl\:hover\:bg-pink-100:hover { + background-color: #fff5f7; + } + + .xl\:hover\:bg-pink-200:hover { + background-color: #fed7e2; + } + + .xl\:hover\:bg-pink-300:hover { + background-color: #fbb6ce; + } + + .xl\:hover\:bg-pink-400:hover { + background-color: #f687b3; + } + + .xl\:hover\:bg-pink-500:hover { + background-color: #ed64a6; + } + + .xl\:hover\:bg-pink-600:hover { + background-color: #d53f8c; + } + + .xl\:hover\:bg-pink-700:hover { + background-color: #b83280; + } + + .xl\:hover\:bg-pink-800:hover { + background-color: #97266d; + } + + .xl\:hover\:bg-pink-900:hover { + background-color: #702459; + } + + .xl\:focus\:bg-transparent:focus { + background-color: transparent; + } + + .xl\:focus\:bg-current:focus { + background-color: currentColor; + } + + .xl\:focus\:bg-black:focus { + background-color: #000; + } + + .xl\:focus\:bg-white:focus { + background-color: #fff; + } + + .xl\:focus\:bg-gray-100:focus { + background-color: #f7fafc; + } + + .xl\:focus\:bg-gray-200:focus { + background-color: #edf2f7; + } + + .xl\:focus\:bg-gray-300:focus { + background-color: #e2e8f0; + } + + .xl\:focus\:bg-gray-400:focus { + background-color: #cbd5e0; + } + + .xl\:focus\:bg-gray-500:focus { + background-color: #a0aec0; + } + + .xl\:focus\:bg-gray-600:focus { + background-color: #718096; + } + + .xl\:focus\:bg-gray-700:focus { + background-color: #4a5568; + } + + .xl\:focus\:bg-gray-800:focus { + background-color: #2d3748; + } + + .xl\:focus\:bg-gray-900:focus { + background-color: #1a202c; + } + + .xl\:focus\:bg-red-100:focus { + background-color: #fff5f5; + } + + .xl\:focus\:bg-red-200:focus { + background-color: #fed7d7; + } + + .xl\:focus\:bg-red-300:focus { + background-color: #feb2b2; + } + + .xl\:focus\:bg-red-400:focus { + background-color: #fc8181; + } + + .xl\:focus\:bg-red-500:focus { + background-color: #f56565; + } + + .xl\:focus\:bg-red-600:focus { + background-color: #e53e3e; + } + + .xl\:focus\:bg-red-700:focus { + background-color: #c53030; + } + + .xl\:focus\:bg-red-800:focus { + background-color: #9b2c2c; + } + + .xl\:focus\:bg-red-900:focus { + background-color: #742a2a; + } + + .xl\:focus\:bg-orange-100:focus { + background-color: #fffaf0; + } + + .xl\:focus\:bg-orange-200:focus { + background-color: #feebc8; + } + + .xl\:focus\:bg-orange-300:focus { + background-color: #fbd38d; + } + + .xl\:focus\:bg-orange-400:focus { + background-color: #f6ad55; + } + + .xl\:focus\:bg-orange-500:focus { + background-color: #ed8936; + } + + .xl\:focus\:bg-orange-600:focus { + background-color: #dd6b20; + } + + .xl\:focus\:bg-orange-700:focus { + background-color: #c05621; + } + + .xl\:focus\:bg-orange-800:focus { + background-color: #9c4221; + } + + .xl\:focus\:bg-orange-900:focus { + background-color: #7b341e; + } + + .xl\:focus\:bg-yellow-100:focus { + background-color: #fffff0; + } + + .xl\:focus\:bg-yellow-200:focus { + background-color: #fefcbf; + } + + .xl\:focus\:bg-yellow-300:focus { + background-color: #faf089; + } + + .xl\:focus\:bg-yellow-400:focus { + background-color: #f6e05e; + } + + .xl\:focus\:bg-yellow-500:focus { + background-color: #ecc94b; + } + + .xl\:focus\:bg-yellow-600:focus { + background-color: #d69e2e; + } + + .xl\:focus\:bg-yellow-700:focus { + background-color: #b7791f; + } + + .xl\:focus\:bg-yellow-800:focus { + background-color: #975a16; + } + + .xl\:focus\:bg-yellow-900:focus { + background-color: #744210; + } + + .xl\:focus\:bg-green-100:focus { + background-color: #f0fff4; + } + + .xl\:focus\:bg-green-200:focus { + background-color: #c6f6d5; + } + + .xl\:focus\:bg-green-300:focus { + background-color: #9ae6b4; + } + + .xl\:focus\:bg-green-400:focus { + background-color: #68d391; + } + + .xl\:focus\:bg-green-500:focus { + background-color: #48bb78; + } + + .xl\:focus\:bg-green-600:focus { + background-color: #38a169; + } + + .xl\:focus\:bg-green-700:focus { + background-color: #2f855a; + } + + .xl\:focus\:bg-green-800:focus { + background-color: #276749; + } + + .xl\:focus\:bg-green-900:focus { + background-color: #22543d; + } + + .xl\:focus\:bg-teal-100:focus { + background-color: #e6fffa; + } + + .xl\:focus\:bg-teal-200:focus { + background-color: #b2f5ea; + } + + .xl\:focus\:bg-teal-300:focus { + background-color: #81e6d9; + } + + .xl\:focus\:bg-teal-400:focus { + background-color: #4fd1c5; + } + + .xl\:focus\:bg-teal-500:focus { + background-color: #38b2ac; + } + + .xl\:focus\:bg-teal-600:focus { + background-color: #319795; + } + + .xl\:focus\:bg-teal-700:focus { + background-color: #2c7a7b; + } + + .xl\:focus\:bg-teal-800:focus { + background-color: #285e61; + } + + .xl\:focus\:bg-teal-900:focus { + background-color: #234e52; + } + + .xl\:focus\:bg-blue-100:focus { + background-color: #ebf8ff; + } + + .xl\:focus\:bg-blue-200:focus { + background-color: #bee3f8; + } + + .xl\:focus\:bg-blue-300:focus { + background-color: #90cdf4; + } + + .xl\:focus\:bg-blue-400:focus { + background-color: #63b3ed; + } + + .xl\:focus\:bg-blue-500:focus { + background-color: #4299e1; + } + + .xl\:focus\:bg-blue-600:focus { + background-color: #3182ce; + } + + .xl\:focus\:bg-blue-700:focus { + background-color: #2b6cb0; + } + + .xl\:focus\:bg-blue-800:focus { + background-color: #2c5282; + } + + .xl\:focus\:bg-blue-900:focus { + background-color: #2a4365; + } + + .xl\:focus\:bg-indigo-100:focus { + background-color: #ebf4ff; + } + + .xl\:focus\:bg-indigo-200:focus { + background-color: #c3dafe; + } + + .xl\:focus\:bg-indigo-300:focus { + background-color: #a3bffa; + } + + .xl\:focus\:bg-indigo-400:focus { + background-color: #7f9cf5; + } + + .xl\:focus\:bg-indigo-500:focus { + background-color: #667eea; + } + + .xl\:focus\:bg-indigo-600:focus { + background-color: #5a67d8; + } + + .xl\:focus\:bg-indigo-700:focus { + background-color: #4c51bf; + } + + .xl\:focus\:bg-indigo-800:focus { + background-color: #434190; + } + + .xl\:focus\:bg-indigo-900:focus { + background-color: #3c366b; + } + + .xl\:focus\:bg-purple-100:focus { + background-color: #faf5ff; + } + + .xl\:focus\:bg-purple-200:focus { + background-color: #e9d8fd; + } + + .xl\:focus\:bg-purple-300:focus { + background-color: #d6bcfa; + } + + .xl\:focus\:bg-purple-400:focus { + background-color: #b794f4; + } + + .xl\:focus\:bg-purple-500:focus { + background-color: #9f7aea; + } + + .xl\:focus\:bg-purple-600:focus { + background-color: #805ad5; + } + + .xl\:focus\:bg-purple-700:focus { + background-color: #6b46c1; + } + + .xl\:focus\:bg-purple-800:focus { + background-color: #553c9a; + } + + .xl\:focus\:bg-purple-900:focus { + background-color: #44337a; + } + + .xl\:focus\:bg-pink-100:focus { + background-color: #fff5f7; + } + + .xl\:focus\:bg-pink-200:focus { + background-color: #fed7e2; + } + + .xl\:focus\:bg-pink-300:focus { + background-color: #fbb6ce; + } + + .xl\:focus\:bg-pink-400:focus { + background-color: #f687b3; + } + + .xl\:focus\:bg-pink-500:focus { + background-color: #ed64a6; + } + + .xl\:focus\:bg-pink-600:focus { + background-color: #d53f8c; + } + + .xl\:focus\:bg-pink-700:focus { + background-color: #b83280; + } + + .xl\:focus\:bg-pink-800:focus { + background-color: #97266d; + } + + .xl\:focus\:bg-pink-900:focus { + background-color: #702459; + } + + .xl\:bg-bottom { + background-position: bottom; + } + + .xl\:bg-center { + background-position: center; + } + + .xl\:bg-left { + background-position: left; + } + + .xl\:bg-left-bottom { + background-position: left bottom; + } + + .xl\:bg-left-top { + background-position: left top; + } + + .xl\:bg-right { + background-position: right; + } + + .xl\:bg-right-bottom { + background-position: right bottom; + } + + .xl\:bg-right-top { + background-position: right top; + } + + .xl\:bg-top { + background-position: top; + } + + .xl\:bg-repeat { + background-repeat: repeat; + } + + .xl\:bg-no-repeat { + background-repeat: no-repeat; + } + + .xl\:bg-repeat-x { + background-repeat: repeat-x; + } + + .xl\:bg-repeat-y { + background-repeat: repeat-y; + } + + .xl\:bg-repeat-round { + background-repeat: round; + } + + .xl\:bg-repeat-space { + background-repeat: space; + } + + .xl\:bg-auto { + background-size: auto; + } + + .xl\:bg-cover { + background-size: cover; + } + + .xl\:bg-contain { + background-size: contain; + } + + .xl\:border-collapse { + border-collapse: collapse; + } + + .xl\:border-separate { + border-collapse: separate; + } + + .xl\:border-transparent { + border-color: transparent; + } + + .xl\:border-current { + border-color: currentColor; + } + + .xl\:border-black { + border-color: #000; + } + + .xl\:border-white { + border-color: #fff; + } + + .xl\:border-gray-100 { + border-color: #f7fafc; + } + + .xl\:border-gray-200 { + border-color: #edf2f7; + } + + .xl\:border-gray-300 { + border-color: #e2e8f0; + } + + .xl\:border-gray-400 { + border-color: #cbd5e0; + } + + .xl\:border-gray-500 { + border-color: #a0aec0; + } + + .xl\:border-gray-600 { + border-color: #718096; + } + + .xl\:border-gray-700 { + border-color: #4a5568; + } + + .xl\:border-gray-800 { + border-color: #2d3748; + } + + .xl\:border-gray-900 { + border-color: #1a202c; + } + + .xl\:border-red-100 { + border-color: #fff5f5; + } + + .xl\:border-red-200 { + border-color: #fed7d7; + } + + .xl\:border-red-300 { + border-color: #feb2b2; + } + + .xl\:border-red-400 { + border-color: #fc8181; + } + + .xl\:border-red-500 { + border-color: #f56565; + } + + .xl\:border-red-600 { + border-color: #e53e3e; + } + + .xl\:border-red-700 { + border-color: #c53030; + } + + .xl\:border-red-800 { + border-color: #9b2c2c; + } + + .xl\:border-red-900 { + border-color: #742a2a; + } + + .xl\:border-orange-100 { + border-color: #fffaf0; + } + + .xl\:border-orange-200 { + border-color: #feebc8; + } + + .xl\:border-orange-300 { + border-color: #fbd38d; + } + + .xl\:border-orange-400 { + border-color: #f6ad55; + } + + .xl\:border-orange-500 { + border-color: #ed8936; + } + + .xl\:border-orange-600 { + border-color: #dd6b20; + } + + .xl\:border-orange-700 { + border-color: #c05621; + } + + .xl\:border-orange-800 { + border-color: #9c4221; + } + + .xl\:border-orange-900 { + border-color: #7b341e; + } + + .xl\:border-yellow-100 { + border-color: #fffff0; + } + + .xl\:border-yellow-200 { + border-color: #fefcbf; + } + + .xl\:border-yellow-300 { + border-color: #faf089; + } + + .xl\:border-yellow-400 { + border-color: #f6e05e; + } + + .xl\:border-yellow-500 { + border-color: #ecc94b; + } + + .xl\:border-yellow-600 { + border-color: #d69e2e; + } + + .xl\:border-yellow-700 { + border-color: #b7791f; + } + + .xl\:border-yellow-800 { + border-color: #975a16; + } + + .xl\:border-yellow-900 { + border-color: #744210; + } + + .xl\:border-green-100 { + border-color: #f0fff4; + } + + .xl\:border-green-200 { + border-color: #c6f6d5; + } + + .xl\:border-green-300 { + border-color: #9ae6b4; + } + + .xl\:border-green-400 { + border-color: #68d391; + } + + .xl\:border-green-500 { + border-color: #48bb78; + } + + .xl\:border-green-600 { + border-color: #38a169; + } + + .xl\:border-green-700 { + border-color: #2f855a; + } + + .xl\:border-green-800 { + border-color: #276749; + } + + .xl\:border-green-900 { + border-color: #22543d; + } + + .xl\:border-teal-100 { + border-color: #e6fffa; + } + + .xl\:border-teal-200 { + border-color: #b2f5ea; + } + + .xl\:border-teal-300 { + border-color: #81e6d9; + } + + .xl\:border-teal-400 { + border-color: #4fd1c5; + } + + .xl\:border-teal-500 { + border-color: #38b2ac; + } + + .xl\:border-teal-600 { + border-color: #319795; + } + + .xl\:border-teal-700 { + border-color: #2c7a7b; + } + + .xl\:border-teal-800 { + border-color: #285e61; + } + + .xl\:border-teal-900 { + border-color: #234e52; + } + + .xl\:border-blue-100 { + border-color: #ebf8ff; + } + + .xl\:border-blue-200 { + border-color: #bee3f8; + } + + .xl\:border-blue-300 { + border-color: #90cdf4; + } + + .xl\:border-blue-400 { + border-color: #63b3ed; + } + + .xl\:border-blue-500 { + border-color: #4299e1; + } + + .xl\:border-blue-600 { + border-color: #3182ce; + } + + .xl\:border-blue-700 { + border-color: #2b6cb0; + } + + .xl\:border-blue-800 { + border-color: #2c5282; + } + + .xl\:border-blue-900 { + border-color: #2a4365; + } + + .xl\:border-indigo-100 { + border-color: #ebf4ff; + } + + .xl\:border-indigo-200 { + border-color: #c3dafe; + } + + .xl\:border-indigo-300 { + border-color: #a3bffa; + } + + .xl\:border-indigo-400 { + border-color: #7f9cf5; + } + + .xl\:border-indigo-500 { + border-color: #667eea; + } + + .xl\:border-indigo-600 { + border-color: #5a67d8; + } + + .xl\:border-indigo-700 { + border-color: #4c51bf; + } + + .xl\:border-indigo-800 { + border-color: #434190; + } + + .xl\:border-indigo-900 { + border-color: #3c366b; + } + + .xl\:border-purple-100 { + border-color: #faf5ff; + } + + .xl\:border-purple-200 { + border-color: #e9d8fd; + } + + .xl\:border-purple-300 { + border-color: #d6bcfa; + } + + .xl\:border-purple-400 { + border-color: #b794f4; + } + + .xl\:border-purple-500 { + border-color: #9f7aea; + } + + .xl\:border-purple-600 { + border-color: #805ad5; + } + + .xl\:border-purple-700 { + border-color: #6b46c1; + } + + .xl\:border-purple-800 { + border-color: #553c9a; + } + + .xl\:border-purple-900 { + border-color: #44337a; + } + + .xl\:border-pink-100 { + border-color: #fff5f7; + } + + .xl\:border-pink-200 { + border-color: #fed7e2; + } + + .xl\:border-pink-300 { + border-color: #fbb6ce; + } + + .xl\:border-pink-400 { + border-color: #f687b3; + } + + .xl\:border-pink-500 { + border-color: #ed64a6; + } + + .xl\:border-pink-600 { + border-color: #d53f8c; + } + + .xl\:border-pink-700 { + border-color: #b83280; + } + + .xl\:border-pink-800 { + border-color: #97266d; + } + + .xl\:border-pink-900 { + border-color: #702459; + } + + .xl\:hover\:border-transparent:hover { + border-color: transparent; + } + + .xl\:hover\:border-current:hover { + border-color: currentColor; + } + + .xl\:hover\:border-black:hover { + border-color: #000; + } + + .xl\:hover\:border-white:hover { + border-color: #fff; + } + + .xl\:hover\:border-gray-100:hover { + border-color: #f7fafc; + } + + .xl\:hover\:border-gray-200:hover { + border-color: #edf2f7; + } + + .xl\:hover\:border-gray-300:hover { + border-color: #e2e8f0; + } + + .xl\:hover\:border-gray-400:hover { + border-color: #cbd5e0; + } + + .xl\:hover\:border-gray-500:hover { + border-color: #a0aec0; + } + + .xl\:hover\:border-gray-600:hover { + border-color: #718096; + } + + .xl\:hover\:border-gray-700:hover { + border-color: #4a5568; + } + + .xl\:hover\:border-gray-800:hover { + border-color: #2d3748; + } + + .xl\:hover\:border-gray-900:hover { + border-color: #1a202c; + } + + .xl\:hover\:border-red-100:hover { + border-color: #fff5f5; + } + + .xl\:hover\:border-red-200:hover { + border-color: #fed7d7; + } + + .xl\:hover\:border-red-300:hover { + border-color: #feb2b2; + } + + .xl\:hover\:border-red-400:hover { + border-color: #fc8181; + } + + .xl\:hover\:border-red-500:hover { + border-color: #f56565; + } + + .xl\:hover\:border-red-600:hover { + border-color: #e53e3e; + } + + .xl\:hover\:border-red-700:hover { + border-color: #c53030; + } + + .xl\:hover\:border-red-800:hover { + border-color: #9b2c2c; + } + + .xl\:hover\:border-red-900:hover { + border-color: #742a2a; + } + + .xl\:hover\:border-orange-100:hover { + border-color: #fffaf0; + } + + .xl\:hover\:border-orange-200:hover { + border-color: #feebc8; + } + + .xl\:hover\:border-orange-300:hover { + border-color: #fbd38d; + } + + .xl\:hover\:border-orange-400:hover { + border-color: #f6ad55; + } + + .xl\:hover\:border-orange-500:hover { + border-color: #ed8936; + } + + .xl\:hover\:border-orange-600:hover { + border-color: #dd6b20; + } + + .xl\:hover\:border-orange-700:hover { + border-color: #c05621; + } + + .xl\:hover\:border-orange-800:hover { + border-color: #9c4221; + } + + .xl\:hover\:border-orange-900:hover { + border-color: #7b341e; + } + + .xl\:hover\:border-yellow-100:hover { + border-color: #fffff0; + } + + .xl\:hover\:border-yellow-200:hover { + border-color: #fefcbf; + } + + .xl\:hover\:border-yellow-300:hover { + border-color: #faf089; + } + + .xl\:hover\:border-yellow-400:hover { + border-color: #f6e05e; + } + + .xl\:hover\:border-yellow-500:hover { + border-color: #ecc94b; + } + + .xl\:hover\:border-yellow-600:hover { + border-color: #d69e2e; + } + + .xl\:hover\:border-yellow-700:hover { + border-color: #b7791f; + } + + .xl\:hover\:border-yellow-800:hover { + border-color: #975a16; + } + + .xl\:hover\:border-yellow-900:hover { + border-color: #744210; + } + + .xl\:hover\:border-green-100:hover { + border-color: #f0fff4; + } + + .xl\:hover\:border-green-200:hover { + border-color: #c6f6d5; + } + + .xl\:hover\:border-green-300:hover { + border-color: #9ae6b4; + } + + .xl\:hover\:border-green-400:hover { + border-color: #68d391; + } + + .xl\:hover\:border-green-500:hover { + border-color: #48bb78; + } + + .xl\:hover\:border-green-600:hover { + border-color: #38a169; + } + + .xl\:hover\:border-green-700:hover { + border-color: #2f855a; + } + + .xl\:hover\:border-green-800:hover { + border-color: #276749; + } + + .xl\:hover\:border-green-900:hover { + border-color: #22543d; + } + + .xl\:hover\:border-teal-100:hover { + border-color: #e6fffa; + } + + .xl\:hover\:border-teal-200:hover { + border-color: #b2f5ea; + } + + .xl\:hover\:border-teal-300:hover { + border-color: #81e6d9; + } + + .xl\:hover\:border-teal-400:hover { + border-color: #4fd1c5; + } + + .xl\:hover\:border-teal-500:hover { + border-color: #38b2ac; + } + + .xl\:hover\:border-teal-600:hover { + border-color: #319795; + } + + .xl\:hover\:border-teal-700:hover { + border-color: #2c7a7b; + } + + .xl\:hover\:border-teal-800:hover { + border-color: #285e61; + } + + .xl\:hover\:border-teal-900:hover { + border-color: #234e52; + } + + .xl\:hover\:border-blue-100:hover { + border-color: #ebf8ff; + } + + .xl\:hover\:border-blue-200:hover { + border-color: #bee3f8; + } + + .xl\:hover\:border-blue-300:hover { + border-color: #90cdf4; + } + + .xl\:hover\:border-blue-400:hover { + border-color: #63b3ed; + } + + .xl\:hover\:border-blue-500:hover { + border-color: #4299e1; + } + + .xl\:hover\:border-blue-600:hover { + border-color: #3182ce; + } + + .xl\:hover\:border-blue-700:hover { + border-color: #2b6cb0; + } + + .xl\:hover\:border-blue-800:hover { + border-color: #2c5282; + } + + .xl\:hover\:border-blue-900:hover { + border-color: #2a4365; + } + + .xl\:hover\:border-indigo-100:hover { + border-color: #ebf4ff; + } + + .xl\:hover\:border-indigo-200:hover { + border-color: #c3dafe; + } + + .xl\:hover\:border-indigo-300:hover { + border-color: #a3bffa; + } + + .xl\:hover\:border-indigo-400:hover { + border-color: #7f9cf5; + } + + .xl\:hover\:border-indigo-500:hover { + border-color: #667eea; + } + + .xl\:hover\:border-indigo-600:hover { + border-color: #5a67d8; + } + + .xl\:hover\:border-indigo-700:hover { + border-color: #4c51bf; + } + + .xl\:hover\:border-indigo-800:hover { + border-color: #434190; + } + + .xl\:hover\:border-indigo-900:hover { + border-color: #3c366b; + } + + .xl\:hover\:border-purple-100:hover { + border-color: #faf5ff; + } + + .xl\:hover\:border-purple-200:hover { + border-color: #e9d8fd; + } + + .xl\:hover\:border-purple-300:hover { + border-color: #d6bcfa; + } + + .xl\:hover\:border-purple-400:hover { + border-color: #b794f4; + } + + .xl\:hover\:border-purple-500:hover { + border-color: #9f7aea; + } + + .xl\:hover\:border-purple-600:hover { + border-color: #805ad5; + } + + .xl\:hover\:border-purple-700:hover { + border-color: #6b46c1; + } + + .xl\:hover\:border-purple-800:hover { + border-color: #553c9a; + } + + .xl\:hover\:border-purple-900:hover { + border-color: #44337a; + } + + .xl\:hover\:border-pink-100:hover { + border-color: #fff5f7; + } + + .xl\:hover\:border-pink-200:hover { + border-color: #fed7e2; + } + + .xl\:hover\:border-pink-300:hover { + border-color: #fbb6ce; + } + + .xl\:hover\:border-pink-400:hover { + border-color: #f687b3; + } + + .xl\:hover\:border-pink-500:hover { + border-color: #ed64a6; + } + + .xl\:hover\:border-pink-600:hover { + border-color: #d53f8c; + } + + .xl\:hover\:border-pink-700:hover { + border-color: #b83280; + } + + .xl\:hover\:border-pink-800:hover { + border-color: #97266d; + } + + .xl\:hover\:border-pink-900:hover { + border-color: #702459; + } + + .xl\:focus\:border-transparent:focus { + border-color: transparent; + } + + .xl\:focus\:border-current:focus { + border-color: currentColor; + } + + .xl\:focus\:border-black:focus { + border-color: #000; + } + + .xl\:focus\:border-white:focus { + border-color: #fff; + } + + .xl\:focus\:border-gray-100:focus { + border-color: #f7fafc; + } + + .xl\:focus\:border-gray-200:focus { + border-color: #edf2f7; + } + + .xl\:focus\:border-gray-300:focus { + border-color: #e2e8f0; + } + + .xl\:focus\:border-gray-400:focus { + border-color: #cbd5e0; + } + + .xl\:focus\:border-gray-500:focus { + border-color: #a0aec0; + } + + .xl\:focus\:border-gray-600:focus { + border-color: #718096; + } + + .xl\:focus\:border-gray-700:focus { + border-color: #4a5568; + } + + .xl\:focus\:border-gray-800:focus { + border-color: #2d3748; + } + + .xl\:focus\:border-gray-900:focus { + border-color: #1a202c; + } + + .xl\:focus\:border-red-100:focus { + border-color: #fff5f5; + } + + .xl\:focus\:border-red-200:focus { + border-color: #fed7d7; + } + + .xl\:focus\:border-red-300:focus { + border-color: #feb2b2; + } + + .xl\:focus\:border-red-400:focus { + border-color: #fc8181; + } + + .xl\:focus\:border-red-500:focus { + border-color: #f56565; + } + + .xl\:focus\:border-red-600:focus { + border-color: #e53e3e; + } + + .xl\:focus\:border-red-700:focus { + border-color: #c53030; + } + + .xl\:focus\:border-red-800:focus { + border-color: #9b2c2c; + } + + .xl\:focus\:border-red-900:focus { + border-color: #742a2a; + } + + .xl\:focus\:border-orange-100:focus { + border-color: #fffaf0; + } + + .xl\:focus\:border-orange-200:focus { + border-color: #feebc8; + } + + .xl\:focus\:border-orange-300:focus { + border-color: #fbd38d; + } + + .xl\:focus\:border-orange-400:focus { + border-color: #f6ad55; + } + + .xl\:focus\:border-orange-500:focus { + border-color: #ed8936; + } + + .xl\:focus\:border-orange-600:focus { + border-color: #dd6b20; + } + + .xl\:focus\:border-orange-700:focus { + border-color: #c05621; + } + + .xl\:focus\:border-orange-800:focus { + border-color: #9c4221; + } + + .xl\:focus\:border-orange-900:focus { + border-color: #7b341e; + } + + .xl\:focus\:border-yellow-100:focus { + border-color: #fffff0; + } + + .xl\:focus\:border-yellow-200:focus { + border-color: #fefcbf; + } + + .xl\:focus\:border-yellow-300:focus { + border-color: #faf089; + } + + .xl\:focus\:border-yellow-400:focus { + border-color: #f6e05e; + } + + .xl\:focus\:border-yellow-500:focus { + border-color: #ecc94b; + } + + .xl\:focus\:border-yellow-600:focus { + border-color: #d69e2e; + } + + .xl\:focus\:border-yellow-700:focus { + border-color: #b7791f; + } + + .xl\:focus\:border-yellow-800:focus { + border-color: #975a16; + } + + .xl\:focus\:border-yellow-900:focus { + border-color: #744210; + } + + .xl\:focus\:border-green-100:focus { + border-color: #f0fff4; + } + + .xl\:focus\:border-green-200:focus { + border-color: #c6f6d5; + } + + .xl\:focus\:border-green-300:focus { + border-color: #9ae6b4; + } + + .xl\:focus\:border-green-400:focus { + border-color: #68d391; + } + + .xl\:focus\:border-green-500:focus { + border-color: #48bb78; + } + + .xl\:focus\:border-green-600:focus { + border-color: #38a169; + } + + .xl\:focus\:border-green-700:focus { + border-color: #2f855a; + } + + .xl\:focus\:border-green-800:focus { + border-color: #276749; + } + + .xl\:focus\:border-green-900:focus { + border-color: #22543d; + } + + .xl\:focus\:border-teal-100:focus { + border-color: #e6fffa; + } + + .xl\:focus\:border-teal-200:focus { + border-color: #b2f5ea; + } + + .xl\:focus\:border-teal-300:focus { + border-color: #81e6d9; + } + + .xl\:focus\:border-teal-400:focus { + border-color: #4fd1c5; + } + + .xl\:focus\:border-teal-500:focus { + border-color: #38b2ac; + } + + .xl\:focus\:border-teal-600:focus { + border-color: #319795; + } + + .xl\:focus\:border-teal-700:focus { + border-color: #2c7a7b; + } + + .xl\:focus\:border-teal-800:focus { + border-color: #285e61; + } + + .xl\:focus\:border-teal-900:focus { + border-color: #234e52; + } + + .xl\:focus\:border-blue-100:focus { + border-color: #ebf8ff; + } + + .xl\:focus\:border-blue-200:focus { + border-color: #bee3f8; + } + + .xl\:focus\:border-blue-300:focus { + border-color: #90cdf4; + } + + .xl\:focus\:border-blue-400:focus { + border-color: #63b3ed; + } + + .xl\:focus\:border-blue-500:focus { + border-color: #4299e1; + } + + .xl\:focus\:border-blue-600:focus { + border-color: #3182ce; + } + + .xl\:focus\:border-blue-700:focus { + border-color: #2b6cb0; + } + + .xl\:focus\:border-blue-800:focus { + border-color: #2c5282; + } + + .xl\:focus\:border-blue-900:focus { + border-color: #2a4365; + } + + .xl\:focus\:border-indigo-100:focus { + border-color: #ebf4ff; + } + + .xl\:focus\:border-indigo-200:focus { + border-color: #c3dafe; + } + + .xl\:focus\:border-indigo-300:focus { + border-color: #a3bffa; + } + + .xl\:focus\:border-indigo-400:focus { + border-color: #7f9cf5; + } + + .xl\:focus\:border-indigo-500:focus { + border-color: #667eea; + } + + .xl\:focus\:border-indigo-600:focus { + border-color: #5a67d8; + } + + .xl\:focus\:border-indigo-700:focus { + border-color: #4c51bf; + } + + .xl\:focus\:border-indigo-800:focus { + border-color: #434190; + } + + .xl\:focus\:border-indigo-900:focus { + border-color: #3c366b; + } + + .xl\:focus\:border-purple-100:focus { + border-color: #faf5ff; + } + + .xl\:focus\:border-purple-200:focus { + border-color: #e9d8fd; + } + + .xl\:focus\:border-purple-300:focus { + border-color: #d6bcfa; + } + + .xl\:focus\:border-purple-400:focus { + border-color: #b794f4; + } + + .xl\:focus\:border-purple-500:focus { + border-color: #9f7aea; + } + + .xl\:focus\:border-purple-600:focus { + border-color: #805ad5; + } + + .xl\:focus\:border-purple-700:focus { + border-color: #6b46c1; + } + + .xl\:focus\:border-purple-800:focus { + border-color: #553c9a; + } + + .xl\:focus\:border-purple-900:focus { + border-color: #44337a; + } + + .xl\:focus\:border-pink-100:focus { + border-color: #fff5f7; + } + + .xl\:focus\:border-pink-200:focus { + border-color: #fed7e2; + } + + .xl\:focus\:border-pink-300:focus { + border-color: #fbb6ce; + } + + .xl\:focus\:border-pink-400:focus { + border-color: #f687b3; + } + + .xl\:focus\:border-pink-500:focus { + border-color: #ed64a6; + } + + .xl\:focus\:border-pink-600:focus { + border-color: #d53f8c; + } + + .xl\:focus\:border-pink-700:focus { + border-color: #b83280; + } + + .xl\:focus\:border-pink-800:focus { + border-color: #97266d; + } + + .xl\:focus\:border-pink-900:focus { + border-color: #702459; + } + + .xl\:rounded-none { + border-radius: 0; + } + + .xl\:rounded-sm { + border-radius: 0.125rem; + } + + .xl\:rounded { + border-radius: 0.25rem; + } + + .xl\:rounded-md { + border-radius: 0.375rem; + } + + .xl\:rounded-lg { + border-radius: 0.5rem; + } + + .xl\:rounded-full { + border-radius: 9999px; + } + + .xl\:rounded-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .xl\:rounded-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .xl\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .xl\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .xl\:rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; + } + + .xl\:rounded-r-sm { + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; + } + + .xl\:rounded-b-sm { + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .xl\:rounded-l-sm { + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; + } + + .xl\:rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + } + + .xl\:rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + } + + .xl\:rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .xl\:rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + + .xl\:rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; + } + + .xl\:rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; + } + + .xl\:rounded-b-md { + border-bottom-right-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .xl\:rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; + } + + .xl\:rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + .xl\:rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + } + + .xl\:rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .xl\:rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .xl\:rounded-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .xl\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .xl\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .xl\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .xl\:rounded-tl-none { + border-top-left-radius: 0; + } + + .xl\:rounded-tr-none { + border-top-right-radius: 0; + } + + .xl\:rounded-br-none { + border-bottom-right-radius: 0; + } + + .xl\:rounded-bl-none { + border-bottom-left-radius: 0; + } + + .xl\:rounded-tl-sm { + border-top-left-radius: 0.125rem; + } + + .xl\:rounded-tr-sm { + border-top-right-radius: 0.125rem; + } + + .xl\:rounded-br-sm { + border-bottom-right-radius: 0.125rem; + } + + .xl\:rounded-bl-sm { + border-bottom-left-radius: 0.125rem; + } + + .xl\:rounded-tl { + border-top-left-radius: 0.25rem; + } + + .xl\:rounded-tr { + border-top-right-radius: 0.25rem; + } + + .xl\:rounded-br { + border-bottom-right-radius: 0.25rem; + } + + .xl\:rounded-bl { + border-bottom-left-radius: 0.25rem; + } + + .xl\:rounded-tl-md { + border-top-left-radius: 0.375rem; + } + + .xl\:rounded-tr-md { + border-top-right-radius: 0.375rem; + } + + .xl\:rounded-br-md { + border-bottom-right-radius: 0.375rem; + } + + .xl\:rounded-bl-md { + border-bottom-left-radius: 0.375rem; + } + + .xl\:rounded-tl-lg { + border-top-left-radius: 0.5rem; + } + + .xl\:rounded-tr-lg { + border-top-right-radius: 0.5rem; + } + + .xl\:rounded-br-lg { + border-bottom-right-radius: 0.5rem; + } + + .xl\:rounded-bl-lg { + border-bottom-left-radius: 0.5rem; + } + + .xl\:rounded-tl-full { + border-top-left-radius: 9999px; + } + + .xl\:rounded-tr-full { + border-top-right-radius: 9999px; + } + + .xl\:rounded-br-full { + border-bottom-right-radius: 9999px; + } + + .xl\:rounded-bl-full { + border-bottom-left-radius: 9999px; + } + + .xl\:border-solid { + border-style: solid; + } + + .xl\:border-dashed { + border-style: dashed; + } + + .xl\:border-dotted { + border-style: dotted; + } + + .xl\:border-double { + border-style: double; + } + + .xl\:border-none { + border-style: none; + } + + .xl\:border-0 { + border-width: 0; + } + + .xl\:border-2 { + border-width: 2px; + } + + .xl\:border-4 { + border-width: 4px; + } + + .xl\:border-8 { + border-width: 8px; + } + + .xl\:border { + border-width: 1px; + } + + .xl\:border-t-0 { + border-top-width: 0; + } + + .xl\:border-r-0 { + border-right-width: 0; + } + + .xl\:border-b-0 { + border-bottom-width: 0; + } + + .xl\:border-l-0 { + border-left-width: 0; + } + + .xl\:border-t-2 { + border-top-width: 2px; + } + + .xl\:border-r-2 { + border-right-width: 2px; + } + + .xl\:border-b-2 { + border-bottom-width: 2px; + } + + .xl\:border-l-2 { + border-left-width: 2px; + } + + .xl\:border-t-4 { + border-top-width: 4px; + } + + .xl\:border-r-4 { + border-right-width: 4px; + } + + .xl\:border-b-4 { + border-bottom-width: 4px; + } + + .xl\:border-l-4 { + border-left-width: 4px; + } + + .xl\:border-t-8 { + border-top-width: 8px; + } + + .xl\:border-r-8 { + border-right-width: 8px; + } + + .xl\:border-b-8 { + border-bottom-width: 8px; + } + + .xl\:border-l-8 { + border-left-width: 8px; + } + + .xl\:border-t { + border-top-width: 1px; + } + + .xl\:border-r { + border-right-width: 1px; + } + + .xl\:border-b { + border-bottom-width: 1px; + } + + .xl\:border-l { + border-left-width: 1px; + } + + .xl\:box-border { + box-sizing: border-box; + } + + .xl\:box-content { + box-sizing: content-box; + } + + .xl\:cursor-auto { + cursor: auto; + } + + .xl\:cursor-default { + cursor: default; + } + + .xl\:cursor-pointer { + cursor: pointer; + } + + .xl\:cursor-wait { + cursor: wait; + } + + .xl\:cursor-text { + cursor: text; + } + + .xl\:cursor-move { + cursor: move; + } + + .xl\:cursor-not-allowed { + cursor: not-allowed; + } + + .xl\:block { + display: block; + } + + .xl\:inline-block { + display: inline-block; + } + + .xl\:inline { + display: inline; + } + + .xl\:flex { + display: flex; + } + + .xl\:inline-flex { + display: inline-flex; + } + + .xl\:table { + display: table; + } + + .xl\:table-caption { + display: table-caption; + } + + .xl\:table-cell { + display: table-cell; + } + + .xl\:table-column { + display: table-column; + } + + .xl\:table-column-group { + display: table-column-group; + } + + .xl\:table-footer-group { + display: table-footer-group; + } + + .xl\:table-header-group { + display: table-header-group; + } + + .xl\:table-row-group { + display: table-row-group; + } + + .xl\:table-row { + display: table-row; + } + + .xl\:flow-root { + display: flow-root; + } + + .xl\:grid { + display: grid; + } + + .xl\:inline-grid { + display: inline-grid; + } + + .xl\:hidden { + display: none; + } + + .xl\:flex-row { + flex-direction: row; + } + + .xl\:flex-row-reverse { + flex-direction: row-reverse; + } + + .xl\:flex-col { + flex-direction: column; + } + + .xl\:flex-col-reverse { + flex-direction: column-reverse; + } + + .xl\:flex-wrap { + flex-wrap: wrap; + } + + .xl\:flex-wrap-reverse { + flex-wrap: wrap-reverse; + } + + .xl\:flex-no-wrap { + flex-wrap: nowrap; + } + + .xl\:items-start { + align-items: flex-start; + } + + .xl\:items-end { + align-items: flex-end; + } + + .xl\:items-center { + align-items: center; + } + + .xl\:items-baseline { + align-items: baseline; + } + + .xl\:items-stretch { + align-items: stretch; + } + + .xl\:self-auto { + align-self: auto; + } + + .xl\:self-start { + align-self: flex-start; + } + + .xl\:self-end { + align-self: flex-end; + } + + .xl\:self-center { + align-self: center; + } + + .xl\:self-stretch { + align-self: stretch; + } + + .xl\:justify-start { + justify-content: flex-start; + } + + .xl\:justify-end { + justify-content: flex-end; + } + + .xl\:justify-center { + justify-content: center; + } + + .xl\:justify-between { + justify-content: space-between; + } + + .xl\:justify-around { + justify-content: space-around; + } + + .xl\:justify-evenly { + justify-content: space-evenly; + } + + .xl\:content-center { + align-content: center; + } + + .xl\:content-start { + align-content: flex-start; + } + + .xl\:content-end { + align-content: flex-end; + } + + .xl\:content-between { + align-content: space-between; + } + + .xl\:content-around { + align-content: space-around; + } + + .xl\:flex-1 { + flex: 1 1 0%; + } + + .xl\:flex-auto { + flex: 1 1 auto; + } + + .xl\:flex-initial { + flex: 0 1 auto; + } + + .xl\:flex-none { + flex: none; + } + + .xl\:flex-grow-0 { + flex-grow: 0; + } + + .xl\:flex-grow { + flex-grow: 1; + } + + .xl\:flex-shrink-0 { + flex-shrink: 0; + } + + .xl\:flex-shrink { + flex-shrink: 1; + } + + .xl\:order-1 { + order: 1; + } + + .xl\:order-2 { + order: 2; + } + + .xl\:order-3 { + order: 3; + } + + .xl\:order-4 { + order: 4; + } + + .xl\:order-5 { + order: 5; + } + + .xl\:order-6 { + order: 6; + } + + .xl\:order-7 { + order: 7; + } + + .xl\:order-8 { + order: 8; + } + + .xl\:order-9 { + order: 9; + } + + .xl\:order-10 { + order: 10; + } + + .xl\:order-11 { + order: 11; + } + + .xl\:order-12 { + order: 12; + } + + .xl\:order-first { + order: -9999; + } + + .xl\:order-last { + order: 9999; + } + + .xl\:order-none { + order: 0; + } + + .xl\:float-right { + float: right; + } + + .xl\:float-left { + float: left; + } + + .xl\:float-none { + float: none; + } + + .xl\:clearfix:after { + content: ""; + display: table; + clear: both; + } + + .xl\:clear-left { + clear: left; + } + + .xl\:clear-right { + clear: right; + } + + .xl\:clear-both { + clear: both; + } + + .xl\:clear-none { + clear: none; + } + + .xl\:font-sans { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + } + + .xl\:font-serif { + font-family: Georgia, Cambria, "Times New Roman", Times, serif; + } + + .xl\:font-mono { + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + } + + .xl\:font-hairline { + font-weight: 100; + } + + .xl\:font-thin { + font-weight: 200; + } + + .xl\:font-light { + font-weight: 300; + } + + .xl\:font-normal { + font-weight: 400; + } + + .xl\:font-medium { + font-weight: 500; + } + + .xl\:font-semibold { + font-weight: 600; + } + + .xl\:font-bold { + font-weight: 700; + } + + .xl\:font-extrabold { + font-weight: 800; + } + + .xl\:font-black { + font-weight: 900; + } + + .xl\:hover\:font-hairline:hover { + font-weight: 100; + } + + .xl\:hover\:font-thin:hover { + font-weight: 200; + } + + .xl\:hover\:font-light:hover { + font-weight: 300; + } + + .xl\:hover\:font-normal:hover { + font-weight: 400; + } + + .xl\:hover\:font-medium:hover { + font-weight: 500; + } + + .xl\:hover\:font-semibold:hover { + font-weight: 600; + } + + .xl\:hover\:font-bold:hover { + font-weight: 700; + } + + .xl\:hover\:font-extrabold:hover { + font-weight: 800; + } + + .xl\:hover\:font-black:hover { + font-weight: 900; + } + + .xl\:focus\:font-hairline:focus { + font-weight: 100; + } + + .xl\:focus\:font-thin:focus { + font-weight: 200; + } + + .xl\:focus\:font-light:focus { + font-weight: 300; + } + + .xl\:focus\:font-normal:focus { + font-weight: 400; + } + + .xl\:focus\:font-medium:focus { + font-weight: 500; + } + + .xl\:focus\:font-semibold:focus { + font-weight: 600; + } + + .xl\:focus\:font-bold:focus { + font-weight: 700; + } + + .xl\:focus\:font-extrabold:focus { + font-weight: 800; + } + + .xl\:focus\:font-black:focus { + font-weight: 900; + } + + .xl\:h-0 { + height: 0; + } + + .xl\:h-1 { + height: 0.25rem; + } + + .xl\:h-2 { + height: 0.5rem; + } + + .xl\:h-3 { + height: 0.75rem; + } + + .xl\:h-4 { + height: 1rem; + } + + .xl\:h-5 { + height: 1.25rem; + } + + .xl\:h-6 { + height: 1.5rem; + } + + .xl\:h-8 { + height: 2rem; + } + + .xl\:h-10 { + height: 2.5rem; + } + + .xl\:h-12 { + height: 3rem; + } + + .xl\:h-16 { + height: 4rem; + } + + .xl\:h-20 { + height: 5rem; + } + + .xl\:h-24 { + height: 6rem; + } + + .xl\:h-32 { + height: 8rem; + } + + .xl\:h-40 { + height: 10rem; + } + + .xl\:h-48 { + height: 12rem; + } + + .xl\:h-56 { + height: 14rem; + } + + .xl\:h-64 { + height: 16rem; + } + + .xl\:h-auto { + height: auto; + } + + .xl\:h-px { + height: 1px; + } + + .xl\:h-full { + height: 100%; + } + + .xl\:h-screen { + height: 100vh; + } + + .xl\:text-xs { + font-size: 0.75rem; + } + + .xl\:text-sm { + font-size: 0.875rem; + } + + .xl\:text-base { + font-size: 1rem; + } + + .xl\:text-lg { + font-size: 1.125rem; + } + + .xl\:text-xl { + font-size: 1.25rem; + } + + .xl\:text-2xl { + font-size: 1.5rem; + } + + .xl\:text-3xl { + font-size: 1.875rem; + } + + .xl\:text-4xl { + font-size: 2.25rem; + } + + .xl\:text-5xl { + font-size: 3rem; + } + + .xl\:text-6xl { + font-size: 4rem; + } + + .xl\:leading-3 { + line-height: .75rem; + } + + .xl\:leading-4 { + line-height: 1rem; + } + + .xl\:leading-5 { + line-height: 1.25rem; + } + + .xl\:leading-6 { + line-height: 1.5rem; + } + + .xl\:leading-7 { + line-height: 1.75rem; + } + + .xl\:leading-8 { + line-height: 2rem; + } + + .xl\:leading-9 { + line-height: 2.25rem; + } + + .xl\:leading-10 { + line-height: 2.5rem; + } + + .xl\:leading-none { + line-height: 1; + } + + .xl\:leading-tight { + line-height: 1.25; + } + + .xl\:leading-snug { + line-height: 1.375; + } + + .xl\:leading-normal { + line-height: 1.5; + } + + .xl\:leading-relaxed { + line-height: 1.625; + } + + .xl\:leading-loose { + line-height: 2; + } + + .xl\:list-inside { + list-style-position: inside; + } + + .xl\:list-outside { + list-style-position: outside; + } + + .xl\:list-none { + list-style-type: none; + } + + .xl\:list-disc { + list-style-type: disc; + } + + .xl\:list-decimal { + list-style-type: decimal; + } + + .xl\:m-0 { + margin: 0; + } + + .xl\:m-1 { + margin: 0.25rem; + } + + .xl\:m-2 { + margin: 0.5rem; + } + + .xl\:m-3 { + margin: 0.75rem; + } + + .xl\:m-4 { + margin: 1rem; + } + + .xl\:m-5 { + margin: 1.25rem; + } + + .xl\:m-6 { + margin: 1.5rem; + } + + .xl\:m-8 { + margin: 2rem; + } + + .xl\:m-10 { + margin: 2.5rem; + } + + .xl\:m-12 { + margin: 3rem; + } + + .xl\:m-16 { + margin: 4rem; + } + + .xl\:m-20 { + margin: 5rem; + } + + .xl\:m-24 { + margin: 6rem; + } + + .xl\:m-32 { + margin: 8rem; + } + + .xl\:m-40 { + margin: 10rem; + } + + .xl\:m-48 { + margin: 12rem; + } + + .xl\:m-56 { + margin: 14rem; + } + + .xl\:m-64 { + margin: 16rem; + } + + .xl\:m-auto { + margin: auto; + } + + .xl\:m-px { + margin: 1px; + } + + .xl\:-m-1 { + margin: -0.25rem; + } + + .xl\:-m-2 { + margin: -0.5rem; + } + + .xl\:-m-3 { + margin: -0.75rem; + } + + .xl\:-m-4 { + margin: -1rem; + } + + .xl\:-m-5 { + margin: -1.25rem; + } + + .xl\:-m-6 { + margin: -1.5rem; + } + + .xl\:-m-8 { + margin: -2rem; + } + + .xl\:-m-10 { + margin: -2.5rem; + } + + .xl\:-m-12 { + margin: -3rem; + } + + .xl\:-m-16 { + margin: -4rem; + } + + .xl\:-m-20 { + margin: -5rem; + } + + .xl\:-m-24 { + margin: -6rem; + } + + .xl\:-m-32 { + margin: -8rem; + } + + .xl\:-m-40 { + margin: -10rem; + } + + .xl\:-m-48 { + margin: -12rem; + } + + .xl\:-m-56 { + margin: -14rem; + } + + .xl\:-m-64 { + margin: -16rem; + } + + .xl\:-m-px { + margin: -1px; + } + + .xl\:my-0 { + margin-top: 0; + margin-bottom: 0; + } + + .xl\:mx-0 { + margin-left: 0; + margin-right: 0; + } + + .xl\:my-1 { + margin-top: 0.25rem; + margin-bottom: 0.25rem; + } + + .xl\:mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; + } + + .xl\:my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; + } + + .xl\:mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; + } + + .xl\:my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; + } + + .xl\:mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; + } + + .xl\:my-4 { + margin-top: 1rem; + margin-bottom: 1rem; + } + + .xl\:mx-4 { + margin-left: 1rem; + margin-right: 1rem; + } + + .xl\:my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; + } + + .xl\:mx-5 { + margin-left: 1.25rem; + margin-right: 1.25rem; + } + + .xl\:my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + } + + .xl\:mx-6 { + margin-left: 1.5rem; + margin-right: 1.5rem; + } + + .xl\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .xl\:mx-8 { + margin-left: 2rem; + margin-right: 2rem; + } + + .xl\:my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; + } + + .xl\:mx-10 { + margin-left: 2.5rem; + margin-right: 2.5rem; + } + + .xl\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .xl\:mx-12 { + margin-left: 3rem; + margin-right: 3rem; + } + + .xl\:my-16 { + margin-top: 4rem; + margin-bottom: 4rem; + } + + .xl\:mx-16 { + margin-left: 4rem; + margin-right: 4rem; + } + + .xl\:my-20 { + margin-top: 5rem; + margin-bottom: 5rem; + } + + .xl\:mx-20 { + margin-left: 5rem; + margin-right: 5rem; + } + + .xl\:my-24 { + margin-top: 6rem; + margin-bottom: 6rem; + } + + .xl\:mx-24 { + margin-left: 6rem; + margin-right: 6rem; + } + + .xl\:my-32 { + margin-top: 8rem; + margin-bottom: 8rem; + } + + .xl\:mx-32 { + margin-left: 8rem; + margin-right: 8rem; + } + + .xl\:my-40 { + margin-top: 10rem; + margin-bottom: 10rem; + } + + .xl\:mx-40 { + margin-left: 10rem; + margin-right: 10rem; + } + + .xl\:my-48 { + margin-top: 12rem; + margin-bottom: 12rem; + } + + .xl\:mx-48 { + margin-left: 12rem; + margin-right: 12rem; + } + + .xl\:my-56 { + margin-top: 14rem; + margin-bottom: 14rem; + } + + .xl\:mx-56 { + margin-left: 14rem; + margin-right: 14rem; + } + + .xl\:my-64 { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .xl\:mx-64 { + margin-left: 16rem; + margin-right: 16rem; + } + + .xl\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .xl\:mx-auto { + margin-left: auto; + margin-right: auto; + } + + .xl\:my-px { + margin-top: 1px; + margin-bottom: 1px; + } + + .xl\:mx-px { + margin-left: 1px; + margin-right: 1px; + } + + .xl\:-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; + } + + .xl\:-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; + } + + .xl\:-my-2 { + margin-top: -0.5rem; + margin-bottom: -0.5rem; + } + + .xl\:-mx-2 { + margin-left: -0.5rem; + margin-right: -0.5rem; + } + + .xl\:-my-3 { + margin-top: -0.75rem; + margin-bottom: -0.75rem; + } + + .xl\:-mx-3 { + margin-left: -0.75rem; + margin-right: -0.75rem; + } + + .xl\:-my-4 { + margin-top: -1rem; + margin-bottom: -1rem; + } + + .xl\:-mx-4 { + margin-left: -1rem; + margin-right: -1rem; + } + + .xl\:-my-5 { + margin-top: -1.25rem; + margin-bottom: -1.25rem; + } + + .xl\:-mx-5 { + margin-left: -1.25rem; + margin-right: -1.25rem; + } + + .xl\:-my-6 { + margin-top: -1.5rem; + margin-bottom: -1.5rem; + } + + .xl\:-mx-6 { + margin-left: -1.5rem; + margin-right: -1.5rem; + } + + .xl\:-my-8 { + margin-top: -2rem; + margin-bottom: -2rem; + } + + .xl\:-mx-8 { + margin-left: -2rem; + margin-right: -2rem; + } + + .xl\:-my-10 { + margin-top: -2.5rem; + margin-bottom: -2.5rem; + } + + .xl\:-mx-10 { + margin-left: -2.5rem; + margin-right: -2.5rem; + } + + .xl\:-my-12 { + margin-top: -3rem; + margin-bottom: -3rem; + } + + .xl\:-mx-12 { + margin-left: -3rem; + margin-right: -3rem; + } + + .xl\:-my-16 { + margin-top: -4rem; + margin-bottom: -4rem; + } + + .xl\:-mx-16 { + margin-left: -4rem; + margin-right: -4rem; + } + + .xl\:-my-20 { + margin-top: -5rem; + margin-bottom: -5rem; + } + + .xl\:-mx-20 { + margin-left: -5rem; + margin-right: -5rem; + } + + .xl\:-my-24 { + margin-top: -6rem; + margin-bottom: -6rem; + } + + .xl\:-mx-24 { + margin-left: -6rem; + margin-right: -6rem; + } + + .xl\:-my-32 { + margin-top: -8rem; + margin-bottom: -8rem; + } + + .xl\:-mx-32 { + margin-left: -8rem; + margin-right: -8rem; + } + + .xl\:-my-40 { + margin-top: -10rem; + margin-bottom: -10rem; + } + + .xl\:-mx-40 { + margin-left: -10rem; + margin-right: -10rem; + } + + .xl\:-my-48 { + margin-top: -12rem; + margin-bottom: -12rem; + } + + .xl\:-mx-48 { + margin-left: -12rem; + margin-right: -12rem; + } + + .xl\:-my-56 { + margin-top: -14rem; + margin-bottom: -14rem; + } + + .xl\:-mx-56 { + margin-left: -14rem; + margin-right: -14rem; + } + + .xl\:-my-64 { + margin-top: -16rem; + margin-bottom: -16rem; + } + + .xl\:-mx-64 { + margin-left: -16rem; + margin-right: -16rem; + } + + .xl\:-my-px { + margin-top: -1px; + margin-bottom: -1px; + } + + .xl\:-mx-px { + margin-left: -1px; + margin-right: -1px; + } + + .xl\:mt-0 { + margin-top: 0; + } + + .xl\:mr-0 { + margin-right: 0; + } + + .xl\:mb-0 { + margin-bottom: 0; + } + + .xl\:ml-0 { + margin-left: 0; + } + + .xl\:mt-1 { + margin-top: 0.25rem; + } + + .xl\:mr-1 { + margin-right: 0.25rem; + } + + .xl\:mb-1 { + margin-bottom: 0.25rem; + } + + .xl\:ml-1 { + margin-left: 0.25rem; + } + + .xl\:mt-2 { + margin-top: 0.5rem; + } + + .xl\:mr-2 { + margin-right: 0.5rem; + } + + .xl\:mb-2 { + margin-bottom: 0.5rem; + } + + .xl\:ml-2 { + margin-left: 0.5rem; + } + + .xl\:mt-3 { + margin-top: 0.75rem; + } + + .xl\:mr-3 { + margin-right: 0.75rem; + } + + .xl\:mb-3 { + margin-bottom: 0.75rem; + } + + .xl\:ml-3 { + margin-left: 0.75rem; + } + + .xl\:mt-4 { + margin-top: 1rem; + } + + .xl\:mr-4 { + margin-right: 1rem; + } + + .xl\:mb-4 { + margin-bottom: 1rem; + } + + .xl\:ml-4 { + margin-left: 1rem; + } + + .xl\:mt-5 { + margin-top: 1.25rem; + } + + .xl\:mr-5 { + margin-right: 1.25rem; + } + + .xl\:mb-5 { + margin-bottom: 1.25rem; + } + + .xl\:ml-5 { + margin-left: 1.25rem; + } + + .xl\:mt-6 { + margin-top: 1.5rem; + } + + .xl\:mr-6 { + margin-right: 1.5rem; + } + + .xl\:mb-6 { + margin-bottom: 1.5rem; + } + + .xl\:ml-6 { + margin-left: 1.5rem; + } + + .xl\:mt-8 { + margin-top: 2rem; + } + + .xl\:mr-8 { + margin-right: 2rem; + } + + .xl\:mb-8 { + margin-bottom: 2rem; + } + + .xl\:ml-8 { + margin-left: 2rem; + } + + .xl\:mt-10 { + margin-top: 2.5rem; + } + + .xl\:mr-10 { + margin-right: 2.5rem; + } + + .xl\:mb-10 { + margin-bottom: 2.5rem; + } + + .xl\:ml-10 { + margin-left: 2.5rem; + } + + .xl\:mt-12 { + margin-top: 3rem; + } + + .xl\:mr-12 { + margin-right: 3rem; + } + + .xl\:mb-12 { + margin-bottom: 3rem; + } + + .xl\:ml-12 { + margin-left: 3rem; + } + + .xl\:mt-16 { + margin-top: 4rem; + } + + .xl\:mr-16 { + margin-right: 4rem; + } + + .xl\:mb-16 { + margin-bottom: 4rem; + } + + .xl\:ml-16 { + margin-left: 4rem; + } + + .xl\:mt-20 { + margin-top: 5rem; + } + + .xl\:mr-20 { + margin-right: 5rem; + } + + .xl\:mb-20 { + margin-bottom: 5rem; + } + + .xl\:ml-20 { + margin-left: 5rem; + } + + .xl\:mt-24 { + margin-top: 6rem; + } + + .xl\:mr-24 { + margin-right: 6rem; + } + + .xl\:mb-24 { + margin-bottom: 6rem; + } + + .xl\:ml-24 { + margin-left: 6rem; + } + + .xl\:mt-32 { + margin-top: 8rem; + } + + .xl\:mr-32 { + margin-right: 8rem; + } + + .xl\:mb-32 { + margin-bottom: 8rem; + } + + .xl\:ml-32 { + margin-left: 8rem; + } + + .xl\:mt-40 { + margin-top: 10rem; + } + + .xl\:mr-40 { + margin-right: 10rem; + } + + .xl\:mb-40 { + margin-bottom: 10rem; + } + + .xl\:ml-40 { + margin-left: 10rem; + } + + .xl\:mt-48 { + margin-top: 12rem; + } + + .xl\:mr-48 { + margin-right: 12rem; + } + + .xl\:mb-48 { + margin-bottom: 12rem; + } + + .xl\:ml-48 { + margin-left: 12rem; + } + + .xl\:mt-56 { + margin-top: 14rem; + } + + .xl\:mr-56 { + margin-right: 14rem; + } + + .xl\:mb-56 { + margin-bottom: 14rem; + } + + .xl\:ml-56 { + margin-left: 14rem; + } + + .xl\:mt-64 { + margin-top: 16rem; + } + + .xl\:mr-64 { + margin-right: 16rem; + } + + .xl\:mb-64 { + margin-bottom: 16rem; + } + + .xl\:ml-64 { + margin-left: 16rem; + } + + .xl\:mt-auto { + margin-top: auto; + } + + .xl\:mr-auto { + margin-right: auto; + } + + .xl\:mb-auto { + margin-bottom: auto; + } + + .xl\:ml-auto { + margin-left: auto; + } + + .xl\:mt-px { + margin-top: 1px; + } + + .xl\:mr-px { + margin-right: 1px; + } + + .xl\:mb-px { + margin-bottom: 1px; + } + + .xl\:ml-px { + margin-left: 1px; + } + + .xl\:-mt-1 { + margin-top: -0.25rem; + } + + .xl\:-mr-1 { + margin-right: -0.25rem; + } + + .xl\:-mb-1 { + margin-bottom: -0.25rem; + } + + .xl\:-ml-1 { + margin-left: -0.25rem; + } + + .xl\:-mt-2 { + margin-top: -0.5rem; + } + + .xl\:-mr-2 { + margin-right: -0.5rem; + } + + .xl\:-mb-2 { + margin-bottom: -0.5rem; + } + + .xl\:-ml-2 { + margin-left: -0.5rem; + } + + .xl\:-mt-3 { + margin-top: -0.75rem; + } + + .xl\:-mr-3 { + margin-right: -0.75rem; + } + + .xl\:-mb-3 { + margin-bottom: -0.75rem; + } + + .xl\:-ml-3 { + margin-left: -0.75rem; + } + + .xl\:-mt-4 { + margin-top: -1rem; + } + + .xl\:-mr-4 { + margin-right: -1rem; + } + + .xl\:-mb-4 { + margin-bottom: -1rem; + } + + .xl\:-ml-4 { + margin-left: -1rem; + } + + .xl\:-mt-5 { + margin-top: -1.25rem; + } + + .xl\:-mr-5 { + margin-right: -1.25rem; + } + + .xl\:-mb-5 { + margin-bottom: -1.25rem; + } + + .xl\:-ml-5 { + margin-left: -1.25rem; + } + + .xl\:-mt-6 { + margin-top: -1.5rem; + } + + .xl\:-mr-6 { + margin-right: -1.5rem; + } + + .xl\:-mb-6 { + margin-bottom: -1.5rem; + } + + .xl\:-ml-6 { + margin-left: -1.5rem; + } + + .xl\:-mt-8 { + margin-top: -2rem; + } + + .xl\:-mr-8 { + margin-right: -2rem; + } + + .xl\:-mb-8 { + margin-bottom: -2rem; + } + + .xl\:-ml-8 { + margin-left: -2rem; + } + + .xl\:-mt-10 { + margin-top: -2.5rem; + } + + .xl\:-mr-10 { + margin-right: -2.5rem; + } + + .xl\:-mb-10 { + margin-bottom: -2.5rem; + } + + .xl\:-ml-10 { + margin-left: -2.5rem; + } + + .xl\:-mt-12 { + margin-top: -3rem; + } + + .xl\:-mr-12 { + margin-right: -3rem; + } + + .xl\:-mb-12 { + margin-bottom: -3rem; + } + + .xl\:-ml-12 { + margin-left: -3rem; + } + + .xl\:-mt-16 { + margin-top: -4rem; + } + + .xl\:-mr-16 { + margin-right: -4rem; + } + + .xl\:-mb-16 { + margin-bottom: -4rem; + } + + .xl\:-ml-16 { + margin-left: -4rem; + } + + .xl\:-mt-20 { + margin-top: -5rem; + } + + .xl\:-mr-20 { + margin-right: -5rem; + } + + .xl\:-mb-20 { + margin-bottom: -5rem; + } + + .xl\:-ml-20 { + margin-left: -5rem; + } + + .xl\:-mt-24 { + margin-top: -6rem; + } + + .xl\:-mr-24 { + margin-right: -6rem; + } + + .xl\:-mb-24 { + margin-bottom: -6rem; + } + + .xl\:-ml-24 { + margin-left: -6rem; + } + + .xl\:-mt-32 { + margin-top: -8rem; + } + + .xl\:-mr-32 { + margin-right: -8rem; + } + + .xl\:-mb-32 { + margin-bottom: -8rem; + } + + .xl\:-ml-32 { + margin-left: -8rem; + } + + .xl\:-mt-40 { + margin-top: -10rem; + } + + .xl\:-mr-40 { + margin-right: -10rem; + } + + .xl\:-mb-40 { + margin-bottom: -10rem; + } + + .xl\:-ml-40 { + margin-left: -10rem; + } + + .xl\:-mt-48 { + margin-top: -12rem; + } + + .xl\:-mr-48 { + margin-right: -12rem; + } + + .xl\:-mb-48 { + margin-bottom: -12rem; + } + + .xl\:-ml-48 { + margin-left: -12rem; + } + + .xl\:-mt-56 { + margin-top: -14rem; + } + + .xl\:-mr-56 { + margin-right: -14rem; + } + + .xl\:-mb-56 { + margin-bottom: -14rem; + } + + .xl\:-ml-56 { + margin-left: -14rem; + } + + .xl\:-mt-64 { + margin-top: -16rem; + } + + .xl\:-mr-64 { + margin-right: -16rem; + } + + .xl\:-mb-64 { + margin-bottom: -16rem; + } + + .xl\:-ml-64 { + margin-left: -16rem; + } + + .xl\:-mt-px { + margin-top: -1px; + } + + .xl\:-mr-px { + margin-right: -1px; + } + + .xl\:-mb-px { + margin-bottom: -1px; + } + + .xl\:-ml-px { + margin-left: -1px; + } + + .xl\:max-h-full { + max-height: 100%; + } + + .xl\:max-h-screen { + max-height: 100vh; + } + + .xl\:max-w-none { + max-width: none; + } + + .xl\:max-w-xs { + max-width: 20rem; + } + + .xl\:max-w-sm { + max-width: 24rem; + } + + .xl\:max-w-md { + max-width: 28rem; + } + + .xl\:max-w-lg { + max-width: 32rem; + } + + .xl\:max-w-xl { + max-width: 36rem; + } + + .xl\:max-w-2xl { + max-width: 42rem; + } + + .xl\:max-w-3xl { + max-width: 48rem; + } + + .xl\:max-w-4xl { + max-width: 56rem; + } + + .xl\:max-w-5xl { + max-width: 64rem; + } + + .xl\:max-w-6xl { + max-width: 72rem; + } + + .xl\:max-w-full { + max-width: 100%; + } + + .xl\:max-w-screen-sm { + max-width: 640px; + } + + .xl\:max-w-screen-md { + max-width: 768px; + } + + .xl\:max-w-screen-lg { + max-width: 1024px; + } + + .xl\:max-w-screen-xl { + max-width: 1280px; + } + + .xl\:min-h-0 { + min-height: 0; + } + + .xl\:min-h-full { + min-height: 100%; + } + + .xl\:min-h-screen { + min-height: 100vh; + } + + .xl\:min-w-0 { + min-width: 0; + } + + .xl\:min-w-full { + min-width: 100%; + } + + .xl\:object-contain { + object-fit: contain; + } + + .xl\:object-cover { + object-fit: cover; + } + + .xl\:object-fill { + object-fit: fill; + } + + .xl\:object-none { + object-fit: none; + } + + .xl\:object-scale-down { + object-fit: scale-down; + } + + .xl\:object-bottom { + object-position: bottom; + } + + .xl\:object-center { + object-position: center; + } + + .xl\:object-left { + object-position: left; + } + + .xl\:object-left-bottom { + object-position: left bottom; + } + + .xl\:object-left-top { + object-position: left top; + } + + .xl\:object-right { + object-position: right; + } + + .xl\:object-right-bottom { + object-position: right bottom; + } + + .xl\:object-right-top { + object-position: right top; + } + + .xl\:object-top { + object-position: top; + } + + .xl\:opacity-0 { + opacity: 0; + } + + .xl\:opacity-25 { + opacity: 0.25; + } + + .xl\:opacity-50 { + opacity: 0.5; + } + + .xl\:opacity-75 { + opacity: 0.75; + } + + .xl\:opacity-100 { + opacity: 1; + } + + .xl\:hover\:opacity-0:hover { + opacity: 0; + } + + .xl\:hover\:opacity-25:hover { + opacity: 0.25; + } + + .xl\:hover\:opacity-50:hover { + opacity: 0.5; + } + + .xl\:hover\:opacity-75:hover { + opacity: 0.75; + } + + .xl\:hover\:opacity-100:hover { + opacity: 1; + } + + .xl\:focus\:opacity-0:focus { + opacity: 0; + } + + .xl\:focus\:opacity-25:focus { + opacity: 0.25; + } + + .xl\:focus\:opacity-50:focus { + opacity: 0.5; + } + + .xl\:focus\:opacity-75:focus { + opacity: 0.75; + } + + .xl\:focus\:opacity-100:focus { + opacity: 1; + } + + .xl\:outline-none { + outline: 0; + } + + .xl\:focus\:outline-none:focus { + outline: 0; + } + + .xl\:overflow-auto { + overflow: auto; + } + + .xl\:overflow-hidden { + overflow: hidden; + } + + .xl\:overflow-visible { + overflow: visible; + } + + .xl\:overflow-scroll { + overflow: scroll; + } + + .xl\:overflow-x-auto { + overflow-x: auto; + } + + .xl\:overflow-y-auto { + overflow-y: auto; + } + + .xl\:overflow-x-hidden { + overflow-x: hidden; + } + + .xl\:overflow-y-hidden { + overflow-y: hidden; + } + + .xl\:overflow-x-visible { + overflow-x: visible; + } + + .xl\:overflow-y-visible { + overflow-y: visible; + } + + .xl\:overflow-x-scroll { + overflow-x: scroll; + } + + .xl\:overflow-y-scroll { + overflow-y: scroll; + } + + .xl\:scrolling-touch { + -webkit-overflow-scrolling: touch; + } + + .xl\:scrolling-auto { + -webkit-overflow-scrolling: auto; + } + + .xl\:p-0 { + padding: 0; + } + + .xl\:p-1 { + padding: 0.25rem; + } + + .xl\:p-2 { + padding: 0.5rem; + } + + .xl\:p-3 { + padding: 0.75rem; + } + + .xl\:p-4 { + padding: 1rem; + } + + .xl\:p-5 { + padding: 1.25rem; + } + + .xl\:p-6 { + padding: 1.5rem; + } + + .xl\:p-8 { + padding: 2rem; + } + + .xl\:p-10 { + padding: 2.5rem; + } + + .xl\:p-12 { + padding: 3rem; + } + + .xl\:p-16 { + padding: 4rem; + } + + .xl\:p-20 { + padding: 5rem; + } + + .xl\:p-24 { + padding: 6rem; + } + + .xl\:p-32 { + padding: 8rem; + } + + .xl\:p-40 { + padding: 10rem; + } + + .xl\:p-48 { + padding: 12rem; + } + + .xl\:p-56 { + padding: 14rem; + } + + .xl\:p-64 { + padding: 16rem; + } + + .xl\:p-px { + padding: 1px; + } + + .xl\:py-0 { + padding-top: 0; + padding-bottom: 0; + } + + .xl\:px-0 { + padding-left: 0; + padding-right: 0; + } + + .xl\:py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .xl\:px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; + } + + .xl\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .xl\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .xl\:py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + } + + .xl\:px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; + } + + .xl\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .xl\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .xl\:py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; + } + + .xl\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .xl\:py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; + } + + .xl\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .xl\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .xl\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .xl\:py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; + } + + .xl\:px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; + } + + .xl\:py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + + .xl\:px-12 { + padding-left: 3rem; + padding-right: 3rem; + } + + .xl\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .xl\:px-16 { + padding-left: 4rem; + padding-right: 4rem; + } + + .xl\:py-20 { + padding-top: 5rem; + padding-bottom: 5rem; + } + + .xl\:px-20 { + padding-left: 5rem; + padding-right: 5rem; + } + + .xl\:py-24 { + padding-top: 6rem; + padding-bottom: 6rem; + } + + .xl\:px-24 { + padding-left: 6rem; + padding-right: 6rem; + } + + .xl\:py-32 { + padding-top: 8rem; + padding-bottom: 8rem; + } + + .xl\:px-32 { + padding-left: 8rem; + padding-right: 8rem; + } + + .xl\:py-40 { + padding-top: 10rem; + padding-bottom: 10rem; + } + + .xl\:px-40 { + padding-left: 10rem; + padding-right: 10rem; + } + + .xl\:py-48 { + padding-top: 12rem; + padding-bottom: 12rem; + } + + .xl\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .xl\:py-56 { + padding-top: 14rem; + padding-bottom: 14rem; + } + + .xl\:px-56 { + padding-left: 14rem; + padding-right: 14rem; + } + + .xl\:py-64 { + padding-top: 16rem; + padding-bottom: 16rem; + } + + .xl\:px-64 { + padding-left: 16rem; + padding-right: 16rem; + } + + .xl\:py-px { + padding-top: 1px; + padding-bottom: 1px; + } + + .xl\:px-px { + padding-left: 1px; + padding-right: 1px; + } + + .xl\:pt-0 { + padding-top: 0; + } + + .xl\:pr-0 { + padding-right: 0; + } + + .xl\:pb-0 { + padding-bottom: 0; + } + + .xl\:pl-0 { + padding-left: 0; + } + + .xl\:pt-1 { + padding-top: 0.25rem; + } + + .xl\:pr-1 { + padding-right: 0.25rem; + } + + .xl\:pb-1 { + padding-bottom: 0.25rem; + } + + .xl\:pl-1 { + padding-left: 0.25rem; + } + + .xl\:pt-2 { + padding-top: 0.5rem; + } + + .xl\:pr-2 { + padding-right: 0.5rem; + } + + .xl\:pb-2 { + padding-bottom: 0.5rem; + } + + .xl\:pl-2 { + padding-left: 0.5rem; + } + + .xl\:pt-3 { + padding-top: 0.75rem; + } + + .xl\:pr-3 { + padding-right: 0.75rem; + } + + .xl\:pb-3 { + padding-bottom: 0.75rem; + } + + .xl\:pl-3 { + padding-left: 0.75rem; + } + + .xl\:pt-4 { + padding-top: 1rem; + } + + .xl\:pr-4 { + padding-right: 1rem; + } + + .xl\:pb-4 { + padding-bottom: 1rem; + } + + .xl\:pl-4 { + padding-left: 1rem; + } + + .xl\:pt-5 { + padding-top: 1.25rem; + } + + .xl\:pr-5 { + padding-right: 1.25rem; + } + + .xl\:pb-5 { + padding-bottom: 1.25rem; + } + + .xl\:pl-5 { + padding-left: 1.25rem; + } + + .xl\:pt-6 { + padding-top: 1.5rem; + } + + .xl\:pr-6 { + padding-right: 1.5rem; + } + + .xl\:pb-6 { + padding-bottom: 1.5rem; + } + + .xl\:pl-6 { + padding-left: 1.5rem; + } + + .xl\:pt-8 { + padding-top: 2rem; + } + + .xl\:pr-8 { + padding-right: 2rem; + } + + .xl\:pb-8 { + padding-bottom: 2rem; + } + + .xl\:pl-8 { + padding-left: 2rem; + } + + .xl\:pt-10 { + padding-top: 2.5rem; + } + + .xl\:pr-10 { + padding-right: 2.5rem; + } + + .xl\:pb-10 { + padding-bottom: 2.5rem; + } + + .xl\:pl-10 { + padding-left: 2.5rem; + } + + .xl\:pt-12 { + padding-top: 3rem; + } + + .xl\:pr-12 { + padding-right: 3rem; + } + + .xl\:pb-12 { + padding-bottom: 3rem; + } + + .xl\:pl-12 { + padding-left: 3rem; + } + + .xl\:pt-16 { + padding-top: 4rem; + } + + .xl\:pr-16 { + padding-right: 4rem; + } + + .xl\:pb-16 { + padding-bottom: 4rem; + } + + .xl\:pl-16 { + padding-left: 4rem; + } + + .xl\:pt-20 { + padding-top: 5rem; + } + + .xl\:pr-20 { + padding-right: 5rem; + } + + .xl\:pb-20 { + padding-bottom: 5rem; + } + + .xl\:pl-20 { + padding-left: 5rem; + } + + .xl\:pt-24 { + padding-top: 6rem; + } + + .xl\:pr-24 { + padding-right: 6rem; + } + + .xl\:pb-24 { + padding-bottom: 6rem; + } + + .xl\:pl-24 { + padding-left: 6rem; + } + + .xl\:pt-32 { + padding-top: 8rem; + } + + .xl\:pr-32 { + padding-right: 8rem; + } + + .xl\:pb-32 { + padding-bottom: 8rem; + } + + .xl\:pl-32 { + padding-left: 8rem; + } + + .xl\:pt-40 { + padding-top: 10rem; + } + + .xl\:pr-40 { + padding-right: 10rem; + } + + .xl\:pb-40 { + padding-bottom: 10rem; + } + + .xl\:pl-40 { + padding-left: 10rem; + } + + .xl\:pt-48 { + padding-top: 12rem; + } + + .xl\:pr-48 { + padding-right: 12rem; + } + + .xl\:pb-48 { + padding-bottom: 12rem; + } + + .xl\:pl-48 { + padding-left: 12rem; + } + + .xl\:pt-56 { + padding-top: 14rem; + } + + .xl\:pr-56 { + padding-right: 14rem; + } + + .xl\:pb-56 { + padding-bottom: 14rem; + } + + .xl\:pl-56 { + padding-left: 14rem; + } + + .xl\:pt-64 { + padding-top: 16rem; + } + + .xl\:pr-64 { + padding-right: 16rem; + } + + .xl\:pb-64 { + padding-bottom: 16rem; + } + + .xl\:pl-64 { + padding-left: 16rem; + } + + .xl\:pt-px { + padding-top: 1px; + } + + .xl\:pr-px { + padding-right: 1px; + } + + .xl\:pb-px { + padding-bottom: 1px; + } + + .xl\:pl-px { + padding-left: 1px; + } + + .xl\:placeholder-transparent::placeholder { + color: transparent; + } + + .xl\:placeholder-current::placeholder { + color: currentColor; + } + + .xl\:placeholder-black::placeholder { + color: #000; + } + + .xl\:placeholder-white::placeholder { + color: #fff; + } + + .xl\:placeholder-gray-100::placeholder { + color: #f7fafc; + } + + .xl\:placeholder-gray-200::placeholder { + color: #edf2f7; + } + + .xl\:placeholder-gray-300::placeholder { + color: #e2e8f0; + } + + .xl\:placeholder-gray-400::placeholder { + color: #cbd5e0; + } + + .xl\:placeholder-gray-500::placeholder { + color: #a0aec0; + } + + .xl\:placeholder-gray-600::placeholder { + color: #718096; + } + + .xl\:placeholder-gray-700::placeholder { + color: #4a5568; + } + + .xl\:placeholder-gray-800::placeholder { + color: #2d3748; + } + + .xl\:placeholder-gray-900::placeholder { + color: #1a202c; + } + + .xl\:placeholder-red-100::placeholder { + color: #fff5f5; + } + + .xl\:placeholder-red-200::placeholder { + color: #fed7d7; + } + + .xl\:placeholder-red-300::placeholder { + color: #feb2b2; + } + + .xl\:placeholder-red-400::placeholder { + color: #fc8181; + } + + .xl\:placeholder-red-500::placeholder { + color: #f56565; + } + + .xl\:placeholder-red-600::placeholder { + color: #e53e3e; + } + + .xl\:placeholder-red-700::placeholder { + color: #c53030; + } + + .xl\:placeholder-red-800::placeholder { + color: #9b2c2c; + } + + .xl\:placeholder-red-900::placeholder { + color: #742a2a; + } + + .xl\:placeholder-orange-100::placeholder { + color: #fffaf0; + } + + .xl\:placeholder-orange-200::placeholder { + color: #feebc8; + } + + .xl\:placeholder-orange-300::placeholder { + color: #fbd38d; + } + + .xl\:placeholder-orange-400::placeholder { + color: #f6ad55; + } + + .xl\:placeholder-orange-500::placeholder { + color: #ed8936; + } + + .xl\:placeholder-orange-600::placeholder { + color: #dd6b20; + } + + .xl\:placeholder-orange-700::placeholder { + color: #c05621; + } + + .xl\:placeholder-orange-800::placeholder { + color: #9c4221; + } + + .xl\:placeholder-orange-900::placeholder { + color: #7b341e; + } + + .xl\:placeholder-yellow-100::placeholder { + color: #fffff0; + } + + .xl\:placeholder-yellow-200::placeholder { + color: #fefcbf; + } + + .xl\:placeholder-yellow-300::placeholder { + color: #faf089; + } + + .xl\:placeholder-yellow-400::placeholder { + color: #f6e05e; + } + + .xl\:placeholder-yellow-500::placeholder { + color: #ecc94b; + } + + .xl\:placeholder-yellow-600::placeholder { + color: #d69e2e; + } + + .xl\:placeholder-yellow-700::placeholder { + color: #b7791f; + } + + .xl\:placeholder-yellow-800::placeholder { + color: #975a16; + } + + .xl\:placeholder-yellow-900::placeholder { + color: #744210; + } + + .xl\:placeholder-green-100::placeholder { + color: #f0fff4; + } + + .xl\:placeholder-green-200::placeholder { + color: #c6f6d5; + } + + .xl\:placeholder-green-300::placeholder { + color: #9ae6b4; + } + + .xl\:placeholder-green-400::placeholder { + color: #68d391; + } + + .xl\:placeholder-green-500::placeholder { + color: #48bb78; + } + + .xl\:placeholder-green-600::placeholder { + color: #38a169; + } + + .xl\:placeholder-green-700::placeholder { + color: #2f855a; + } + + .xl\:placeholder-green-800::placeholder { + color: #276749; + } + + .xl\:placeholder-green-900::placeholder { + color: #22543d; + } + + .xl\:placeholder-teal-100::placeholder { + color: #e6fffa; + } + + .xl\:placeholder-teal-200::placeholder { + color: #b2f5ea; + } + + .xl\:placeholder-teal-300::placeholder { + color: #81e6d9; + } + + .xl\:placeholder-teal-400::placeholder { + color: #4fd1c5; + } + + .xl\:placeholder-teal-500::placeholder { + color: #38b2ac; + } + + .xl\:placeholder-teal-600::placeholder { + color: #319795; + } + + .xl\:placeholder-teal-700::placeholder { + color: #2c7a7b; + } + + .xl\:placeholder-teal-800::placeholder { + color: #285e61; + } + + .xl\:placeholder-teal-900::placeholder { + color: #234e52; + } + + .xl\:placeholder-blue-100::placeholder { + color: #ebf8ff; + } + + .xl\:placeholder-blue-200::placeholder { + color: #bee3f8; + } + + .xl\:placeholder-blue-300::placeholder { + color: #90cdf4; + } + + .xl\:placeholder-blue-400::placeholder { + color: #63b3ed; + } + + .xl\:placeholder-blue-500::placeholder { + color: #4299e1; + } + + .xl\:placeholder-blue-600::placeholder { + color: #3182ce; + } + + .xl\:placeholder-blue-700::placeholder { + color: #2b6cb0; + } + + .xl\:placeholder-blue-800::placeholder { + color: #2c5282; + } + + .xl\:placeholder-blue-900::placeholder { + color: #2a4365; + } + + .xl\:placeholder-indigo-100::placeholder { + color: #ebf4ff; + } + + .xl\:placeholder-indigo-200::placeholder { + color: #c3dafe; + } + + .xl\:placeholder-indigo-300::placeholder { + color: #a3bffa; + } + + .xl\:placeholder-indigo-400::placeholder { + color: #7f9cf5; + } + + .xl\:placeholder-indigo-500::placeholder { + color: #667eea; + } + + .xl\:placeholder-indigo-600::placeholder { + color: #5a67d8; + } + + .xl\:placeholder-indigo-700::placeholder { + color: #4c51bf; + } + + .xl\:placeholder-indigo-800::placeholder { + color: #434190; + } + + .xl\:placeholder-indigo-900::placeholder { + color: #3c366b; + } + + .xl\:placeholder-purple-100::placeholder { + color: #faf5ff; + } + + .xl\:placeholder-purple-200::placeholder { + color: #e9d8fd; + } + + .xl\:placeholder-purple-300::placeholder { + color: #d6bcfa; + } + + .xl\:placeholder-purple-400::placeholder { + color: #b794f4; + } + + .xl\:placeholder-purple-500::placeholder { + color: #9f7aea; + } + + .xl\:placeholder-purple-600::placeholder { + color: #805ad5; + } + + .xl\:placeholder-purple-700::placeholder { + color: #6b46c1; + } + + .xl\:placeholder-purple-800::placeholder { + color: #553c9a; + } + + .xl\:placeholder-purple-900::placeholder { + color: #44337a; + } + + .xl\:placeholder-pink-100::placeholder { + color: #fff5f7; + } + + .xl\:placeholder-pink-200::placeholder { + color: #fed7e2; + } + + .xl\:placeholder-pink-300::placeholder { + color: #fbb6ce; + } + + .xl\:placeholder-pink-400::placeholder { + color: #f687b3; + } + + .xl\:placeholder-pink-500::placeholder { + color: #ed64a6; + } + + .xl\:placeholder-pink-600::placeholder { + color: #d53f8c; + } + + .xl\:placeholder-pink-700::placeholder { + color: #b83280; + } + + .xl\:placeholder-pink-800::placeholder { + color: #97266d; + } + + .xl\:placeholder-pink-900::placeholder { + color: #702459; + } + + .xl\:focus\:placeholder-transparent:focus::placeholder { + color: transparent; + } + + .xl\:focus\:placeholder-current:focus::placeholder { + color: currentColor; + } + + .xl\:focus\:placeholder-black:focus::placeholder { + color: #000; + } + + .xl\:focus\:placeholder-white:focus::placeholder { + color: #fff; + } + + .xl\:focus\:placeholder-gray-100:focus::placeholder { + color: #f7fafc; + } + + .xl\:focus\:placeholder-gray-200:focus::placeholder { + color: #edf2f7; + } + + .xl\:focus\:placeholder-gray-300:focus::placeholder { + color: #e2e8f0; + } + + .xl\:focus\:placeholder-gray-400:focus::placeholder { + color: #cbd5e0; + } + + .xl\:focus\:placeholder-gray-500:focus::placeholder { + color: #a0aec0; + } + + .xl\:focus\:placeholder-gray-600:focus::placeholder { + color: #718096; + } + + .xl\:focus\:placeholder-gray-700:focus::placeholder { + color: #4a5568; + } + + .xl\:focus\:placeholder-gray-800:focus::placeholder { + color: #2d3748; + } + + .xl\:focus\:placeholder-gray-900:focus::placeholder { + color: #1a202c; + } + + .xl\:focus\:placeholder-red-100:focus::placeholder { + color: #fff5f5; + } + + .xl\:focus\:placeholder-red-200:focus::placeholder { + color: #fed7d7; + } + + .xl\:focus\:placeholder-red-300:focus::placeholder { + color: #feb2b2; + } + + .xl\:focus\:placeholder-red-400:focus::placeholder { + color: #fc8181; + } + + .xl\:focus\:placeholder-red-500:focus::placeholder { + color: #f56565; + } + + .xl\:focus\:placeholder-red-600:focus::placeholder { + color: #e53e3e; + } + + .xl\:focus\:placeholder-red-700:focus::placeholder { + color: #c53030; + } + + .xl\:focus\:placeholder-red-800:focus::placeholder { + color: #9b2c2c; + } + + .xl\:focus\:placeholder-red-900:focus::placeholder { + color: #742a2a; + } + + .xl\:focus\:placeholder-orange-100:focus::placeholder { + color: #fffaf0; + } + + .xl\:focus\:placeholder-orange-200:focus::placeholder { + color: #feebc8; + } + + .xl\:focus\:placeholder-orange-300:focus::placeholder { + color: #fbd38d; + } + + .xl\:focus\:placeholder-orange-400:focus::placeholder { + color: #f6ad55; + } + + .xl\:focus\:placeholder-orange-500:focus::placeholder { + color: #ed8936; + } + + .xl\:focus\:placeholder-orange-600:focus::placeholder { + color: #dd6b20; + } + + .xl\:focus\:placeholder-orange-700:focus::placeholder { + color: #c05621; + } + + .xl\:focus\:placeholder-orange-800:focus::placeholder { + color: #9c4221; + } + + .xl\:focus\:placeholder-orange-900:focus::placeholder { + color: #7b341e; + } + + .xl\:focus\:placeholder-yellow-100:focus::placeholder { + color: #fffff0; + } + + .xl\:focus\:placeholder-yellow-200:focus::placeholder { + color: #fefcbf; + } + + .xl\:focus\:placeholder-yellow-300:focus::placeholder { + color: #faf089; + } + + .xl\:focus\:placeholder-yellow-400:focus::placeholder { + color: #f6e05e; + } + + .xl\:focus\:placeholder-yellow-500:focus::placeholder { + color: #ecc94b; + } + + .xl\:focus\:placeholder-yellow-600:focus::placeholder { + color: #d69e2e; + } + + .xl\:focus\:placeholder-yellow-700:focus::placeholder { + color: #b7791f; + } + + .xl\:focus\:placeholder-yellow-800:focus::placeholder { + color: #975a16; + } + + .xl\:focus\:placeholder-yellow-900:focus::placeholder { + color: #744210; + } + + .xl\:focus\:placeholder-green-100:focus::placeholder { + color: #f0fff4; + } + + .xl\:focus\:placeholder-green-200:focus::placeholder { + color: #c6f6d5; + } + + .xl\:focus\:placeholder-green-300:focus::placeholder { + color: #9ae6b4; + } + + .xl\:focus\:placeholder-green-400:focus::placeholder { + color: #68d391; + } + + .xl\:focus\:placeholder-green-500:focus::placeholder { + color: #48bb78; + } + + .xl\:focus\:placeholder-green-600:focus::placeholder { + color: #38a169; + } + + .xl\:focus\:placeholder-green-700:focus::placeholder { + color: #2f855a; + } + + .xl\:focus\:placeholder-green-800:focus::placeholder { + color: #276749; + } + + .xl\:focus\:placeholder-green-900:focus::placeholder { + color: #22543d; + } + + .xl\:focus\:placeholder-teal-100:focus::placeholder { + color: #e6fffa; + } + + .xl\:focus\:placeholder-teal-200:focus::placeholder { + color: #b2f5ea; + } + + .xl\:focus\:placeholder-teal-300:focus::placeholder { + color: #81e6d9; + } + + .xl\:focus\:placeholder-teal-400:focus::placeholder { + color: #4fd1c5; + } + + .xl\:focus\:placeholder-teal-500:focus::placeholder { + color: #38b2ac; + } + + .xl\:focus\:placeholder-teal-600:focus::placeholder { + color: #319795; + } + + .xl\:focus\:placeholder-teal-700:focus::placeholder { + color: #2c7a7b; + } + + .xl\:focus\:placeholder-teal-800:focus::placeholder { + color: #285e61; + } + + .xl\:focus\:placeholder-teal-900:focus::placeholder { + color: #234e52; + } + + .xl\:focus\:placeholder-blue-100:focus::placeholder { + color: #ebf8ff; + } + + .xl\:focus\:placeholder-blue-200:focus::placeholder { + color: #bee3f8; + } + + .xl\:focus\:placeholder-blue-300:focus::placeholder { + color: #90cdf4; + } + + .xl\:focus\:placeholder-blue-400:focus::placeholder { + color: #63b3ed; + } + + .xl\:focus\:placeholder-blue-500:focus::placeholder { + color: #4299e1; + } + + .xl\:focus\:placeholder-blue-600:focus::placeholder { + color: #3182ce; + } + + .xl\:focus\:placeholder-blue-700:focus::placeholder { + color: #2b6cb0; + } + + .xl\:focus\:placeholder-blue-800:focus::placeholder { + color: #2c5282; + } + + .xl\:focus\:placeholder-blue-900:focus::placeholder { + color: #2a4365; + } + + .xl\:focus\:placeholder-indigo-100:focus::placeholder { + color: #ebf4ff; + } + + .xl\:focus\:placeholder-indigo-200:focus::placeholder { + color: #c3dafe; + } + + .xl\:focus\:placeholder-indigo-300:focus::placeholder { + color: #a3bffa; + } + + .xl\:focus\:placeholder-indigo-400:focus::placeholder { + color: #7f9cf5; + } + + .xl\:focus\:placeholder-indigo-500:focus::placeholder { + color: #667eea; + } + + .xl\:focus\:placeholder-indigo-600:focus::placeholder { + color: #5a67d8; + } + + .xl\:focus\:placeholder-indigo-700:focus::placeholder { + color: #4c51bf; + } + + .xl\:focus\:placeholder-indigo-800:focus::placeholder { + color: #434190; + } + + .xl\:focus\:placeholder-indigo-900:focus::placeholder { + color: #3c366b; + } + + .xl\:focus\:placeholder-purple-100:focus::placeholder { + color: #faf5ff; + } + + .xl\:focus\:placeholder-purple-200:focus::placeholder { + color: #e9d8fd; + } + + .xl\:focus\:placeholder-purple-300:focus::placeholder { + color: #d6bcfa; + } + + .xl\:focus\:placeholder-purple-400:focus::placeholder { + color: #b794f4; + } + + .xl\:focus\:placeholder-purple-500:focus::placeholder { + color: #9f7aea; + } + + .xl\:focus\:placeholder-purple-600:focus::placeholder { + color: #805ad5; + } + + .xl\:focus\:placeholder-purple-700:focus::placeholder { + color: #6b46c1; + } + + .xl\:focus\:placeholder-purple-800:focus::placeholder { + color: #553c9a; + } + + .xl\:focus\:placeholder-purple-900:focus::placeholder { + color: #44337a; + } + + .xl\:focus\:placeholder-pink-100:focus::placeholder { + color: #fff5f7; + } + + .xl\:focus\:placeholder-pink-200:focus::placeholder { + color: #fed7e2; + } + + .xl\:focus\:placeholder-pink-300:focus::placeholder { + color: #fbb6ce; + } + + .xl\:focus\:placeholder-pink-400:focus::placeholder { + color: #f687b3; + } + + .xl\:focus\:placeholder-pink-500:focus::placeholder { + color: #ed64a6; + } + + .xl\:focus\:placeholder-pink-600:focus::placeholder { + color: #d53f8c; + } + + .xl\:focus\:placeholder-pink-700:focus::placeholder { + color: #b83280; + } + + .xl\:focus\:placeholder-pink-800:focus::placeholder { + color: #97266d; + } + + .xl\:focus\:placeholder-pink-900:focus::placeholder { + color: #702459; + } + + .xl\:pointer-events-none { + pointer-events: none; + } + + .xl\:pointer-events-auto { + pointer-events: auto; + } + + .xl\:static { + position: static; + } + + .xl\:fixed { + position: fixed; + } + + .xl\:absolute { + position: absolute; + } + + .xl\:relative { + position: relative; + } + + .xl\:sticky { + position: sticky; + } + + .xl\:inset-0 { + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + .xl\:inset-auto { + top: auto; + right: auto; + bottom: auto; + left: auto; + } + + .xl\:inset-y-0 { + top: 0; + bottom: 0; + } + + .xl\:inset-x-0 { + right: 0; + left: 0; + } + + .xl\:inset-y-auto { + top: auto; + bottom: auto; + } + + .xl\:inset-x-auto { + right: auto; + left: auto; + } + + .xl\:top-0 { + top: 0; + } + + .xl\:right-0 { + right: 0; + } + + .xl\:bottom-0 { + bottom: 0; + } + + .xl\:left-0 { + left: 0; + } + + .xl\:top-auto { + top: auto; + } + + .xl\:right-auto { + right: auto; + } + + .xl\:bottom-auto { + bottom: auto; + } + + .xl\:left-auto { + left: auto; + } + + .xl\:resize-none { + resize: none; + } + + .xl\:resize-y { + resize: vertical; + } + + .xl\:resize-x { + resize: horizontal; + } + + .xl\:resize { + resize: both; + } + + .xl\:shadow-xs { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .xl\:shadow-sm { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .xl\:shadow { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .xl\:shadow-md { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .xl\:shadow-lg { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .xl\:shadow-xl { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .xl\:shadow-2xl { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .xl\:shadow-inner { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .xl\:shadow-outline { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .xl\:shadow-none { + box-shadow: none; + } + + .xl\:hover\:shadow-xs:hover { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .xl\:hover\:shadow-sm:hover { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .xl\:hover\:shadow:hover { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .xl\:hover\:shadow-md:hover { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .xl\:hover\:shadow-lg:hover { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .xl\:hover\:shadow-xl:hover { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .xl\:hover\:shadow-2xl:hover { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .xl\:hover\:shadow-inner:hover { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .xl\:hover\:shadow-outline:hover { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .xl\:hover\:shadow-none:hover { + box-shadow: none; + } + + .xl\:focus\:shadow-xs:focus { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); + } + + .xl\:focus\:shadow-sm:focus { + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + } + + .xl\:focus\:shadow:focus { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + } + + .xl\:focus\:shadow-md:focus { + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + + .xl\:focus\:shadow-lg:focus { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .xl\:focus\:shadow-xl:focus { + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + } + + .xl\:focus\:shadow-2xl:focus { + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + } + + .xl\:focus\:shadow-inner:focus { + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); + } + + .xl\:focus\:shadow-outline:focus { + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + } + + .xl\:focus\:shadow-none:focus { + box-shadow: none; + } + + .xl\:fill-current { + fill: currentColor; + } + + .xl\:stroke-current { + stroke: currentColor; + } + + .xl\:stroke-0 { + stroke-width: 0; + } + + .xl\:stroke-1 { + stroke-width: 1; + } + + .xl\:stroke-2 { + stroke-width: 2; + } + + .xl\:table-auto { + table-layout: auto; + } + + .xl\:table-fixed { + table-layout: fixed; + } + + .xl\:text-left { + text-align: left; + } + + .xl\:text-center { + text-align: center; + } + + .xl\:text-right { + text-align: right; + } + + .xl\:text-justify { + text-align: justify; + } + + .xl\:text-transparent { + color: transparent; + } + + .xl\:text-current { + color: currentColor; + } + + .xl\:text-black { + color: #000; + } + + .xl\:text-white { + color: #fff; + } + + .xl\:text-gray-100 { + color: #f7fafc; + } + + .xl\:text-gray-200 { + color: #edf2f7; + } + + .xl\:text-gray-300 { + color: #e2e8f0; + } + + .xl\:text-gray-400 { + color: #cbd5e0; + } + + .xl\:text-gray-500 { + color: #a0aec0; + } + + .xl\:text-gray-600 { + color: #718096; + } + + .xl\:text-gray-700 { + color: #4a5568; + } + + .xl\:text-gray-800 { + color: #2d3748; + } + + .xl\:text-gray-900 { + color: #1a202c; + } + + .xl\:text-red-100 { + color: #fff5f5; + } + + .xl\:text-red-200 { + color: #fed7d7; + } + + .xl\:text-red-300 { + color: #feb2b2; + } + + .xl\:text-red-400 { + color: #fc8181; + } + + .xl\:text-red-500 { + color: #f56565; + } + + .xl\:text-red-600 { + color: #e53e3e; + } + + .xl\:text-red-700 { + color: #c53030; + } + + .xl\:text-red-800 { + color: #9b2c2c; + } + + .xl\:text-red-900 { + color: #742a2a; + } + + .xl\:text-orange-100 { + color: #fffaf0; + } + + .xl\:text-orange-200 { + color: #feebc8; + } + + .xl\:text-orange-300 { + color: #fbd38d; + } + + .xl\:text-orange-400 { + color: #f6ad55; + } + + .xl\:text-orange-500 { + color: #ed8936; + } + + .xl\:text-orange-600 { + color: #dd6b20; + } + + .xl\:text-orange-700 { + color: #c05621; + } + + .xl\:text-orange-800 { + color: #9c4221; + } + + .xl\:text-orange-900 { + color: #7b341e; + } + + .xl\:text-yellow-100 { + color: #fffff0; + } + + .xl\:text-yellow-200 { + color: #fefcbf; + } + + .xl\:text-yellow-300 { + color: #faf089; + } + + .xl\:text-yellow-400 { + color: #f6e05e; + } + + .xl\:text-yellow-500 { + color: #ecc94b; + } + + .xl\:text-yellow-600 { + color: #d69e2e; + } + + .xl\:text-yellow-700 { + color: #b7791f; + } + + .xl\:text-yellow-800 { + color: #975a16; + } + + .xl\:text-yellow-900 { + color: #744210; + } + + .xl\:text-green-100 { + color: #f0fff4; + } + + .xl\:text-green-200 { + color: #c6f6d5; + } + + .xl\:text-green-300 { + color: #9ae6b4; + } + + .xl\:text-green-400 { + color: #68d391; + } + + .xl\:text-green-500 { + color: #48bb78; + } + + .xl\:text-green-600 { + color: #38a169; + } + + .xl\:text-green-700 { + color: #2f855a; + } + + .xl\:text-green-800 { + color: #276749; + } + + .xl\:text-green-900 { + color: #22543d; + } + + .xl\:text-teal-100 { + color: #e6fffa; + } + + .xl\:text-teal-200 { + color: #b2f5ea; + } + + .xl\:text-teal-300 { + color: #81e6d9; + } + + .xl\:text-teal-400 { + color: #4fd1c5; + } + + .xl\:text-teal-500 { + color: #38b2ac; + } + + .xl\:text-teal-600 { + color: #319795; + } + + .xl\:text-teal-700 { + color: #2c7a7b; + } + + .xl\:text-teal-800 { + color: #285e61; + } + + .xl\:text-teal-900 { + color: #234e52; + } + + .xl\:text-blue-100 { + color: #ebf8ff; + } + + .xl\:text-blue-200 { + color: #bee3f8; + } + + .xl\:text-blue-300 { + color: #90cdf4; + } + + .xl\:text-blue-400 { + color: #63b3ed; + } + + .xl\:text-blue-500 { + color: #4299e1; + } + + .xl\:text-blue-600 { + color: #3182ce; + } + + .xl\:text-blue-700 { + color: #2b6cb0; + } + + .xl\:text-blue-800 { + color: #2c5282; + } + + .xl\:text-blue-900 { + color: #2a4365; + } + + .xl\:text-indigo-100 { + color: #ebf4ff; + } + + .xl\:text-indigo-200 { + color: #c3dafe; + } + + .xl\:text-indigo-300 { + color: #a3bffa; + } + + .xl\:text-indigo-400 { + color: #7f9cf5; + } + + .xl\:text-indigo-500 { + color: #667eea; + } + + .xl\:text-indigo-600 { + color: #5a67d8; + } + + .xl\:text-indigo-700 { + color: #4c51bf; + } + + .xl\:text-indigo-800 { + color: #434190; + } + + .xl\:text-indigo-900 { + color: #3c366b; + } + + .xl\:text-purple-100 { + color: #faf5ff; + } + + .xl\:text-purple-200 { + color: #e9d8fd; + } + + .xl\:text-purple-300 { + color: #d6bcfa; + } + + .xl\:text-purple-400 { + color: #b794f4; + } + + .xl\:text-purple-500 { + color: #9f7aea; + } + + .xl\:text-purple-600 { + color: #805ad5; + } + + .xl\:text-purple-700 { + color: #6b46c1; + } + + .xl\:text-purple-800 { + color: #553c9a; + } + + .xl\:text-purple-900 { + color: #44337a; + } + + .xl\:text-pink-100 { + color: #fff5f7; + } + + .xl\:text-pink-200 { + color: #fed7e2; + } + + .xl\:text-pink-300 { + color: #fbb6ce; + } + + .xl\:text-pink-400 { + color: #f687b3; + } + + .xl\:text-pink-500 { + color: #ed64a6; + } + + .xl\:text-pink-600 { + color: #d53f8c; + } + + .xl\:text-pink-700 { + color: #b83280; + } + + .xl\:text-pink-800 { + color: #97266d; + } + + .xl\:text-pink-900 { + color: #702459; + } + + .xl\:hover\:text-transparent:hover { + color: transparent; + } + + .xl\:hover\:text-current:hover { + color: currentColor; + } + + .xl\:hover\:text-black:hover { + color: #000; + } + + .xl\:hover\:text-white:hover { + color: #fff; + } + + .xl\:hover\:text-gray-100:hover { + color: #f7fafc; + } + + .xl\:hover\:text-gray-200:hover { + color: #edf2f7; + } + + .xl\:hover\:text-gray-300:hover { + color: #e2e8f0; + } + + .xl\:hover\:text-gray-400:hover { + color: #cbd5e0; + } + + .xl\:hover\:text-gray-500:hover { + color: #a0aec0; + } + + .xl\:hover\:text-gray-600:hover { + color: #718096; + } + + .xl\:hover\:text-gray-700:hover { + color: #4a5568; + } + + .xl\:hover\:text-gray-800:hover { + color: #2d3748; + } + + .xl\:hover\:text-gray-900:hover { + color: #1a202c; + } + + .xl\:hover\:text-red-100:hover { + color: #fff5f5; + } + + .xl\:hover\:text-red-200:hover { + color: #fed7d7; + } + + .xl\:hover\:text-red-300:hover { + color: #feb2b2; + } + + .xl\:hover\:text-red-400:hover { + color: #fc8181; + } + + .xl\:hover\:text-red-500:hover { + color: #f56565; + } + + .xl\:hover\:text-red-600:hover { + color: #e53e3e; + } + + .xl\:hover\:text-red-700:hover { + color: #c53030; + } + + .xl\:hover\:text-red-800:hover { + color: #9b2c2c; + } + + .xl\:hover\:text-red-900:hover { + color: #742a2a; + } + + .xl\:hover\:text-orange-100:hover { + color: #fffaf0; + } + + .xl\:hover\:text-orange-200:hover { + color: #feebc8; + } + + .xl\:hover\:text-orange-300:hover { + color: #fbd38d; + } + + .xl\:hover\:text-orange-400:hover { + color: #f6ad55; + } + + .xl\:hover\:text-orange-500:hover { + color: #ed8936; + } + + .xl\:hover\:text-orange-600:hover { + color: #dd6b20; + } + + .xl\:hover\:text-orange-700:hover { + color: #c05621; + } + + .xl\:hover\:text-orange-800:hover { + color: #9c4221; + } + + .xl\:hover\:text-orange-900:hover { + color: #7b341e; + } + + .xl\:hover\:text-yellow-100:hover { + color: #fffff0; + } + + .xl\:hover\:text-yellow-200:hover { + color: #fefcbf; + } + + .xl\:hover\:text-yellow-300:hover { + color: #faf089; + } + + .xl\:hover\:text-yellow-400:hover { + color: #f6e05e; + } + + .xl\:hover\:text-yellow-500:hover { + color: #ecc94b; + } + + .xl\:hover\:text-yellow-600:hover { + color: #d69e2e; + } + + .xl\:hover\:text-yellow-700:hover { + color: #b7791f; + } + + .xl\:hover\:text-yellow-800:hover { + color: #975a16; + } + + .xl\:hover\:text-yellow-900:hover { + color: #744210; + } + + .xl\:hover\:text-green-100:hover { + color: #f0fff4; + } + + .xl\:hover\:text-green-200:hover { + color: #c6f6d5; + } + + .xl\:hover\:text-green-300:hover { + color: #9ae6b4; + } + + .xl\:hover\:text-green-400:hover { + color: #68d391; + } + + .xl\:hover\:text-green-500:hover { + color: #48bb78; + } + + .xl\:hover\:text-green-600:hover { + color: #38a169; + } + + .xl\:hover\:text-green-700:hover { + color: #2f855a; + } + + .xl\:hover\:text-green-800:hover { + color: #276749; + } + + .xl\:hover\:text-green-900:hover { + color: #22543d; + } + + .xl\:hover\:text-teal-100:hover { + color: #e6fffa; + } + + .xl\:hover\:text-teal-200:hover { + color: #b2f5ea; + } + + .xl\:hover\:text-teal-300:hover { + color: #81e6d9; + } + + .xl\:hover\:text-teal-400:hover { + color: #4fd1c5; + } + + .xl\:hover\:text-teal-500:hover { + color: #38b2ac; + } + + .xl\:hover\:text-teal-600:hover { + color: #319795; + } + + .xl\:hover\:text-teal-700:hover { + color: #2c7a7b; + } + + .xl\:hover\:text-teal-800:hover { + color: #285e61; + } + + .xl\:hover\:text-teal-900:hover { + color: #234e52; + } + + .xl\:hover\:text-blue-100:hover { + color: #ebf8ff; + } + + .xl\:hover\:text-blue-200:hover { + color: #bee3f8; + } + + .xl\:hover\:text-blue-300:hover { + color: #90cdf4; + } + + .xl\:hover\:text-blue-400:hover { + color: #63b3ed; + } + + .xl\:hover\:text-blue-500:hover { + color: #4299e1; + } + + .xl\:hover\:text-blue-600:hover { + color: #3182ce; + } + + .xl\:hover\:text-blue-700:hover { + color: #2b6cb0; + } + + .xl\:hover\:text-blue-800:hover { + color: #2c5282; + } + + .xl\:hover\:text-blue-900:hover { + color: #2a4365; + } + + .xl\:hover\:text-indigo-100:hover { + color: #ebf4ff; + } + + .xl\:hover\:text-indigo-200:hover { + color: #c3dafe; + } + + .xl\:hover\:text-indigo-300:hover { + color: #a3bffa; + } + + .xl\:hover\:text-indigo-400:hover { + color: #7f9cf5; + } + + .xl\:hover\:text-indigo-500:hover { + color: #667eea; + } + + .xl\:hover\:text-indigo-600:hover { + color: #5a67d8; + } + + .xl\:hover\:text-indigo-700:hover { + color: #4c51bf; + } + + .xl\:hover\:text-indigo-800:hover { + color: #434190; + } + + .xl\:hover\:text-indigo-900:hover { + color: #3c366b; + } + + .xl\:hover\:text-purple-100:hover { + color: #faf5ff; + } + + .xl\:hover\:text-purple-200:hover { + color: #e9d8fd; + } + + .xl\:hover\:text-purple-300:hover { + color: #d6bcfa; + } + + .xl\:hover\:text-purple-400:hover { + color: #b794f4; + } + + .xl\:hover\:text-purple-500:hover { + color: #9f7aea; + } + + .xl\:hover\:text-purple-600:hover { + color: #805ad5; + } + + .xl\:hover\:text-purple-700:hover { + color: #6b46c1; + } + + .xl\:hover\:text-purple-800:hover { + color: #553c9a; + } + + .xl\:hover\:text-purple-900:hover { + color: #44337a; + } + + .xl\:hover\:text-pink-100:hover { + color: #fff5f7; + } + + .xl\:hover\:text-pink-200:hover { + color: #fed7e2; + } + + .xl\:hover\:text-pink-300:hover { + color: #fbb6ce; + } + + .xl\:hover\:text-pink-400:hover { + color: #f687b3; + } + + .xl\:hover\:text-pink-500:hover { + color: #ed64a6; + } + + .xl\:hover\:text-pink-600:hover { + color: #d53f8c; + } + + .xl\:hover\:text-pink-700:hover { + color: #b83280; + } + + .xl\:hover\:text-pink-800:hover { + color: #97266d; + } + + .xl\:hover\:text-pink-900:hover { + color: #702459; + } + + .xl\:focus\:text-transparent:focus { + color: transparent; + } + + .xl\:focus\:text-current:focus { + color: currentColor; + } + + .xl\:focus\:text-black:focus { + color: #000; + } + + .xl\:focus\:text-white:focus { + color: #fff; + } + + .xl\:focus\:text-gray-100:focus { + color: #f7fafc; + } + + .xl\:focus\:text-gray-200:focus { + color: #edf2f7; + } + + .xl\:focus\:text-gray-300:focus { + color: #e2e8f0; + } + + .xl\:focus\:text-gray-400:focus { + color: #cbd5e0; + } + + .xl\:focus\:text-gray-500:focus { + color: #a0aec0; + } + + .xl\:focus\:text-gray-600:focus { + color: #718096; + } + + .xl\:focus\:text-gray-700:focus { + color: #4a5568; + } + + .xl\:focus\:text-gray-800:focus { + color: #2d3748; + } + + .xl\:focus\:text-gray-900:focus { + color: #1a202c; + } + + .xl\:focus\:text-red-100:focus { + color: #fff5f5; + } + + .xl\:focus\:text-red-200:focus { + color: #fed7d7; + } + + .xl\:focus\:text-red-300:focus { + color: #feb2b2; + } + + .xl\:focus\:text-red-400:focus { + color: #fc8181; + } + + .xl\:focus\:text-red-500:focus { + color: #f56565; + } + + .xl\:focus\:text-red-600:focus { + color: #e53e3e; + } + + .xl\:focus\:text-red-700:focus { + color: #c53030; + } + + .xl\:focus\:text-red-800:focus { + color: #9b2c2c; + } + + .xl\:focus\:text-red-900:focus { + color: #742a2a; + } + + .xl\:focus\:text-orange-100:focus { + color: #fffaf0; + } + + .xl\:focus\:text-orange-200:focus { + color: #feebc8; + } + + .xl\:focus\:text-orange-300:focus { + color: #fbd38d; + } + + .xl\:focus\:text-orange-400:focus { + color: #f6ad55; + } + + .xl\:focus\:text-orange-500:focus { + color: #ed8936; + } + + .xl\:focus\:text-orange-600:focus { + color: #dd6b20; + } + + .xl\:focus\:text-orange-700:focus { + color: #c05621; + } + + .xl\:focus\:text-orange-800:focus { + color: #9c4221; + } + + .xl\:focus\:text-orange-900:focus { + color: #7b341e; + } + + .xl\:focus\:text-yellow-100:focus { + color: #fffff0; + } + + .xl\:focus\:text-yellow-200:focus { + color: #fefcbf; + } + + .xl\:focus\:text-yellow-300:focus { + color: #faf089; + } + + .xl\:focus\:text-yellow-400:focus { + color: #f6e05e; + } + + .xl\:focus\:text-yellow-500:focus { + color: #ecc94b; + } + + .xl\:focus\:text-yellow-600:focus { + color: #d69e2e; + } + + .xl\:focus\:text-yellow-700:focus { + color: #b7791f; + } + + .xl\:focus\:text-yellow-800:focus { + color: #975a16; + } + + .xl\:focus\:text-yellow-900:focus { + color: #744210; + } + + .xl\:focus\:text-green-100:focus { + color: #f0fff4; + } + + .xl\:focus\:text-green-200:focus { + color: #c6f6d5; + } + + .xl\:focus\:text-green-300:focus { + color: #9ae6b4; + } + + .xl\:focus\:text-green-400:focus { + color: #68d391; + } + + .xl\:focus\:text-green-500:focus { + color: #48bb78; + } + + .xl\:focus\:text-green-600:focus { + color: #38a169; + } + + .xl\:focus\:text-green-700:focus { + color: #2f855a; + } + + .xl\:focus\:text-green-800:focus { + color: #276749; + } + + .xl\:focus\:text-green-900:focus { + color: #22543d; + } + + .xl\:focus\:text-teal-100:focus { + color: #e6fffa; + } + + .xl\:focus\:text-teal-200:focus { + color: #b2f5ea; + } + + .xl\:focus\:text-teal-300:focus { + color: #81e6d9; + } + + .xl\:focus\:text-teal-400:focus { + color: #4fd1c5; + } + + .xl\:focus\:text-teal-500:focus { + color: #38b2ac; + } + + .xl\:focus\:text-teal-600:focus { + color: #319795; + } + + .xl\:focus\:text-teal-700:focus { + color: #2c7a7b; + } + + .xl\:focus\:text-teal-800:focus { + color: #285e61; + } + + .xl\:focus\:text-teal-900:focus { + color: #234e52; + } + + .xl\:focus\:text-blue-100:focus { + color: #ebf8ff; + } + + .xl\:focus\:text-blue-200:focus { + color: #bee3f8; + } + + .xl\:focus\:text-blue-300:focus { + color: #90cdf4; + } + + .xl\:focus\:text-blue-400:focus { + color: #63b3ed; + } + + .xl\:focus\:text-blue-500:focus { + color: #4299e1; + } + + .xl\:focus\:text-blue-600:focus { + color: #3182ce; + } + + .xl\:focus\:text-blue-700:focus { + color: #2b6cb0; + } + + .xl\:focus\:text-blue-800:focus { + color: #2c5282; + } + + .xl\:focus\:text-blue-900:focus { + color: #2a4365; + } + + .xl\:focus\:text-indigo-100:focus { + color: #ebf4ff; + } + + .xl\:focus\:text-indigo-200:focus { + color: #c3dafe; + } + + .xl\:focus\:text-indigo-300:focus { + color: #a3bffa; + } + + .xl\:focus\:text-indigo-400:focus { + color: #7f9cf5; + } + + .xl\:focus\:text-indigo-500:focus { + color: #667eea; + } + + .xl\:focus\:text-indigo-600:focus { + color: #5a67d8; + } + + .xl\:focus\:text-indigo-700:focus { + color: #4c51bf; + } + + .xl\:focus\:text-indigo-800:focus { + color: #434190; + } + + .xl\:focus\:text-indigo-900:focus { + color: #3c366b; + } + + .xl\:focus\:text-purple-100:focus { + color: #faf5ff; + } + + .xl\:focus\:text-purple-200:focus { + color: #e9d8fd; + } + + .xl\:focus\:text-purple-300:focus { + color: #d6bcfa; + } + + .xl\:focus\:text-purple-400:focus { + color: #b794f4; + } + + .xl\:focus\:text-purple-500:focus { + color: #9f7aea; + } + + .xl\:focus\:text-purple-600:focus { + color: #805ad5; + } + + .xl\:focus\:text-purple-700:focus { + color: #6b46c1; + } + + .xl\:focus\:text-purple-800:focus { + color: #553c9a; + } + + .xl\:focus\:text-purple-900:focus { + color: #44337a; + } + + .xl\:focus\:text-pink-100:focus { + color: #fff5f7; + } + + .xl\:focus\:text-pink-200:focus { + color: #fed7e2; + } + + .xl\:focus\:text-pink-300:focus { + color: #fbb6ce; + } + + .xl\:focus\:text-pink-400:focus { + color: #f687b3; + } + + .xl\:focus\:text-pink-500:focus { + color: #ed64a6; + } + + .xl\:focus\:text-pink-600:focus { + color: #d53f8c; + } + + .xl\:focus\:text-pink-700:focus { + color: #b83280; + } + + .xl\:focus\:text-pink-800:focus { + color: #97266d; + } + + .xl\:focus\:text-pink-900:focus { + color: #702459; + } + + .xl\:italic { + font-style: italic; + } + + .xl\:not-italic { + font-style: normal; + } + + .xl\:uppercase { + text-transform: uppercase; + } + + .xl\:lowercase { + text-transform: lowercase; + } + + .xl\:capitalize { + text-transform: capitalize; + } + + .xl\:normal-case { + text-transform: none; + } + + .xl\:underline { + text-decoration: underline; + } + + .xl\:line-through { + text-decoration: line-through; + } + + .xl\:no-underline { + text-decoration: none; + } + + .xl\:hover\:underline:hover { + text-decoration: underline; + } + + .xl\:hover\:line-through:hover { + text-decoration: line-through; + } + + .xl\:hover\:no-underline:hover { + text-decoration: none; + } + + .xl\:focus\:underline:focus { + text-decoration: underline; + } + + .xl\:focus\:line-through:focus { + text-decoration: line-through; + } + + .xl\:focus\:no-underline:focus { + text-decoration: none; + } + + .xl\:antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + .xl\:subpixel-antialiased { + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; + } + + .xl\:tracking-tighter { + letter-spacing: -0.05em; + } + + .xl\:tracking-tight { + letter-spacing: -0.025em; + } + + .xl\:tracking-normal { + letter-spacing: 0; + } + + .xl\:tracking-wide { + letter-spacing: 0.025em; + } + + .xl\:tracking-wider { + letter-spacing: 0.05em; + } + + .xl\:tracking-widest { + letter-spacing: 0.1em; + } + + .xl\:select-none { + user-select: none; + } + + .xl\:select-text { + user-select: text; + } + + .xl\:select-all { + user-select: all; + } + + .xl\:select-auto { + user-select: auto; + } + + .xl\:align-baseline { + vertical-align: baseline; + } + + .xl\:align-top { + vertical-align: top; + } + + .xl\:align-middle { + vertical-align: middle; + } + + .xl\:align-bottom { + vertical-align: bottom; + } + + .xl\:align-text-top { + vertical-align: text-top; + } + + .xl\:align-text-bottom { + vertical-align: text-bottom; + } + + .xl\:visible { + visibility: visible; + } + + .xl\:invisible { + visibility: hidden; + } + + .xl\:whitespace-normal { + white-space: normal; + } + + .xl\:whitespace-no-wrap { + white-space: nowrap; + } + + .xl\:whitespace-pre { + white-space: pre; + } + + .xl\:whitespace-pre-line { + white-space: pre-line; + } + + .xl\:whitespace-pre-wrap { + white-space: pre-wrap; + } + + .xl\:break-normal { + overflow-wrap: normal; + word-break: normal; + } + + .xl\:break-words { + overflow-wrap: break-word; + } + + .xl\:break-all { + word-break: break-all; + } + + .xl\:truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .xl\:w-0 { + width: 0; + } + + .xl\:w-1 { + width: 0.25rem; + } + + .xl\:w-2 { + width: 0.5rem; + } + + .xl\:w-3 { + width: 0.75rem; + } + + .xl\:w-4 { + width: 1rem; + } + + .xl\:w-5 { + width: 1.25rem; + } + + .xl\:w-6 { + width: 1.5rem; + } + + .xl\:w-8 { + width: 2rem; + } + + .xl\:w-10 { + width: 2.5rem; + } + + .xl\:w-12 { + width: 3rem; + } + + .xl\:w-16 { + width: 4rem; + } + + .xl\:w-20 { + width: 5rem; + } + + .xl\:w-24 { + width: 6rem; + } + + .xl\:w-32 { + width: 8rem; + } + + .xl\:w-40 { + width: 10rem; + } + + .xl\:w-48 { + width: 12rem; + } + + .xl\:w-56 { + width: 14rem; + } + + .xl\:w-64 { + width: 16rem; + } + + .xl\:w-auto { + width: auto; + } + + .xl\:w-px { + width: 1px; + } + + .xl\:w-1\/2 { + width: 50%; + } + + .xl\:w-1\/3 { + width: 33.333333%; + } + + .xl\:w-2\/3 { + width: 66.666667%; + } + + .xl\:w-1\/4 { + width: 25%; + } + + .xl\:w-2\/4 { + width: 50%; + } + + .xl\:w-3\/4 { + width: 75%; + } + + .xl\:w-1\/5 { + width: 20%; + } + + .xl\:w-2\/5 { + width: 40%; + } + + .xl\:w-3\/5 { + width: 60%; + } + + .xl\:w-4\/5 { + width: 80%; + } + + .xl\:w-1\/6 { + width: 16.666667%; + } + + .xl\:w-2\/6 { + width: 33.333333%; + } + + .xl\:w-3\/6 { + width: 50%; + } + + .xl\:w-4\/6 { + width: 66.666667%; + } + + .xl\:w-5\/6 { + width: 83.333333%; + } + + .xl\:w-1\/12 { + width: 8.333333%; + } + + .xl\:w-2\/12 { + width: 16.666667%; + } + + .xl\:w-3\/12 { + width: 25%; + } + + .xl\:w-4\/12 { + width: 33.333333%; + } + + .xl\:w-5\/12 { + width: 41.666667%; + } + + .xl\:w-6\/12 { + width: 50%; + } + + .xl\:w-7\/12 { + width: 58.333333%; + } + + .xl\:w-8\/12 { + width: 66.666667%; + } + + .xl\:w-9\/12 { + width: 75%; + } + + .xl\:w-10\/12 { + width: 83.333333%; + } + + .xl\:w-11\/12 { + width: 91.666667%; + } + + .xl\:w-full { + width: 100%; + } + + .xl\:w-screen { + width: 100vw; + } + + .xl\:z-0 { + z-index: 0; + } + + .xl\:z-10 { + z-index: 10; + } + + .xl\:z-20 { + z-index: 20; + } + + .xl\:z-30 { + z-index: 30; + } + + .xl\:z-40 { + z-index: 40; + } + + .xl\:z-50 { + z-index: 50; + } + + .xl\:z-auto { + z-index: auto; + } + + .xl\:gap-0 { + grid-gap: 0; + gap: 0; + } + + .xl\:gap-1 { + grid-gap: 0.25rem; + gap: 0.25rem; + } + + .xl\:gap-2 { + grid-gap: 0.5rem; + gap: 0.5rem; + } + + .xl\:gap-3 { + grid-gap: 0.75rem; + gap: 0.75rem; + } + + .xl\:gap-4 { + grid-gap: 1rem; + gap: 1rem; + } + + .xl\:gap-5 { + grid-gap: 1.25rem; + gap: 1.25rem; + } + + .xl\:gap-6 { + grid-gap: 1.5rem; + gap: 1.5rem; + } + + .xl\:gap-8 { + grid-gap: 2rem; + gap: 2rem; + } + + .xl\:gap-10 { + grid-gap: 2.5rem; + gap: 2.5rem; + } + + .xl\:gap-12 { + grid-gap: 3rem; + gap: 3rem; + } + + .xl\:gap-16 { + grid-gap: 4rem; + gap: 4rem; + } + + .xl\:gap-20 { + grid-gap: 5rem; + gap: 5rem; + } + + .xl\:gap-24 { + grid-gap: 6rem; + gap: 6rem; + } + + .xl\:gap-32 { + grid-gap: 8rem; + gap: 8rem; + } + + .xl\:gap-40 { + grid-gap: 10rem; + gap: 10rem; + } + + .xl\:gap-48 { + grid-gap: 12rem; + gap: 12rem; + } + + .xl\:gap-56 { + grid-gap: 14rem; + gap: 14rem; + } + + .xl\:gap-64 { + grid-gap: 16rem; + gap: 16rem; + } + + .xl\:gap-px { + grid-gap: 1px; + gap: 1px; + } + + .xl\:col-gap-0 { + grid-column-gap: 0; + column-gap: 0; + } + + .xl\:col-gap-1 { + grid-column-gap: 0.25rem; + column-gap: 0.25rem; + } + + .xl\:col-gap-2 { + grid-column-gap: 0.5rem; + column-gap: 0.5rem; + } + + .xl\:col-gap-3 { + grid-column-gap: 0.75rem; + column-gap: 0.75rem; + } + + .xl\:col-gap-4 { + grid-column-gap: 1rem; + column-gap: 1rem; + } + + .xl\:col-gap-5 { + grid-column-gap: 1.25rem; + column-gap: 1.25rem; + } + + .xl\:col-gap-6 { + grid-column-gap: 1.5rem; + column-gap: 1.5rem; + } + + .xl\:col-gap-8 { + grid-column-gap: 2rem; + column-gap: 2rem; + } + + .xl\:col-gap-10 { + grid-column-gap: 2.5rem; + column-gap: 2.5rem; + } + + .xl\:col-gap-12 { + grid-column-gap: 3rem; + column-gap: 3rem; + } + + .xl\:col-gap-16 { + grid-column-gap: 4rem; + column-gap: 4rem; + } + + .xl\:col-gap-20 { + grid-column-gap: 5rem; + column-gap: 5rem; + } + + .xl\:col-gap-24 { + grid-column-gap: 6rem; + column-gap: 6rem; + } + + .xl\:col-gap-32 { + grid-column-gap: 8rem; + column-gap: 8rem; + } + + .xl\:col-gap-40 { + grid-column-gap: 10rem; + column-gap: 10rem; + } + + .xl\:col-gap-48 { + grid-column-gap: 12rem; + column-gap: 12rem; + } + + .xl\:col-gap-56 { + grid-column-gap: 14rem; + column-gap: 14rem; + } + + .xl\:col-gap-64 { + grid-column-gap: 16rem; + column-gap: 16rem; + } + + .xl\:col-gap-px { + grid-column-gap: 1px; + column-gap: 1px; + } + + .xl\:row-gap-0 { + grid-row-gap: 0; + row-gap: 0; + } + + .xl\:row-gap-1 { + grid-row-gap: 0.25rem; + row-gap: 0.25rem; + } + + .xl\:row-gap-2 { + grid-row-gap: 0.5rem; + row-gap: 0.5rem; + } + + .xl\:row-gap-3 { + grid-row-gap: 0.75rem; + row-gap: 0.75rem; + } + + .xl\:row-gap-4 { + grid-row-gap: 1rem; + row-gap: 1rem; + } + + .xl\:row-gap-5 { + grid-row-gap: 1.25rem; + row-gap: 1.25rem; + } + + .xl\:row-gap-6 { + grid-row-gap: 1.5rem; + row-gap: 1.5rem; + } + + .xl\:row-gap-8 { + grid-row-gap: 2rem; + row-gap: 2rem; + } + + .xl\:row-gap-10 { + grid-row-gap: 2.5rem; + row-gap: 2.5rem; + } + + .xl\:row-gap-12 { + grid-row-gap: 3rem; + row-gap: 3rem; + } + + .xl\:row-gap-16 { + grid-row-gap: 4rem; + row-gap: 4rem; + } + + .xl\:row-gap-20 { + grid-row-gap: 5rem; + row-gap: 5rem; + } + + .xl\:row-gap-24 { + grid-row-gap: 6rem; + row-gap: 6rem; + } + + .xl\:row-gap-32 { + grid-row-gap: 8rem; + row-gap: 8rem; + } + + .xl\:row-gap-40 { + grid-row-gap: 10rem; + row-gap: 10rem; + } + + .xl\:row-gap-48 { + grid-row-gap: 12rem; + row-gap: 12rem; + } + + .xl\:row-gap-56 { + grid-row-gap: 14rem; + row-gap: 14rem; + } + + .xl\:row-gap-64 { + grid-row-gap: 16rem; + row-gap: 16rem; + } + + .xl\:row-gap-px { + grid-row-gap: 1px; + row-gap: 1px; + } + + .xl\:grid-flow-row { + grid-auto-flow: row; + } + + .xl\:grid-flow-col { + grid-auto-flow: column; + } + + .xl\:grid-flow-row-dense { + grid-auto-flow: row dense; + } + + .xl\:grid-flow-col-dense { + grid-auto-flow: column dense; + } + + .xl\:grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + + .xl\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .xl\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .xl\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .xl\:grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); + } + + .xl\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .xl\:grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); + } + + .xl\:grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); + } + + .xl\:grid-cols-9 { + grid-template-columns: repeat(9, minmax(0, 1fr)); + } + + .xl\:grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); + } + + .xl\:grid-cols-11 { + grid-template-columns: repeat(11, minmax(0, 1fr)); + } + + .xl\:grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .xl\:grid-cols-none { + grid-template-columns: none; + } + + .xl\:col-auto { + grid-column: auto; + } + + .xl\:col-span-1 { + grid-column: span 1 / span 1; + } + + .xl\:col-span-2 { + grid-column: span 2 / span 2; + } + + .xl\:col-span-3 { + grid-column: span 3 / span 3; + } + + .xl\:col-span-4 { + grid-column: span 4 / span 4; + } + + .xl\:col-span-5 { + grid-column: span 5 / span 5; + } + + .xl\:col-span-6 { + grid-column: span 6 / span 6; + } + + .xl\:col-span-7 { + grid-column: span 7 / span 7; + } + + .xl\:col-span-8 { + grid-column: span 8 / span 8; + } + + .xl\:col-span-9 { + grid-column: span 9 / span 9; + } + + .xl\:col-span-10 { + grid-column: span 10 / span 10; + } + + .xl\:col-span-11 { + grid-column: span 11 / span 11; + } + + .xl\:col-span-12 { + grid-column: span 12 / span 12; + } + + .xl\:col-start-1 { + grid-column-start: 1; + } + + .xl\:col-start-2 { + grid-column-start: 2; + } + + .xl\:col-start-3 { + grid-column-start: 3; + } + + .xl\:col-start-4 { + grid-column-start: 4; + } + + .xl\:col-start-5 { + grid-column-start: 5; + } + + .xl\:col-start-6 { + grid-column-start: 6; + } + + .xl\:col-start-7 { + grid-column-start: 7; + } + + .xl\:col-start-8 { + grid-column-start: 8; + } + + .xl\:col-start-9 { + grid-column-start: 9; + } + + .xl\:col-start-10 { + grid-column-start: 10; + } + + .xl\:col-start-11 { + grid-column-start: 11; + } + + .xl\:col-start-12 { + grid-column-start: 12; + } + + .xl\:col-start-13 { + grid-column-start: 13; + } + + .xl\:col-start-auto { + grid-column-start: auto; + } + + .xl\:col-end-1 { + grid-column-end: 1; + } + + .xl\:col-end-2 { + grid-column-end: 2; + } + + .xl\:col-end-3 { + grid-column-end: 3; + } + + .xl\:col-end-4 { + grid-column-end: 4; + } + + .xl\:col-end-5 { + grid-column-end: 5; + } + + .xl\:col-end-6 { + grid-column-end: 6; + } + + .xl\:col-end-7 { + grid-column-end: 7; + } + + .xl\:col-end-8 { + grid-column-end: 8; + } + + .xl\:col-end-9 { + grid-column-end: 9; + } + + .xl\:col-end-10 { + grid-column-end: 10; + } + + .xl\:col-end-11 { + grid-column-end: 11; + } + + .xl\:col-end-12 { + grid-column-end: 12; + } + + .xl\:col-end-13 { + grid-column-end: 13; + } + + .xl\:col-end-auto { + grid-column-end: auto; + } + + .xl\:grid-rows-1 { + grid-template-rows: repeat(1, minmax(0, 1fr)); + } + + .xl\:grid-rows-2 { + grid-template-rows: repeat(2, minmax(0, 1fr)); + } + + .xl\:grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); + } + + .xl\:grid-rows-4 { + grid-template-rows: repeat(4, minmax(0, 1fr)); + } + + .xl\:grid-rows-5 { + grid-template-rows: repeat(5, minmax(0, 1fr)); + } + + .xl\:grid-rows-6 { + grid-template-rows: repeat(6, minmax(0, 1fr)); + } + + .xl\:grid-rows-none { + grid-template-rows: none; + } + + .xl\:row-auto { + grid-row: auto; + } + + .xl\:row-span-1 { + grid-row: span 1 / span 1; + } + + .xl\:row-span-2 { + grid-row: span 2 / span 2; + } + + .xl\:row-span-3 { + grid-row: span 3 / span 3; + } + + .xl\:row-span-4 { + grid-row: span 4 / span 4; + } + + .xl\:row-span-5 { + grid-row: span 5 / span 5; + } + + .xl\:row-span-6 { + grid-row: span 6 / span 6; + } + + .xl\:row-start-1 { + grid-row-start: 1; + } + + .xl\:row-start-2 { + grid-row-start: 2; + } + + .xl\:row-start-3 { + grid-row-start: 3; + } + + .xl\:row-start-4 { + grid-row-start: 4; + } + + .xl\:row-start-5 { + grid-row-start: 5; + } + + .xl\:row-start-6 { + grid-row-start: 6; + } + + .xl\:row-start-7 { + grid-row-start: 7; + } + + .xl\:row-start-auto { + grid-row-start: auto; + } + + .xl\:row-end-1 { + grid-row-end: 1; + } + + .xl\:row-end-2 { + grid-row-end: 2; + } + + .xl\:row-end-3 { + grid-row-end: 3; + } + + .xl\:row-end-4 { + grid-row-end: 4; + } + + .xl\:row-end-5 { + grid-row-end: 5; + } + + .xl\:row-end-6 { + grid-row-end: 6; + } + + .xl\:row-end-7 { + grid-row-end: 7; + } + + .xl\:row-end-auto { + grid-row-end: auto; + } + + .xl\:transform { + --transform-translate-x: 0; + --transform-translate-y: 0; + --transform-rotate: 0; + --transform-skew-x: 0; + --transform-skew-y: 0; + --transform-scale-x: 1; + --transform-scale-y: 1; + transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y)); + } + + .xl\:transform-none { + transform: none; + } + + .xl\:origin-center { + transform-origin: center; + } + + .xl\:origin-top { + transform-origin: top; + } + + .xl\:origin-top-right { + transform-origin: top right; + } + + .xl\:origin-right { + transform-origin: right; + } + + .xl\:origin-bottom-right { + transform-origin: bottom right; + } + + .xl\:origin-bottom { + transform-origin: bottom; + } + + .xl\:origin-bottom-left { + transform-origin: bottom left; + } + + .xl\:origin-left { + transform-origin: left; + } + + .xl\:origin-top-left { + transform-origin: top left; + } + + .xl\:scale-0 { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .xl\:scale-50 { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .xl\:scale-75 { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .xl\:scale-90 { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .xl\:scale-95 { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .xl\:scale-100 { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .xl\:scale-105 { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .xl\:scale-110 { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .xl\:scale-125 { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .xl\:scale-150 { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .xl\:scale-x-0 { + --transform-scale-x: 0; + } + + .xl\:scale-x-50 { + --transform-scale-x: .5; + } + + .xl\:scale-x-75 { + --transform-scale-x: .75; + } + + .xl\:scale-x-90 { + --transform-scale-x: .9; + } + + .xl\:scale-x-95 { + --transform-scale-x: .95; + } + + .xl\:scale-x-100 { + --transform-scale-x: 1; + } + + .xl\:scale-x-105 { + --transform-scale-x: 1.05; + } + + .xl\:scale-x-110 { + --transform-scale-x: 1.1; + } + + .xl\:scale-x-125 { + --transform-scale-x: 1.25; + } + + .xl\:scale-x-150 { + --transform-scale-x: 1.5; + } + + .xl\:scale-y-0 { + --transform-scale-y: 0; + } + + .xl\:scale-y-50 { + --transform-scale-y: .5; + } + + .xl\:scale-y-75 { + --transform-scale-y: .75; + } + + .xl\:scale-y-90 { + --transform-scale-y: .9; + } + + .xl\:scale-y-95 { + --transform-scale-y: .95; + } + + .xl\:scale-y-100 { + --transform-scale-y: 1; + } + + .xl\:scale-y-105 { + --transform-scale-y: 1.05; + } + + .xl\:scale-y-110 { + --transform-scale-y: 1.1; + } + + .xl\:scale-y-125 { + --transform-scale-y: 1.25; + } + + .xl\:scale-y-150 { + --transform-scale-y: 1.5; + } + + .xl\:hover\:scale-0:hover { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .xl\:hover\:scale-50:hover { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .xl\:hover\:scale-75:hover { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .xl\:hover\:scale-90:hover { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .xl\:hover\:scale-95:hover { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .xl\:hover\:scale-100:hover { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .xl\:hover\:scale-105:hover { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .xl\:hover\:scale-110:hover { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .xl\:hover\:scale-125:hover { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .xl\:hover\:scale-150:hover { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .xl\:hover\:scale-x-0:hover { + --transform-scale-x: 0; + } + + .xl\:hover\:scale-x-50:hover { + --transform-scale-x: .5; + } + + .xl\:hover\:scale-x-75:hover { + --transform-scale-x: .75; + } + + .xl\:hover\:scale-x-90:hover { + --transform-scale-x: .9; + } + + .xl\:hover\:scale-x-95:hover { + --transform-scale-x: .95; + } + + .xl\:hover\:scale-x-100:hover { + --transform-scale-x: 1; + } + + .xl\:hover\:scale-x-105:hover { + --transform-scale-x: 1.05; + } + + .xl\:hover\:scale-x-110:hover { + --transform-scale-x: 1.1; + } + + .xl\:hover\:scale-x-125:hover { + --transform-scale-x: 1.25; + } + + .xl\:hover\:scale-x-150:hover { + --transform-scale-x: 1.5; + } + + .xl\:hover\:scale-y-0:hover { + --transform-scale-y: 0; + } + + .xl\:hover\:scale-y-50:hover { + --transform-scale-y: .5; + } + + .xl\:hover\:scale-y-75:hover { + --transform-scale-y: .75; + } + + .xl\:hover\:scale-y-90:hover { + --transform-scale-y: .9; + } + + .xl\:hover\:scale-y-95:hover { + --transform-scale-y: .95; + } + + .xl\:hover\:scale-y-100:hover { + --transform-scale-y: 1; + } + + .xl\:hover\:scale-y-105:hover { + --transform-scale-y: 1.05; + } + + .xl\:hover\:scale-y-110:hover { + --transform-scale-y: 1.1; + } + + .xl\:hover\:scale-y-125:hover { + --transform-scale-y: 1.25; + } + + .xl\:hover\:scale-y-150:hover { + --transform-scale-y: 1.5; + } + + .xl\:focus\:scale-0:focus { + --transform-scale-x: 0; + --transform-scale-y: 0; + } + + .xl\:focus\:scale-50:focus { + --transform-scale-x: .5; + --transform-scale-y: .5; + } + + .xl\:focus\:scale-75:focus { + --transform-scale-x: .75; + --transform-scale-y: .75; + } + + .xl\:focus\:scale-90:focus { + --transform-scale-x: .9; + --transform-scale-y: .9; + } + + .xl\:focus\:scale-95:focus { + --transform-scale-x: .95; + --transform-scale-y: .95; + } + + .xl\:focus\:scale-100:focus { + --transform-scale-x: 1; + --transform-scale-y: 1; + } + + .xl\:focus\:scale-105:focus { + --transform-scale-x: 1.05; + --transform-scale-y: 1.05; + } + + .xl\:focus\:scale-110:focus { + --transform-scale-x: 1.1; + --transform-scale-y: 1.1; + } + + .xl\:focus\:scale-125:focus { + --transform-scale-x: 1.25; + --transform-scale-y: 1.25; + } + + .xl\:focus\:scale-150:focus { + --transform-scale-x: 1.5; + --transform-scale-y: 1.5; + } + + .xl\:focus\:scale-x-0:focus { + --transform-scale-x: 0; + } + + .xl\:focus\:scale-x-50:focus { + --transform-scale-x: .5; + } + + .xl\:focus\:scale-x-75:focus { + --transform-scale-x: .75; + } + + .xl\:focus\:scale-x-90:focus { + --transform-scale-x: .9; + } + + .xl\:focus\:scale-x-95:focus { + --transform-scale-x: .95; + } + + .xl\:focus\:scale-x-100:focus { + --transform-scale-x: 1; + } + + .xl\:focus\:scale-x-105:focus { + --transform-scale-x: 1.05; + } + + .xl\:focus\:scale-x-110:focus { + --transform-scale-x: 1.1; + } + + .xl\:focus\:scale-x-125:focus { + --transform-scale-x: 1.25; + } + + .xl\:focus\:scale-x-150:focus { + --transform-scale-x: 1.5; + } + + .xl\:focus\:scale-y-0:focus { + --transform-scale-y: 0; + } + + .xl\:focus\:scale-y-50:focus { + --transform-scale-y: .5; + } + + .xl\:focus\:scale-y-75:focus { + --transform-scale-y: .75; + } + + .xl\:focus\:scale-y-90:focus { + --transform-scale-y: .9; + } + + .xl\:focus\:scale-y-95:focus { + --transform-scale-y: .95; + } + + .xl\:focus\:scale-y-100:focus { + --transform-scale-y: 1; + } + + .xl\:focus\:scale-y-105:focus { + --transform-scale-y: 1.05; + } + + .xl\:focus\:scale-y-110:focus { + --transform-scale-y: 1.1; + } + + .xl\:focus\:scale-y-125:focus { + --transform-scale-y: 1.25; + } + + .xl\:focus\:scale-y-150:focus { + --transform-scale-y: 1.5; + } + + .xl\:rotate-0 { + --transform-rotate: 0; + } + + .xl\:rotate-45 { + --transform-rotate: 45deg; + } + + .xl\:rotate-90 { + --transform-rotate: 90deg; + } + + .xl\:rotate-180 { + --transform-rotate: 180deg; + } + + .xl\:-rotate-180 { + --transform-rotate: -180deg; + } + + .xl\:-rotate-90 { + --transform-rotate: -90deg; + } + + .xl\:-rotate-45 { + --transform-rotate: -45deg; + } + + .xl\:hover\:rotate-0:hover { + --transform-rotate: 0; + } + + .xl\:hover\:rotate-45:hover { + --transform-rotate: 45deg; + } + + .xl\:hover\:rotate-90:hover { + --transform-rotate: 90deg; + } + + .xl\:hover\:rotate-180:hover { + --transform-rotate: 180deg; + } + + .xl\:hover\:-rotate-180:hover { + --transform-rotate: -180deg; + } + + .xl\:hover\:-rotate-90:hover { + --transform-rotate: -90deg; + } + + .xl\:hover\:-rotate-45:hover { + --transform-rotate: -45deg; + } + + .xl\:focus\:rotate-0:focus { + --transform-rotate: 0; + } + + .xl\:focus\:rotate-45:focus { + --transform-rotate: 45deg; + } + + .xl\:focus\:rotate-90:focus { + --transform-rotate: 90deg; + } + + .xl\:focus\:rotate-180:focus { + --transform-rotate: 180deg; + } + + .xl\:focus\:-rotate-180:focus { + --transform-rotate: -180deg; + } + + .xl\:focus\:-rotate-90:focus { + --transform-rotate: -90deg; + } + + .xl\:focus\:-rotate-45:focus { + --transform-rotate: -45deg; + } + + .xl\:translate-x-0 { + --transform-translate-x: 0; + } + + .xl\:translate-x-1 { + --transform-translate-x: 0.25rem; + } + + .xl\:translate-x-2 { + --transform-translate-x: 0.5rem; + } + + .xl\:translate-x-3 { + --transform-translate-x: 0.75rem; + } + + .xl\:translate-x-4 { + --transform-translate-x: 1rem; + } + + .xl\:translate-x-5 { + --transform-translate-x: 1.25rem; + } + + .xl\:translate-x-6 { + --transform-translate-x: 1.5rem; + } + + .xl\:translate-x-8 { + --transform-translate-x: 2rem; + } + + .xl\:translate-x-10 { + --transform-translate-x: 2.5rem; + } + + .xl\:translate-x-12 { + --transform-translate-x: 3rem; + } + + .xl\:translate-x-16 { + --transform-translate-x: 4rem; + } + + .xl\:translate-x-20 { + --transform-translate-x: 5rem; + } + + .xl\:translate-x-24 { + --transform-translate-x: 6rem; + } + + .xl\:translate-x-32 { + --transform-translate-x: 8rem; + } + + .xl\:translate-x-40 { + --transform-translate-x: 10rem; + } + + .xl\:translate-x-48 { + --transform-translate-x: 12rem; + } + + .xl\:translate-x-56 { + --transform-translate-x: 14rem; + } + + .xl\:translate-x-64 { + --transform-translate-x: 16rem; + } + + .xl\:translate-x-px { + --transform-translate-x: 1px; + } + + .xl\:-translate-x-1 { + --transform-translate-x: -0.25rem; + } + + .xl\:-translate-x-2 { + --transform-translate-x: -0.5rem; + } + + .xl\:-translate-x-3 { + --transform-translate-x: -0.75rem; + } + + .xl\:-translate-x-4 { + --transform-translate-x: -1rem; + } + + .xl\:-translate-x-5 { + --transform-translate-x: -1.25rem; + } + + .xl\:-translate-x-6 { + --transform-translate-x: -1.5rem; + } + + .xl\:-translate-x-8 { + --transform-translate-x: -2rem; + } + + .xl\:-translate-x-10 { + --transform-translate-x: -2.5rem; + } + + .xl\:-translate-x-12 { + --transform-translate-x: -3rem; + } + + .xl\:-translate-x-16 { + --transform-translate-x: -4rem; + } + + .xl\:-translate-x-20 { + --transform-translate-x: -5rem; + } + + .xl\:-translate-x-24 { + --transform-translate-x: -6rem; + } + + .xl\:-translate-x-32 { + --transform-translate-x: -8rem; + } + + .xl\:-translate-x-40 { + --transform-translate-x: -10rem; + } + + .xl\:-translate-x-48 { + --transform-translate-x: -12rem; + } + + .xl\:-translate-x-56 { + --transform-translate-x: -14rem; + } + + .xl\:-translate-x-64 { + --transform-translate-x: -16rem; + } + + .xl\:-translate-x-px { + --transform-translate-x: -1px; + } + + .xl\:-translate-x-full { + --transform-translate-x: -100%; + } + + .xl\:-translate-x-1\/2 { + --transform-translate-x: -50%; + } + + .xl\:translate-x-1\/2 { + --transform-translate-x: 50%; + } + + .xl\:translate-x-full { + --transform-translate-x: 100%; + } + + .xl\:translate-y-0 { + --transform-translate-y: 0; + } + + .xl\:translate-y-1 { + --transform-translate-y: 0.25rem; + } + + .xl\:translate-y-2 { + --transform-translate-y: 0.5rem; + } + + .xl\:translate-y-3 { + --transform-translate-y: 0.75rem; + } + + .xl\:translate-y-4 { + --transform-translate-y: 1rem; + } + + .xl\:translate-y-5 { + --transform-translate-y: 1.25rem; + } + + .xl\:translate-y-6 { + --transform-translate-y: 1.5rem; + } + + .xl\:translate-y-8 { + --transform-translate-y: 2rem; + } + + .xl\:translate-y-10 { + --transform-translate-y: 2.5rem; + } + + .xl\:translate-y-12 { + --transform-translate-y: 3rem; + } + + .xl\:translate-y-16 { + --transform-translate-y: 4rem; + } + + .xl\:translate-y-20 { + --transform-translate-y: 5rem; + } + + .xl\:translate-y-24 { + --transform-translate-y: 6rem; + } + + .xl\:translate-y-32 { + --transform-translate-y: 8rem; + } + + .xl\:translate-y-40 { + --transform-translate-y: 10rem; + } + + .xl\:translate-y-48 { + --transform-translate-y: 12rem; + } + + .xl\:translate-y-56 { + --transform-translate-y: 14rem; + } + + .xl\:translate-y-64 { + --transform-translate-y: 16rem; + } + + .xl\:translate-y-px { + --transform-translate-y: 1px; + } + + .xl\:-translate-y-1 { + --transform-translate-y: -0.25rem; + } + + .xl\:-translate-y-2 { + --transform-translate-y: -0.5rem; + } + + .xl\:-translate-y-3 { + --transform-translate-y: -0.75rem; + } + + .xl\:-translate-y-4 { + --transform-translate-y: -1rem; + } + + .xl\:-translate-y-5 { + --transform-translate-y: -1.25rem; + } + + .xl\:-translate-y-6 { + --transform-translate-y: -1.5rem; + } + + .xl\:-translate-y-8 { + --transform-translate-y: -2rem; + } + + .xl\:-translate-y-10 { + --transform-translate-y: -2.5rem; + } + + .xl\:-translate-y-12 { + --transform-translate-y: -3rem; + } + + .xl\:-translate-y-16 { + --transform-translate-y: -4rem; + } + + .xl\:-translate-y-20 { + --transform-translate-y: -5rem; + } + + .xl\:-translate-y-24 { + --transform-translate-y: -6rem; + } + + .xl\:-translate-y-32 { + --transform-translate-y: -8rem; + } + + .xl\:-translate-y-40 { + --transform-translate-y: -10rem; + } + + .xl\:-translate-y-48 { + --transform-translate-y: -12rem; + } + + .xl\:-translate-y-56 { + --transform-translate-y: -14rem; + } + + .xl\:-translate-y-64 { + --transform-translate-y: -16rem; + } + + .xl\:-translate-y-px { + --transform-translate-y: -1px; + } + + .xl\:-translate-y-full { + --transform-translate-y: -100%; + } + + .xl\:-translate-y-1\/2 { + --transform-translate-y: -50%; + } + + .xl\:translate-y-1\/2 { + --transform-translate-y: 50%; + } + + .xl\:translate-y-full { + --transform-translate-y: 100%; + } + + .xl\:hover\:translate-x-0:hover { + --transform-translate-x: 0; + } + + .xl\:hover\:translate-x-1:hover { + --transform-translate-x: 0.25rem; + } + + .xl\:hover\:translate-x-2:hover { + --transform-translate-x: 0.5rem; + } + + .xl\:hover\:translate-x-3:hover { + --transform-translate-x: 0.75rem; + } + + .xl\:hover\:translate-x-4:hover { + --transform-translate-x: 1rem; + } + + .xl\:hover\:translate-x-5:hover { + --transform-translate-x: 1.25rem; + } + + .xl\:hover\:translate-x-6:hover { + --transform-translate-x: 1.5rem; + } + + .xl\:hover\:translate-x-8:hover { + --transform-translate-x: 2rem; + } + + .xl\:hover\:translate-x-10:hover { + --transform-translate-x: 2.5rem; + } + + .xl\:hover\:translate-x-12:hover { + --transform-translate-x: 3rem; + } + + .xl\:hover\:translate-x-16:hover { + --transform-translate-x: 4rem; + } + + .xl\:hover\:translate-x-20:hover { + --transform-translate-x: 5rem; + } + + .xl\:hover\:translate-x-24:hover { + --transform-translate-x: 6rem; + } + + .xl\:hover\:translate-x-32:hover { + --transform-translate-x: 8rem; + } + + .xl\:hover\:translate-x-40:hover { + --transform-translate-x: 10rem; + } + + .xl\:hover\:translate-x-48:hover { + --transform-translate-x: 12rem; + } + + .xl\:hover\:translate-x-56:hover { + --transform-translate-x: 14rem; + } + + .xl\:hover\:translate-x-64:hover { + --transform-translate-x: 16rem; + } + + .xl\:hover\:translate-x-px:hover { + --transform-translate-x: 1px; + } + + .xl\:hover\:-translate-x-1:hover { + --transform-translate-x: -0.25rem; + } + + .xl\:hover\:-translate-x-2:hover { + --transform-translate-x: -0.5rem; + } + + .xl\:hover\:-translate-x-3:hover { + --transform-translate-x: -0.75rem; + } + + .xl\:hover\:-translate-x-4:hover { + --transform-translate-x: -1rem; + } + + .xl\:hover\:-translate-x-5:hover { + --transform-translate-x: -1.25rem; + } + + .xl\:hover\:-translate-x-6:hover { + --transform-translate-x: -1.5rem; + } + + .xl\:hover\:-translate-x-8:hover { + --transform-translate-x: -2rem; + } + + .xl\:hover\:-translate-x-10:hover { + --transform-translate-x: -2.5rem; + } + + .xl\:hover\:-translate-x-12:hover { + --transform-translate-x: -3rem; + } + + .xl\:hover\:-translate-x-16:hover { + --transform-translate-x: -4rem; + } + + .xl\:hover\:-translate-x-20:hover { + --transform-translate-x: -5rem; + } + + .xl\:hover\:-translate-x-24:hover { + --transform-translate-x: -6rem; + } + + .xl\:hover\:-translate-x-32:hover { + --transform-translate-x: -8rem; + } + + .xl\:hover\:-translate-x-40:hover { + --transform-translate-x: -10rem; + } + + .xl\:hover\:-translate-x-48:hover { + --transform-translate-x: -12rem; + } + + .xl\:hover\:-translate-x-56:hover { + --transform-translate-x: -14rem; + } + + .xl\:hover\:-translate-x-64:hover { + --transform-translate-x: -16rem; + } + + .xl\:hover\:-translate-x-px:hover { + --transform-translate-x: -1px; + } + + .xl\:hover\:-translate-x-full:hover { + --transform-translate-x: -100%; + } + + .xl\:hover\:-translate-x-1\/2:hover { + --transform-translate-x: -50%; + } + + .xl\:hover\:translate-x-1\/2:hover { + --transform-translate-x: 50%; + } + + .xl\:hover\:translate-x-full:hover { + --transform-translate-x: 100%; + } + + .xl\:hover\:translate-y-0:hover { + --transform-translate-y: 0; + } + + .xl\:hover\:translate-y-1:hover { + --transform-translate-y: 0.25rem; + } + + .xl\:hover\:translate-y-2:hover { + --transform-translate-y: 0.5rem; + } + + .xl\:hover\:translate-y-3:hover { + --transform-translate-y: 0.75rem; + } + + .xl\:hover\:translate-y-4:hover { + --transform-translate-y: 1rem; + } + + .xl\:hover\:translate-y-5:hover { + --transform-translate-y: 1.25rem; + } + + .xl\:hover\:translate-y-6:hover { + --transform-translate-y: 1.5rem; + } + + .xl\:hover\:translate-y-8:hover { + --transform-translate-y: 2rem; + } + + .xl\:hover\:translate-y-10:hover { + --transform-translate-y: 2.5rem; + } + + .xl\:hover\:translate-y-12:hover { + --transform-translate-y: 3rem; + } + + .xl\:hover\:translate-y-16:hover { + --transform-translate-y: 4rem; + } + + .xl\:hover\:translate-y-20:hover { + --transform-translate-y: 5rem; + } + + .xl\:hover\:translate-y-24:hover { + --transform-translate-y: 6rem; + } + + .xl\:hover\:translate-y-32:hover { + --transform-translate-y: 8rem; + } + + .xl\:hover\:translate-y-40:hover { + --transform-translate-y: 10rem; + } + + .xl\:hover\:translate-y-48:hover { + --transform-translate-y: 12rem; + } + + .xl\:hover\:translate-y-56:hover { + --transform-translate-y: 14rem; + } + + .xl\:hover\:translate-y-64:hover { + --transform-translate-y: 16rem; + } + + .xl\:hover\:translate-y-px:hover { + --transform-translate-y: 1px; + } + + .xl\:hover\:-translate-y-1:hover { + --transform-translate-y: -0.25rem; + } + + .xl\:hover\:-translate-y-2:hover { + --transform-translate-y: -0.5rem; + } + + .xl\:hover\:-translate-y-3:hover { + --transform-translate-y: -0.75rem; + } + + .xl\:hover\:-translate-y-4:hover { + --transform-translate-y: -1rem; + } + + .xl\:hover\:-translate-y-5:hover { + --transform-translate-y: -1.25rem; + } + + .xl\:hover\:-translate-y-6:hover { + --transform-translate-y: -1.5rem; + } + + .xl\:hover\:-translate-y-8:hover { + --transform-translate-y: -2rem; + } + + .xl\:hover\:-translate-y-10:hover { + --transform-translate-y: -2.5rem; + } + + .xl\:hover\:-translate-y-12:hover { + --transform-translate-y: -3rem; + } + + .xl\:hover\:-translate-y-16:hover { + --transform-translate-y: -4rem; + } + + .xl\:hover\:-translate-y-20:hover { + --transform-translate-y: -5rem; + } + + .xl\:hover\:-translate-y-24:hover { + --transform-translate-y: -6rem; + } + + .xl\:hover\:-translate-y-32:hover { + --transform-translate-y: -8rem; + } + + .xl\:hover\:-translate-y-40:hover { + --transform-translate-y: -10rem; + } + + .xl\:hover\:-translate-y-48:hover { + --transform-translate-y: -12rem; + } + + .xl\:hover\:-translate-y-56:hover { + --transform-translate-y: -14rem; + } + + .xl\:hover\:-translate-y-64:hover { + --transform-translate-y: -16rem; + } + + .xl\:hover\:-translate-y-px:hover { + --transform-translate-y: -1px; + } + + .xl\:hover\:-translate-y-full:hover { + --transform-translate-y: -100%; + } + + .xl\:hover\:-translate-y-1\/2:hover { + --transform-translate-y: -50%; + } + + .xl\:hover\:translate-y-1\/2:hover { + --transform-translate-y: 50%; + } + + .xl\:hover\:translate-y-full:hover { + --transform-translate-y: 100%; + } + + .xl\:focus\:translate-x-0:focus { + --transform-translate-x: 0; + } + + .xl\:focus\:translate-x-1:focus { + --transform-translate-x: 0.25rem; + } + + .xl\:focus\:translate-x-2:focus { + --transform-translate-x: 0.5rem; + } + + .xl\:focus\:translate-x-3:focus { + --transform-translate-x: 0.75rem; + } + + .xl\:focus\:translate-x-4:focus { + --transform-translate-x: 1rem; + } + + .xl\:focus\:translate-x-5:focus { + --transform-translate-x: 1.25rem; + } + + .xl\:focus\:translate-x-6:focus { + --transform-translate-x: 1.5rem; + } + + .xl\:focus\:translate-x-8:focus { + --transform-translate-x: 2rem; + } + + .xl\:focus\:translate-x-10:focus { + --transform-translate-x: 2.5rem; + } + + .xl\:focus\:translate-x-12:focus { + --transform-translate-x: 3rem; + } + + .xl\:focus\:translate-x-16:focus { + --transform-translate-x: 4rem; + } + + .xl\:focus\:translate-x-20:focus { + --transform-translate-x: 5rem; + } + + .xl\:focus\:translate-x-24:focus { + --transform-translate-x: 6rem; + } + + .xl\:focus\:translate-x-32:focus { + --transform-translate-x: 8rem; + } + + .xl\:focus\:translate-x-40:focus { + --transform-translate-x: 10rem; + } + + .xl\:focus\:translate-x-48:focus { + --transform-translate-x: 12rem; + } + + .xl\:focus\:translate-x-56:focus { + --transform-translate-x: 14rem; + } + + .xl\:focus\:translate-x-64:focus { + --transform-translate-x: 16rem; + } + + .xl\:focus\:translate-x-px:focus { + --transform-translate-x: 1px; + } + + .xl\:focus\:-translate-x-1:focus { + --transform-translate-x: -0.25rem; + } + + .xl\:focus\:-translate-x-2:focus { + --transform-translate-x: -0.5rem; + } + + .xl\:focus\:-translate-x-3:focus { + --transform-translate-x: -0.75rem; + } + + .xl\:focus\:-translate-x-4:focus { + --transform-translate-x: -1rem; + } + + .xl\:focus\:-translate-x-5:focus { + --transform-translate-x: -1.25rem; + } + + .xl\:focus\:-translate-x-6:focus { + --transform-translate-x: -1.5rem; + } + + .xl\:focus\:-translate-x-8:focus { + --transform-translate-x: -2rem; + } + + .xl\:focus\:-translate-x-10:focus { + --transform-translate-x: -2.5rem; + } + + .xl\:focus\:-translate-x-12:focus { + --transform-translate-x: -3rem; + } + + .xl\:focus\:-translate-x-16:focus { + --transform-translate-x: -4rem; + } + + .xl\:focus\:-translate-x-20:focus { + --transform-translate-x: -5rem; + } + + .xl\:focus\:-translate-x-24:focus { + --transform-translate-x: -6rem; + } + + .xl\:focus\:-translate-x-32:focus { + --transform-translate-x: -8rem; + } + + .xl\:focus\:-translate-x-40:focus { + --transform-translate-x: -10rem; + } + + .xl\:focus\:-translate-x-48:focus { + --transform-translate-x: -12rem; + } + + .xl\:focus\:-translate-x-56:focus { + --transform-translate-x: -14rem; + } + + .xl\:focus\:-translate-x-64:focus { + --transform-translate-x: -16rem; + } + + .xl\:focus\:-translate-x-px:focus { + --transform-translate-x: -1px; + } + + .xl\:focus\:-translate-x-full:focus { + --transform-translate-x: -100%; + } + + .xl\:focus\:-translate-x-1\/2:focus { + --transform-translate-x: -50%; + } + + .xl\:focus\:translate-x-1\/2:focus { + --transform-translate-x: 50%; + } + + .xl\:focus\:translate-x-full:focus { + --transform-translate-x: 100%; + } + + .xl\:focus\:translate-y-0:focus { + --transform-translate-y: 0; + } + + .xl\:focus\:translate-y-1:focus { + --transform-translate-y: 0.25rem; + } + + .xl\:focus\:translate-y-2:focus { + --transform-translate-y: 0.5rem; + } + + .xl\:focus\:translate-y-3:focus { + --transform-translate-y: 0.75rem; + } + + .xl\:focus\:translate-y-4:focus { + --transform-translate-y: 1rem; + } + + .xl\:focus\:translate-y-5:focus { + --transform-translate-y: 1.25rem; + } + + .xl\:focus\:translate-y-6:focus { + --transform-translate-y: 1.5rem; + } + + .xl\:focus\:translate-y-8:focus { + --transform-translate-y: 2rem; + } + + .xl\:focus\:translate-y-10:focus { + --transform-translate-y: 2.5rem; + } + + .xl\:focus\:translate-y-12:focus { + --transform-translate-y: 3rem; + } + + .xl\:focus\:translate-y-16:focus { + --transform-translate-y: 4rem; + } + + .xl\:focus\:translate-y-20:focus { + --transform-translate-y: 5rem; + } + + .xl\:focus\:translate-y-24:focus { + --transform-translate-y: 6rem; + } + + .xl\:focus\:translate-y-32:focus { + --transform-translate-y: 8rem; + } + + .xl\:focus\:translate-y-40:focus { + --transform-translate-y: 10rem; + } + + .xl\:focus\:translate-y-48:focus { + --transform-translate-y: 12rem; + } + + .xl\:focus\:translate-y-56:focus { + --transform-translate-y: 14rem; + } + + .xl\:focus\:translate-y-64:focus { + --transform-translate-y: 16rem; + } + + .xl\:focus\:translate-y-px:focus { + --transform-translate-y: 1px; + } + + .xl\:focus\:-translate-y-1:focus { + --transform-translate-y: -0.25rem; + } + + .xl\:focus\:-translate-y-2:focus { + --transform-translate-y: -0.5rem; + } + + .xl\:focus\:-translate-y-3:focus { + --transform-translate-y: -0.75rem; + } + + .xl\:focus\:-translate-y-4:focus { + --transform-translate-y: -1rem; + } + + .xl\:focus\:-translate-y-5:focus { + --transform-translate-y: -1.25rem; + } + + .xl\:focus\:-translate-y-6:focus { + --transform-translate-y: -1.5rem; + } + + .xl\:focus\:-translate-y-8:focus { + --transform-translate-y: -2rem; + } + + .xl\:focus\:-translate-y-10:focus { + --transform-translate-y: -2.5rem; + } + + .xl\:focus\:-translate-y-12:focus { + --transform-translate-y: -3rem; + } + + .xl\:focus\:-translate-y-16:focus { + --transform-translate-y: -4rem; + } + + .xl\:focus\:-translate-y-20:focus { + --transform-translate-y: -5rem; + } + + .xl\:focus\:-translate-y-24:focus { + --transform-translate-y: -6rem; + } + + .xl\:focus\:-translate-y-32:focus { + --transform-translate-y: -8rem; + } + + .xl\:focus\:-translate-y-40:focus { + --transform-translate-y: -10rem; + } + + .xl\:focus\:-translate-y-48:focus { + --transform-translate-y: -12rem; + } + + .xl\:focus\:-translate-y-56:focus { + --transform-translate-y: -14rem; + } + + .xl\:focus\:-translate-y-64:focus { + --transform-translate-y: -16rem; + } + + .xl\:focus\:-translate-y-px:focus { + --transform-translate-y: -1px; + } + + .xl\:focus\:-translate-y-full:focus { + --transform-translate-y: -100%; + } + + .xl\:focus\:-translate-y-1\/2:focus { + --transform-translate-y: -50%; + } + + .xl\:focus\:translate-y-1\/2:focus { + --transform-translate-y: 50%; + } + + .xl\:focus\:translate-y-full:focus { + --transform-translate-y: 100%; + } + + .xl\:skew-x-0 { + --transform-skew-x: 0; + } + + .xl\:skew-x-3 { + --transform-skew-x: 3deg; + } + + .xl\:skew-x-6 { + --transform-skew-x: 6deg; + } + + .xl\:skew-x-12 { + --transform-skew-x: 12deg; + } + + .xl\:-skew-x-12 { + --transform-skew-x: -12deg; + } + + .xl\:-skew-x-6 { + --transform-skew-x: -6deg; + } + + .xl\:-skew-x-3 { + --transform-skew-x: -3deg; + } + + .xl\:skew-y-0 { + --transform-skew-y: 0; + } + + .xl\:skew-y-3 { + --transform-skew-y: 3deg; + } + + .xl\:skew-y-6 { + --transform-skew-y: 6deg; + } + + .xl\:skew-y-12 { + --transform-skew-y: 12deg; + } + + .xl\:-skew-y-12 { + --transform-skew-y: -12deg; + } + + .xl\:-skew-y-6 { + --transform-skew-y: -6deg; + } + + .xl\:-skew-y-3 { + --transform-skew-y: -3deg; + } + + .xl\:hover\:skew-x-0:hover { + --transform-skew-x: 0; + } + + .xl\:hover\:skew-x-3:hover { + --transform-skew-x: 3deg; + } + + .xl\:hover\:skew-x-6:hover { + --transform-skew-x: 6deg; + } + + .xl\:hover\:skew-x-12:hover { + --transform-skew-x: 12deg; + } + + .xl\:hover\:-skew-x-12:hover { + --transform-skew-x: -12deg; + } + + .xl\:hover\:-skew-x-6:hover { + --transform-skew-x: -6deg; + } + + .xl\:hover\:-skew-x-3:hover { + --transform-skew-x: -3deg; + } + + .xl\:hover\:skew-y-0:hover { + --transform-skew-y: 0; + } + + .xl\:hover\:skew-y-3:hover { + --transform-skew-y: 3deg; + } + + .xl\:hover\:skew-y-6:hover { + --transform-skew-y: 6deg; + } + + .xl\:hover\:skew-y-12:hover { + --transform-skew-y: 12deg; + } + + .xl\:hover\:-skew-y-12:hover { + --transform-skew-y: -12deg; + } + + .xl\:hover\:-skew-y-6:hover { + --transform-skew-y: -6deg; + } + + .xl\:hover\:-skew-y-3:hover { + --transform-skew-y: -3deg; + } + + .xl\:focus\:skew-x-0:focus { + --transform-skew-x: 0; + } + + .xl\:focus\:skew-x-3:focus { + --transform-skew-x: 3deg; + } + + .xl\:focus\:skew-x-6:focus { + --transform-skew-x: 6deg; + } + + .xl\:focus\:skew-x-12:focus { + --transform-skew-x: 12deg; + } + + .xl\:focus\:-skew-x-12:focus { + --transform-skew-x: -12deg; + } + + .xl\:focus\:-skew-x-6:focus { + --transform-skew-x: -6deg; + } + + .xl\:focus\:-skew-x-3:focus { + --transform-skew-x: -3deg; + } + + .xl\:focus\:skew-y-0:focus { + --transform-skew-y: 0; + } + + .xl\:focus\:skew-y-3:focus { + --transform-skew-y: 3deg; + } + + .xl\:focus\:skew-y-6:focus { + --transform-skew-y: 6deg; + } + + .xl\:focus\:skew-y-12:focus { + --transform-skew-y: 12deg; + } + + .xl\:focus\:-skew-y-12:focus { + --transform-skew-y: -12deg; + } + + .xl\:focus\:-skew-y-6:focus { + --transform-skew-y: -6deg; + } + + .xl\:focus\:-skew-y-3:focus { + --transform-skew-y: -3deg; + } + + .xl\:transition-none { + transition-property: none; + } + + .xl\:transition-all { + transition-property: all; + } + + .xl\:transition { + transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; + } + + .xl\:transition-colors { + transition-property: background-color, border-color, color, fill, stroke; + } + + .xl\:transition-opacity { + transition-property: opacity; + } + + .xl\:transition-shadow { + transition-property: box-shadow; + } + + .xl\:transition-transform { + transition-property: transform; + } + + .xl\:ease-linear { + transition-timing-function: linear; + } + + .xl\:ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); + } + + .xl\:ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + + .xl\:ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + } + + .xl\:duration-75 { + transition-duration: 75ms; + } + + .xl\:duration-100 { + transition-duration: 100ms; + } + + .xl\:duration-150 { + transition-duration: 150ms; + } + + .xl\:duration-200 { + transition-duration: 200ms; + } + + .xl\:duration-300 { + transition-duration: 300ms; + } + + .xl\:duration-500 { + transition-duration: 500ms; + } + + .xl\:duration-700 { + transition-duration: 700ms; + } + + .xl\:duration-1000 { + transition-duration: 1000ms; + } + + .xl\:delay-75 { + transition-delay: 75ms; + } + + .xl\:delay-100 { + transition-delay: 100ms; + } + + .xl\:delay-150 { + transition-delay: 150ms; + } + + .xl\:delay-200 { + transition-delay: 200ms; + } + + .xl\:delay-300 { + transition-delay: 300ms; + } + + .xl\:delay-500 { + transition-delay: 500ms; + } + + .xl\:delay-700 { + transition-delay: 700ms; + } + + .xl\:delay-1000 { + transition-delay: 1000ms; + } + + .xl\:example { + font-weight: 700; + color: #f56565; + } +} diff --git a/__tests__/sanity.test.js b/__tests__/sanity.test.js --- a/__tests__/sanity.test.js +++ b/__tests__/sanity.test.js @@ -52,6 +52,34 @@ it('generates the right CSS when using @import instead of @tailwind', () => { }) }) +// TODO: Move to per plugin unit tests for this sort of thing +it('generates the right CSS when color opacity plugins are disabled', () => { + const inputPath = path.resolve(`${__dirname}/fixtures/tailwind-input.css`) + const input = fs.readFileSync(inputPath, 'utf8') + + return postcss([ + tailwind({ + ...config, + corePlugins: { + textOpacity: false, + backgroundOpacity: false, + borderOpacity: false, + placeholderOpacity: false, + divideOpacity: false, + }, + }), + ]) + .process(input, { from: inputPath }) + .then(result => { + const expected = fs.readFileSync( + path.resolve(`${__dirname}/fixtures/tailwind-output-no-color-opacity.css`), + 'utf8' + ) + + expect(result.css).toBe(expected) + }) +}) + it('does not add any CSS if no Tailwind features are used', () => { return postcss([tailwind()]) .process('.foo { color: blue; }', { from: undefined })
[v1.4] Turning off opacity in corePlugins config still generates CSS variables The generated CSS file has increased substantially in size (~40%) as a result and I can't seem to turn it off. **tailwind.config.js** ```js corePlugins: { divideOpacity: false, backgroundOpacity: false, borderOpacity: false, placeholderOpacity: false, textOpacity: false } ``` **Generated CSS** ```css a { --text-opacity: 1; color: rgba(255, 128, 153, var(--text-opacity)); } .divide-black > :not(template) ~ :not(template){ --divide-opacity: 1; border-color: rgba(51, 51, 51, var(--divide-opacity)); } .bg-black{ --bg-opacity: 1; background-color: rgba(51, 51, 51, var(--bg-opacity)); } ```
Same here. Disabling the core-modules only removes the corresponding classes `.bg-opacity-*`, `.text-opacity-*` and so on. Seems like there should be a check here (and the other plugins): https://github.com/tailwindcss/tailwindcss/blob/e52c59a7588a17c04c250fc3d41c182678895061/src/plugins/backgroundColor.js#L23-L27 if the the corresponding opacity-plugin (in this case `backgroundOpacity`) is enabled or not. If not, just return the old version ``` { 'background-color': value, } ``` Or use ie11 as the target for now I think we can improve this for sure by adding some API to the plugin system to allow checking if a given plugin is enabled. For now I'd recommend what @emptynick suggested and use the `ie11` target mode for the color plugins: ```js target: ['relaxed', { backgroundColor: 'ie11', textColor: 'ie11', borderColor: 'ie11', placeholderColor: 'ie11', divideColor: 'ie11', }] ``` Where is `target` documented? I'm not seeing it on the [Configuration](https://tailwindcss.com/docs/configuration) page. In the release notes and in [the PR](https://github.com/tailwindcss/tailwindcss/pull/1635). Its experimental and (I guess) therefore not yet documented Question: for the `browserslist` target, I've tried the following approaches that all evaluate to [these browser versions](https://browserl.ist/?q=last+3+Chrome+major+versions%2C+last+3+Firefox+versions%2C+last+3+Edge+versions%2C+last+3+Safari+versions%2C+IE+11%2C+last+3+ChromeAndroid+versions%2C+last+3+iOS+versions), but I still get custom properties in the output: 1. `browserslist` key in `package.json`. 2. `.browserslistrc` config file. 3. `browserslist` config file. The only thing that works is using `target: 'ie11'`. Is the `browserslist` target not in `1.4.1`?
2020-05-01T19:10:59Z
1.4
tailwindlabs/tailwindcss
1,094
tailwindlabs__tailwindcss-1094
[ "1074" ]
28dab5eb3a797b38aaba12d8c5fcb06ca651dc45
diff --git a/src/corePlugins.js b/src/corePlugins.js --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -50,6 +50,7 @@ import resize from './plugins/resize' import boxShadow from './plugins/boxShadow' import fill from './plugins/fill' import stroke from './plugins/stroke' +import strokeWidth from './plugins/strokeWidth' import tableLayout from './plugins/tableLayout' import textAlign from './plugins/textAlign' import textColor from './plugins/textColor' @@ -123,6 +124,7 @@ export default function({ corePlugins: corePluginConfig }) { boxShadow, fill, stroke, + strokeWidth, tableLayout, textAlign, textColor, diff --git a/src/plugins/strokeWidth.js b/src/plugins/strokeWidth.js new file mode 100644 --- /dev/null +++ b/src/plugins/strokeWidth.js @@ -0,0 +1,19 @@ +import _ from 'lodash' +import flattenColorPalette from '../util/flattenColorPalette' + +export default function() { + return function({ addUtilities, e, theme, variants }) { + const utilities = _.fromPairs( + _.map(flattenColorPalette(theme('strokeWidth')), (value, modifier) => { + return [ + `.${e(`stroke-w-${modifier}`)}`, + { + 'stroke-width': value, + }, + ] + }) + ) + + addUtilities(utilities, variants('strokeWidth')) + } +} diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -375,6 +375,13 @@ module.exports = { stroke: { current: 'currentColor', }, + strokeWidth: { + '0': '0', + '1': '1px', + '2': '2px', + '3': '3px', + '4': '4px', + }, textColor: theme => theme('colors'), width: theme => ({ auto: 'auto', @@ -473,6 +480,7 @@ module.exports = { position: ['responsive'], resize: ['responsive'], stroke: ['responsive'], + strokeWidth: ['responsive'], tableLayout: ['responsive'], textAlign: ['responsive'], textColor: ['responsive', 'hover', 'focus'],
diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -6758,6 +6758,26 @@ video { stroke: currentColor !important; } +.stroke-w-0 { + stroke-width: 0 !important; +} + +.stroke-w-1 { + stroke-width: 1px !important; +} + +.stroke-w-2 { + stroke-width: 2px !important; +} + +.stroke-w-3 { + stroke-width: 3px !important; +} + +.stroke-w-4 { + stroke-width: 4px !important; +} + .table-auto { table-layout: auto !important; } @@ -14493,6 +14513,26 @@ video { stroke: currentColor !important; } + .sm\:stroke-w-0 { + stroke-width: 0 !important; + } + + .sm\:stroke-w-1 { + stroke-width: 1px !important; + } + + .sm\:stroke-w-2 { + stroke-width: 2px !important; + } + + .sm\:stroke-w-3 { + stroke-width: 3px !important; + } + + .sm\:stroke-w-4 { + stroke-width: 4px !important; + } + .sm\:table-auto { table-layout: auto !important; } @@ -22229,6 +22269,26 @@ video { stroke: currentColor !important; } + .md\:stroke-w-0 { + stroke-width: 0 !important; + } + + .md\:stroke-w-1 { + stroke-width: 1px !important; + } + + .md\:stroke-w-2 { + stroke-width: 2px !important; + } + + .md\:stroke-w-3 { + stroke-width: 3px !important; + } + + .md\:stroke-w-4 { + stroke-width: 4px !important; + } + .md\:table-auto { table-layout: auto !important; } @@ -29965,6 +30025,26 @@ video { stroke: currentColor !important; } + .lg\:stroke-w-0 { + stroke-width: 0 !important; + } + + .lg\:stroke-w-1 { + stroke-width: 1px !important; + } + + .lg\:stroke-w-2 { + stroke-width: 2px !important; + } + + .lg\:stroke-w-3 { + stroke-width: 3px !important; + } + + .lg\:stroke-w-4 { + stroke-width: 4px !important; + } + .lg\:table-auto { table-layout: auto !important; } @@ -37701,6 +37781,26 @@ video { stroke: currentColor !important; } + .xl\:stroke-w-0 { + stroke-width: 0 !important; + } + + .xl\:stroke-w-1 { + stroke-width: 1px !important; + } + + .xl\:stroke-w-2 { + stroke-width: 2px !important; + } + + .xl\:stroke-w-3 { + stroke-width: 3px !important; + } + + .xl\:stroke-w-4 { + stroke-width: 4px !important; + } + .xl\:table-auto { table-layout: auto !important; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -6758,6 +6758,26 @@ video { stroke: currentColor; } +.stroke-w-0 { + stroke-width: 0; +} + +.stroke-w-1 { + stroke-width: 1px; +} + +.stroke-w-2 { + stroke-width: 2px; +} + +.stroke-w-3 { + stroke-width: 3px; +} + +.stroke-w-4 { + stroke-width: 4px; +} + .table-auto { table-layout: auto; } @@ -14493,6 +14513,26 @@ video { stroke: currentColor; } + .sm\:stroke-w-0 { + stroke-width: 0; + } + + .sm\:stroke-w-1 { + stroke-width: 1px; + } + + .sm\:stroke-w-2 { + stroke-width: 2px; + } + + .sm\:stroke-w-3 { + stroke-width: 3px; + } + + .sm\:stroke-w-4 { + stroke-width: 4px; + } + .sm\:table-auto { table-layout: auto; } @@ -22229,6 +22269,26 @@ video { stroke: currentColor; } + .md\:stroke-w-0 { + stroke-width: 0; + } + + .md\:stroke-w-1 { + stroke-width: 1px; + } + + .md\:stroke-w-2 { + stroke-width: 2px; + } + + .md\:stroke-w-3 { + stroke-width: 3px; + } + + .md\:stroke-w-4 { + stroke-width: 4px; + } + .md\:table-auto { table-layout: auto; } @@ -29965,6 +30025,26 @@ video { stroke: currentColor; } + .lg\:stroke-w-0 { + stroke-width: 0; + } + + .lg\:stroke-w-1 { + stroke-width: 1px; + } + + .lg\:stroke-w-2 { + stroke-width: 2px; + } + + .lg\:stroke-w-3 { + stroke-width: 3px; + } + + .lg\:stroke-w-4 { + stroke-width: 4px; + } + .lg\:table-auto { table-layout: auto; } @@ -37701,6 +37781,26 @@ video { stroke: currentColor; } + .xl\:stroke-w-0 { + stroke-width: 0; + } + + .xl\:stroke-w-1 { + stroke-width: 1px; + } + + .xl\:stroke-w-2 { + stroke-width: 2px; + } + + .xl\:stroke-w-3 { + stroke-width: 3px; + } + + .xl\:stroke-w-4 { + stroke-width: 4px; + } + .xl\:table-auto { table-layout: auto; } diff --git a/__tests__/plugins/strokeWidth.test.js b/__tests__/plugins/strokeWidth.test.js new file mode 100644 --- /dev/null +++ b/__tests__/plugins/strokeWidth.test.js @@ -0,0 +1,57 @@ +import _ from 'lodash' +import escapeClassName from '../../src/util/escapeClassName' +import plugin from '../../src/plugins/strokeWidth' + +test('the width of the stroke to be applied to the shape', () => { + const addedUtilities = [] + + const config = { + theme: { + strokeWidth: { + '0': '0', + '1': '1px', + '2': '2px', + '3': '3px', + '4': '4px', + }, + }, + variants: { + strokeWidth: ['responsive'], + }, + } + + const getConfigValue = (path, defaultValue) => _.get(config, path, defaultValue) + const pluginApi = { + config: getConfigValue, + e: escapeClassName, + theme: (path, defaultValue) => getConfigValue(`theme.${path}`, defaultValue), + variants: (path, defaultValue) => { + if (_.isArray(config.variants)) { + return config.variants + } + + return getConfigValue(`variants.${path}`, defaultValue) + }, + addUtilities(utilities, variants) { + addedUtilities.push({ + utilities, + variants, + }) + }, + } + + plugin()(pluginApi) + + expect(addedUtilities).toEqual([ + { + utilities: { + '.stroke-w-0': { 'stroke-width': '0' }, + '.stroke-w-1': { 'stroke-width': '1px' }, + '.stroke-w-2': { 'stroke-width': '2px' }, + '.stroke-w-3': { 'stroke-width': '3px' }, + '.stroke-w-4': { 'stroke-width': '4px' }, + }, + variants: ['responsive'], + }, + ]) +})
[Proposal] Add `stroke-width` It's quite nice to customize feather icons using `stroke-width`. The default is `2`, but setting it to `1` make large icons much nicer to look at. Could this be added to Tailwind?
I found a solution and i'll make pull request
2019-08-22T21:15:02Z
1.2
tailwindlabs/tailwindcss
1,799
tailwindlabs__tailwindcss-1799
[ "1797" ]
ae8b634f332a4290436ba13a8eac6f0a42853d14
diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -1,6 +1,34 @@ import _ from 'lodash' import functions from 'postcss-functions' +function findClosestExistingPath(theme, path) { + const parts = _.toPath(path) + do { + parts.pop() + + if (_.hasIn(theme, parts)) break + } while (parts.length) + + return parts +} + +function buildError(root, theme, path) { + const closestPath = findClosestExistingPath(theme, path).join('.') || 'theme' + const closestValue = _.get(theme, closestPath, theme) + + let message = `"${path}" does not exist in your tailwind theme.\n` + + if (typeof closestValue === 'object') { + message += `Valid keys for "${closestPath}" are: ${Object.keys(closestValue) + .map(k => `"${k}"`) + .join(', ')}` + } else { + message += `"${closestPath}" exists but is not an object.` + } + + return root.error(message) +} + const themeTransforms = { fontSize(value) { return Array.isArray(value) ? value[0] : value @@ -12,16 +40,22 @@ function defaultTransform(value) { } export default function(config) { - return functions({ - functions: { - theme: (path, ...defaultValue) => { - const trimmedPath = _.trim(path, `'"`) - return _.thru(_.get(config.theme, trimmedPath, defaultValue), value => { - const [themeSection] = trimmedPath.split('.') - - return _.get(themeTransforms, themeSection, defaultTransform)(value) - }) + return root => + functions({ + functions: { + theme: (path, ...defaultValue) => { + const trimmedPath = _.trim(path, `'"`) + + if (!defaultValue.length && !_.hasIn(config.theme, trimmedPath)) { + throw buildError(root, config.theme, trimmedPath) + } + + return _.thru(_.get(config.theme, trimmedPath, defaultValue), value => { + const [themeSection] = trimmedPath.split('.') + + return _.get(themeTransforms, themeSection, defaultTransform)(value) + }) + }, }, - }, - }) + })(root) }
diff --git a/__tests__/themeFunction.test.js b/__tests__/themeFunction.test.js --- a/__tests__/themeFunction.test.js +++ b/__tests__/themeFunction.test.js @@ -110,6 +110,61 @@ test('an unquoted list is valid as a default value', () => { }) }) +test('A missing root theme value throws', () => { + const input = ` + .heading { color: theme('colours.gray.100'); } + ` + + return expect( + run(input, { + theme: { + colors: { + yellow: '#f7cc50', + }, + }, + }) + ).rejects.toThrowError( + '"colours.gray.100" does not exist in your tailwind theme.\nValid keys for "theme" are: "colors"' + ) +}) + +test('A missing nested theme property throws', () => { + const input = ` + .heading { color: theme('colors.red'); } + ` + + return expect( + run(input, { + theme: { + colors: { + blue: 'blue', + yellow: '#f7cc50', + }, + }, + }) + ).rejects.toThrowError( + '"colors.red" does not exist in your tailwind theme.\nValid keys for "colors" are: "blue", "yellow"' + ) +}) + +test('A path through a non-object throws', () => { + const input = ` + .heading { color: theme('colors.yellow.100'); } + ` + + return expect( + run(input, { + theme: { + colors: { + yellow: '#f7cc50', + }, + }, + }) + ).rejects.toThrowError( + '"colors.yellow.100" does not exist in your tailwind theme.\n"colors.yellow" exists but is not an object' + ) +}) + test('array values are joined by default', () => { const input = ` .heading { font-family: theme('fontFamily.sans'); }
Is it intentional that `theme()` doesn't throw when property doesn't exist? This seems like maybe a bug, or at least an undocumented design choice. I was expecting `theme` to provide safety rails against typos or unexpected theme breakage by throwing an error if you try and get something that doesn't exist from the config. It doesn't tho, which is all very css but seems like an unnecessary footgun. Wondering if it's a bug to be fixed or some thoughts on why it fails silently thanks!
Could definitely make it throw when someone asks for a key that doesn't exist 👍 Would accept a PR for it for sure.
2020-05-19T17:06:41Z
1.9
tailwindlabs/tailwindcss
992
tailwindlabs__tailwindcss-992
[ "982" ]
afa2b50dc2a213591d369ff1e7fa59fa6c18a0cc
diff --git a/src/plugins/boxShadow.js b/src/plugins/boxShadow.js --- a/src/plugins/boxShadow.js +++ b/src/plugins/boxShadow.js @@ -1,12 +1,14 @@ import _ from 'lodash' +import prefixNegativeModifiers from '../util/prefixNegativeModifiers' export default function() { return function({ addUtilities, e, theme, variants }) { const utilities = _.fromPairs( _.map(theme('boxShadow'), (value, modifier) => { - const className = modifier === 'default' ? 'shadow' : `shadow-${modifier}` + const className = + modifier === 'default' ? 'shadow' : `${e(prefixNegativeModifiers('shadow', modifier))}` return [ - `.${e(className)}`, + `.${className}`, { 'box-shadow': value, }, diff --git a/src/plugins/letterSpacing.js b/src/plugins/letterSpacing.js --- a/src/plugins/letterSpacing.js +++ b/src/plugins/letterSpacing.js @@ -1,11 +1,12 @@ import _ from 'lodash' +import prefixNegativeModifiers from '../util/prefixNegativeModifiers' export default function() { return function({ addUtilities, theme, variants, e }) { const utilities = _.fromPairs( _.map(theme('letterSpacing'), (value, modifier) => { return [ - `.${e(`tracking-${modifier}`)}`, + `.${e(prefixNegativeModifiers('tracking', modifier))}`, { 'letter-spacing': value, }, diff --git a/src/util/prefixNegativeModifiers.js b/src/util/prefixNegativeModifiers.js --- a/src/util/prefixNegativeModifiers.js +++ b/src/util/prefixNegativeModifiers.js @@ -1,5 +1,11 @@ import _ from 'lodash' export default function prefixNegativeModifiers(base, modifier) { - return _.startsWith(modifier, '-') ? `-${base}-${modifier.slice(1)}` : `${base}-${modifier}` + if (modifier === '-') { + return `-${base}` + } else if (_.startsWith(modifier, '-')) { + return `-${base}-${modifier.slice(1)}` + } else { + return `${base}-${modifier}` + } }
diff --git a/__tests__/plugins/boxShadow.test.js b/__tests__/plugins/boxShadow.test.js new file mode 100644 --- /dev/null +++ b/__tests__/plugins/boxShadow.test.js @@ -0,0 +1,63 @@ +import _ from 'lodash' +import escapeClassName from '../../src/util/escapeClassName' +import plugin from '../../src/plugins/boxShadow' + +test('box shadow can use default keyword and negative prefix syntax', () => { + const addedUtilities = [] + + const config = { + theme: { + boxShadow: { + default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', + md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', + '-': 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)', + '-md': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', + }, + }, + variants: { + boxShadow: ['responsive'], + }, + } + + const getConfigValue = (path, defaultValue) => _.get(config, path, defaultValue) + const pluginApi = { + config: getConfigValue, + e: escapeClassName, + theme: (path, defaultValue) => getConfigValue(`theme.${path}`, defaultValue), + variants: (path, defaultValue) => { + if (_.isArray(config.variants)) { + return config.variants + } + + return getConfigValue(`variants.${path}`, defaultValue) + }, + addUtilities(utilities, variants) { + addedUtilities.push({ + utilities, + variants, + }) + }, + } + + plugin()(pluginApi) + + expect(addedUtilities).toEqual([ + { + utilities: { + '.shadow': { + 'box-shadow': '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', + }, + '.shadow-md': { + 'box-shadow': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', + }, + '.-shadow': { + 'box-shadow': 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)', + }, + '.-shadow-md': { + 'box-shadow': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', + }, + }, + variants: ['responsive'], + }, + ]) +}) diff --git a/__tests__/plugins/letterSpacing.test.js b/__tests__/plugins/letterSpacing.test.js new file mode 100644 --- /dev/null +++ b/__tests__/plugins/letterSpacing.test.js @@ -0,0 +1,51 @@ +import _ from 'lodash' +import escapeClassName from '../../src/util/escapeClassName' +import plugin from '../../src/plugins/letterSpacing' + +test('letter spacing can use negative prefix syntax', () => { + const addedUtilities = [] + + const config = { + theme: { + letterSpacing: { + '-1': '-0.025em', + '1': '0.025em', + }, + }, + variants: { + letterSpacing: ['responsive'], + }, + } + + const getConfigValue = (path, defaultValue) => _.get(config, path, defaultValue) + const pluginApi = { + config: getConfigValue, + e: escapeClassName, + theme: (path, defaultValue) => getConfigValue(`theme.${path}`, defaultValue), + variants: (path, defaultValue) => { + if (_.isArray(config.variants)) { + return config.variants + } + + return getConfigValue(`variants.${path}`, defaultValue) + }, + addUtilities(utilities, variants) { + addedUtilities.push({ + utilities, + variants, + }) + }, + } + + plugin()(pluginApi) + + expect(addedUtilities).toEqual([ + { + utilities: { + '.-tracking-1': { 'letter-spacing': '-0.025em' }, + '.tracking-1': { 'letter-spacing': '0.025em' }, + }, + variants: ['responsive'], + }, + ]) +}) diff --git a/__tests__/plugins/zIndex.test.js b/__tests__/plugins/zIndex.test.js new file mode 100644 --- /dev/null +++ b/__tests__/plugins/zIndex.test.js @@ -0,0 +1,55 @@ +import _ from 'lodash' +import escapeClassName from '../../src/util/escapeClassName' +import plugin from '../../src/plugins/zIndex' + +test('z index can use negative prefix syntax', () => { + const addedUtilities = [] + + const config = { + theme: { + zIndex: { + '-20': '-20', + '-10': '-10', + '10': '10', + '20': '20', + }, + }, + variants: { + zIndex: ['responsive'], + }, + } + + const getConfigValue = (path, defaultValue) => _.get(config, path, defaultValue) + const pluginApi = { + config: getConfigValue, + e: escapeClassName, + theme: (path, defaultValue) => getConfigValue(`theme.${path}`, defaultValue), + variants: (path, defaultValue) => { + if (_.isArray(config.variants)) { + return config.variants + } + + return getConfigValue(`variants.${path}`, defaultValue) + }, + addUtilities(utilities, variants) { + addedUtilities.push({ + utilities, + variants, + }) + }, + } + + plugin()(pluginApi) + + expect(addedUtilities).toEqual([ + { + utilities: { + '.-z-20': { 'z-index': '-20' }, + '.-z-10': { 'z-index': '-10' }, + '.z-10': { 'z-index': '10' }, + '.z-20': { 'z-index': '20' }, + }, + variants: ['responsive'], + }, + ]) +}) diff --git a/__tests__/prefixNegativeModifiers.test.js b/__tests__/prefixNegativeModifiers.test.js new file mode 100644 --- /dev/null +++ b/__tests__/prefixNegativeModifiers.test.js @@ -0,0 +1,13 @@ +import prefixNegativeModifiers from '../src/util/prefixNegativeModifiers' + +test('it does not prefix classes using standard syntax', () => { + expect(prefixNegativeModifiers('base', 'modifier')).toEqual('base-modifier') +}) + +test('it prefixes classes using negative syntax', () => { + expect(prefixNegativeModifiers('base', '-modifier')).toEqual('-base-modifier') +}) + +test('it prefixes classes and omits suffix using default negative syntax', () => { + expect(prefixNegativeModifiers('base', '-')).toEqual('-base') +})
[Feature Request] Support negative prefix syntax in config for letterSpacing and boxShadow ### Background When I'm using letter spacing utilities, I prefer numerical class names like `tracking-1`, `tracking-2`, etc. instead of `wide`, `wider`, etc. I also like to set my negative letter spacing values to `-tracking-1`, `-tracking-2`, etc.—the negative prefix makes it more explicit that I'm shrinking the font's normal letter spacing. Same goes for box shadows—I prefer `shadow-1`, `shadow-2`, etc., and I dig `-shadow` instead of `shadow-inner`. Also feels cleaner to do something like `-shadow-1`, `-shadow-2`, etc. instead of `shadow-inner-md`, `shadow-inner-lg`, etc. ### Problem For `zIndex`, `margin`, and `inset`, you can easily create these prefixed classes in your config like so: ``` zIndex: { '10': '10', // z-10 '-10': '-10' // -z-10 } ``` But the negative prefix syntax isn't supported for any other utilities (I edit Tailwind's source code in my projects to get it working). ### Solution Support negative prefix syntax for `letterSpacing` and `boxShadow`. Looking through the other plugins, it might make sense to add support for `lineHeight` too. If this is considered a breaking change, it's probably not worth it. Otherwise, I'd be happy to make the pull request.
Happy to accept a PR for this, it's probably technically a breaking change but it's just as much a bugfix IMO 👍
2019-06-28T01:59:42Z
1
tailwindlabs/tailwindcss
847
tailwindlabs__tailwindcss-847
[ "817" ]
c88c187ca447491eb557f27b3e38f0df393a8710
diff --git a/src/index.js b/src/index.js --- a/src/index.js +++ b/src/index.js @@ -3,10 +3,10 @@ import fs from 'fs' import _ from 'lodash' import postcss from 'postcss' -import perfectionist from 'perfectionist' import registerConfigAsDependency from './lib/registerConfigAsDependency' import processTailwindFeatures from './processTailwindFeatures' +import formatCSS from './lib/formatCSS' import resolveConfig from './util/resolveConfig' import { defaultConfigFile } from './constants' @@ -53,16 +53,7 @@ const plugin = postcss.plugin('tailwind', config => { return postcss([ ...plugins, processTailwindFeatures(getConfigFunction(resolvedConfigPath || config)), - perfectionist({ - cascade: true, - colorShorthand: true, - indentSize: 2, - maxSelectorLength: 1, - maxValueLength: false, - trimLeadingZero: true, - trimTrailingZeros: true, - zeroLengthNoUnit: false, - }), + formatCSS, ]) }) diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -5,7 +5,9 @@ export default function(config) { return functions({ functions: { theme: (path, ...defaultValue) => { - return _.get(config.theme, _.trim(path, `'"`), defaultValue.join(', ')) + return _.thru(_.get(config.theme, _.trim(path, `'"`), defaultValue), value => { + return _.isArray(value) ? value.join(', ') : value + }) }, }, }) diff --git a/src/lib/formatCSS.js b/src/lib/formatCSS.js new file mode 100644 --- /dev/null +++ b/src/lib/formatCSS.js @@ -0,0 +1,15 @@ +function indentRecursive(node, indent = 0) { + node.each && + node.each((child, i) => { + if (!child.raws.before || child.raws.before.includes('\n')) { + child.raws.before = `\n${node.type !== 'rule' && i > 0 ? '\n' : ''}${' '.repeat(indent)}` + } + child.raws.after = `\n${' '.repeat(indent)}` + indentRecursive(child, indent + 1) + }) +} + +export default function formatNodes(root) { + indentRecursive(root) + root.first.raws.before = '' +} diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -173,8 +173,8 @@ module.exports = { ], }, fontSize: { - xs: '.75rem', - sm: '.875rem', + xs: '0.75rem', + sm: '0.875rem', base: '1rem', lg: '1.125rem', xl: '1.25rem', @@ -207,9 +207,9 @@ module.exports = { tighter: '-.05em', tight: '-.025em', normal: '0', - wide: '.025em', - wider: '.05em', - widest: '.1em', + wide: '0.025em', + wider: '0.05em', + widest: '0.1em', }, textColor: theme => theme('colors'), backgroundColor: theme => theme('colors'), @@ -242,9 +242,9 @@ module.exports = { }), borderRadius: { none: '0', - sm: '.125rem', - default: '.25rem', - lg: '.5rem', + sm: '0.125rem', + default: '0.25rem', + lg: '0.5rem', full: '9999px', }, cursor: { @@ -324,8 +324,8 @@ module.exports = { lg: '0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05)', xl: '0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04)', '2xl': '0 25px 50px -12px rgba(0, 0, 0, .25)', - inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)', - outline: '0 0 0 3px rgba(66,153,225,0.5)', + inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)', + outline: '0 0 0 3px rgba(66, 153, 225, 0.5)', none: 'none', }, zIndex: { @@ -339,9 +339,9 @@ module.exports = { }, opacity: { '0': '0', - '25': '.25', - '50': '.5', - '75': '.75', + '25': '0.25', + '50': '0.5', + '75': '0.75', '100': '1', }, fill: {
diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -39,7 +39,7 @@ main { h1 { font-size: 2em; - margin: .67em 0; + margin: 0.67em 0; } /* Grouping content @@ -174,8 +174,7 @@ textarea { */ button, -input { - /* 1 */ +input { /* 1 */ overflow: visible; } @@ -185,8 +184,7 @@ input { */ button, -select { - /* 1 */ +select { /* 1 */ text-transform: none; } @@ -229,7 +227,7 @@ button:-moz-focusring, */ fieldset { - padding: .35em .75em .625em; + padding: 0.35em 0.75em 0.625em; } /** @@ -479,7 +477,7 @@ textarea { input::placeholder, textarea::placeholder { color: inherit; - opacity: .5; + opacity: 0.5; } button, @@ -2929,15 +2927,15 @@ video { } .rounded-sm { - border-radius: .125rem !important; + border-radius: 0.125rem !important; } .rounded { - border-radius: .25rem !important; + border-radius: 0.25rem !important; } .rounded-lg { - border-radius: .5rem !important; + border-radius: 0.5rem !important; } .rounded-full { @@ -2965,63 +2963,63 @@ video { } .rounded-t-sm { - border-top-left-radius: .125rem !important; - border-top-right-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-top-right-radius: 0.125rem !important; } .rounded-r-sm { - border-top-right-radius: .125rem !important; - border-bottom-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; + border-bottom-right-radius: 0.125rem !important; } .rounded-b-sm { - border-bottom-right-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .rounded-l-sm { - border-top-left-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .rounded-t { - border-top-left-radius: .25rem !important; - border-top-right-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; } .rounded-r { - border-top-right-radius: .25rem !important; - border-bottom-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; + border-bottom-right-radius: 0.25rem !important; } .rounded-b { - border-bottom-right-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .rounded-l { - border-top-left-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .rounded-t-lg { - border-top-left-radius: .5rem !important; - border-top-right-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-top-right-radius: 0.5rem !important; } .rounded-r-lg { - border-top-right-radius: .5rem !important; - border-bottom-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; + border-bottom-right-radius: 0.5rem !important; } .rounded-b-lg { - border-bottom-right-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .rounded-l-lg { - border-top-left-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .rounded-t-full { @@ -3061,51 +3059,51 @@ video { } .rounded-tl-sm { - border-top-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; } .rounded-tr-sm { - border-top-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; } .rounded-br-sm { - border-bottom-right-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; } .rounded-bl-sm { - border-bottom-left-radius: .125rem !important; + border-bottom-left-radius: 0.125rem !important; } .rounded-tl { - border-top-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; } .rounded-tr { - border-top-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; } .rounded-br { - border-bottom-right-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; } .rounded-bl { - border-bottom-left-radius: .25rem !important; + border-bottom-left-radius: 0.25rem !important; } .rounded-tl-lg { - border-top-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; } .rounded-tr-lg { - border-top-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; } .rounded-br-lg { - border-bottom-right-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; } .rounded-bl-lg { - border-bottom-left-radius: .5rem !important; + border-bottom-left-radius: 0.5rem !important; } .rounded-tl-full { @@ -3583,15 +3581,15 @@ video { } .h-1 { - height: .25rem !important; + height: 0.25rem !important; } .h-2 { - height: .5rem !important; + height: 0.5rem !important; } .h-3 { - height: .75rem !important; + height: 0.75rem !important; } .h-4 { @@ -3715,15 +3713,15 @@ video { } .m-1 { - margin: .25rem !important; + margin: 0.25rem !important; } .m-2 { - margin: .5rem !important; + margin: 0.5rem !important; } .m-3 { - margin: .75rem !important; + margin: 0.75rem !important; } .m-4 { @@ -3801,33 +3799,33 @@ video { } .my-1 { - margin-top: .25rem !important; - margin-bottom: .25rem !important; + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } .mx-1 { - margin-left: .25rem !important; - margin-right: .25rem !important; + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; } .my-2 { - margin-top: .5rem !important; - margin-bottom: .5rem !important; + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; } .mx-2 { - margin-left: .5rem !important; - margin-right: .5rem !important; + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; } .my-3 { - margin-top: .75rem !important; - margin-bottom: .75rem !important; + margin-top: 0.75rem !important; + margin-bottom: 0.75rem !important; } .mx-3 { - margin-left: .75rem !important; - margin-right: .75rem !important; + margin-left: 0.75rem !important; + margin-right: 0.75rem !important; } .my-4 { @@ -4007,51 +4005,51 @@ video { } .mt-1 { - margin-top: .25rem !important; + margin-top: 0.25rem !important; } .mr-1 { - margin-right: .25rem !important; + margin-right: 0.25rem !important; } .mb-1 { - margin-bottom: .25rem !important; + margin-bottom: 0.25rem !important; } .ml-1 { - margin-left: .25rem !important; + margin-left: 0.25rem !important; } .mt-2 { - margin-top: .5rem !important; + margin-top: 0.5rem !important; } .mr-2 { - margin-right: .5rem !important; + margin-right: 0.5rem !important; } .mb-2 { - margin-bottom: .5rem !important; + margin-bottom: 0.5rem !important; } .ml-2 { - margin-left: .5rem !important; + margin-left: 0.5rem !important; } .mt-3 { - margin-top: .75rem !important; + margin-top: 0.75rem !important; } .mr-3 { - margin-right: .75rem !important; + margin-right: 0.75rem !important; } .mb-3 { - margin-bottom: .75rem !important; + margin-bottom: 0.75rem !important; } .ml-3 { - margin-left: .75rem !important; + margin-left: 0.75rem !important; } .mt-4 { @@ -5013,15 +5011,15 @@ video { } .opacity-25 { - opacity: .25 !important; + opacity: 0.25 !important; } .opacity-50 { - opacity: .5 !important; + opacity: 0.5 !important; } .opacity-75 { - opacity: .75 !important; + opacity: 0.75 !important; } .opacity-100 { @@ -5097,15 +5095,15 @@ video { } .p-1 { - padding: .25rem !important; + padding: 0.25rem !important; } .p-2 { - padding: .5rem !important; + padding: 0.5rem !important; } .p-3 { - padding: .75rem !important; + padding: 0.75rem !important; } .p-4 { @@ -5179,33 +5177,33 @@ video { } .py-1 { - padding-top: .25rem !important; - padding-bottom: .25rem !important; + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; } .px-1 { - padding-left: .25rem !important; - padding-right: .25rem !important; + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; } .py-2 { - padding-top: .5rem !important; - padding-bottom: .5rem !important; + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; } .px-2 { - padding-left: .5rem !important; - padding-right: .5rem !important; + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; } .py-3 { - padding-top: .75rem !important; - padding-bottom: .75rem !important; + padding-top: 0.75rem !important; + padding-bottom: 0.75rem !important; } .px-3 { - padding-left: .75rem !important; - padding-right: .75rem !important; + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; } .py-4 { @@ -5375,51 +5373,51 @@ video { } .pt-1 { - padding-top: .25rem !important; + padding-top: 0.25rem !important; } .pr-1 { - padding-right: .25rem !important; + padding-right: 0.25rem !important; } .pb-1 { - padding-bottom: .25rem !important; + padding-bottom: 0.25rem !important; } .pl-1 { - padding-left: .25rem !important; + padding-left: 0.25rem !important; } .pt-2 { - padding-top: .5rem !important; + padding-top: 0.5rem !important; } .pr-2 { - padding-right: .5rem !important; + padding-right: 0.5rem !important; } .pb-2 { - padding-bottom: .5rem !important; + padding-bottom: 0.5rem !important; } .pl-2 { - padding-left: .5rem !important; + padding-left: 0.5rem !important; } .pt-3 { - padding-top: .75rem !important; + padding-top: 0.75rem !important; } .pr-3 { - padding-right: .75rem !important; + padding-right: 0.75rem !important; } .pb-3 { - padding-bottom: .75rem !important; + padding-bottom: 0.75rem !important; } .pl-3 { - padding-left: .75rem !important; + padding-left: 0.75rem !important; } .pt-4 { @@ -5793,11 +5791,11 @@ video { } .shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .shadow-none { @@ -5825,11 +5823,11 @@ video { } .hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .hover\:shadow-none:hover { @@ -5857,11 +5855,11 @@ video { } .focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .focus\:shadow-none:focus { @@ -7017,11 +7015,11 @@ video { } .text-xs { - font-size: .75rem !important; + font-size: 0.75rem !important; } .text-sm { - font-size: .875rem !important; + font-size: 0.875rem !important; } .text-base { @@ -7139,15 +7137,15 @@ video { } .tracking-wide { - letter-spacing: .025em !important; + letter-spacing: 0.025em !important; } .tracking-wider { - letter-spacing: .05em !important; + letter-spacing: 0.05em !important; } .tracking-widest { - letter-spacing: .1em !important; + letter-spacing: 0.1em !important; } .select-none { @@ -7234,15 +7232,15 @@ video { } .w-1 { - width: .25rem !important; + width: 0.25rem !important; } .w-2 { - width: .5rem !important; + width: 0.5rem !important; } .w-3 { - width: .75rem !important; + width: 0.75rem !important; } .w-4 { @@ -9712,15 +9710,15 @@ video { } .sm\:rounded-sm { - border-radius: .125rem !important; + border-radius: 0.125rem !important; } .sm\:rounded { - border-radius: .25rem !important; + border-radius: 0.25rem !important; } .sm\:rounded-lg { - border-radius: .5rem !important; + border-radius: 0.5rem !important; } .sm\:rounded-full { @@ -9748,63 +9746,63 @@ video { } .sm\:rounded-t-sm { - border-top-left-radius: .125rem !important; - border-top-right-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-top-right-radius: 0.125rem !important; } .sm\:rounded-r-sm { - border-top-right-radius: .125rem !important; - border-bottom-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; + border-bottom-right-radius: 0.125rem !important; } .sm\:rounded-b-sm { - border-bottom-right-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .sm\:rounded-l-sm { - border-top-left-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .sm\:rounded-t { - border-top-left-radius: .25rem !important; - border-top-right-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; } .sm\:rounded-r { - border-top-right-radius: .25rem !important; - border-bottom-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; + border-bottom-right-radius: 0.25rem !important; } .sm\:rounded-b { - border-bottom-right-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .sm\:rounded-l { - border-top-left-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .sm\:rounded-t-lg { - border-top-left-radius: .5rem !important; - border-top-right-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-top-right-radius: 0.5rem !important; } .sm\:rounded-r-lg { - border-top-right-radius: .5rem !important; - border-bottom-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; + border-bottom-right-radius: 0.5rem !important; } .sm\:rounded-b-lg { - border-bottom-right-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .sm\:rounded-l-lg { - border-top-left-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .sm\:rounded-t-full { @@ -9844,51 +9842,51 @@ video { } .sm\:rounded-tl-sm { - border-top-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; } .sm\:rounded-tr-sm { - border-top-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; } .sm\:rounded-br-sm { - border-bottom-right-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; } .sm\:rounded-bl-sm { - border-bottom-left-radius: .125rem !important; + border-bottom-left-radius: 0.125rem !important; } .sm\:rounded-tl { - border-top-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; } .sm\:rounded-tr { - border-top-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; } .sm\:rounded-br { - border-bottom-right-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; } .sm\:rounded-bl { - border-bottom-left-radius: .25rem !important; + border-bottom-left-radius: 0.25rem !important; } .sm\:rounded-tl-lg { - border-top-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; } .sm\:rounded-tr-lg { - border-top-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; } .sm\:rounded-br-lg { - border-bottom-right-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; } .sm\:rounded-bl-lg { - border-bottom-left-radius: .5rem !important; + border-bottom-left-radius: 0.5rem !important; } .sm\:rounded-tl-full { @@ -10366,15 +10364,15 @@ video { } .sm\:h-1 { - height: .25rem !important; + height: 0.25rem !important; } .sm\:h-2 { - height: .5rem !important; + height: 0.5rem !important; } .sm\:h-3 { - height: .75rem !important; + height: 0.75rem !important; } .sm\:h-4 { @@ -10498,15 +10496,15 @@ video { } .sm\:m-1 { - margin: .25rem !important; + margin: 0.25rem !important; } .sm\:m-2 { - margin: .5rem !important; + margin: 0.5rem !important; } .sm\:m-3 { - margin: .75rem !important; + margin: 0.75rem !important; } .sm\:m-4 { @@ -10584,33 +10582,33 @@ video { } .sm\:my-1 { - margin-top: .25rem !important; - margin-bottom: .25rem !important; + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } .sm\:mx-1 { - margin-left: .25rem !important; - margin-right: .25rem !important; + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; } .sm\:my-2 { - margin-top: .5rem !important; - margin-bottom: .5rem !important; + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; } .sm\:mx-2 { - margin-left: .5rem !important; - margin-right: .5rem !important; + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; } .sm\:my-3 { - margin-top: .75rem !important; - margin-bottom: .75rem !important; + margin-top: 0.75rem !important; + margin-bottom: 0.75rem !important; } .sm\:mx-3 { - margin-left: .75rem !important; - margin-right: .75rem !important; + margin-left: 0.75rem !important; + margin-right: 0.75rem !important; } .sm\:my-4 { @@ -10790,51 +10788,51 @@ video { } .sm\:mt-1 { - margin-top: .25rem !important; + margin-top: 0.25rem !important; } .sm\:mr-1 { - margin-right: .25rem !important; + margin-right: 0.25rem !important; } .sm\:mb-1 { - margin-bottom: .25rem !important; + margin-bottom: 0.25rem !important; } .sm\:ml-1 { - margin-left: .25rem !important; + margin-left: 0.25rem !important; } .sm\:mt-2 { - margin-top: .5rem !important; + margin-top: 0.5rem !important; } .sm\:mr-2 { - margin-right: .5rem !important; + margin-right: 0.5rem !important; } .sm\:mb-2 { - margin-bottom: .5rem !important; + margin-bottom: 0.5rem !important; } .sm\:ml-2 { - margin-left: .5rem !important; + margin-left: 0.5rem !important; } .sm\:mt-3 { - margin-top: .75rem !important; + margin-top: 0.75rem !important; } .sm\:mr-3 { - margin-right: .75rem !important; + margin-right: 0.75rem !important; } .sm\:mb-3 { - margin-bottom: .75rem !important; + margin-bottom: 0.75rem !important; } .sm\:ml-3 { - margin-left: .75rem !important; + margin-left: 0.75rem !important; } .sm\:mt-4 { @@ -11796,15 +11794,15 @@ video { } .sm\:opacity-25 { - opacity: .25 !important; + opacity: 0.25 !important; } .sm\:opacity-50 { - opacity: .5 !important; + opacity: 0.5 !important; } .sm\:opacity-75 { - opacity: .75 !important; + opacity: 0.75 !important; } .sm\:opacity-100 { @@ -11872,15 +11870,15 @@ video { } .sm\:p-1 { - padding: .25rem !important; + padding: 0.25rem !important; } .sm\:p-2 { - padding: .5rem !important; + padding: 0.5rem !important; } .sm\:p-3 { - padding: .75rem !important; + padding: 0.75rem !important; } .sm\:p-4 { @@ -11954,33 +11952,33 @@ video { } .sm\:py-1 { - padding-top: .25rem !important; - padding-bottom: .25rem !important; + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; } .sm\:px-1 { - padding-left: .25rem !important; - padding-right: .25rem !important; + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; } .sm\:py-2 { - padding-top: .5rem !important; - padding-bottom: .5rem !important; + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; } .sm\:px-2 { - padding-left: .5rem !important; - padding-right: .5rem !important; + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; } .sm\:py-3 { - padding-top: .75rem !important; - padding-bottom: .75rem !important; + padding-top: 0.75rem !important; + padding-bottom: 0.75rem !important; } .sm\:px-3 { - padding-left: .75rem !important; - padding-right: .75rem !important; + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; } .sm\:py-4 { @@ -12150,51 +12148,51 @@ video { } .sm\:pt-1 { - padding-top: .25rem !important; + padding-top: 0.25rem !important; } .sm\:pr-1 { - padding-right: .25rem !important; + padding-right: 0.25rem !important; } .sm\:pb-1 { - padding-bottom: .25rem !important; + padding-bottom: 0.25rem !important; } .sm\:pl-1 { - padding-left: .25rem !important; + padding-left: 0.25rem !important; } .sm\:pt-2 { - padding-top: .5rem !important; + padding-top: 0.5rem !important; } .sm\:pr-2 { - padding-right: .5rem !important; + padding-right: 0.5rem !important; } .sm\:pb-2 { - padding-bottom: .5rem !important; + padding-bottom: 0.5rem !important; } .sm\:pl-2 { - padding-left: .5rem !important; + padding-left: 0.5rem !important; } .sm\:pt-3 { - padding-top: .75rem !important; + padding-top: 0.75rem !important; } .sm\:pr-3 { - padding-right: .75rem !important; + padding-right: 0.75rem !important; } .sm\:pb-3 { - padding-bottom: .75rem !important; + padding-bottom: 0.75rem !important; } .sm\:pl-3 { - padding-left: .75rem !important; + padding-left: 0.75rem !important; } .sm\:pt-4 { @@ -12568,11 +12566,11 @@ video { } .sm\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .sm\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .sm\:shadow-none { @@ -12600,11 +12598,11 @@ video { } .sm\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .sm\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .sm\:hover\:shadow-none:hover { @@ -12632,11 +12630,11 @@ video { } .sm\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .sm\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .sm\:focus\:shadow-none:focus { @@ -13784,11 +13782,11 @@ video { } .sm\:text-xs { - font-size: .75rem !important; + font-size: 0.75rem !important; } .sm\:text-sm { - font-size: .875rem !important; + font-size: 0.875rem !important; } .sm\:text-base { @@ -13906,15 +13904,15 @@ video { } .sm\:tracking-wide { - letter-spacing: .025em !important; + letter-spacing: 0.025em !important; } .sm\:tracking-wider { - letter-spacing: .05em !important; + letter-spacing: 0.05em !important; } .sm\:tracking-widest { - letter-spacing: .1em !important; + letter-spacing: 0.1em !important; } .sm\:select-none { @@ -14001,15 +13999,15 @@ video { } .sm\:w-1 { - width: .25rem !important; + width: 0.25rem !important; } .sm\:w-2 { - width: .5rem !important; + width: 0.5rem !important; } .sm\:w-3 { - width: .75rem !important; + width: 0.75rem !important; } .sm\:w-4 { @@ -16480,15 +16478,15 @@ video { } .md\:rounded-sm { - border-radius: .125rem !important; + border-radius: 0.125rem !important; } .md\:rounded { - border-radius: .25rem !important; + border-radius: 0.25rem !important; } .md\:rounded-lg { - border-radius: .5rem !important; + border-radius: 0.5rem !important; } .md\:rounded-full { @@ -16516,63 +16514,63 @@ video { } .md\:rounded-t-sm { - border-top-left-radius: .125rem !important; - border-top-right-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-top-right-radius: 0.125rem !important; } .md\:rounded-r-sm { - border-top-right-radius: .125rem !important; - border-bottom-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; + border-bottom-right-radius: 0.125rem !important; } .md\:rounded-b-sm { - border-bottom-right-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .md\:rounded-l-sm { - border-top-left-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .md\:rounded-t { - border-top-left-radius: .25rem !important; - border-top-right-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; } .md\:rounded-r { - border-top-right-radius: .25rem !important; - border-bottom-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; + border-bottom-right-radius: 0.25rem !important; } .md\:rounded-b { - border-bottom-right-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .md\:rounded-l { - border-top-left-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .md\:rounded-t-lg { - border-top-left-radius: .5rem !important; - border-top-right-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-top-right-radius: 0.5rem !important; } .md\:rounded-r-lg { - border-top-right-radius: .5rem !important; - border-bottom-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; + border-bottom-right-radius: 0.5rem !important; } .md\:rounded-b-lg { - border-bottom-right-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .md\:rounded-l-lg { - border-top-left-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .md\:rounded-t-full { @@ -16612,51 +16610,51 @@ video { } .md\:rounded-tl-sm { - border-top-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; } .md\:rounded-tr-sm { - border-top-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; } .md\:rounded-br-sm { - border-bottom-right-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; } .md\:rounded-bl-sm { - border-bottom-left-radius: .125rem !important; + border-bottom-left-radius: 0.125rem !important; } .md\:rounded-tl { - border-top-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; } .md\:rounded-tr { - border-top-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; } .md\:rounded-br { - border-bottom-right-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; } .md\:rounded-bl { - border-bottom-left-radius: .25rem !important; + border-bottom-left-radius: 0.25rem !important; } .md\:rounded-tl-lg { - border-top-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; } .md\:rounded-tr-lg { - border-top-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; } .md\:rounded-br-lg { - border-bottom-right-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; } .md\:rounded-bl-lg { - border-bottom-left-radius: .5rem !important; + border-bottom-left-radius: 0.5rem !important; } .md\:rounded-tl-full { @@ -17134,15 +17132,15 @@ video { } .md\:h-1 { - height: .25rem !important; + height: 0.25rem !important; } .md\:h-2 { - height: .5rem !important; + height: 0.5rem !important; } .md\:h-3 { - height: .75rem !important; + height: 0.75rem !important; } .md\:h-4 { @@ -17266,15 +17264,15 @@ video { } .md\:m-1 { - margin: .25rem !important; + margin: 0.25rem !important; } .md\:m-2 { - margin: .5rem !important; + margin: 0.5rem !important; } .md\:m-3 { - margin: .75rem !important; + margin: 0.75rem !important; } .md\:m-4 { @@ -17352,33 +17350,33 @@ video { } .md\:my-1 { - margin-top: .25rem !important; - margin-bottom: .25rem !important; + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } .md\:mx-1 { - margin-left: .25rem !important; - margin-right: .25rem !important; + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; } .md\:my-2 { - margin-top: .5rem !important; - margin-bottom: .5rem !important; + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; } .md\:mx-2 { - margin-left: .5rem !important; - margin-right: .5rem !important; + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; } .md\:my-3 { - margin-top: .75rem !important; - margin-bottom: .75rem !important; + margin-top: 0.75rem !important; + margin-bottom: 0.75rem !important; } .md\:mx-3 { - margin-left: .75rem !important; - margin-right: .75rem !important; + margin-left: 0.75rem !important; + margin-right: 0.75rem !important; } .md\:my-4 { @@ -17558,51 +17556,51 @@ video { } .md\:mt-1 { - margin-top: .25rem !important; + margin-top: 0.25rem !important; } .md\:mr-1 { - margin-right: .25rem !important; + margin-right: 0.25rem !important; } .md\:mb-1 { - margin-bottom: .25rem !important; + margin-bottom: 0.25rem !important; } .md\:ml-1 { - margin-left: .25rem !important; + margin-left: 0.25rem !important; } .md\:mt-2 { - margin-top: .5rem !important; + margin-top: 0.5rem !important; } .md\:mr-2 { - margin-right: .5rem !important; + margin-right: 0.5rem !important; } .md\:mb-2 { - margin-bottom: .5rem !important; + margin-bottom: 0.5rem !important; } .md\:ml-2 { - margin-left: .5rem !important; + margin-left: 0.5rem !important; } .md\:mt-3 { - margin-top: .75rem !important; + margin-top: 0.75rem !important; } .md\:mr-3 { - margin-right: .75rem !important; + margin-right: 0.75rem !important; } .md\:mb-3 { - margin-bottom: .75rem !important; + margin-bottom: 0.75rem !important; } .md\:ml-3 { - margin-left: .75rem !important; + margin-left: 0.75rem !important; } .md\:mt-4 { @@ -18564,15 +18562,15 @@ video { } .md\:opacity-25 { - opacity: .25 !important; + opacity: 0.25 !important; } .md\:opacity-50 { - opacity: .5 !important; + opacity: 0.5 !important; } .md\:opacity-75 { - opacity: .75 !important; + opacity: 0.75 !important; } .md\:opacity-100 { @@ -18640,15 +18638,15 @@ video { } .md\:p-1 { - padding: .25rem !important; + padding: 0.25rem !important; } .md\:p-2 { - padding: .5rem !important; + padding: 0.5rem !important; } .md\:p-3 { - padding: .75rem !important; + padding: 0.75rem !important; } .md\:p-4 { @@ -18722,33 +18720,33 @@ video { } .md\:py-1 { - padding-top: .25rem !important; - padding-bottom: .25rem !important; + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; } .md\:px-1 { - padding-left: .25rem !important; - padding-right: .25rem !important; + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; } .md\:py-2 { - padding-top: .5rem !important; - padding-bottom: .5rem !important; + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; } .md\:px-2 { - padding-left: .5rem !important; - padding-right: .5rem !important; + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; } .md\:py-3 { - padding-top: .75rem !important; - padding-bottom: .75rem !important; + padding-top: 0.75rem !important; + padding-bottom: 0.75rem !important; } .md\:px-3 { - padding-left: .75rem !important; - padding-right: .75rem !important; + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; } .md\:py-4 { @@ -18918,51 +18916,51 @@ video { } .md\:pt-1 { - padding-top: .25rem !important; + padding-top: 0.25rem !important; } .md\:pr-1 { - padding-right: .25rem !important; + padding-right: 0.25rem !important; } .md\:pb-1 { - padding-bottom: .25rem !important; + padding-bottom: 0.25rem !important; } .md\:pl-1 { - padding-left: .25rem !important; + padding-left: 0.25rem !important; } .md\:pt-2 { - padding-top: .5rem !important; + padding-top: 0.5rem !important; } .md\:pr-2 { - padding-right: .5rem !important; + padding-right: 0.5rem !important; } .md\:pb-2 { - padding-bottom: .5rem !important; + padding-bottom: 0.5rem !important; } .md\:pl-2 { - padding-left: .5rem !important; + padding-left: 0.5rem !important; } .md\:pt-3 { - padding-top: .75rem !important; + padding-top: 0.75rem !important; } .md\:pr-3 { - padding-right: .75rem !important; + padding-right: 0.75rem !important; } .md\:pb-3 { - padding-bottom: .75rem !important; + padding-bottom: 0.75rem !important; } .md\:pl-3 { - padding-left: .75rem !important; + padding-left: 0.75rem !important; } .md\:pt-4 { @@ -19336,11 +19334,11 @@ video { } .md\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .md\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .md\:shadow-none { @@ -19368,11 +19366,11 @@ video { } .md\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .md\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .md\:hover\:shadow-none:hover { @@ -19400,11 +19398,11 @@ video { } .md\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .md\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .md\:focus\:shadow-none:focus { @@ -20552,11 +20550,11 @@ video { } .md\:text-xs { - font-size: .75rem !important; + font-size: 0.75rem !important; } .md\:text-sm { - font-size: .875rem !important; + font-size: 0.875rem !important; } .md\:text-base { @@ -20674,15 +20672,15 @@ video { } .md\:tracking-wide { - letter-spacing: .025em !important; + letter-spacing: 0.025em !important; } .md\:tracking-wider { - letter-spacing: .05em !important; + letter-spacing: 0.05em !important; } .md\:tracking-widest { - letter-spacing: .1em !important; + letter-spacing: 0.1em !important; } .md\:select-none { @@ -20769,15 +20767,15 @@ video { } .md\:w-1 { - width: .25rem !important; + width: 0.25rem !important; } .md\:w-2 { - width: .5rem !important; + width: 0.5rem !important; } .md\:w-3 { - width: .75rem !important; + width: 0.75rem !important; } .md\:w-4 { @@ -23248,15 +23246,15 @@ video { } .lg\:rounded-sm { - border-radius: .125rem !important; + border-radius: 0.125rem !important; } .lg\:rounded { - border-radius: .25rem !important; + border-radius: 0.25rem !important; } .lg\:rounded-lg { - border-radius: .5rem !important; + border-radius: 0.5rem !important; } .lg\:rounded-full { @@ -23284,63 +23282,63 @@ video { } .lg\:rounded-t-sm { - border-top-left-radius: .125rem !important; - border-top-right-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-top-right-radius: 0.125rem !important; } .lg\:rounded-r-sm { - border-top-right-radius: .125rem !important; - border-bottom-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; + border-bottom-right-radius: 0.125rem !important; } .lg\:rounded-b-sm { - border-bottom-right-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .lg\:rounded-l-sm { - border-top-left-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .lg\:rounded-t { - border-top-left-radius: .25rem !important; - border-top-right-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; } .lg\:rounded-r { - border-top-right-radius: .25rem !important; - border-bottom-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; + border-bottom-right-radius: 0.25rem !important; } .lg\:rounded-b { - border-bottom-right-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .lg\:rounded-l { - border-top-left-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .lg\:rounded-t-lg { - border-top-left-radius: .5rem !important; - border-top-right-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-top-right-radius: 0.5rem !important; } .lg\:rounded-r-lg { - border-top-right-radius: .5rem !important; - border-bottom-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; + border-bottom-right-radius: 0.5rem !important; } .lg\:rounded-b-lg { - border-bottom-right-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .lg\:rounded-l-lg { - border-top-left-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .lg\:rounded-t-full { @@ -23380,51 +23378,51 @@ video { } .lg\:rounded-tl-sm { - border-top-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; } .lg\:rounded-tr-sm { - border-top-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; } .lg\:rounded-br-sm { - border-bottom-right-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; } .lg\:rounded-bl-sm { - border-bottom-left-radius: .125rem !important; + border-bottom-left-radius: 0.125rem !important; } .lg\:rounded-tl { - border-top-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; } .lg\:rounded-tr { - border-top-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; } .lg\:rounded-br { - border-bottom-right-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; } .lg\:rounded-bl { - border-bottom-left-radius: .25rem !important; + border-bottom-left-radius: 0.25rem !important; } .lg\:rounded-tl-lg { - border-top-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; } .lg\:rounded-tr-lg { - border-top-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; } .lg\:rounded-br-lg { - border-bottom-right-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; } .lg\:rounded-bl-lg { - border-bottom-left-radius: .5rem !important; + border-bottom-left-radius: 0.5rem !important; } .lg\:rounded-tl-full { @@ -23902,15 +23900,15 @@ video { } .lg\:h-1 { - height: .25rem !important; + height: 0.25rem !important; } .lg\:h-2 { - height: .5rem !important; + height: 0.5rem !important; } .lg\:h-3 { - height: .75rem !important; + height: 0.75rem !important; } .lg\:h-4 { @@ -24034,15 +24032,15 @@ video { } .lg\:m-1 { - margin: .25rem !important; + margin: 0.25rem !important; } .lg\:m-2 { - margin: .5rem !important; + margin: 0.5rem !important; } .lg\:m-3 { - margin: .75rem !important; + margin: 0.75rem !important; } .lg\:m-4 { @@ -24120,33 +24118,33 @@ video { } .lg\:my-1 { - margin-top: .25rem !important; - margin-bottom: .25rem !important; + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } .lg\:mx-1 { - margin-left: .25rem !important; - margin-right: .25rem !important; + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; } .lg\:my-2 { - margin-top: .5rem !important; - margin-bottom: .5rem !important; + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; } .lg\:mx-2 { - margin-left: .5rem !important; - margin-right: .5rem !important; + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; } .lg\:my-3 { - margin-top: .75rem !important; - margin-bottom: .75rem !important; + margin-top: 0.75rem !important; + margin-bottom: 0.75rem !important; } .lg\:mx-3 { - margin-left: .75rem !important; - margin-right: .75rem !important; + margin-left: 0.75rem !important; + margin-right: 0.75rem !important; } .lg\:my-4 { @@ -24326,51 +24324,51 @@ video { } .lg\:mt-1 { - margin-top: .25rem !important; + margin-top: 0.25rem !important; } .lg\:mr-1 { - margin-right: .25rem !important; + margin-right: 0.25rem !important; } .lg\:mb-1 { - margin-bottom: .25rem !important; + margin-bottom: 0.25rem !important; } .lg\:ml-1 { - margin-left: .25rem !important; + margin-left: 0.25rem !important; } .lg\:mt-2 { - margin-top: .5rem !important; + margin-top: 0.5rem !important; } .lg\:mr-2 { - margin-right: .5rem !important; + margin-right: 0.5rem !important; } .lg\:mb-2 { - margin-bottom: .5rem !important; + margin-bottom: 0.5rem !important; } .lg\:ml-2 { - margin-left: .5rem !important; + margin-left: 0.5rem !important; } .lg\:mt-3 { - margin-top: .75rem !important; + margin-top: 0.75rem !important; } .lg\:mr-3 { - margin-right: .75rem !important; + margin-right: 0.75rem !important; } .lg\:mb-3 { - margin-bottom: .75rem !important; + margin-bottom: 0.75rem !important; } .lg\:ml-3 { - margin-left: .75rem !important; + margin-left: 0.75rem !important; } .lg\:mt-4 { @@ -25332,15 +25330,15 @@ video { } .lg\:opacity-25 { - opacity: .25 !important; + opacity: 0.25 !important; } .lg\:opacity-50 { - opacity: .5 !important; + opacity: 0.5 !important; } .lg\:opacity-75 { - opacity: .75 !important; + opacity: 0.75 !important; } .lg\:opacity-100 { @@ -25408,15 +25406,15 @@ video { } .lg\:p-1 { - padding: .25rem !important; + padding: 0.25rem !important; } .lg\:p-2 { - padding: .5rem !important; + padding: 0.5rem !important; } .lg\:p-3 { - padding: .75rem !important; + padding: 0.75rem !important; } .lg\:p-4 { @@ -25490,33 +25488,33 @@ video { } .lg\:py-1 { - padding-top: .25rem !important; - padding-bottom: .25rem !important; + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; } .lg\:px-1 { - padding-left: .25rem !important; - padding-right: .25rem !important; + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; } .lg\:py-2 { - padding-top: .5rem !important; - padding-bottom: .5rem !important; + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; } .lg\:px-2 { - padding-left: .5rem !important; - padding-right: .5rem !important; + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; } .lg\:py-3 { - padding-top: .75rem !important; - padding-bottom: .75rem !important; + padding-top: 0.75rem !important; + padding-bottom: 0.75rem !important; } .lg\:px-3 { - padding-left: .75rem !important; - padding-right: .75rem !important; + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; } .lg\:py-4 { @@ -25686,51 +25684,51 @@ video { } .lg\:pt-1 { - padding-top: .25rem !important; + padding-top: 0.25rem !important; } .lg\:pr-1 { - padding-right: .25rem !important; + padding-right: 0.25rem !important; } .lg\:pb-1 { - padding-bottom: .25rem !important; + padding-bottom: 0.25rem !important; } .lg\:pl-1 { - padding-left: .25rem !important; + padding-left: 0.25rem !important; } .lg\:pt-2 { - padding-top: .5rem !important; + padding-top: 0.5rem !important; } .lg\:pr-2 { - padding-right: .5rem !important; + padding-right: 0.5rem !important; } .lg\:pb-2 { - padding-bottom: .5rem !important; + padding-bottom: 0.5rem !important; } .lg\:pl-2 { - padding-left: .5rem !important; + padding-left: 0.5rem !important; } .lg\:pt-3 { - padding-top: .75rem !important; + padding-top: 0.75rem !important; } .lg\:pr-3 { - padding-right: .75rem !important; + padding-right: 0.75rem !important; } .lg\:pb-3 { - padding-bottom: .75rem !important; + padding-bottom: 0.75rem !important; } .lg\:pl-3 { - padding-left: .75rem !important; + padding-left: 0.75rem !important; } .lg\:pt-4 { @@ -26104,11 +26102,11 @@ video { } .lg\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .lg\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .lg\:shadow-none { @@ -26136,11 +26134,11 @@ video { } .lg\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .lg\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .lg\:hover\:shadow-none:hover { @@ -26168,11 +26166,11 @@ video { } .lg\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .lg\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .lg\:focus\:shadow-none:focus { @@ -27320,11 +27318,11 @@ video { } .lg\:text-xs { - font-size: .75rem !important; + font-size: 0.75rem !important; } .lg\:text-sm { - font-size: .875rem !important; + font-size: 0.875rem !important; } .lg\:text-base { @@ -27442,15 +27440,15 @@ video { } .lg\:tracking-wide { - letter-spacing: .025em !important; + letter-spacing: 0.025em !important; } .lg\:tracking-wider { - letter-spacing: .05em !important; + letter-spacing: 0.05em !important; } .lg\:tracking-widest { - letter-spacing: .1em !important; + letter-spacing: 0.1em !important; } .lg\:select-none { @@ -27537,15 +27535,15 @@ video { } .lg\:w-1 { - width: .25rem !important; + width: 0.25rem !important; } .lg\:w-2 { - width: .5rem !important; + width: 0.5rem !important; } .lg\:w-3 { - width: .75rem !important; + width: 0.75rem !important; } .lg\:w-4 { @@ -30016,15 +30014,15 @@ video { } .xl\:rounded-sm { - border-radius: .125rem !important; + border-radius: 0.125rem !important; } .xl\:rounded { - border-radius: .25rem !important; + border-radius: 0.25rem !important; } .xl\:rounded-lg { - border-radius: .5rem !important; + border-radius: 0.5rem !important; } .xl\:rounded-full { @@ -30052,63 +30050,63 @@ video { } .xl\:rounded-t-sm { - border-top-left-radius: .125rem !important; - border-top-right-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-top-right-radius: 0.125rem !important; } .xl\:rounded-r-sm { - border-top-right-radius: .125rem !important; - border-bottom-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; + border-bottom-right-radius: 0.125rem !important; } .xl\:rounded-b-sm { - border-bottom-right-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .xl\:rounded-l-sm { - border-top-left-radius: .125rem !important; - border-bottom-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; + border-bottom-left-radius: 0.125rem !important; } .xl\:rounded-t { - border-top-left-radius: .25rem !important; - border-top-right-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; } .xl\:rounded-r { - border-top-right-radius: .25rem !important; - border-bottom-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; + border-bottom-right-radius: 0.25rem !important; } .xl\:rounded-b { - border-bottom-right-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .xl\:rounded-l { - border-top-left-radius: .25rem !important; - border-bottom-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; } .xl\:rounded-t-lg { - border-top-left-radius: .5rem !important; - border-top-right-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-top-right-radius: 0.5rem !important; } .xl\:rounded-r-lg { - border-top-right-radius: .5rem !important; - border-bottom-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; + border-bottom-right-radius: 0.5rem !important; } .xl\:rounded-b-lg { - border-bottom-right-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .xl\:rounded-l-lg { - border-top-left-radius: .5rem !important; - border-bottom-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; + border-bottom-left-radius: 0.5rem !important; } .xl\:rounded-t-full { @@ -30148,51 +30146,51 @@ video { } .xl\:rounded-tl-sm { - border-top-left-radius: .125rem !important; + border-top-left-radius: 0.125rem !important; } .xl\:rounded-tr-sm { - border-top-right-radius: .125rem !important; + border-top-right-radius: 0.125rem !important; } .xl\:rounded-br-sm { - border-bottom-right-radius: .125rem !important; + border-bottom-right-radius: 0.125rem !important; } .xl\:rounded-bl-sm { - border-bottom-left-radius: .125rem !important; + border-bottom-left-radius: 0.125rem !important; } .xl\:rounded-tl { - border-top-left-radius: .25rem !important; + border-top-left-radius: 0.25rem !important; } .xl\:rounded-tr { - border-top-right-radius: .25rem !important; + border-top-right-radius: 0.25rem !important; } .xl\:rounded-br { - border-bottom-right-radius: .25rem !important; + border-bottom-right-radius: 0.25rem !important; } .xl\:rounded-bl { - border-bottom-left-radius: .25rem !important; + border-bottom-left-radius: 0.25rem !important; } .xl\:rounded-tl-lg { - border-top-left-radius: .5rem !important; + border-top-left-radius: 0.5rem !important; } .xl\:rounded-tr-lg { - border-top-right-radius: .5rem !important; + border-top-right-radius: 0.5rem !important; } .xl\:rounded-br-lg { - border-bottom-right-radius: .5rem !important; + border-bottom-right-radius: 0.5rem !important; } .xl\:rounded-bl-lg { - border-bottom-left-radius: .5rem !important; + border-bottom-left-radius: 0.5rem !important; } .xl\:rounded-tl-full { @@ -30670,15 +30668,15 @@ video { } .xl\:h-1 { - height: .25rem !important; + height: 0.25rem !important; } .xl\:h-2 { - height: .5rem !important; + height: 0.5rem !important; } .xl\:h-3 { - height: .75rem !important; + height: 0.75rem !important; } .xl\:h-4 { @@ -30802,15 +30800,15 @@ video { } .xl\:m-1 { - margin: .25rem !important; + margin: 0.25rem !important; } .xl\:m-2 { - margin: .5rem !important; + margin: 0.5rem !important; } .xl\:m-3 { - margin: .75rem !important; + margin: 0.75rem !important; } .xl\:m-4 { @@ -30888,33 +30886,33 @@ video { } .xl\:my-1 { - margin-top: .25rem !important; - margin-bottom: .25rem !important; + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } .xl\:mx-1 { - margin-left: .25rem !important; - margin-right: .25rem !important; + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; } .xl\:my-2 { - margin-top: .5rem !important; - margin-bottom: .5rem !important; + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; } .xl\:mx-2 { - margin-left: .5rem !important; - margin-right: .5rem !important; + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; } .xl\:my-3 { - margin-top: .75rem !important; - margin-bottom: .75rem !important; + margin-top: 0.75rem !important; + margin-bottom: 0.75rem !important; } .xl\:mx-3 { - margin-left: .75rem !important; - margin-right: .75rem !important; + margin-left: 0.75rem !important; + margin-right: 0.75rem !important; } .xl\:my-4 { @@ -31094,51 +31092,51 @@ video { } .xl\:mt-1 { - margin-top: .25rem !important; + margin-top: 0.25rem !important; } .xl\:mr-1 { - margin-right: .25rem !important; + margin-right: 0.25rem !important; } .xl\:mb-1 { - margin-bottom: .25rem !important; + margin-bottom: 0.25rem !important; } .xl\:ml-1 { - margin-left: .25rem !important; + margin-left: 0.25rem !important; } .xl\:mt-2 { - margin-top: .5rem !important; + margin-top: 0.5rem !important; } .xl\:mr-2 { - margin-right: .5rem !important; + margin-right: 0.5rem !important; } .xl\:mb-2 { - margin-bottom: .5rem !important; + margin-bottom: 0.5rem !important; } .xl\:ml-2 { - margin-left: .5rem !important; + margin-left: 0.5rem !important; } .xl\:mt-3 { - margin-top: .75rem !important; + margin-top: 0.75rem !important; } .xl\:mr-3 { - margin-right: .75rem !important; + margin-right: 0.75rem !important; } .xl\:mb-3 { - margin-bottom: .75rem !important; + margin-bottom: 0.75rem !important; } .xl\:ml-3 { - margin-left: .75rem !important; + margin-left: 0.75rem !important; } .xl\:mt-4 { @@ -32100,15 +32098,15 @@ video { } .xl\:opacity-25 { - opacity: .25 !important; + opacity: 0.25 !important; } .xl\:opacity-50 { - opacity: .5 !important; + opacity: 0.5 !important; } .xl\:opacity-75 { - opacity: .75 !important; + opacity: 0.75 !important; } .xl\:opacity-100 { @@ -32176,15 +32174,15 @@ video { } .xl\:p-1 { - padding: .25rem !important; + padding: 0.25rem !important; } .xl\:p-2 { - padding: .5rem !important; + padding: 0.5rem !important; } .xl\:p-3 { - padding: .75rem !important; + padding: 0.75rem !important; } .xl\:p-4 { @@ -32258,33 +32256,33 @@ video { } .xl\:py-1 { - padding-top: .25rem !important; - padding-bottom: .25rem !important; + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; } .xl\:px-1 { - padding-left: .25rem !important; - padding-right: .25rem !important; + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; } .xl\:py-2 { - padding-top: .5rem !important; - padding-bottom: .5rem !important; + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; } .xl\:px-2 { - padding-left: .5rem !important; - padding-right: .5rem !important; + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; } .xl\:py-3 { - padding-top: .75rem !important; - padding-bottom: .75rem !important; + padding-top: 0.75rem !important; + padding-bottom: 0.75rem !important; } .xl\:px-3 { - padding-left: .75rem !important; - padding-right: .75rem !important; + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; } .xl\:py-4 { @@ -32454,51 +32452,51 @@ video { } .xl\:pt-1 { - padding-top: .25rem !important; + padding-top: 0.25rem !important; } .xl\:pr-1 { - padding-right: .25rem !important; + padding-right: 0.25rem !important; } .xl\:pb-1 { - padding-bottom: .25rem !important; + padding-bottom: 0.25rem !important; } .xl\:pl-1 { - padding-left: .25rem !important; + padding-left: 0.25rem !important; } .xl\:pt-2 { - padding-top: .5rem !important; + padding-top: 0.5rem !important; } .xl\:pr-2 { - padding-right: .5rem !important; + padding-right: 0.5rem !important; } .xl\:pb-2 { - padding-bottom: .5rem !important; + padding-bottom: 0.5rem !important; } .xl\:pl-2 { - padding-left: .5rem !important; + padding-left: 0.5rem !important; } .xl\:pt-3 { - padding-top: .75rem !important; + padding-top: 0.75rem !important; } .xl\:pr-3 { - padding-right: .75rem !important; + padding-right: 0.75rem !important; } .xl\:pb-3 { - padding-bottom: .75rem !important; + padding-bottom: 0.75rem !important; } .xl\:pl-3 { - padding-left: .75rem !important; + padding-left: 0.75rem !important; } .xl\:pt-4 { @@ -32872,11 +32870,11 @@ video { } .xl\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .xl\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .xl\:shadow-none { @@ -32904,11 +32902,11 @@ video { } .xl\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .xl\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .xl\:hover\:shadow-none:hover { @@ -32936,11 +32934,11 @@ video { } .xl\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important; + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important; } .xl\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5) !important; + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important; } .xl\:focus\:shadow-none:focus { @@ -34088,11 +34086,11 @@ video { } .xl\:text-xs { - font-size: .75rem !important; + font-size: 0.75rem !important; } .xl\:text-sm { - font-size: .875rem !important; + font-size: 0.875rem !important; } .xl\:text-base { @@ -34210,15 +34208,15 @@ video { } .xl\:tracking-wide { - letter-spacing: .025em !important; + letter-spacing: 0.025em !important; } .xl\:tracking-wider { - letter-spacing: .05em !important; + letter-spacing: 0.05em !important; } .xl\:tracking-widest { - letter-spacing: .1em !important; + letter-spacing: 0.1em !important; } .xl\:select-none { @@ -34305,15 +34303,15 @@ video { } .xl\:w-1 { - width: .25rem !important; + width: 0.25rem !important; } .xl\:w-2 { - width: .5rem !important; + width: 0.5rem !important; } .xl\:w-3 { - width: .75rem !important; + width: 0.75rem !important; } .xl\:w-4 { diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -39,7 +39,7 @@ main { h1 { font-size: 2em; - margin: .67em 0; + margin: 0.67em 0; } /* Grouping content @@ -174,8 +174,7 @@ textarea { */ button, -input { - /* 1 */ +input { /* 1 */ overflow: visible; } @@ -185,8 +184,7 @@ input { */ button, -select { - /* 1 */ +select { /* 1 */ text-transform: none; } @@ -229,7 +227,7 @@ button:-moz-focusring, */ fieldset { - padding: .35em .75em .625em; + padding: 0.35em 0.75em 0.625em; } /** @@ -479,7 +477,7 @@ textarea { input::placeholder, textarea::placeholder { color: inherit; - opacity: .5; + opacity: 0.5; } button, @@ -2929,15 +2927,15 @@ video { } .rounded-sm { - border-radius: .125rem; + border-radius: 0.125rem; } .rounded { - border-radius: .25rem; + border-radius: 0.25rem; } .rounded-lg { - border-radius: .5rem; + border-radius: 0.5rem; } .rounded-full { @@ -2965,63 +2963,63 @@ video { } .rounded-t-sm { - border-top-left-radius: .125rem; - border-top-right-radius: .125rem; + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; } .rounded-r-sm { - border-top-right-radius: .125rem; - border-bottom-right-radius: .125rem; + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; } .rounded-b-sm { - border-bottom-right-radius: .125rem; - border-bottom-left-radius: .125rem; + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .rounded-l-sm { - border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .rounded-t { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } .rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .rounded-t-lg { - border-top-left-radius: .5rem; - border-top-right-radius: .5rem; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; } .rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; } .rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .rounded-t-full { @@ -3061,51 +3059,51 @@ video { } .rounded-tl-sm { - border-top-left-radius: .125rem; + border-top-left-radius: 0.125rem; } .rounded-tr-sm { - border-top-right-radius: .125rem; + border-top-right-radius: 0.125rem; } .rounded-br-sm { - border-bottom-right-radius: .125rem; + border-bottom-right-radius: 0.125rem; } .rounded-bl-sm { - border-bottom-left-radius: .125rem; + border-bottom-left-radius: 0.125rem; } .rounded-tl { - border-top-left-radius: .25rem; + border-top-left-radius: 0.25rem; } .rounded-tr { - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; } .rounded-br { - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; } .rounded-bl { - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; } .rounded-tl-lg { - border-top-left-radius: .5rem; + border-top-left-radius: 0.5rem; } .rounded-tr-lg { - border-top-right-radius: .5rem; + border-top-right-radius: 0.5rem; } .rounded-br-lg { - border-bottom-right-radius: .5rem; + border-bottom-right-radius: 0.5rem; } .rounded-bl-lg { - border-bottom-left-radius: .5rem; + border-bottom-left-radius: 0.5rem; } .rounded-tl-full { @@ -3583,15 +3581,15 @@ video { } .h-1 { - height: .25rem; + height: 0.25rem; } .h-2 { - height: .5rem; + height: 0.5rem; } .h-3 { - height: .75rem; + height: 0.75rem; } .h-4 { @@ -3715,15 +3713,15 @@ video { } .m-1 { - margin: .25rem; + margin: 0.25rem; } .m-2 { - margin: .5rem; + margin: 0.5rem; } .m-3 { - margin: .75rem; + margin: 0.75rem; } .m-4 { @@ -3801,33 +3799,33 @@ video { } .my-1 { - margin-top: .25rem; - margin-bottom: .25rem; + margin-top: 0.25rem; + margin-bottom: 0.25rem; } .mx-1 { - margin-left: .25rem; - margin-right: .25rem; + margin-left: 0.25rem; + margin-right: 0.25rem; } .my-2 { - margin-top: .5rem; - margin-bottom: .5rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } .mx-2 { - margin-left: .5rem; - margin-right: .5rem; + margin-left: 0.5rem; + margin-right: 0.5rem; } .my-3 { - margin-top: .75rem; - margin-bottom: .75rem; + margin-top: 0.75rem; + margin-bottom: 0.75rem; } .mx-3 { - margin-left: .75rem; - margin-right: .75rem; + margin-left: 0.75rem; + margin-right: 0.75rem; } .my-4 { @@ -4007,51 +4005,51 @@ video { } .mt-1 { - margin-top: .25rem; + margin-top: 0.25rem; } .mr-1 { - margin-right: .25rem; + margin-right: 0.25rem; } .mb-1 { - margin-bottom: .25rem; + margin-bottom: 0.25rem; } .ml-1 { - margin-left: .25rem; + margin-left: 0.25rem; } .mt-2 { - margin-top: .5rem; + margin-top: 0.5rem; } .mr-2 { - margin-right: .5rem; + margin-right: 0.5rem; } .mb-2 { - margin-bottom: .5rem; + margin-bottom: 0.5rem; } .ml-2 { - margin-left: .5rem; + margin-left: 0.5rem; } .mt-3 { - margin-top: .75rem; + margin-top: 0.75rem; } .mr-3 { - margin-right: .75rem; + margin-right: 0.75rem; } .mb-3 { - margin-bottom: .75rem; + margin-bottom: 0.75rem; } .ml-3 { - margin-left: .75rem; + margin-left: 0.75rem; } .mt-4 { @@ -5013,15 +5011,15 @@ video { } .opacity-25 { - opacity: .25; + opacity: 0.25; } .opacity-50 { - opacity: .5; + opacity: 0.5; } .opacity-75 { - opacity: .75; + opacity: 0.75; } .opacity-100 { @@ -5097,15 +5095,15 @@ video { } .p-1 { - padding: .25rem; + padding: 0.25rem; } .p-2 { - padding: .5rem; + padding: 0.5rem; } .p-3 { - padding: .75rem; + padding: 0.75rem; } .p-4 { @@ -5179,33 +5177,33 @@ video { } .py-1 { - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; } .px-1 { - padding-left: .25rem; - padding-right: .25rem; + padding-left: 0.25rem; + padding-right: 0.25rem; } .py-2 { - padding-top: .5rem; - padding-bottom: .5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } .px-2 { - padding-left: .5rem; - padding-right: .5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; } .py-3 { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; } .px-3 { - padding-left: .75rem; - padding-right: .75rem; + padding-left: 0.75rem; + padding-right: 0.75rem; } .py-4 { @@ -5375,51 +5373,51 @@ video { } .pt-1 { - padding-top: .25rem; + padding-top: 0.25rem; } .pr-1 { - padding-right: .25rem; + padding-right: 0.25rem; } .pb-1 { - padding-bottom: .25rem; + padding-bottom: 0.25rem; } .pl-1 { - padding-left: .25rem; + padding-left: 0.25rem; } .pt-2 { - padding-top: .5rem; + padding-top: 0.5rem; } .pr-2 { - padding-right: .5rem; + padding-right: 0.5rem; } .pb-2 { - padding-bottom: .5rem; + padding-bottom: 0.5rem; } .pl-2 { - padding-left: .5rem; + padding-left: 0.5rem; } .pt-3 { - padding-top: .75rem; + padding-top: 0.75rem; } .pr-3 { - padding-right: .75rem; + padding-right: 0.75rem; } .pb-3 { - padding-bottom: .75rem; + padding-bottom: 0.75rem; } .pl-3 { - padding-left: .75rem; + padding-left: 0.75rem; } .pt-4 { @@ -5793,11 +5791,11 @@ video { } .shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .shadow-none { @@ -5825,11 +5823,11 @@ video { } .hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .hover\:shadow-none:hover { @@ -5857,11 +5855,11 @@ video { } .focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .focus\:shadow-none:focus { @@ -7017,11 +7015,11 @@ video { } .text-xs { - font-size: .75rem; + font-size: 0.75rem; } .text-sm { - font-size: .875rem; + font-size: 0.875rem; } .text-base { @@ -7139,15 +7137,15 @@ video { } .tracking-wide { - letter-spacing: .025em; + letter-spacing: 0.025em; } .tracking-wider { - letter-spacing: .05em; + letter-spacing: 0.05em; } .tracking-widest { - letter-spacing: .1em; + letter-spacing: 0.1em; } .select-none { @@ -7234,15 +7232,15 @@ video { } .w-1 { - width: .25rem; + width: 0.25rem; } .w-2 { - width: .5rem; + width: 0.5rem; } .w-3 { - width: .75rem; + width: 0.75rem; } .w-4 { @@ -9712,15 +9710,15 @@ video { } .sm\:rounded-sm { - border-radius: .125rem; + border-radius: 0.125rem; } .sm\:rounded { - border-radius: .25rem; + border-radius: 0.25rem; } .sm\:rounded-lg { - border-radius: .5rem; + border-radius: 0.5rem; } .sm\:rounded-full { @@ -9748,63 +9746,63 @@ video { } .sm\:rounded-t-sm { - border-top-left-radius: .125rem; - border-top-right-radius: .125rem; + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; } .sm\:rounded-r-sm { - border-top-right-radius: .125rem; - border-bottom-right-radius: .125rem; + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; } .sm\:rounded-b-sm { - border-bottom-right-radius: .125rem; - border-bottom-left-radius: .125rem; + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .sm\:rounded-l-sm { - border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .sm\:rounded-t { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .sm\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } .sm\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .sm\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .sm\:rounded-t-lg { - border-top-left-radius: .5rem; - border-top-right-radius: .5rem; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; } .sm\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; } .sm\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .sm\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .sm\:rounded-t-full { @@ -9844,51 +9842,51 @@ video { } .sm\:rounded-tl-sm { - border-top-left-radius: .125rem; + border-top-left-radius: 0.125rem; } .sm\:rounded-tr-sm { - border-top-right-radius: .125rem; + border-top-right-radius: 0.125rem; } .sm\:rounded-br-sm { - border-bottom-right-radius: .125rem; + border-bottom-right-radius: 0.125rem; } .sm\:rounded-bl-sm { - border-bottom-left-radius: .125rem; + border-bottom-left-radius: 0.125rem; } .sm\:rounded-tl { - border-top-left-radius: .25rem; + border-top-left-radius: 0.25rem; } .sm\:rounded-tr { - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; } .sm\:rounded-br { - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; } .sm\:rounded-bl { - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; } .sm\:rounded-tl-lg { - border-top-left-radius: .5rem; + border-top-left-radius: 0.5rem; } .sm\:rounded-tr-lg { - border-top-right-radius: .5rem; + border-top-right-radius: 0.5rem; } .sm\:rounded-br-lg { - border-bottom-right-radius: .5rem; + border-bottom-right-radius: 0.5rem; } .sm\:rounded-bl-lg { - border-bottom-left-radius: .5rem; + border-bottom-left-radius: 0.5rem; } .sm\:rounded-tl-full { @@ -10366,15 +10364,15 @@ video { } .sm\:h-1 { - height: .25rem; + height: 0.25rem; } .sm\:h-2 { - height: .5rem; + height: 0.5rem; } .sm\:h-3 { - height: .75rem; + height: 0.75rem; } .sm\:h-4 { @@ -10498,15 +10496,15 @@ video { } .sm\:m-1 { - margin: .25rem; + margin: 0.25rem; } .sm\:m-2 { - margin: .5rem; + margin: 0.5rem; } .sm\:m-3 { - margin: .75rem; + margin: 0.75rem; } .sm\:m-4 { @@ -10584,33 +10582,33 @@ video { } .sm\:my-1 { - margin-top: .25rem; - margin-bottom: .25rem; + margin-top: 0.25rem; + margin-bottom: 0.25rem; } .sm\:mx-1 { - margin-left: .25rem; - margin-right: .25rem; + margin-left: 0.25rem; + margin-right: 0.25rem; } .sm\:my-2 { - margin-top: .5rem; - margin-bottom: .5rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } .sm\:mx-2 { - margin-left: .5rem; - margin-right: .5rem; + margin-left: 0.5rem; + margin-right: 0.5rem; } .sm\:my-3 { - margin-top: .75rem; - margin-bottom: .75rem; + margin-top: 0.75rem; + margin-bottom: 0.75rem; } .sm\:mx-3 { - margin-left: .75rem; - margin-right: .75rem; + margin-left: 0.75rem; + margin-right: 0.75rem; } .sm\:my-4 { @@ -10790,51 +10788,51 @@ video { } .sm\:mt-1 { - margin-top: .25rem; + margin-top: 0.25rem; } .sm\:mr-1 { - margin-right: .25rem; + margin-right: 0.25rem; } .sm\:mb-1 { - margin-bottom: .25rem; + margin-bottom: 0.25rem; } .sm\:ml-1 { - margin-left: .25rem; + margin-left: 0.25rem; } .sm\:mt-2 { - margin-top: .5rem; + margin-top: 0.5rem; } .sm\:mr-2 { - margin-right: .5rem; + margin-right: 0.5rem; } .sm\:mb-2 { - margin-bottom: .5rem; + margin-bottom: 0.5rem; } .sm\:ml-2 { - margin-left: .5rem; + margin-left: 0.5rem; } .sm\:mt-3 { - margin-top: .75rem; + margin-top: 0.75rem; } .sm\:mr-3 { - margin-right: .75rem; + margin-right: 0.75rem; } .sm\:mb-3 { - margin-bottom: .75rem; + margin-bottom: 0.75rem; } .sm\:ml-3 { - margin-left: .75rem; + margin-left: 0.75rem; } .sm\:mt-4 { @@ -11796,15 +11794,15 @@ video { } .sm\:opacity-25 { - opacity: .25; + opacity: 0.25; } .sm\:opacity-50 { - opacity: .5; + opacity: 0.5; } .sm\:opacity-75 { - opacity: .75; + opacity: 0.75; } .sm\:opacity-100 { @@ -11872,15 +11870,15 @@ video { } .sm\:p-1 { - padding: .25rem; + padding: 0.25rem; } .sm\:p-2 { - padding: .5rem; + padding: 0.5rem; } .sm\:p-3 { - padding: .75rem; + padding: 0.75rem; } .sm\:p-4 { @@ -11954,33 +11952,33 @@ video { } .sm\:py-1 { - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; } .sm\:px-1 { - padding-left: .25rem; - padding-right: .25rem; + padding-left: 0.25rem; + padding-right: 0.25rem; } .sm\:py-2 { - padding-top: .5rem; - padding-bottom: .5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } .sm\:px-2 { - padding-left: .5rem; - padding-right: .5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; } .sm\:py-3 { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; } .sm\:px-3 { - padding-left: .75rem; - padding-right: .75rem; + padding-left: 0.75rem; + padding-right: 0.75rem; } .sm\:py-4 { @@ -12150,51 +12148,51 @@ video { } .sm\:pt-1 { - padding-top: .25rem; + padding-top: 0.25rem; } .sm\:pr-1 { - padding-right: .25rem; + padding-right: 0.25rem; } .sm\:pb-1 { - padding-bottom: .25rem; + padding-bottom: 0.25rem; } .sm\:pl-1 { - padding-left: .25rem; + padding-left: 0.25rem; } .sm\:pt-2 { - padding-top: .5rem; + padding-top: 0.5rem; } .sm\:pr-2 { - padding-right: .5rem; + padding-right: 0.5rem; } .sm\:pb-2 { - padding-bottom: .5rem; + padding-bottom: 0.5rem; } .sm\:pl-2 { - padding-left: .5rem; + padding-left: 0.5rem; } .sm\:pt-3 { - padding-top: .75rem; + padding-top: 0.75rem; } .sm\:pr-3 { - padding-right: .75rem; + padding-right: 0.75rem; } .sm\:pb-3 { - padding-bottom: .75rem; + padding-bottom: 0.75rem; } .sm\:pl-3 { - padding-left: .75rem; + padding-left: 0.75rem; } .sm\:pt-4 { @@ -12568,11 +12566,11 @@ video { } .sm\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .sm\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .sm\:shadow-none { @@ -12600,11 +12598,11 @@ video { } .sm\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .sm\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .sm\:hover\:shadow-none:hover { @@ -12632,11 +12630,11 @@ video { } .sm\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .sm\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .sm\:focus\:shadow-none:focus { @@ -13784,11 +13782,11 @@ video { } .sm\:text-xs { - font-size: .75rem; + font-size: 0.75rem; } .sm\:text-sm { - font-size: .875rem; + font-size: 0.875rem; } .sm\:text-base { @@ -13906,15 +13904,15 @@ video { } .sm\:tracking-wide { - letter-spacing: .025em; + letter-spacing: 0.025em; } .sm\:tracking-wider { - letter-spacing: .05em; + letter-spacing: 0.05em; } .sm\:tracking-widest { - letter-spacing: .1em; + letter-spacing: 0.1em; } .sm\:select-none { @@ -14001,15 +13999,15 @@ video { } .sm\:w-1 { - width: .25rem; + width: 0.25rem; } .sm\:w-2 { - width: .5rem; + width: 0.5rem; } .sm\:w-3 { - width: .75rem; + width: 0.75rem; } .sm\:w-4 { @@ -16480,15 +16478,15 @@ video { } .md\:rounded-sm { - border-radius: .125rem; + border-radius: 0.125rem; } .md\:rounded { - border-radius: .25rem; + border-radius: 0.25rem; } .md\:rounded-lg { - border-radius: .5rem; + border-radius: 0.5rem; } .md\:rounded-full { @@ -16516,63 +16514,63 @@ video { } .md\:rounded-t-sm { - border-top-left-radius: .125rem; - border-top-right-radius: .125rem; + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; } .md\:rounded-r-sm { - border-top-right-radius: .125rem; - border-bottom-right-radius: .125rem; + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; } .md\:rounded-b-sm { - border-bottom-right-radius: .125rem; - border-bottom-left-radius: .125rem; + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .md\:rounded-l-sm { - border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .md\:rounded-t { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .md\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } .md\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .md\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .md\:rounded-t-lg { - border-top-left-radius: .5rem; - border-top-right-radius: .5rem; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; } .md\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; } .md\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .md\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .md\:rounded-t-full { @@ -16612,51 +16610,51 @@ video { } .md\:rounded-tl-sm { - border-top-left-radius: .125rem; + border-top-left-radius: 0.125rem; } .md\:rounded-tr-sm { - border-top-right-radius: .125rem; + border-top-right-radius: 0.125rem; } .md\:rounded-br-sm { - border-bottom-right-radius: .125rem; + border-bottom-right-radius: 0.125rem; } .md\:rounded-bl-sm { - border-bottom-left-radius: .125rem; + border-bottom-left-radius: 0.125rem; } .md\:rounded-tl { - border-top-left-radius: .25rem; + border-top-left-radius: 0.25rem; } .md\:rounded-tr { - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; } .md\:rounded-br { - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; } .md\:rounded-bl { - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; } .md\:rounded-tl-lg { - border-top-left-radius: .5rem; + border-top-left-radius: 0.5rem; } .md\:rounded-tr-lg { - border-top-right-radius: .5rem; + border-top-right-radius: 0.5rem; } .md\:rounded-br-lg { - border-bottom-right-radius: .5rem; + border-bottom-right-radius: 0.5rem; } .md\:rounded-bl-lg { - border-bottom-left-radius: .5rem; + border-bottom-left-radius: 0.5rem; } .md\:rounded-tl-full { @@ -17134,15 +17132,15 @@ video { } .md\:h-1 { - height: .25rem; + height: 0.25rem; } .md\:h-2 { - height: .5rem; + height: 0.5rem; } .md\:h-3 { - height: .75rem; + height: 0.75rem; } .md\:h-4 { @@ -17266,15 +17264,15 @@ video { } .md\:m-1 { - margin: .25rem; + margin: 0.25rem; } .md\:m-2 { - margin: .5rem; + margin: 0.5rem; } .md\:m-3 { - margin: .75rem; + margin: 0.75rem; } .md\:m-4 { @@ -17352,33 +17350,33 @@ video { } .md\:my-1 { - margin-top: .25rem; - margin-bottom: .25rem; + margin-top: 0.25rem; + margin-bottom: 0.25rem; } .md\:mx-1 { - margin-left: .25rem; - margin-right: .25rem; + margin-left: 0.25rem; + margin-right: 0.25rem; } .md\:my-2 { - margin-top: .5rem; - margin-bottom: .5rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } .md\:mx-2 { - margin-left: .5rem; - margin-right: .5rem; + margin-left: 0.5rem; + margin-right: 0.5rem; } .md\:my-3 { - margin-top: .75rem; - margin-bottom: .75rem; + margin-top: 0.75rem; + margin-bottom: 0.75rem; } .md\:mx-3 { - margin-left: .75rem; - margin-right: .75rem; + margin-left: 0.75rem; + margin-right: 0.75rem; } .md\:my-4 { @@ -17558,51 +17556,51 @@ video { } .md\:mt-1 { - margin-top: .25rem; + margin-top: 0.25rem; } .md\:mr-1 { - margin-right: .25rem; + margin-right: 0.25rem; } .md\:mb-1 { - margin-bottom: .25rem; + margin-bottom: 0.25rem; } .md\:ml-1 { - margin-left: .25rem; + margin-left: 0.25rem; } .md\:mt-2 { - margin-top: .5rem; + margin-top: 0.5rem; } .md\:mr-2 { - margin-right: .5rem; + margin-right: 0.5rem; } .md\:mb-2 { - margin-bottom: .5rem; + margin-bottom: 0.5rem; } .md\:ml-2 { - margin-left: .5rem; + margin-left: 0.5rem; } .md\:mt-3 { - margin-top: .75rem; + margin-top: 0.75rem; } .md\:mr-3 { - margin-right: .75rem; + margin-right: 0.75rem; } .md\:mb-3 { - margin-bottom: .75rem; + margin-bottom: 0.75rem; } .md\:ml-3 { - margin-left: .75rem; + margin-left: 0.75rem; } .md\:mt-4 { @@ -18564,15 +18562,15 @@ video { } .md\:opacity-25 { - opacity: .25; + opacity: 0.25; } .md\:opacity-50 { - opacity: .5; + opacity: 0.5; } .md\:opacity-75 { - opacity: .75; + opacity: 0.75; } .md\:opacity-100 { @@ -18640,15 +18638,15 @@ video { } .md\:p-1 { - padding: .25rem; + padding: 0.25rem; } .md\:p-2 { - padding: .5rem; + padding: 0.5rem; } .md\:p-3 { - padding: .75rem; + padding: 0.75rem; } .md\:p-4 { @@ -18722,33 +18720,33 @@ video { } .md\:py-1 { - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; } .md\:px-1 { - padding-left: .25rem; - padding-right: .25rem; + padding-left: 0.25rem; + padding-right: 0.25rem; } .md\:py-2 { - padding-top: .5rem; - padding-bottom: .5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } .md\:px-2 { - padding-left: .5rem; - padding-right: .5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; } .md\:py-3 { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; } .md\:px-3 { - padding-left: .75rem; - padding-right: .75rem; + padding-left: 0.75rem; + padding-right: 0.75rem; } .md\:py-4 { @@ -18918,51 +18916,51 @@ video { } .md\:pt-1 { - padding-top: .25rem; + padding-top: 0.25rem; } .md\:pr-1 { - padding-right: .25rem; + padding-right: 0.25rem; } .md\:pb-1 { - padding-bottom: .25rem; + padding-bottom: 0.25rem; } .md\:pl-1 { - padding-left: .25rem; + padding-left: 0.25rem; } .md\:pt-2 { - padding-top: .5rem; + padding-top: 0.5rem; } .md\:pr-2 { - padding-right: .5rem; + padding-right: 0.5rem; } .md\:pb-2 { - padding-bottom: .5rem; + padding-bottom: 0.5rem; } .md\:pl-2 { - padding-left: .5rem; + padding-left: 0.5rem; } .md\:pt-3 { - padding-top: .75rem; + padding-top: 0.75rem; } .md\:pr-3 { - padding-right: .75rem; + padding-right: 0.75rem; } .md\:pb-3 { - padding-bottom: .75rem; + padding-bottom: 0.75rem; } .md\:pl-3 { - padding-left: .75rem; + padding-left: 0.75rem; } .md\:pt-4 { @@ -19336,11 +19334,11 @@ video { } .md\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .md\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .md\:shadow-none { @@ -19368,11 +19366,11 @@ video { } .md\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .md\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .md\:hover\:shadow-none:hover { @@ -19400,11 +19398,11 @@ video { } .md\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .md\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .md\:focus\:shadow-none:focus { @@ -20552,11 +20550,11 @@ video { } .md\:text-xs { - font-size: .75rem; + font-size: 0.75rem; } .md\:text-sm { - font-size: .875rem; + font-size: 0.875rem; } .md\:text-base { @@ -20674,15 +20672,15 @@ video { } .md\:tracking-wide { - letter-spacing: .025em; + letter-spacing: 0.025em; } .md\:tracking-wider { - letter-spacing: .05em; + letter-spacing: 0.05em; } .md\:tracking-widest { - letter-spacing: .1em; + letter-spacing: 0.1em; } .md\:select-none { @@ -20769,15 +20767,15 @@ video { } .md\:w-1 { - width: .25rem; + width: 0.25rem; } .md\:w-2 { - width: .5rem; + width: 0.5rem; } .md\:w-3 { - width: .75rem; + width: 0.75rem; } .md\:w-4 { @@ -23248,15 +23246,15 @@ video { } .lg\:rounded-sm { - border-radius: .125rem; + border-radius: 0.125rem; } .lg\:rounded { - border-radius: .25rem; + border-radius: 0.25rem; } .lg\:rounded-lg { - border-radius: .5rem; + border-radius: 0.5rem; } .lg\:rounded-full { @@ -23284,63 +23282,63 @@ video { } .lg\:rounded-t-sm { - border-top-left-radius: .125rem; - border-top-right-radius: .125rem; + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; } .lg\:rounded-r-sm { - border-top-right-radius: .125rem; - border-bottom-right-radius: .125rem; + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; } .lg\:rounded-b-sm { - border-bottom-right-radius: .125rem; - border-bottom-left-radius: .125rem; + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .lg\:rounded-l-sm { - border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .lg\:rounded-t { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .lg\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } .lg\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .lg\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .lg\:rounded-t-lg { - border-top-left-radius: .5rem; - border-top-right-radius: .5rem; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; } .lg\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; } .lg\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .lg\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .lg\:rounded-t-full { @@ -23380,51 +23378,51 @@ video { } .lg\:rounded-tl-sm { - border-top-left-radius: .125rem; + border-top-left-radius: 0.125rem; } .lg\:rounded-tr-sm { - border-top-right-radius: .125rem; + border-top-right-radius: 0.125rem; } .lg\:rounded-br-sm { - border-bottom-right-radius: .125rem; + border-bottom-right-radius: 0.125rem; } .lg\:rounded-bl-sm { - border-bottom-left-radius: .125rem; + border-bottom-left-radius: 0.125rem; } .lg\:rounded-tl { - border-top-left-radius: .25rem; + border-top-left-radius: 0.25rem; } .lg\:rounded-tr { - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; } .lg\:rounded-br { - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; } .lg\:rounded-bl { - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; } .lg\:rounded-tl-lg { - border-top-left-radius: .5rem; + border-top-left-radius: 0.5rem; } .lg\:rounded-tr-lg { - border-top-right-radius: .5rem; + border-top-right-radius: 0.5rem; } .lg\:rounded-br-lg { - border-bottom-right-radius: .5rem; + border-bottom-right-radius: 0.5rem; } .lg\:rounded-bl-lg { - border-bottom-left-radius: .5rem; + border-bottom-left-radius: 0.5rem; } .lg\:rounded-tl-full { @@ -23902,15 +23900,15 @@ video { } .lg\:h-1 { - height: .25rem; + height: 0.25rem; } .lg\:h-2 { - height: .5rem; + height: 0.5rem; } .lg\:h-3 { - height: .75rem; + height: 0.75rem; } .lg\:h-4 { @@ -24034,15 +24032,15 @@ video { } .lg\:m-1 { - margin: .25rem; + margin: 0.25rem; } .lg\:m-2 { - margin: .5rem; + margin: 0.5rem; } .lg\:m-3 { - margin: .75rem; + margin: 0.75rem; } .lg\:m-4 { @@ -24120,33 +24118,33 @@ video { } .lg\:my-1 { - margin-top: .25rem; - margin-bottom: .25rem; + margin-top: 0.25rem; + margin-bottom: 0.25rem; } .lg\:mx-1 { - margin-left: .25rem; - margin-right: .25rem; + margin-left: 0.25rem; + margin-right: 0.25rem; } .lg\:my-2 { - margin-top: .5rem; - margin-bottom: .5rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } .lg\:mx-2 { - margin-left: .5rem; - margin-right: .5rem; + margin-left: 0.5rem; + margin-right: 0.5rem; } .lg\:my-3 { - margin-top: .75rem; - margin-bottom: .75rem; + margin-top: 0.75rem; + margin-bottom: 0.75rem; } .lg\:mx-3 { - margin-left: .75rem; - margin-right: .75rem; + margin-left: 0.75rem; + margin-right: 0.75rem; } .lg\:my-4 { @@ -24326,51 +24324,51 @@ video { } .lg\:mt-1 { - margin-top: .25rem; + margin-top: 0.25rem; } .lg\:mr-1 { - margin-right: .25rem; + margin-right: 0.25rem; } .lg\:mb-1 { - margin-bottom: .25rem; + margin-bottom: 0.25rem; } .lg\:ml-1 { - margin-left: .25rem; + margin-left: 0.25rem; } .lg\:mt-2 { - margin-top: .5rem; + margin-top: 0.5rem; } .lg\:mr-2 { - margin-right: .5rem; + margin-right: 0.5rem; } .lg\:mb-2 { - margin-bottom: .5rem; + margin-bottom: 0.5rem; } .lg\:ml-2 { - margin-left: .5rem; + margin-left: 0.5rem; } .lg\:mt-3 { - margin-top: .75rem; + margin-top: 0.75rem; } .lg\:mr-3 { - margin-right: .75rem; + margin-right: 0.75rem; } .lg\:mb-3 { - margin-bottom: .75rem; + margin-bottom: 0.75rem; } .lg\:ml-3 { - margin-left: .75rem; + margin-left: 0.75rem; } .lg\:mt-4 { @@ -25332,15 +25330,15 @@ video { } .lg\:opacity-25 { - opacity: .25; + opacity: 0.25; } .lg\:opacity-50 { - opacity: .5; + opacity: 0.5; } .lg\:opacity-75 { - opacity: .75; + opacity: 0.75; } .lg\:opacity-100 { @@ -25408,15 +25406,15 @@ video { } .lg\:p-1 { - padding: .25rem; + padding: 0.25rem; } .lg\:p-2 { - padding: .5rem; + padding: 0.5rem; } .lg\:p-3 { - padding: .75rem; + padding: 0.75rem; } .lg\:p-4 { @@ -25490,33 +25488,33 @@ video { } .lg\:py-1 { - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; } .lg\:px-1 { - padding-left: .25rem; - padding-right: .25rem; + padding-left: 0.25rem; + padding-right: 0.25rem; } .lg\:py-2 { - padding-top: .5rem; - padding-bottom: .5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } .lg\:px-2 { - padding-left: .5rem; - padding-right: .5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; } .lg\:py-3 { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; } .lg\:px-3 { - padding-left: .75rem; - padding-right: .75rem; + padding-left: 0.75rem; + padding-right: 0.75rem; } .lg\:py-4 { @@ -25686,51 +25684,51 @@ video { } .lg\:pt-1 { - padding-top: .25rem; + padding-top: 0.25rem; } .lg\:pr-1 { - padding-right: .25rem; + padding-right: 0.25rem; } .lg\:pb-1 { - padding-bottom: .25rem; + padding-bottom: 0.25rem; } .lg\:pl-1 { - padding-left: .25rem; + padding-left: 0.25rem; } .lg\:pt-2 { - padding-top: .5rem; + padding-top: 0.5rem; } .lg\:pr-2 { - padding-right: .5rem; + padding-right: 0.5rem; } .lg\:pb-2 { - padding-bottom: .5rem; + padding-bottom: 0.5rem; } .lg\:pl-2 { - padding-left: .5rem; + padding-left: 0.5rem; } .lg\:pt-3 { - padding-top: .75rem; + padding-top: 0.75rem; } .lg\:pr-3 { - padding-right: .75rem; + padding-right: 0.75rem; } .lg\:pb-3 { - padding-bottom: .75rem; + padding-bottom: 0.75rem; } .lg\:pl-3 { - padding-left: .75rem; + padding-left: 0.75rem; } .lg\:pt-4 { @@ -26104,11 +26102,11 @@ video { } .lg\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .lg\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .lg\:shadow-none { @@ -26136,11 +26134,11 @@ video { } .lg\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .lg\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .lg\:hover\:shadow-none:hover { @@ -26168,11 +26166,11 @@ video { } .lg\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .lg\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .lg\:focus\:shadow-none:focus { @@ -27320,11 +27318,11 @@ video { } .lg\:text-xs { - font-size: .75rem; + font-size: 0.75rem; } .lg\:text-sm { - font-size: .875rem; + font-size: 0.875rem; } .lg\:text-base { @@ -27442,15 +27440,15 @@ video { } .lg\:tracking-wide { - letter-spacing: .025em; + letter-spacing: 0.025em; } .lg\:tracking-wider { - letter-spacing: .05em; + letter-spacing: 0.05em; } .lg\:tracking-widest { - letter-spacing: .1em; + letter-spacing: 0.1em; } .lg\:select-none { @@ -27537,15 +27535,15 @@ video { } .lg\:w-1 { - width: .25rem; + width: 0.25rem; } .lg\:w-2 { - width: .5rem; + width: 0.5rem; } .lg\:w-3 { - width: .75rem; + width: 0.75rem; } .lg\:w-4 { @@ -30016,15 +30014,15 @@ video { } .xl\:rounded-sm { - border-radius: .125rem; + border-radius: 0.125rem; } .xl\:rounded { - border-radius: .25rem; + border-radius: 0.25rem; } .xl\:rounded-lg { - border-radius: .5rem; + border-radius: 0.5rem; } .xl\:rounded-full { @@ -30052,63 +30050,63 @@ video { } .xl\:rounded-t-sm { - border-top-left-radius: .125rem; - border-top-right-radius: .125rem; + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; } .xl\:rounded-r-sm { - border-top-right-radius: .125rem; - border-bottom-right-radius: .125rem; + border-top-right-radius: 0.125rem; + border-bottom-right-radius: 0.125rem; } .xl\:rounded-b-sm { - border-bottom-right-radius: .125rem; - border-bottom-left-radius: .125rem; + border-bottom-right-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .xl\:rounded-l-sm { - border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; + border-top-left-radius: 0.125rem; + border-bottom-left-radius: 0.125rem; } .xl\:rounded-t { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .xl\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } .xl\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .xl\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .xl\:rounded-t-lg { - border-top-left-radius: .5rem; - border-top-right-radius: .5rem; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; } .xl\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; } .xl\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .xl\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; } .xl\:rounded-t-full { @@ -30148,51 +30146,51 @@ video { } .xl\:rounded-tl-sm { - border-top-left-radius: .125rem; + border-top-left-radius: 0.125rem; } .xl\:rounded-tr-sm { - border-top-right-radius: .125rem; + border-top-right-radius: 0.125rem; } .xl\:rounded-br-sm { - border-bottom-right-radius: .125rem; + border-bottom-right-radius: 0.125rem; } .xl\:rounded-bl-sm { - border-bottom-left-radius: .125rem; + border-bottom-left-radius: 0.125rem; } .xl\:rounded-tl { - border-top-left-radius: .25rem; + border-top-left-radius: 0.25rem; } .xl\:rounded-tr { - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; } .xl\:rounded-br { - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; } .xl\:rounded-bl { - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; } .xl\:rounded-tl-lg { - border-top-left-radius: .5rem; + border-top-left-radius: 0.5rem; } .xl\:rounded-tr-lg { - border-top-right-radius: .5rem; + border-top-right-radius: 0.5rem; } .xl\:rounded-br-lg { - border-bottom-right-radius: .5rem; + border-bottom-right-radius: 0.5rem; } .xl\:rounded-bl-lg { - border-bottom-left-radius: .5rem; + border-bottom-left-radius: 0.5rem; } .xl\:rounded-tl-full { @@ -30670,15 +30668,15 @@ video { } .xl\:h-1 { - height: .25rem; + height: 0.25rem; } .xl\:h-2 { - height: .5rem; + height: 0.5rem; } .xl\:h-3 { - height: .75rem; + height: 0.75rem; } .xl\:h-4 { @@ -30802,15 +30800,15 @@ video { } .xl\:m-1 { - margin: .25rem; + margin: 0.25rem; } .xl\:m-2 { - margin: .5rem; + margin: 0.5rem; } .xl\:m-3 { - margin: .75rem; + margin: 0.75rem; } .xl\:m-4 { @@ -30888,33 +30886,33 @@ video { } .xl\:my-1 { - margin-top: .25rem; - margin-bottom: .25rem; + margin-top: 0.25rem; + margin-bottom: 0.25rem; } .xl\:mx-1 { - margin-left: .25rem; - margin-right: .25rem; + margin-left: 0.25rem; + margin-right: 0.25rem; } .xl\:my-2 { - margin-top: .5rem; - margin-bottom: .5rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } .xl\:mx-2 { - margin-left: .5rem; - margin-right: .5rem; + margin-left: 0.5rem; + margin-right: 0.5rem; } .xl\:my-3 { - margin-top: .75rem; - margin-bottom: .75rem; + margin-top: 0.75rem; + margin-bottom: 0.75rem; } .xl\:mx-3 { - margin-left: .75rem; - margin-right: .75rem; + margin-left: 0.75rem; + margin-right: 0.75rem; } .xl\:my-4 { @@ -31094,51 +31092,51 @@ video { } .xl\:mt-1 { - margin-top: .25rem; + margin-top: 0.25rem; } .xl\:mr-1 { - margin-right: .25rem; + margin-right: 0.25rem; } .xl\:mb-1 { - margin-bottom: .25rem; + margin-bottom: 0.25rem; } .xl\:ml-1 { - margin-left: .25rem; + margin-left: 0.25rem; } .xl\:mt-2 { - margin-top: .5rem; + margin-top: 0.5rem; } .xl\:mr-2 { - margin-right: .5rem; + margin-right: 0.5rem; } .xl\:mb-2 { - margin-bottom: .5rem; + margin-bottom: 0.5rem; } .xl\:ml-2 { - margin-left: .5rem; + margin-left: 0.5rem; } .xl\:mt-3 { - margin-top: .75rem; + margin-top: 0.75rem; } .xl\:mr-3 { - margin-right: .75rem; + margin-right: 0.75rem; } .xl\:mb-3 { - margin-bottom: .75rem; + margin-bottom: 0.75rem; } .xl\:ml-3 { - margin-left: .75rem; + margin-left: 0.75rem; } .xl\:mt-4 { @@ -32100,15 +32098,15 @@ video { } .xl\:opacity-25 { - opacity: .25; + opacity: 0.25; } .xl\:opacity-50 { - opacity: .5; + opacity: 0.5; } .xl\:opacity-75 { - opacity: .75; + opacity: 0.75; } .xl\:opacity-100 { @@ -32176,15 +32174,15 @@ video { } .xl\:p-1 { - padding: .25rem; + padding: 0.25rem; } .xl\:p-2 { - padding: .5rem; + padding: 0.5rem; } .xl\:p-3 { - padding: .75rem; + padding: 0.75rem; } .xl\:p-4 { @@ -32258,33 +32256,33 @@ video { } .xl\:py-1 { - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; } .xl\:px-1 { - padding-left: .25rem; - padding-right: .25rem; + padding-left: 0.25rem; + padding-right: 0.25rem; } .xl\:py-2 { - padding-top: .5rem; - padding-bottom: .5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } .xl\:px-2 { - padding-left: .5rem; - padding-right: .5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; } .xl\:py-3 { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; } .xl\:px-3 { - padding-left: .75rem; - padding-right: .75rem; + padding-left: 0.75rem; + padding-right: 0.75rem; } .xl\:py-4 { @@ -32454,51 +32452,51 @@ video { } .xl\:pt-1 { - padding-top: .25rem; + padding-top: 0.25rem; } .xl\:pr-1 { - padding-right: .25rem; + padding-right: 0.25rem; } .xl\:pb-1 { - padding-bottom: .25rem; + padding-bottom: 0.25rem; } .xl\:pl-1 { - padding-left: .25rem; + padding-left: 0.25rem; } .xl\:pt-2 { - padding-top: .5rem; + padding-top: 0.5rem; } .xl\:pr-2 { - padding-right: .5rem; + padding-right: 0.5rem; } .xl\:pb-2 { - padding-bottom: .5rem; + padding-bottom: 0.5rem; } .xl\:pl-2 { - padding-left: .5rem; + padding-left: 0.5rem; } .xl\:pt-3 { - padding-top: .75rem; + padding-top: 0.75rem; } .xl\:pr-3 { - padding-right: .75rem; + padding-right: 0.75rem; } .xl\:pb-3 { - padding-bottom: .75rem; + padding-bottom: 0.75rem; } .xl\:pl-3 { - padding-left: .75rem; + padding-left: 0.75rem; } .xl\:pt-4 { @@ -32872,11 +32870,11 @@ video { } .xl\:shadow-inner { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .xl\:shadow-outline { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .xl\:shadow-none { @@ -32904,11 +32902,11 @@ video { } .xl\:hover\:shadow-inner:hover { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .xl\:hover\:shadow-outline:hover { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .xl\:hover\:shadow-none:hover { @@ -32936,11 +32934,11 @@ video { } .xl\:focus\:shadow-inner:focus { - box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06); + box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); } .xl\:focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, .5); + box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); } .xl\:focus\:shadow-none:focus { @@ -34088,11 +34086,11 @@ video { } .xl\:text-xs { - font-size: .75rem; + font-size: 0.75rem; } .xl\:text-sm { - font-size: .875rem; + font-size: 0.875rem; } .xl\:text-base { @@ -34210,15 +34208,15 @@ video { } .xl\:tracking-wide { - letter-spacing: .025em; + letter-spacing: 0.025em; } .xl\:tracking-wider { - letter-spacing: .05em; + letter-spacing: 0.05em; } .xl\:tracking-widest { - letter-spacing: .1em; + letter-spacing: 0.1em; } .xl\:select-none { @@ -34305,15 +34303,15 @@ video { } .xl\:w-1 { - width: .25rem; + width: 0.25rem; } .xl\:w-2 { - width: .5rem; + width: 0.5rem; } .xl\:w-3 { - width: .75rem; + width: 0.75rem; } .xl\:w-4 {
Error when adding comments between @apply `foo.css`: ```css .btn { @apply flex w-20 py-1 justify-center items-center; /* it works without this line */ @apply border border-gray-200 rounded; } ``` <img width="1464" alt="屏幕快照 2019-04-02 下午1 43 48" src="https://user-images.githubusercontent.com/8784712/55378844-5ea19000-554d-11e9-87cb-f638449d937a.png"> Seems like [`perfectionist`](https://github.com/ben-eb/perfectionist/) is unmaintained and it uses an outdated version of PostCSS. --- - tailwindcss: `1.0.0-beta.4` - postcss: `7.0.14`
2019-04-16T15:45:36Z
1
tailwindlabs/tailwindcss
681
tailwindlabs__tailwindcss-681
[ "571" ]
f987d5386de23a836f1ba8a8aab818cda46f0139
diff --git a/src/plugins/whitespace.js b/src/plugins/whitespace.js --- a/src/plugins/whitespace.js +++ b/src/plugins/whitespace.js @@ -8,8 +8,11 @@ export default function({ variants }) { '.whitespace-pre-line': { 'white-space': 'pre-line' }, '.whitespace-pre-wrap': { 'white-space': 'pre-wrap' }, - '.break-words': { 'word-wrap': 'break-word' }, - '.break-normal': { 'word-wrap': 'normal' }, + '.wrap-break': { 'overflow-wrap': 'break-word' }, + '.wrap-normal': { 'overflow-wrap': 'normal' }, + + '.break-normal': { 'word-break': 'normal' }, + '.break-all': { 'word-break': 'break-all' }, '.truncate': { overflow: 'hidden',
diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -6019,12 +6019,20 @@ table { white-space: pre-wrap !important; } -.break-words { - word-wrap: break-word !important; +.wrap-break { + overflow-wrap: break-word !important; +} + +.wrap-normal { + overflow-wrap: normal !important; } .break-normal { - word-wrap: normal !important; + word-break: normal !important; +} + +.break-all { + word-break: break-all !important; } .truncate { @@ -11680,12 +11688,20 @@ table { white-space: pre-wrap !important; } - .sm\:break-words { - word-wrap: break-word !important; + .sm\:wrap-break { + overflow-wrap: break-word !important; + } + + .sm\:wrap-normal { + overflow-wrap: normal !important; } .sm\:break-normal { - word-wrap: normal !important; + word-break: normal !important; + } + + .sm\:break-all { + word-break: break-all !important; } .sm\:truncate { @@ -17342,12 +17358,20 @@ table { white-space: pre-wrap !important; } - .md\:break-words { - word-wrap: break-word !important; + .md\:wrap-break { + overflow-wrap: break-word !important; + } + + .md\:wrap-normal { + overflow-wrap: normal !important; } .md\:break-normal { - word-wrap: normal !important; + word-break: normal !important; + } + + .md\:break-all { + word-break: break-all !important; } .md\:truncate { @@ -23004,12 +23028,20 @@ table { white-space: pre-wrap !important; } - .lg\:break-words { - word-wrap: break-word !important; + .lg\:wrap-break { + overflow-wrap: break-word !important; + } + + .lg\:wrap-normal { + overflow-wrap: normal !important; } .lg\:break-normal { - word-wrap: normal !important; + word-break: normal !important; + } + + .lg\:break-all { + word-break: break-all !important; } .lg\:truncate { @@ -28666,12 +28698,20 @@ table { white-space: pre-wrap !important; } - .xl\:break-words { - word-wrap: break-word !important; + .xl\:wrap-break { + overflow-wrap: break-word !important; + } + + .xl\:wrap-normal { + overflow-wrap: normal !important; } .xl\:break-normal { - word-wrap: normal !important; + word-break: normal !important; + } + + .xl\:break-all { + word-break: break-all !important; } .xl\:truncate { diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -6019,12 +6019,20 @@ table { white-space: pre-wrap; } -.break-words { - word-wrap: break-word; +.wrap-break { + overflow-wrap: break-word; +} + +.wrap-normal { + overflow-wrap: normal; } .break-normal { - word-wrap: normal; + word-break: normal; +} + +.break-all { + word-break: break-all; } .truncate { @@ -11680,12 +11688,20 @@ table { white-space: pre-wrap; } - .sm\:break-words { - word-wrap: break-word; + .sm\:wrap-break { + overflow-wrap: break-word; + } + + .sm\:wrap-normal { + overflow-wrap: normal; } .sm\:break-normal { - word-wrap: normal; + word-break: normal; + } + + .sm\:break-all { + word-break: break-all; } .sm\:truncate { @@ -17342,12 +17358,20 @@ table { white-space: pre-wrap; } - .md\:break-words { - word-wrap: break-word; + .md\:wrap-break { + overflow-wrap: break-word; + } + + .md\:wrap-normal { + overflow-wrap: normal; } .md\:break-normal { - word-wrap: normal; + word-break: normal; + } + + .md\:break-all { + word-break: break-all; } .md\:truncate { @@ -23004,12 +23028,20 @@ table { white-space: pre-wrap; } - .lg\:break-words { - word-wrap: break-word; + .lg\:wrap-break { + overflow-wrap: break-word; + } + + .lg\:wrap-normal { + overflow-wrap: normal; } .lg\:break-normal { - word-wrap: normal; + word-break: normal; + } + + .lg\:break-all { + word-break: break-all; } .lg\:truncate { @@ -28666,12 +28698,20 @@ table { white-space: pre-wrap; } - .xl\:break-words { - word-wrap: break-word; + .xl\:wrap-break { + overflow-wrap: break-word; + } + + .xl\:wrap-normal { + overflow-wrap: normal; } .xl\:break-normal { - word-wrap: normal; + word-break: normal; + } + + .xl\:break-all { + word-break: break-all; } .xl\:truncate {
Add break-all utility, change word-wrap to overflow-wrap 👋 Fix #411 This PR: - Adds a `.break-all` class - Changes `word-wrap` to `overflow-wrap` (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap) Thanks!
Docs updated in [#47.](https://github.com/tailwindcss/docs/pull/47) Thanks for this! I really want to merge it but there's an annoying decision we have to figure out... Right now you can use `break-normal` to "undo" `break-words` at various breakpoints, like: ``` <div class="break-words md:break-normal">...</div> ``` ...but because `break-all` has to use the `word-break` property, there's currently no way to undo it since `break-normal` uses `overflow-wrap`. I see two solutions: 1. **Make `break-normal` do two things** If `break-normal` were defined like this it would fix the problem: ``` .break-normal { overflow-wrap: normal; word-break: normal; } ``` I'm not sure if there are actually cases where you *wouldn't* want this to happen though, like maybe you want `overflow-wrap: normal` and `word-break: break-all` or some other combination. It's also very rare that any of Tailwind's utilities set multiple properties, I think `truncate` is the only other one and we have talked in the past about "fixing" that 😕 2. **Add another class** We could add a new class specifically for `word-break: normal` but what the hell would we call it? I think if we did that we'd probably need to rename the `overflow-wrap` utilities, or at least `break-normal` to `wrap-normal`, so `word-break: normal` could be called `break-normal`. This sucks because it's a breaking change. Any ideas or thoughts? 🤔 Thanks for your feedback! I see the problem, not an easy nut to crack. Been doing some thinking and this is my take on all this: 1. **Make `break-normal` do two things** Instead of making `.break-normal` do two things we could introduce a `.break-reset` class similar to `.list-reset` but for word-wrapping in general: ``` .break-reset { overflow-wrap: normal; word-break: normal; } ``` This way we could keep the current class names as is, hence not introducing a breaking change. Then again as you said, if this kind of utility classes are going to be fixed/removed in future releases then maybe it's a bad idea to add yet another one. I'm also, like you - not sure if there are actually cases where you _wouldn't_ want this to happen, maybe there has to be a seperate class for resetting `word-break: break-all` specifically. I'm not sure.. 2. **Add another class** It does indeed suck that changing the names would be a breaking change, however it wouldn't make sense (at least not to me) to have `overflow-wrap: normal` being named `.break-normal` if `word-break: normal` was introduced to the framework. I feel a change of the class names in this scenario is a must: ``` 'wrap-words': { 'overflow-wrap': 'break-word' }, 'wrap-normal': { 'overflow-wrap': 'normal' }, 'break-normal': { 'word-break': 'normal' }, 'break-all': { 'word-break': 'break-all' }, ``` **Conclusion** I'm really not sure what's the best option here, or if there is another better way of doing this. At least I haven't come up with anything else so far other than my suggestion about adding a `.break-reset` class which is basically what you already suggested. In the meantime, I'll keep thinking about this to see if I can come up with something better. 🤔 Coming back to this since we can break this for 1.0, I think I'm okay with these names... ``` 'wrap-break': { 'overflow-wrap': 'break-word' }, 'wrap-normal': { 'overflow-wrap': 'normal' }, 'break-normal': { 'word-break': 'normal' }, 'break-all': { 'word-break': 'break-all' }, ``` Anyone have any thoughts? I don't like `wrap-words` because words already wrap by default, so doesn't really feel like it describes it properly. `wrap-break` is kind of awkward too but it feels a bit closer. Still considering just making `break-normal` unset both properties, I think I would be fine with that if no one can think of a scenario (no matter how obscure) where that would be problematic. @adamwathan sounds good to me!
2019-02-22T16:59:19Z
0.7
tailwindlabs/tailwindcss
516
tailwindlabs__tailwindcss-516
[ "150" ]
38c211a164fe03bef2fb844792c134d93a415c8e
diff --git a/src/lib/substituteClassApplyAtRules.js b/src/lib/substituteClassApplyAtRules.js --- a/src/lib/substituteClassApplyAtRules.js +++ b/src/lib/substituteClassApplyAtRules.js @@ -15,40 +15,57 @@ function buildClassTable(css) { return classTable } +function buildShadowTable(generatedUtilities) { + const utilities = postcss.root() + + generatedUtilities.walkAtRules('variants', atRule => { + utilities.append(atRule.clone().nodes) + }) + + return buildClassTable(utilities) +} + function normalizeClassName(className) { return `.${escapeClassName(_.trimStart(className, '.'))}` } -function findMixin(classTable, mixin, onError) { - const matches = _.get(classTable, mixin, []) +function findClass(classToApply, classTable, shadowLookup, onError) { + const matches = _.get(classTable, classToApply, []) if (_.isEmpty(matches)) { - // prettier-ignore - onError(`\`@apply\` cannot be used with \`${mixin}\` because \`${mixin}\` either cannot be found, or it's actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that \`${mixin}\` exists, make sure that any \`@import\` statements are being properly processed *before* Tailwind CSS sees your CSS, as \`@apply\` can only be used for classes in the same CSS tree.`) + if (_.isEmpty(shadowLookup)) { + // prettier-ignore + throw onError(`\`@apply\` cannot be used with \`${classToApply}\` because \`${classToApply}\` either cannot be found, or it's actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that \`${classToApply}\` exists, make sure that any \`@import\` statements are being properly processed *before* Tailwind CSS sees your CSS, as \`@apply\` can only be used for classes in the same CSS tree.`) + } + + return findClass(classToApply, shadowLookup, {}, onError) } if (matches.length > 1) { // prettier-ignore - onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} is included in multiple rulesets.`) + throw onError(`\`@apply\` cannot be used with ${classToApply} because ${classToApply} is included in multiple rulesets.`) } const [match] = matches if (match.parent.type !== 'root') { // prettier-ignore - onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} is nested inside of an at-rule (@${match.parent.name}).`) + throw onError(`\`@apply\` cannot be used with ${classToApply} because ${classToApply} is nested inside of an at-rule (@${match.parent.name}).`) } return match.clone().nodes } -export default function() { +export default function(config, generatedUtilities) { return function(css) { const classLookup = buildClassTable(css) + const shadowLookup = _.get(config, 'experiments.shadowLookup', false) + ? buildShadowTable(generatedUtilities) + : {} css.walkRules(rule => { rule.walkAtRules('apply', atRule => { - const mixins = postcss.list.space(atRule.params) + const classesAndProperties = postcss.list.space(atRule.params) /* * Don't wreck CSSNext-style @apply rules: @@ -57,20 +74,20 @@ export default function() { * These are deprecated in CSSNext but still playing it safe for now. * We might consider renaming this at-rule. */ - const [customProperties, classes] = _.partition(mixins, mixin => { - return _.startsWith(mixin, '--') + const [customProperties, classes] = _.partition(classesAndProperties, classOrProperty => { + return _.startsWith(classOrProperty, '--') }) const decls = _(classes) - .reject(mixin => mixin === '!important') - .flatMap(mixin => { - return findMixin(classLookup, normalizeClassName(mixin), message => { - throw atRule.error(message) + .reject(cssClass => cssClass === '!important') + .flatMap(cssClass => { + return findClass(normalizeClassName(cssClass), classLookup, shadowLookup, message => { + return atRule.error(message) }) }) .value() - _.tap(_.last(mixins) === '!important', important => { + _.tap(_.last(classesAndProperties) === '!important', important => { decls.forEach(decl => (decl.important = important)) }) diff --git a/src/lib/substituteTailwindAtRules.js b/src/lib/substituteTailwindAtRules.js --- a/src/lib/substituteTailwindAtRules.js +++ b/src/lib/substituteTailwindAtRules.js @@ -1,10 +1,7 @@ import fs from 'fs' import postcss from 'postcss' -import utilityModules from '../utilityModules' -import prefixTree from '../util/prefixTree' -import generateModules from '../util/generateModules' -export default function(config, { components: pluginComponents, utilities: pluginUtilities }) { +export default function(config, { components: pluginComponents }, generatedUtilities) { return function(css) { css.walkAtRules('tailwind', atRule => { if (atRule.params === 'preflight') { @@ -30,27 +27,8 @@ export default function(config, { components: pluginComponents, utilities: plugi } if (atRule.params === 'utilities') { - const utilities = generateModules(utilityModules, config.modules, config) - - if (config.options.important) { - utilities.walkDecls(decl => (decl.important = true)) - } - - const tailwindUtilityTree = postcss.root({ - nodes: utilities.nodes, - }) - - const pluginUtilityTree = postcss.root({ - nodes: pluginUtilities, - }) - - prefixTree(tailwindUtilityTree, config.options.prefix) - - tailwindUtilityTree.walk(node => (node.source = atRule.source)) - pluginUtilityTree.walk(node => (node.source = atRule.source)) - - atRule.before(tailwindUtilityTree) - atRule.before(pluginUtilityTree) + generatedUtilities.walk(node => (node.source = atRule.source)) + atRule.before(generatedUtilities) atRule.remove() } }) diff --git a/src/processTailwindFeatures.js b/src/processTailwindFeatures.js --- a/src/processTailwindFeatures.js +++ b/src/processTailwindFeatures.js @@ -6,18 +6,21 @@ import substituteVariantsAtRules from './lib/substituteVariantsAtRules' import substituteResponsiveAtRules from './lib/substituteResponsiveAtRules' import substituteScreenAtRules from './lib/substituteScreenAtRules' import substituteClassApplyAtRules from './lib/substituteClassApplyAtRules' + +import generateUtilities from './util/generateUtilities' import processPlugins from './util/processPlugins' export default function(lazyConfig) { const config = lazyConfig() - const plugins = processPlugins(config) + const processedPlugins = processPlugins(config) + const utilities = generateUtilities(config, processedPlugins.utilities) return postcss([ - substituteTailwindAtRules(config, plugins), + substituteTailwindAtRules(config, processedPlugins, utilities.clone()), evaluateTailwindFunctions(config), - substituteVariantsAtRules(config, plugins), + substituteVariantsAtRules(config, processedPlugins), substituteResponsiveAtRules(config), substituteScreenAtRules(config), - substituteClassApplyAtRules(config), + substituteClassApplyAtRules(config, utilities.clone()), ]) } diff --git a/src/util/generateUtilities.js b/src/util/generateUtilities.js new file mode 100644 --- /dev/null +++ b/src/util/generateUtilities.js @@ -0,0 +1,24 @@ +import _ from 'lodash' +import postcss from 'postcss' +import utilityModules from '../utilityModules' +import prefixTree from '../util/prefixTree' +import generateModules from '../util/generateModules' + +export default function(config, pluginUtilities) { + const utilities = generateModules(utilityModules, config.modules, config) + + if (config.options.important) { + utilities.walkDecls(decl => (decl.important = true)) + } + + const tailwindUtilityTree = postcss.root({ + nodes: utilities.nodes, + }) + + prefixTree(tailwindUtilityTree, config.options.prefix) + + return _.tap(postcss.root(), root => { + root.append(tailwindUtilityTree.nodes) + root.append(pluginUtilities) + }) +}
diff --git a/__tests__/applyAtRule.test.js b/__tests__/applyAtRule.test.js --- a/__tests__/applyAtRule.test.js +++ b/__tests__/applyAtRule.test.js @@ -1,8 +1,12 @@ import postcss from 'postcss' import plugin from '../src/lib/substituteClassApplyAtRules' +import generateUtilities from '../src/util/generateUtilities' +import defaultConfig from '../defaultConfig.stub.js' -function run(input, opts = {}) { - return postcss([plugin(opts)]).process(input, { from: undefined }) +const defaultUtilities = generateUtilities(defaultConfig, []) + +function run(input, config = defaultConfig, utilities = defaultUtilities) { + return postcss([plugin(config, utilities)]).process(input, { from: undefined }) } test("it copies a class's declarations into itself", () => { @@ -168,3 +172,23 @@ test('it does not match classes that have multiple rules', () => { expect(e).toMatchObject({ name: 'CssSyntaxError' }) }) }) + +test('you can apply utility classes that do not actually exist as long as they would exist if utilities were being generated', () => { + const input = ` + .foo { @apply .mt-4; } + ` + + const expected = ` + .foo { margin-top: 1rem; } + ` + + const config = { + ...defaultConfig, + experiments: { shadowLookup: true }, + } + + return run(input, config).then(result => { + expect(result.css).toEqual(expected) + expect(result.warnings().length).toBe(0) + }) +})
Consider not relying on previously defined mixin in file for "@apply" Currently `@apply` works by walking through all previously defined "mixins"[1] in the file before substituting the found ones, which constrains you to either only use one file, or to import all of your css in one place [2] before defining your custom utilities. It of course won't work with popular css-in-js solutions [3] simply because the css fragment using `@apply` has no knowledge of tailwind's utilities, yielding the dreaded `unable to find $SELECTOR` error. Importing them beforehand using `@tailwind utilities` everywhere is obviously not a solution because of duplication. An idea would be to: 1. Check if the "mixin" has been defined before in the file/fragment, as usual 2. **If none was found, try to get it from a global map of generated utilities** 3. Throw if both of these steps yield nothing --- [1] which are actually selectors, making me wonder why the mixin terminology was used [2] https://github.com/tailwindcss/tailwindcss/issues/53#issuecomment-341413622 [3] such as styled-component, emotionjs or even vue's "single file component" (https://github.com/tailwindcss/tailwindcss/issues/1#issuecomment-341918988) They all are processed by postcss under the hood
I tried using https://github.com/ben-eb/postcss-discard-duplicates to discard the duplicate code created by `@tailwind utilities;` but unfortunately it just did not work for me at all. Has anyone else been able to get it to work? The only other option would be to have the core include a "reverse parser", something that can take in a css class, and spit out a config key path. Probably not the easiest thing to do, but with it you could avoid including `@tailwind utilities;` all together when using `@apply` in something like a Vue single file component. Follow up: I was able to dedupe the rules using https://github.com/ChristianMurphy/postcss-combine-duplicated-selectors, so that is an option.
2018-07-11T16:00:30Z
0.6
tailwindlabs/tailwindcss
497
tailwindlabs__tailwindcss-497
[ "464" ]
62994fc022ef21c4db2f7e0b958eed10405fb447
diff --git a/src/lib/substituteResponsiveAtRules.js b/src/lib/substituteResponsiveAtRules.js --- a/src/lib/substituteResponsiveAtRules.js +++ b/src/lib/substituteResponsiveAtRules.js @@ -2,7 +2,7 @@ import _ from 'lodash' import postcss from 'postcss' import cloneNodes from '../util/cloneNodes' import buildMediaQuery from '../util/buildMediaQuery' -import buildClassVariant from '../util/buildClassVariant' +import buildSelectorVariant from '../util/buildSelectorVariant' export default function(config) { return function(css) { @@ -28,7 +28,9 @@ export default function(config) { responsiveRules.map(rule => { const cloned = rule.clone() cloned.selectors = _.map(rule.selectors, selector => - buildClassVariant(selector, screen, separator) + buildSelectorVariant(selector, screen, separator, message => { + throw rule.error(message) + }) ) return cloned }) diff --git a/src/lib/substituteVariantsAtRules.js b/src/lib/substituteVariantsAtRules.js --- a/src/lib/substituteVariantsAtRules.js +++ b/src/lib/substituteVariantsAtRules.js @@ -1,9 +1,9 @@ import _ from 'lodash' import postcss from 'postcss' -import buildClassVariant from '../util/buildClassVariant' +import buildSelectorVariant from '../util/buildSelectorVariant' function buildPseudoClassVariant(selector, pseudoClass, separator) { - return `${buildClassVariant(selector, pseudoClass, separator)}:${pseudoClass}` + return `${buildSelectorVariant(selector, pseudoClass, separator)}:${pseudoClass}` } function generatePseudoClassVariant(pseudoClass) { @@ -23,7 +23,11 @@ const variantGenerators = { const cloned = container.clone() cloned.walkRules(rule => { - rule.selector = `.group:hover ${buildClassVariant(rule.selector, 'group-hover', separator)}` + rule.selector = `.group:hover ${buildSelectorVariant( + rule.selector, + 'group-hover', + separator + )}` }) container.before(cloned.nodes) diff --git a/src/util/buildClassVariant.js b/src/util/buildClassVariant.js deleted file mode 100644 --- a/src/util/buildClassVariant.js +++ /dev/null @@ -1,5 +0,0 @@ -import escapeClassName from './escapeClassName' - -export default function buildClassVariant(className, variantName, separator) { - return `.${variantName}${escapeClassName(separator)}${className.slice(1)}` -} diff --git a/src/util/buildSelectorVariant.js b/src/util/buildSelectorVariant.js new file mode 100644 --- /dev/null +++ b/src/util/buildSelectorVariant.js @@ -0,0 +1,16 @@ +import escapeClassName from './escapeClassName' +import parser from 'postcss-selector-parser' +import tap from 'lodash/tap' + +export default function buildSelectorVariant(selector, variantName, separator, onError = () => {}) { + return parser(selectors => { + tap(selectors.first.filter(({ type }) => type === 'class').pop(), classSelector => { + if (classSelector === undefined) { + onError('Variant cannot be generated because selector contains no classes.') + return + } + + classSelector.value = `${variantName}${escapeClassName(separator)}${classSelector.value}` + }) + }).processSync(selector) +}
diff --git a/__tests__/responsiveAtRule.test.js b/__tests__/responsiveAtRule.test.js new file mode 100644 --- /dev/null +++ b/__tests__/responsiveAtRule.test.js @@ -0,0 +1,245 @@ +import postcss from 'postcss' +import plugin from '../src/lib/substituteResponsiveAtRules' +import config from '../defaultConfig.stub.js' + +function run(input, opts = () => config) { + return postcss([plugin(opts)]).process(input, { from: undefined }) +} + +test('it can generate responsive variants', () => { + const input = ` + @responsive { + .banana { color: yellow; } + .chocolate { color: brown; } + } + ` + + const output = ` + .banana { color: yellow; } + .chocolate { color: brown; } + @media (min-width: 500px) { + .sm\\:banana { color: yellow; } + .sm\\:chocolate { color: brown; } + } + @media (min-width: 750px) { + .md\\:banana { color: yellow; } + .md\\:chocolate { color: brown; } + } + @media (min-width: 1000px) { + .lg\\:banana { color: yellow; } + .lg\\:chocolate { color: brown; } + } + ` + + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: ':', + }, + })).then(result => { + expect(result.css).toMatchCss(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('it can generate responsive variants with a custom separator', () => { + const input = ` + @responsive { + .banana { color: yellow; } + .chocolate { color: brown; } + } + ` + + const output = ` + .banana { color: yellow; } + .chocolate { color: brown; } + @media (min-width: 500px) { + .sm__banana { color: yellow; } + .sm__chocolate { color: brown; } + } + @media (min-width: 750px) { + .md__banana { color: yellow; } + .md__chocolate { color: brown; } + } + @media (min-width: 1000px) { + .lg__banana { color: yellow; } + .lg__chocolate { color: brown; } + } + ` + + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: '__', + }, + })).then(result => { + expect(result.css).toMatchCss(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('responsive variants are grouped', () => { + const input = ` + @responsive { + .banana { color: yellow; } + } + + .apple { color: red; } + + @responsive { + .chocolate { color: brown; } + } + ` + + const output = ` + .banana { color: yellow; } + .apple { color: red; } + .chocolate { color: brown; } + @media (min-width: 500px) { + .sm\\:banana { color: yellow; } + .sm\\:chocolate { color: brown; } + } + @media (min-width: 750px) { + .md\\:banana { color: yellow; } + .md\\:chocolate { color: brown; } + } + @media (min-width: 1000px) { + .lg\\:banana { color: yellow; } + .lg\\:chocolate { color: brown; } + } + ` + + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: ':', + }, + })).then(result => { + expect(result.css).toMatchCss(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('screen prefix is only applied to the last class in a selector', () => { + const input = ` + @responsive { + .banana li * .sandwich #foo > div { color: yellow; } + } + ` + + const output = ` + .banana li * .sandwich #foo > div { color: yellow; } + @media (min-width: 500px) { + .banana li * .sm\\:sandwich #foo > div { color: yellow; } + } + @media (min-width: 750px) { + .banana li * .md\\:sandwich #foo > div { color: yellow; } + } + @media (min-width: 1000px) { + .banana li * .lg\\:sandwich #foo > div { color: yellow; } + } + ` + + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: ':', + }, + })).then(result => { + expect(result.css).toMatchCss(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('responsive variants are generated for all selectors in a rule', () => { + const input = ` + @responsive { + .foo, .bar { color: yellow; } + } + ` + + const output = ` + .foo, .bar { color: yellow; } + @media (min-width: 500px) { + .sm\\:foo, .sm\\:bar { color: yellow; } + } + @media (min-width: 750px) { + .md\\:foo, .md\\:bar { color: yellow; } + } + @media (min-width: 1000px) { + .lg\\:foo, .lg\\:bar { color: yellow; } + } + ` + + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: ':', + }, + })).then(result => { + expect(result.css).toMatchCss(output) + expect(result.warnings().length).toBe(0) + }) +}) + +test('selectors with no classes cannot be made responsive', () => { + const input = ` + @responsive { + div { color: yellow; } + } + ` + expect.assertions(1) + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: ':', + }, + })).catch(e => { + expect(e).toMatchObject({ name: 'CssSyntaxError' }) + }) +}) + +test('all selectors in a rule must contain classes', () => { + const input = ` + @responsive { + .foo, div { color: yellow; } + } + ` + expect.assertions(1) + return run(input, () => ({ + screens: { + sm: '500px', + md: '750px', + lg: '1000px', + }, + options: { + separator: ':', + }, + })).catch(e => { + expect(e).toMatchObject({ name: 'CssSyntaxError' }) + }) +})
State Variant with Responsive Prefix does not work with group-hover ## Steps to reproduce ### Create element Create an element with: ```html <div class="group bg-red p-8"> <div class="hidden md:group-hover:block bg-blue p-4"> Only visible when group is hovered </div> </div> ``` ### Enable `group-hover` state variant Enable the `group-hover` state variant to the `display` module and compile ```javascript module.exports = { // ... modules: { // ... display: ['responsive', 'group-hover'], // ... } // ... }l ``` ### Test Test. It won't work. It only works without the responsive prefix: `group-hover:block`
*Copying this over from duplicate issue #468 so I can close that one.* --- Right now if you have `responsive` and `group-hover` variants enabled for a module, you'll get selectors like: ``` @media (min-width: 768px) { .md\:group:hover .group-hover\:bg-blue { background-color: blue } } ``` I think I expect this instead: ``` @media (min-width: 768px) { .group:hover .md\:group-hover\:bg-blue { background-color: blue } } ``` ...or maybe even this: ``` @media (min-width: 768px) { .md\:group:hover .md\:group-hover\:bg-blue { background-color: blue } } ``` This turns out to be really hard to solve based on how we currently generate responsive variants — it's a second step later in the build after generating regular variants. I'm not sure what the best solution is here, but it reminded me that I've been thinking about making the "responsive + state" variants more explicit, so I wanted to document that idea for future reference. Basically, instead of this automatically generating responsive hover utilities: ``` backgroundColors: ['responsive', 'hover'], ``` ...we'd add a third variant you could use to generate them explicitly: ``` backgroundColors: ['responsive', 'hover', 'responsive-hover'], ``` This should give us more control over how responsive variants are generated for each existing variant type, making it easier to solve the `responsive-group-hover` problem. It would be a breaking change but not too annoying to update for; you'd just need to update the variant lists in the `modules` section of your config to add all of the new explicit variants. I'm thinking I'd make it the job of each variant to generate the media query + completed class name, and add a new step in the build where all of the media queries get grouped, rather than generating the media queries and grouping them in the same step. That would give each variant generator complete control over how the responsive selectors are generated. I'll have to think through if it makes sense to group all media queries (even those written by the user and not generated by Tailwind); I'm thinking "no" but if that's the case I'll need to come up with some sort of special internal marker we can use to mark the media queries that should be grouped.
2018-06-20T16:25:43Z
0.5
tailwindlabs/tailwindcss
418
tailwindlabs__tailwindcss-418
[ "256" ]
fa0e06c2dd5182ab27311f4526fb083afaea1682
diff --git a/defaultConfig.stub.js b/defaultConfig.stub.js --- a/defaultConfig.stub.js +++ b/defaultConfig.stub.js @@ -864,15 +864,18 @@ module.exports = { | Plugins https://tailwindcss.com/docs/plugins |----------------------------------------------------------------------------- | - | Here is where you can register any additional plugins you'd like to use in - | your project. + | Here is where you can register any plugins you'd like to use in your + | project. Tailwind's built-in `container` plugin is enabled by default to + | give you a Bootstrap-style responsive container component out of the box. | | Be sure to view the complete plugin documentation to learn more about how | the plugin system works. | */ - plugins: [], + plugins: [ + require('./plugins/container')(), + ], /* diff --git a/plugins/container.js b/plugins/container.js new file mode 100644 --- /dev/null +++ b/plugins/container.js @@ -0,0 +1 @@ +module.exports = require('../lib/plugins/container') diff --git a/src/cli.js b/src/cli.js --- a/src/cli.js +++ b/src/cli.js @@ -54,6 +54,10 @@ program const output = fs.readFileSync(path.resolve(__dirname, '../defaultConfig.stub.js'), 'utf8') fs.outputFileSync(destination, output.replace('// let defaultConfig', 'let defaultConfig')) + fs.outputFileSync( + destination, + output.replace("require('./plugins/container')", "require('tailwindcss/plugins/container')") + ) console.log(`Generated Tailwind config: ${destination}`) process.exit() }) diff --git a/src/lib/substituteTailwindAtRules.js b/src/lib/substituteTailwindAtRules.js --- a/src/lib/substituteTailwindAtRules.js +++ b/src/lib/substituteTailwindAtRules.js @@ -1,6 +1,5 @@ import fs from 'fs' import postcss from 'postcss' -import container from '../generators/container' import utilityModules from '../utilityModules' import prefixTree from '../util/prefixTree' import generateModules from '../util/generateModules' @@ -39,7 +38,7 @@ export default function(config) { } const tailwindUtilityTree = postcss.root({ - nodes: [...container(unwrappedConfig), ...utilities.nodes], + nodes: utilities.nodes, }) const pluginUtilityTree = postcss.root({ diff --git a/src/generators/container.js b/src/plugins/container.js similarity index 52% rename from src/generators/container.js rename to src/plugins/container.js --- a/src/generators/container.js +++ b/src/plugins/container.js @@ -1,7 +1,5 @@ /* eslint-disable no-shadow */ import _ from 'lodash' -import postcss from 'postcss' -import defineClass from '../util/defineClass' function extractMinWidths(breakpoints) { return _.flatMap(breakpoints, breakpoints => { @@ -24,26 +22,29 @@ function extractMinWidths(breakpoints) { }) } -export default function({ screens }) { - const minWidths = extractMinWidths(screens) +module.exports = function(options) { + return function({ addComponents, config }) { + const screens = _.get(options, 'screens', config('screens')) - const atRules = _.map(minWidths, minWidth => { - const atRule = postcss.atRule({ - name: 'media', - params: `(min-width: ${minWidth})`, + const minWidths = extractMinWidths(screens) + + const atRules = _.map(minWidths, minWidth => { + return { + [`@media (min-width: ${minWidth})`]: { + '.container': { + 'max-width': minWidth, + }, + }, + } }) - atRule.append( - defineClass('container', { - 'max-width': minWidth, - }) - ) - return atRule - }) - return [ - defineClass('container', { - width: '100%', - }), - ...atRules, - ] + addComponents([ + { + '.container': { + width: '100%', + }, + }, + ...atRules, + ]) + } }
diff --git a/__tests__/fixtures/tailwind-input.css b/__tests__/fixtures/tailwind-input.css --- a/__tests__/fixtures/tailwind-input.css +++ b/__tests__/fixtures/tailwind-input.css @@ -1,5 +1,7 @@ @tailwind preflight; +@tailwind components; + @tailwind utilities; @responsive {
Disable Container module Hi, Can I ignore the container class output in tailwind.js? Thanks, Gabor
Right now it's not possible to disable the container module but we're planning to make it possible soon. In the mean time, just choose a different class name for your own container and don't use the `.container` class 👍 Thanks @adamwathan
2018-03-12T17:30:27Z
0.4
tailwindlabs/tailwindcss
255
tailwindlabs__tailwindcss-255
[ "247" ]
cbe89ea6eed75eea4889d2178a940041c316073b
diff --git a/defaultConfig.stub.js b/defaultConfig.stub.js --- a/defaultConfig.stub.js +++ b/defaultConfig.stub.js @@ -775,6 +775,7 @@ module.exports = { appearance: ['responsive'], backgroundColors: ['responsive', 'hover'], backgroundPosition: ['responsive'], + backgroundRepeat: ['responsive'], backgroundSize: ['responsive'], borderColors: ['responsive', 'hover'], borderRadius: ['responsive'], diff --git a/src/generators/backgroundRepeat.js b/src/generators/backgroundRepeat.js new file mode 100644 --- /dev/null +++ b/src/generators/backgroundRepeat.js @@ -0,0 +1,10 @@ +import defineClasses from '../util/defineClasses' + +export default function() { + return defineClasses({ + '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' }, + }) +} diff --git a/src/utilityModules.js b/src/utilityModules.js --- a/src/utilityModules.js +++ b/src/utilityModules.js @@ -2,6 +2,7 @@ import lists from './generators/lists' import appearance from './generators/appearance' import backgroundColors from './generators/backgroundColors' import backgroundPosition from './generators/backgroundPosition' +import backgroundRepeat from './generators/backgroundRepeat' import backgroundSize from './generators/backgroundSize' import borderColors from './generators/borderColors' import borderRadius from './generators/borderRadius' @@ -45,6 +46,7 @@ export default [ { name: 'appearance', generator: appearance }, { name: 'backgroundColors', generator: backgroundColors }, { name: 'backgroundPosition', generator: backgroundPosition }, + { name: 'backgroundRepeat', generator: backgroundRepeat }, { name: 'backgroundSize', generator: backgroundSize }, { name: 'borderColors', generator: borderColors }, { name: 'borderRadius', generator: borderRadius },
diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -1235,6 +1235,22 @@ button, background-position: top; } +.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-cover { background-size: cover; } @@ -5078,6 +5094,22 @@ button, background-position: top; } + .sm\:bg-repeat { + background-repeat: repeat; + } + + .sm\:bg-no-repeat { + background-repeat: no-repeat; + } + + .sm\:bg-repeat-x { + background-repeat: repeat-x; + } + + .sm\:bg-repeat-y { + background-repeat: repeat-y; + } + .sm\:bg-cover { background-size: cover; } @@ -8922,6 +8954,22 @@ button, background-position: top; } + .md\:bg-repeat { + background-repeat: repeat; + } + + .md\:bg-no-repeat { + background-repeat: no-repeat; + } + + .md\:bg-repeat-x { + background-repeat: repeat-x; + } + + .md\:bg-repeat-y { + background-repeat: repeat-y; + } + .md\:bg-cover { background-size: cover; } @@ -12766,6 +12814,22 @@ button, background-position: top; } + .lg\:bg-repeat { + background-repeat: repeat; + } + + .lg\:bg-no-repeat { + background-repeat: no-repeat; + } + + .lg\:bg-repeat-x { + background-repeat: repeat-x; + } + + .lg\:bg-repeat-y { + background-repeat: repeat-y; + } + .lg\:bg-cover { background-size: cover; } @@ -16610,6 +16674,22 @@ button, background-position: top; } + .xl\:bg-repeat { + background-repeat: repeat; + } + + .xl\:bg-no-repeat { + background-repeat: no-repeat; + } + + .xl\:bg-repeat-x { + background-repeat: repeat-x; + } + + .xl\:bg-repeat-y { + background-repeat: repeat-y; + } + .xl\:bg-cover { background-size: cover; }
Utility Request: background-repeat I believe the background-repeat utility is missing. Any specific reason why it is not included?
No specific reason, just haven't gotten around to discussing it yet. What values do you think are smart to include by default? I'm thinking at least `bg-repeat` and `bg-no-repeat` but not sure if the others are commonly used enough to justify including by default. I would like at least `bg-repeat-x` and `bg-repeat-y`. I personally don't care about the `space` and `round` values and don't think they're commonly used. Well, for starters it is a fail safe when used with `background-position: center`. Also in practise, a quick way to always make your content responsive for all screen sizes were `background: no-repeat center / cover`, which translates to: ``` background-repeat: no-repeat; background-position: center; background-size: cover; // or contain ``` So I think we still need this utility. I'll leave the class syntax for you to decide since I haven't got around to fully understand Tailwind's syntax standards yet. The implicit value is repeat so bg-repeat its not so useful. In a situation when you dynamically want to change a background (bg-no-repeat) into a repeat you just remove that class. I agree with @benface for the `bg-repeat-x` and `bg-repeat-y` and ofc `bg-no-repeat` its a must in my opinion > The implicit value is repeat so bg-repeat its not so useful. Actually this means it's mandatory to include if we have any background-repeat utilities, otherwise there is no way to get back to a default state at larger screen sizes. So I think the four we should add are: ``` bg-repeat bg-no-repeat bg-repeat-x bg-repeat-y ``` Happy to accept a PR for getting this started, otherwise I can start something if I have time over the next few days. @pxwee5 as you initiated it do u have time in making that PR? i would call the generator `backgroundRepeat.js`. @adamwathan what do you think ? @sorinr @pxwee5 PR is on it's way 🙂😉
2017-11-28T15:36:46Z
0.2
tailwindlabs/tailwindcss
77
tailwindlabs__tailwindcss-77
[ "55" ]
edb5c045f4cf81f5a8640ab9652cd67f21ab82b3
diff --git a/docs/tailwind.js b/docs/tailwind.js --- a/docs/tailwind.js +++ b/docs/tailwind.js @@ -1,4 +1,4 @@ -var config = require('../defaultConfig') +var config = require('../lib/index').defaultConfig() config.colors = { ...config.colors, diff --git a/src/index.js b/src/index.js --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,7 @@ import _ from 'lodash' import postcss from 'postcss' import stylefmt from 'stylefmt' +import registerConfigAsDependency from './lib/registerConfigAsDependency' import substitutePreflightAtRule from './lib/substitutePreflightAtRule' import evaluateTailwindFunctions from './lib/evaluateTailwindFunctions' import generateUtilities from './lib/generateUtilities' @@ -15,23 +16,30 @@ import substituteScreenAtRules from './lib/substituteScreenAtRules' import substituteClassApplyAtRules from './lib/substituteClassApplyAtRules' const plugin = postcss.plugin('tailwind', (config) => { - if (_.isUndefined(config)) { - config = require('../defaultConfig') + const plugins = [] + + if (! _.isUndefined(config)) { + plugins.push(registerConfigAsDependency(path.resolve(config))) } - if (_.isString(config)) { - config = require(path.resolve(config)) + const lazyConfig = () => { + if (_.isUndefined(config)) { + return require('../defaultConfig') + } + + delete require.cache[require.resolve(path.resolve(config))] + return require(path.resolve(config)) } - return postcss([ - substitutePreflightAtRule(config), - evaluateTailwindFunctions(config), - generateUtilities(config), - substituteHoverableAtRules(config), - substituteFocusableAtRules(config), - substituteResponsiveAtRules(config), - substituteScreenAtRules(config), - substituteClassApplyAtRules(config), + return postcss(...plugins, ...[ + substitutePreflightAtRule(lazyConfig), + evaluateTailwindFunctions(lazyConfig), + generateUtilities(lazyConfig), + substituteHoverableAtRules(lazyConfig), + substituteFocusableAtRules(lazyConfig), + substituteResponsiveAtRules(lazyConfig), + substituteScreenAtRules(lazyConfig), + substituteClassApplyAtRules(lazyConfig), stylefmt, ]) }) diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -1,7 +1,9 @@ import _ from 'lodash' import functions from 'postcss-functions' -export default function(options) { +export default function(config) { + const options = config() + return functions({ functions: { config: function (path) { diff --git a/src/lib/generateUtilities.js b/src/lib/generateUtilities.js --- a/src/lib/generateUtilities.js +++ b/src/lib/generateUtilities.js @@ -37,8 +37,10 @@ import verticalAlign from '../generators/verticalAlign' import visibility from '../generators/visibility' import zIndex from '../generators/zIndex' -export default function(options) { +export default function(config) { return function(css) { + const options = config() + css.walkAtRules('tailwind', atRule => { if (atRule.params === 'utilities') { const utilities = _.flatten([ diff --git a/src/lib/registerConfigAsDependency.js b/src/lib/registerConfigAsDependency.js new file mode 100644 --- /dev/null +++ b/src/lib/registerConfigAsDependency.js @@ -0,0 +1,15 @@ +import fs from 'fs' + +export default function(configFile) { + if (! fs.existsSync(configFile)) { + throw new Error(`Specified Tailwind config file "${configFile}" doesn't exist.`) + } + + return function (css, opts) { + opts.messages = [{ + type: 'dependency', + file: configFile, + parent: css.source.input.file, + }] + } +} diff --git a/src/lib/substituteClassApplyAtRules.js b/src/lib/substituteClassApplyAtRules.js --- a/src/lib/substituteClassApplyAtRules.js +++ b/src/lib/substituteClassApplyAtRules.js @@ -9,8 +9,9 @@ function normalizeClassNames(classNames) { }) } -export default postcss.plugin('tailwind-apply', function(css) { - return function(css) { +export default function(config) { + return function (css) { + const options = config() css.walkRules(function(rule) { rule.walkAtRules('apply', atRule => { const mixins = normalizeClassNames(postcss.list.space(atRule.params)) @@ -42,4 +43,4 @@ export default postcss.plugin('tailwind-apply', function(css) { }) }) } -}) +} diff --git a/src/lib/substituteFocusableAtRules.js b/src/lib/substituteFocusableAtRules.js --- a/src/lib/substituteFocusableAtRules.js +++ b/src/lib/substituteFocusableAtRules.js @@ -2,8 +2,10 @@ import _ from 'lodash' import postcss from 'postcss' import cloneNodes from '../util/cloneNodes' -export default function(options) { - return function(css) { +export default function(config) { + return function (css) { + const options = config() + css.walkAtRules('focusable', atRule => { atRule.walkRules(rule => { diff --git a/src/lib/substituteHoverableAtRules.js b/src/lib/substituteHoverableAtRules.js --- a/src/lib/substituteHoverableAtRules.js +++ b/src/lib/substituteHoverableAtRules.js @@ -2,8 +2,10 @@ import _ from 'lodash' import postcss from 'postcss' import cloneNodes from '../util/cloneNodes' -export default function(options) { - return function(css) { +export default function(config) { + return function (css) { + const options = config() + css.walkAtRules('hoverable', atRule => { atRule.walkRules(rule => { diff --git a/src/lib/substitutePreflightAtRule.js b/src/lib/substitutePreflightAtRule.js --- a/src/lib/substitutePreflightAtRule.js +++ b/src/lib/substitutePreflightAtRule.js @@ -1,8 +1,10 @@ import fs from 'fs' import postcss from 'postcss' -export default function(options) { +export default function(config) { return function (css) { + const options = config() + css.walkAtRules('tailwind', atRule => { if (atRule.params === 'preflight') { atRule.before(postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8'))) diff --git a/src/lib/substituteResponsiveAtRules.js b/src/lib/substituteResponsiveAtRules.js --- a/src/lib/substituteResponsiveAtRules.js +++ b/src/lib/substituteResponsiveAtRules.js @@ -3,8 +3,10 @@ import postcss from 'postcss' import cloneNodes from '../util/cloneNodes' import buildMediaQuery from '../util/buildMediaQuery' -export default function({ screens }) { - return function(css) { + +export default function(config) { + return function (css) { + const screens = config().screens const rules = [] css.walkAtRules('responsive', atRule => { diff --git a/src/lib/substituteScreenAtRules.js b/src/lib/substituteScreenAtRules.js --- a/src/lib/substituteScreenAtRules.js +++ b/src/lib/substituteScreenAtRules.js @@ -3,8 +3,9 @@ import postcss from 'postcss' import cloneNodes from '../util/cloneNodes' import buildMediaQuery from '../util/buildMediaQuery' -export default function(options) { +export default function(config) { return function(css) { + const options = config() const rules = [] css.walkAtRules('screen', atRule => {
diff --git a/__tests__/applyAtRule.test.js b/__tests__/applyAtRule.test.js --- a/__tests__/applyAtRule.test.js +++ b/__tests__/applyAtRule.test.js @@ -1,14 +1,14 @@ import postcss from 'postcss' import plugin from '../src/lib/substituteClassApplyAtRules' -function run(input, opts) { +function run(input, opts = () => {}) { return postcss([plugin(opts)]).process(input) } test("it copies a class's declarations into itself", () => { const output = '.a { color: red; } .b { color: red; }' - return run('.a { color: red; } .b { @apply .a; }', {}).then(result => { + return run('.a { color: red; } .b { @apply .a; }').then(result => { expect(result.css).toEqual(output) expect(result.warnings().length).toBe(0) }) @@ -38,16 +38,15 @@ test("it doesn't copy a media query definition into itself", () => { .b { @apply .a; - }`, - {} - ).then(result => { + }`) + .then(result => { expect(result.css).toEqual(output) expect(result.warnings().length).toBe(0) }) }) test('it fails if the class does not exist', () => { - run('.b { @apply .a; }', {}).catch(error => { + run('.b { @apply .a; }').catch(error => { expect(error.reason).toEqual('No .a class found.') }) }) diff --git a/__tests__/focusableAtRule.test.js b/__tests__/focusableAtRule.test.js --- a/__tests__/focusableAtRule.test.js +++ b/__tests__/focusableAtRule.test.js @@ -1,7 +1,7 @@ import postcss from 'postcss' import plugin from '../src/lib/substituteFocusableAtRules' -function run(input, opts = {}) { +function run(input, opts = () => {}) { return postcss([plugin(opts)]).process(input) } @@ -18,7 +18,7 @@ test("it adds a focusable variant to each nested class definition", () => { .chocolate, .focus\\:chocolate:focus { color: brown; } ` - return run(input, {}).then(result => { + return run(input).then(result => { expect(result.css).toEqual(output) expect(result.warnings().length).toBe(0) }) diff --git a/__tests__/hoverableAtRule.test.js b/__tests__/hoverableAtRule.test.js --- a/__tests__/hoverableAtRule.test.js +++ b/__tests__/hoverableAtRule.test.js @@ -1,7 +1,7 @@ import postcss from 'postcss' import plugin from '../src/lib/substituteHoverableAtRules' -function run(input, opts = {}) { +function run(input, opts = () => {}) { return postcss([plugin(opts)]).process(input) } @@ -18,7 +18,7 @@ test("it adds a hoverable variant to each nested class definition", () => { .chocolate, .hover\\:chocolate:hover { color: brown; } ` - return run(input, {}).then(result => { + return run(input).then(result => { expect(result.css).toEqual(output) expect(result.warnings().length).toBe(0) })
Triggering rebuild on config.js change Enjoying working with the release, good work! I'd like to propose triggering a rebuild when the config file (`tailwind-config.js`) is updated if a build tool is being used – ie. webpack. Basically in the same way as a new build is triggered when you update a css/sass/js file. It would mean that modifications can be made to the config file without having to halt and restart `npm watch` for instance.
I do not believe it's possible as the config is loaded into memory on the webpack side, and webpack doesn't watch it's own config files as it can't restart itself. How about an abstraction that watches for Laravel Mix (in my case) config changes or tailwind changes and restarts the watch command? This is a super annoying problem and is hard to solve nicely for the reasons @joshmanders mentioned. The best I've figured is to use [chokidar-cli](https://github.com/kimmobrunfeldt/chokidar-cli) to watch the config and restart `watch` when the config file changes. Here's an example command you can add to your `package.json` scripts: ``` "watch-tailwind": "chokidar 'tailwind.js' --initial=true -c 'npm run watch'", ``` You'll have to install chokidar-cli first to get that working: ``` npm install chokidar-cli --save-dev ``` Changes to your config will result in much slower rebuilds than changes to just your CSS since it has to restart the entire watcher, but it's the best I've come up with so far. I've also had a few weird situations where it feels like it's building stale versions of things in weird ways and I've had to restart the command manually, but I can't reproduce it reliably and haven't noticed any patterns. In general, I would recommend trying to avoid editing your config file; ideally you want your config file figured out and more or less "done" at some point, it should be a super low churn file. The workflow shouldn't be "go to config, add utility size I need, go to DOM, add new class"; you want everything already there, otherwise you're just writing CSS again. One Tailwind anti-pattern that I'd like to warn against in the documentation is starting with a really small/light config file and adding values as you need them. This totally kills the workflow of just designing in the browser with a comprehensive set of utilities, all in the name of prematurely trying to keep your CSS small. It's better to have more than you need and never have to edit that file and introduce new values into your CSS, then optimize for filesize later IMO. Even then, Tailwind out of the box with a million fucking colors and 5 breakpoints is only 27kb minified and gzipped, which is smaller than just about every image you'll ever serve 😄 I'm going to close this as an issue just because there's really nothing we can do about it; we don't have our own watching build tool or anything, we're just the CSS framework. Happy to keep discussing this though, and we can definitely add some stuff to the documentation if we can come up with some good recommended approaches for people using different tools. > It's better to have more than you need and never have to edit that file and introduce new values into your CSS, then optimize for filesize later IMO. Even then, Tailwind out of the box with a million fucking colors and 5 breakpoints is only 27kb minified and gzipped, which is smaller than just about every image you'll ever serve 😄 This right here is why I was so excited for tailwind. Tachyons naming didn't really sit well with me. I really enjoy your naming of every thing having the same name, just prefixed with a size, like `tablet:bg-blue` instead of something like `bg-sm-blue` or something. > In general, I would recommend trying to avoid editing your config file; ideally you want your config file figured out and more or less "done" at some point, it should be a super low churn file. The workflow shouldn't be "go to config, add utility size I need, go to DOM, add new class"; you want everything already there, otherwise you're just writing CSS again. I completely agree, having the ability without reducing the rebuild time would be pretty handy though. Happy to continue the discussion. Closing the issue makes sense. For Webpack (with postcss-loader), the config file can be added as a dependency to the messages array. postcss-loader will then add this to Webpack via `addDependency` ([for reference](https://webpack.github.io/docs/loaders.html#adddependency)). I'm doing something similar to the below in another project: ```javascript module.exports = postcss.plugin('loadconfig', function (configFile) { return function (css, opts) { if (fs.existsSync(configFile)) { opts.messages = [{ type: 'dependency', file: configFile, parent: css.source.input.file, }]; } }); } }); ``` This will trigger a rebuild if the config file is updated/changed in the exact same manner as a sass/css/js file. I've not noticed any real performance hits in rebuilds with this approach in the past. I haven't attempted an implementation with gulp though. Normally you specify the files you want watch for changes and the subsequent behaviours manually. Happy to investigate further though. In the meantime I can create a fork for testing the above with webpack (which will work with laravel mix @m1guelpf)? @davidianbonner Oh wow that's great news! I had thought this was a lost cause from a pure Webpack point of view. So I've got things rebuilding now whenever the config changes, but the rebuilds don't seem to take into account the new config 🤔 So for example if I add a new color and save the config file, I can see Webpack retriggering in the terminal, but the CSS output doesn't actually contain the new color. Going to keep hacking on it and try a few things, but if you've got any ideas I'd love to heard them. I'm a complete Webpack novice, so lots of trial and error at the moment, haha... Alright so I've actually got this figured it out and it was a change needed in Tailwind! Going to PR a solution for this soon and probably get it out in a release today.
2017-11-03T13:55:45Z
0.1
tailwindlabs/tailwindcss
82
tailwindlabs__tailwindcss-82
[ "75" ]
5c585f844ec1675b289c6f7f332cfc211dd8a1ff
diff --git a/src/generators/spacing.js b/src/generators/spacing.js --- a/src/generators/spacing.js +++ b/src/generators/spacing.js @@ -98,9 +98,15 @@ export default function ({ padding, margin, negativeMargin }) { definePadding(padding), defineMargin(margin), defineClasses({ + 'mt-auto': { + 'margin-top': 'auto', + }, 'mr-auto': { 'margin-right': 'auto', }, + 'mb-auto': { + 'margin-bottom': 'auto', + }, 'ml-auto': { 'margin-left': 'auto', }, @@ -108,6 +114,13 @@ export default function ({ padding, margin, negativeMargin }) { 'margin-left': 'auto', 'margin-right': 'auto', }, + 'my-auto': { + 'margin-top': 'auto', + 'margin-bottom': 'auto', + }, + 'm-auto': { + 'margin': 'auto', + }, }), defineNegativeMargin(negativeMargin), ])
diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -2982,10 +2982,18 @@ button, margin: 1px; } +.mt-auto { + margin-top: auto; +} + .mr-auto { margin-right: auto; } +.mb-auto { + margin-bottom: auto; +} + .ml-auto { margin-left: auto; } @@ -2995,6 +3003,15 @@ button, margin-right: auto; } +.my-auto { + margin-top: auto; + margin-bottom: auto; +} + +.m-auto { + margin: auto; +} + .-mt-0 { margin-top: 0; } @@ -5925,10 +5942,18 @@ button, margin: 1px; } + .sm\:mt-auto { + margin-top: auto; + } + .sm\:mr-auto { margin-right: auto; } + .sm\:mb-auto { + margin-bottom: auto; + } + .sm\:ml-auto { margin-left: auto; } @@ -5938,6 +5963,15 @@ button, margin-right: auto; } + .sm\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .sm\:m-auto { + margin: auto; + } + .sm\:-mt-0 { margin-top: 0; } @@ -8869,10 +8903,18 @@ button, margin: 1px; } + .md\:mt-auto { + margin-top: auto; + } + .md\:mr-auto { margin-right: auto; } + .md\:mb-auto { + margin-bottom: auto; + } + .md\:ml-auto { margin-left: auto; } @@ -8882,6 +8924,15 @@ button, margin-right: auto; } + .md\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .md\:m-auto { + margin: auto; + } + .md\:-mt-0 { margin-top: 0; } @@ -11813,10 +11864,18 @@ button, margin: 1px; } + .lg\:mt-auto { + margin-top: auto; + } + .lg\:mr-auto { margin-right: auto; } + .lg\:mb-auto { + margin-bottom: auto; + } + .lg\:ml-auto { margin-left: auto; } @@ -11826,6 +11885,15 @@ button, margin-right: auto; } + .lg\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .lg\:m-auto { + margin: auto; + } + .lg\:-mt-0 { margin-top: 0; } @@ -14757,10 +14825,18 @@ button, margin: 1px; } + .xl\:mt-auto { + margin-top: auto; + } + .xl\:mr-auto { margin-right: auto; } + .xl\:mb-auto { + margin-bottom: auto; + } + .xl\:ml-auto { margin-left: auto; } @@ -14770,6 +14846,15 @@ button, margin-right: auto; } + .xl\:my-auto { + margin-top: auto; + margin-bottom: auto; + } + + .xl\:m-auto { + margin: auto; + } + .xl\:-mt-0 { margin-top: 0; }
Add my-auto Hello. Adding "auto" suffix to margin vertical utilites can be usefull with flexbox: ```html <div class="h-half bg-grey-lighter flex"> <div class="ml-auto flex flex-col justify-end p-12 text-right"> <h2 class="my-auto text-5xl font-extrabold uppercase">Centered on rest block</h2> <a href="#" class="ml-auto bg-brand text-white w-64 py-3 no-underline text-center font-sans font-medium tracking-wide rounded-xl">Some button text</a> </div> </div> ``` How it's currently looks ![image](https://user-images.githubusercontent.com/2044754/32375348-1184e85a-c0c3-11e7-8300-a011e59ba607.png) How I'm expected to be ![image](https://user-images.githubusercontent.com/2044754/32375374-29b06774-c0c3-11e7-9041-88102d1adb6f.png)
This is super interesting and is the first time I've ever seen vertical margins of `auto` do anything at all 😄 I think what we're going to do is add this to the core utility set hardcoded like the horizontal auto variations for now, and then in the next breaking release (`0.2.0`) we'll move all of it out to the config, so you'll just have an `'auto': 'auto'` value in your Tailwind config file under margins. In the mean time don't forget it's incredibly easy to add these to your own project: ```css @tailwind preflight; @responsive { .mt-auto { margin-top: auto; } .mb-auto { margin-bottom: auto; } .my-auto { @apply .mt-auto .mb-auto; } } @tailwind utilities; ```
2017-11-03T15:21:16Z
0.1
checkstyle/checkstyle
16,515
checkstyle__checkstyle-16515
[ "15769" ]
0f9d47e2ae3f0af2b1df2f98e44280db6b4d4931
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java @@ -157,14 +157,23 @@ private void checkLeftCurly() { protected IndentLevel curlyIndent() { final DetailAST lcurly = getLeftCurly(); IndentLevel expIndentLevel = new IndentLevel(getIndent(), getBraceAdjustment()); - if (!isOnStartOfLine(lcurly) - || lcurly.getParent().getType() == TokenTypes.INSTANCE_INIT) { + if (!isOnStartOfLine(lcurly) || checkIfCodeBlock()) { expIndentLevel = new IndentLevel(getIndent(), 0); } - return expIndentLevel; } + /** + * Checks if lcurly is a Code block. + * + * @return true if lcurly is a code block + */ + private boolean checkIfCodeBlock() { + return getMainAst().getType() == TokenTypes.SLIST + && getParent() instanceof BlockParentHandler + && getParent().getParent() instanceof BlockParentHandler; + } + /** * Determines if child elements within the expression may be nested. *
diff --git a/src/it/resources-noncompilable/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/InputPatternVariableNameEnhancedInstanceofTestDefault.java b/src/it/resources-noncompilable/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/InputPatternVariableNameEnhancedInstanceofTestDefault.java --- a/src/it/resources-noncompilable/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/InputPatternVariableNameEnhancedInstanceofTestDefault.java +++ b/src/it/resources-noncompilable/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/InputPatternVariableNameEnhancedInstanceofTestDefault.java @@ -70,17 +70,17 @@ public void testing(Object o1, Object o2) { System.out.println("done"); } - { - while (!(o1 instanceof String _aa)) { - // violation above 'Pattern variable name '_aa' must match pattern' - L3: - break L3; - } - while (o1 instanceof String aa_) { - // violation above 'Pattern variable name 'aa_' must match pattern' - aa_.length(); - } + { + while (!(o1 instanceof String _aa)) { + // violation above 'Pattern variable name '_aa' must match pattern' + L3: + break L3; } + while (o1 instanceof String aa_) { + // violation above 'Pattern variable name 'aa_' must match pattern' + aa_.length(); + } + } int x = o1 instanceof String aaa$aaa ? aaa$aaa.length() : 2; // violation above 'Pattern variable name .* must match pattern' diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java @@ -3155,6 +3155,43 @@ public void testIndentationRecordPattern() verifyWarns(checkConfig, fileName, expected); } + @Test + public void testIndentationCodeBlocks1() throws Exception { + final DefaultConfiguration checkConfig = createModuleConfig(IndentationCheck.class); + checkConfig.addProperty("tabWidth", "4"); + checkConfig.addProperty("basicOffset", "2"); + checkConfig.addProperty("braceAdjustment", "2"); + checkConfig.addProperty("caseIndent", "2"); + checkConfig.addProperty("throwsIndent", "4"); + checkConfig.addProperty("lineWrappingIndentation", "4"); + final String[] expected = { + "17:5: " + getCheckMessage(MSG_ERROR, "block lcurly", 4, 2), + "18:7: " + getCheckMessage(MSG_CHILD_ERROR, "block", 6, 4), + "19:5: " + getCheckMessage(MSG_ERROR, "block rcurly", 4, 2), + "30:5: " + getCheckMessage(MSG_ERROR, "block lcurly", 4, 2), + "31:7: " + getCheckMessage(MSG_CHILD_ERROR, "block", 6, 4), + "32:5: " + getCheckMessage(MSG_ERROR, "block rcurly", 4, 2), + }; + verifyWarns(checkConfig, getPath("InputIndentationCodeBlocks1.java"), expected); + } + + @Test + public void testIndentationCodeBlocks2() throws Exception { + final DefaultConfiguration checkConfig = createModuleConfig(IndentationCheck.class); + checkConfig.addProperty("tabWidth", "4"); + checkConfig.addProperty("basicOffset", "2"); + checkConfig.addProperty("braceAdjustment", "2"); + checkConfig.addProperty("throwsIndent", "4"); + checkConfig.addProperty("caseIndent", "2"); + checkConfig.addProperty("lineWrappingIndentation", "4"); + final String[] expected = { + "45:13: " + getCheckMessage(MSG_ERROR, "for lcurly", 12, 14), + "47:13: " + getCheckMessage(MSG_ERROR, "for rcurly", 12, 14), + }; + verifyWarns(checkConfig, + getNonCompilablePath("InputIndentationCodeBlocks2.java"), expected); + } + @Test public void testIndentationSealedClasses() throws Exception { diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks2.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks2.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks2.java @@ -0,0 +1,63 @@ + +//non-compiled with javac: Compilable with Java17 //indent:0 exp:0 + +/* Config: //indent:0 exp:0 + * This test-input is intended to be checked using following configuration: //indent:1 exp:1 + * //indent:1 exp:1 + * basicOffset = 2 //indent:1 exp:1 + * braceAdjustment = 2 //indent:1 exp:1 + * caseIndent = 2 //indent:1 exp:1 + * lineWrappingIndentation = 4 //indent:1 exp:1 + * throwsIndent = 4 //indent:1 exp:1 + */ //indent:1 exp:1 + +package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0 + +public class InputIndentationCodeBlocks2 { //indent:0 exp:0 + public void testSwitchCases(int j) { //indent:2 exp:2 + switch (j) { //indent:4 exp:4 + case 1: //indent:6 exp:6 + { //indent:8 exp:8 + System.out.println("One"); //indent:10 exp:10 + break; //indent:10 exp:10 + } //indent:8 exp:8 + case 2: //indent:6 exp:6 + { //indent:8 exp:8 + System.out.println("2"); //indent:10 exp:10 + break; //indent:10 exp:10 + } //indent:8 exp:8 + default: //indent:6 exp:6 + System.out.println("default"); //indent:8 exp:8 + } //indent:4 exp:4 + final int status = //indent:4 exp:4 + switch (j) { //indent:8 exp:8 + case 1 -> 502; //indent:10 exp:10 + case 10 -> 502; //indent:10 exp:10 + case 110 -> 504; //indent:10 exp:10 + default -> 500; //indent:10 exp:10 + }; //indent:8 exp:8 + + switch (j) { //indent:4 exp:4 + case 2: //indent:6 exp:6 + if (status + 10 > 100) { //indent:8 exp:8 + { //indent:10 exp:10 + for (int _i1 = 0; _i1 < -5; ++_i1) //indent:12 exp:12 + { //indent:12 exp:14 warn + System.out.println("sout"); //indent:14 exp:14 + } //indent:12 exp:14 warn + } //indent:10 exp:10 + } else { //indent:8 exp:8 + System.out.println("souta"); //indent:10 exp:10 + } //indent:8 exp:8 + } //indent:4 exp:4 + + if (j < -1) { //indent:4 exp:4 + { //indent:6 exp:6 + for (int i = 0; i < 1; i++) //indent:8 exp:8 + { //indent:10 exp:10 + System.out.println("sout"); //indent:12 exp:12 + } //indent:10 exp:10 + } //indent:6 exp:6 + } //indent:4 exp:4 + } //indent:2 exp:2 +} //indent:0 exp:0 diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks1.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationCodeBlocks1.java @@ -0,0 +1,58 @@ +/* Config: //indent:0 exp:0 + * This test-input is intended to be checked using following configuration: //indent:1 exp:1 + * //indent:1 exp:1 + * basicOffset = 2 //indent:1 exp:1 + * braceAdjustment = 2 //indent:1 exp:1 + * caseIndent = 2 //indent:1 exp:1 + * lineWrappingIndentation = 4 //indent:1 exp:1 + * throwsIndent = 4 //indent:1 exp:1 + */ //indent:1 exp:1 + +package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0 + +public class InputIndentationCodeBlocks1 { //indent:0 exp:0 + { //indent:2 exp:2 + System.out.println("True"); //indent:4 exp:4 + } //indent:2 exp:2 + { //indent:4 exp:2 warn + System.out.println("False"); //indent:6 exp:4 warn + } //indent:4 exp:2 warn + private static void test(int condition) { //indent:2 exp:2 + { //indent:4 exp:4 + System.out.println("True"); //indent:6 exp:6 + } //indent:4 exp:4 + } //indent:2 exp:2 + + { //indent:2 exp:2 + System.out.println("False"); //indent:4 exp:4 + } //indent:2 exp:2 + + { //indent:4 exp:2 warn + System.out.println("False"); //indent:6 exp:4 warn + } //indent:4 exp:2 warn + + public void testSwitchCases(int j) { //indent:2 exp:2 + switch (j) { //indent:4 exp:4 + case 1: //indent:6 exp:6 + { //indent:8 exp:8 + System.out.println("One"); //indent:10 exp:10 + break; //indent:10 exp:10 + } //indent:8 exp:8 + case 2: //indent:6 exp:6 + { //indent:8 exp:8 + test(2); //indent:10 exp:10 + break; //indent:10 exp:10 + } //indent:8 exp:8 + default: //indent:6 exp:6 + System.out.println("default"); //indent:8 exp:8 + } //indent:4 exp:4 + } //indent:2 exp:2 + + class Inner { //indent:2 exp:2 + void test() { //indent:4 exp:4 + { //indent:6 exp:6 + System.out.println("True"); //indent:8 exp:8 + } //indent:6 exp:6 + } //indent:4 exp:4 + } //indent:2 exp:2 +} //indent:0 exp:0
google_checks.xml: remove xpath suppression and false-positive indentation violations for block codes I have read check documentation: https://checkstyle.org/checks/misc/indentation.html I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words Detected at https://github.com/checkstyle/checkstyle/issues/14294 In [google_checks.xml](https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml), [Indentation](https://checkstyle.org/checks/misc/indentation.html) module gives false-positive error for following type of blocks: ``` { int x = 99; } ``` **Example:** ```java /** Test... */ public class Test { private static void indentationIssue(int condition) { { // line 4, false-positive System.out.println("True"); } // line 6, false-positive } { // good, no violation System.out.println("False"); } // good, no violation { // line 13, expected System.out.println("False"); } // line 15, expected class Inner { void test() { { // line 19, false-positive System.out.println("True"); } // line 21, false-positive } } } ``` ``` $ java -jar .\checkstyle-10.18.2-all.jar -c .\google_checks.xml .\Test.java Starting audit... [WARN] C:\checkstyle testing\.\Test.java:4:5: 'block lcurly' has incorrect indentation level 4, expected level should be 6. [Indentation] [WARN] C:\checkstyle testing\.\Test.java:6:5: 'block rcurly' has incorrect indentation level 4, expected level should be 6. [Indentation] [WARN] C:\checkstyle testing\.\Test.java:13:5: 'block lcurly' has incorrect indentation level 4, expected level should be 2. [Indentation] [WARN] C:\checkstyle testing\.\Test.java:14:7: 'block' child has incorrect indentation level 6, expected level should be 4. [Indentation] [WARN] C:\checkstyle testing\.\Test.java:15:5: 'block rcurly' has incorrect indentation level 4, expected level should be 2. [Indentation] [WARN] C:\checkstyle testing\.\Test.java:19:7: 'block lcurly' has incorrect indentation level 6, expected level should be 8. [Indentation] [WARN] C:\checkstyle testing\.\Test.java:21:7: 'block rcurly' has incorrect indentation level 6, expected level should be 8. [Indentation] Audit done. ``` @romani suggested to use suppression to suppress these false-positives until we find a way to fix it at: https://github.com/checkstyle/checkstyle/issues/14294#issuecomment-2408353743 The suppression is: ```xml <module name="SuppressionXpathSingleFilter"> <property name="checks" value="Indentation"/> <property name="query" value="//SLIST/SLIST"/> </module> <module name="SuppressionXpathSingleFilter"> <property name="checks" value="Indentation"/> <property name="query" value="//SLIST/SLIST/RCURLY"/> </module> <module name="Indentation"> <property name="basicOffset" value="2"/> <property name="braceAdjustment" value="2"/> <property name="caseIndent" value="2"/> <property name="throwsIndent" value="4"/> <property name="lineWrappingIndentation" value="4"/> <property name="arrayInitIndent" value="2"/> </module> ``` Adding this suppression will suppress all indentation violations for above mentioned type of blocks whether they're correct or not but we need to use it till we find a fix. --- As part of this issue, we need to find a way to fix this false-positive and remove the suppression.
I am on it
2025-03-10T03:15:29Z
10.23
checkstyle/checkstyle
16,605
checkstyle__checkstyle-16605
[ "9745" ]
88eb861f176bece7c70eb87f71a760e7bea7532a
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java @@ -115,6 +115,11 @@ * Default value is {@code public, protected, package, private}. * </li> * <li> + * Property {@code allowInlineReturn} - Control whether to allow inline return tags. + * Type is {@code boolean}. + * Default value is {@code false}. + * </li> + * <li> * Property {@code allowMissingParamTags} - Control whether to ignore violations * when a method has parameters but does not have matching {@code param} tags in the javadoc. * Type is {@code boolean}. @@ -256,6 +261,9 @@ public class JavadocMethodCheck extends AbstractCheck { /** Compiled regexp to match Javadoc tags with no argument. */ private static final Pattern MATCH_JAVADOC_NOARG = CommonUtil.createPattern("^\\s*(?>\\*|\\/\\*\\*)?\\s*@(return|see)\\s+\\S"); + /** Compiled regexp to match Javadoc tags with no argument allowing inline return tag. */ + private static final Pattern MATCH_JAVADOC_NOARG_INLINE_RETURN = + CommonUtil.createPattern("^\\s*(?>\\*|\\/\\*\\*)?\\s*\\{?@(return|see)\\s+\\S"); /** Compiled regexp to match first part of multilineJavadoc tags. */ private static final Pattern MATCH_JAVADOC_NOARG_MULTILINE_START = CommonUtil.createPattern("^\\s*(?>\\*|\\/\\*\\*)?\\s*@(return|see)\\s*$"); @@ -263,6 +271,11 @@ public class JavadocMethodCheck extends AbstractCheck { private static final Pattern MATCH_JAVADOC_NOARG_CURLY = CommonUtil.createPattern("\\{\\s*@(inheritDoc)\\s*\\}"); + /** + * Control whether to allow inline return tags. + */ + private boolean allowInlineReturn; + /** Specify the access modifiers where Javadoc comments are checked. */ private AccessModifierOption[] accessModifiers = { AccessModifierOption.PUBLIC, @@ -291,6 +304,16 @@ public class JavadocMethodCheck extends AbstractCheck { /** Specify annotations that allow missed documentation. */ private Set<String> allowedAnnotations = Set.of("Override"); + /** + * Setter to control whether to allow inline return tags. + * + * @param value a {@code boolean} value + * @since 10.22.1 + */ + public void setAllowInlineReturn(boolean value) { + allowInlineReturn = value; + } + /** * Setter to control whether to validate {@code throws} tags. * @@ -511,7 +534,11 @@ private boolean hasShortCircuitTag(final DetailAST ast, final List<JavadocTag> t * @param comment the Javadoc comment * @return the tags found */ - private static List<JavadocTag> getMethodTags(TextBlock comment) { + private List<JavadocTag> getMethodTags(TextBlock comment) { + Pattern matchJavadocNoArg = MATCH_JAVADOC_NOARG; + if (allowInlineReturn) { + matchJavadocNoArg = MATCH_JAVADOC_NOARG_INLINE_RETURN; + } final String[] lines = comment.getText(); final List<JavadocTag> tags = new ArrayList<>(); int currentLine = comment.getStartLineNo() - 1; @@ -524,7 +551,7 @@ private static List<JavadocTag> getMethodTags(TextBlock comment) { final Matcher javadocArgMissingDescriptionMatcher = MATCH_JAVADOC_ARG_MISSING_DESCRIPTION.matcher(lines[i]); final Matcher javadocNoargMatcher = - MATCH_JAVADOC_NOARG.matcher(lines[i]); + matchJavadocNoArg.matcher(lines[i]); final Matcher noargCurlyMatcher = MATCH_JAVADOC_NOARG_CURLY.matcher(lines[i]); final Matcher noargMultilineStart = diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/Example8.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/Example8.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/Example8.java @@ -0,0 +1,27 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="JavadocMethod"> + <property name="allowInlineReturn" value="true"/> + </module> + </module> +</module> +*/ +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod; + +// xdoc section -- start +public class Example8 { + + /** + * {@return the foo} + */ + public int getFoo() { return 0; } + + /** + * Returns the bar + * @return the bar + */ + public int getBar() { return 0; } + +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java @@ -590,4 +590,25 @@ public void testJavadocMethodAboveComments() throws Exception { verifyWithInlineConfigParser( getPath("InputJavadocMethodAboveComments.java"), expected); } + + @Test + public void testJavadocMethodAllowInlineReturn() throws Exception { + final String[] expected = { + "32: " + getCheckMessage(MSG_RETURN_EXPECTED), + "39: " + getCheckMessage(MSG_RETURN_EXPECTED), + }; + verifyWithInlineConfigParser( + getPath("InputJavadocMethodAllowInlineReturn.java"), expected); + } + + @Test + public void testJavadocMethodDoNotAllowInlineReturn() throws Exception { + final String[] expected = { + "21: " + getCheckMessage(MSG_RETURN_EXPECTED), + "33: " + getCheckMessage(MSG_RETURN_EXPECTED), + "40: " + getCheckMessage(MSG_RETURN_EXPECTED), + }; + verifyWithInlineConfigParser( + getPath("InputJavadocMethodDoNotAllowInlineReturn.java"), expected); + } } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/InputJavadocMethodAllowInlineReturn.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/InputJavadocMethodAllowInlineReturn.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/InputJavadocMethodAllowInlineReturn.java @@ -0,0 +1,41 @@ +/* +JavadocMethod +allowInlineReturn = true +allowedAnnotations = (default)Override +validateThrows = (default)false +accessModifiers = (default)public, protected, package, private +allowMissingParamTags = (default)false +allowMissingReturnTag = (default)false +tokens = (default)METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod; + +public class InputJavadocMethodAllowInlineReturn { + + /** + * {@return the foo} + */ + public int getFoo() { return 0; } + + /** + * Returns the bar + * @return the bar + */ + public int getBar() { return 0; } + + /** + * Returns the fiz + */ + public int getFiz() { return 0; } + // violation above, '@return tag should be present and have description.' + + /** + * Returns the baz + * @see "getFoo" + */ + public int getBaz() { return 0; } + // violation above, '@return tag should be present and have description.' +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/InputJavadocMethodDoNotAllowInlineReturn.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/InputJavadocMethodDoNotAllowInlineReturn.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocmethod/InputJavadocMethodDoNotAllowInlineReturn.java @@ -0,0 +1,42 @@ +/* +JavadocMethod +allowInlineReturn = (default)false +allowedAnnotations = (default)Override +validateThrows = (default)false +accessModifiers = (default)public, protected, package, private +allowMissingParamTags = (default)false +allowMissingReturnTag = (default)false +tokens = (default)METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod; + +public class InputJavadocMethodDoNotAllowInlineReturn { + + /** + * {@return the foo} + */ + public int getFoo() { return 0; } + // violation above, '@return tag should be present and have description.' + + /** + * Returns the bar + * @return the bar + */ + public int getBar() { return 0; } + + /** + * Returns the fiz + */ + public int getFiz() { return 0; } + // violation above, '@return tag should be present and have description.' + + /** + * Returns the baz + * @see "getFoo" + */ + public int getBaz() { return 0; } + // violation above, '@return tag should be present and have description.' +}
JavadocMethod: new property 'allowInlineReturn' to support for Javadoc return tag as inline I have downloaded the latest cli from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words **How it works Now:** ```bash $ javac Foo.java $ javadoc Foo.java Loading source file Foo.java... Constructing Javadoc information... Building index for all the packages and classes... Standard Doclet version 16+36 Building tree for all the packages and classes... Generating ./Foo.html... Generating ./package-summary.html... Generating ./package-tree.html... Generating ./overview-tree.html... Building index for all classes... Generating ./allclasses-index.html... Generating ./allpackages-index.html... Generating ./index-all.html... Generating ./index.html... Generating ./help-doc.html... ``` config.xml ```xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="fileExtensions" value="java"/> <module name="TreeWalker"> <module name="JavadocMethod"> <property name="accessModifiers" value="public"/> </module> </module> </module> ``` Foo.java ```java /** * Test */ public class Foo { /** * {@return the foo} */ public int getFoo() { return 0; } // violation /** * Returns the bar * @return the bar */ public int getBar() { return 0; } } ``` ```bash $ RUN_LOCALE="-Duser.language=en -Duser.country=US" $ java $RUN_LOCALE -jar ~/Downloads/checkstyle-9.0-all.jar -c config.xml Foo.java Starting audit... [ERROR] /tmp/Foo.java:9: @return tag should be present and have description. [JavadocMethod] Audit done. Checkstyle ends with 1 errors. ``` **Is your feature request related to a problem? Please describe.** Add support for Javadoc inline return tag **Describe the solution you'd like** Both methods to be treated the same (getFoo and getBar), as it is by the Javadoc **Additional context** The support for this syntax was added in JDK 16 https://bugs.openjdk.java.net/browse/JDK-8075778 ``` rivanov@p5510:/var/tmp$ javadoc Foo.java Loading source file Foo.java... Constructing Javadoc information... Standard Doclet version 11 Building tree for all the packages and classes... Generating ./Foo.html... Foo.java:7: error: no tag name after @ * {@return the foo} ^ Foo.java:9: warning: no @return public int getFoo() { return 0; } // violation ^ /var/tmp$ export JAVA_HOME=/opt/jvm/jdk-17.0.1/ /var/tmp$ export PATH=$JAVA_HOME/bin:$PATH rivanov@p5510:/var/tmp$ javadoc Foo.java Loading source file Foo.java... Constructing Javadoc information... Building index for all the packages and classes... Standard Doclet version 17.0.1+12-39 Building tree for all the packages and classes... Generating ./Foo.html... ``` ![image](https://user-images.githubusercontent.com/812984/147023606-4df25f74-666d-4c53-933d-fcba6a9d7ff5.png)
Similar to #10014 The pattern should be updated to something like ```java /** Compiled regexp to match Javadoc tags with no argument. */ private static final Pattern MATCH_JAVADOC_NOARG = CommonUtil.createPattern("^\\s*(?>\\*|\\/\\*\\*)?\\s*(\{?@return|@see)\\s+\\S"); ``` I would like to get started on this project, can you please suggest to me any beginner-friendly issues that I could start fixing. Can we have an example of what the Javadoc tool prints as its summary in the HTML pages using this example to show what it does in this situation? > The support for this syntax was added in JDK 16 So how does pre-JDK 16 handle this compared to JDK 16+? @rnveach pre-JDK 16: ![image](https://user-images.githubusercontent.com/13357965/132101452-16c46faf-14e1-4d00-8c3d-ad0fea91dd31.png) 16+: ![image](https://user-images.githubusercontent.com/13357965/132101463-fff60673-c731-47b8-abe8-cd25516b62eb.png) @Thihup , please update PR description with output of latest cli 9.0. In 8.42, https://checkstyle.org/releasenotes.html#Release_8.42 we did big breaking compatibility update for this Check. @romani Updated! I guess the main change is from `scope` to `accessModifiers`. In short from the pictures, Pre-JDK 16 sees the text as only the summary and has nothing for the return. JDK 16+ sees the text as the summary and the return. @romani What is your opinion on this? Should we add a property that just allows `{@return XXX}` to act as both summary and return? It's main purpose would be just to decide if a violation or no-violation should be placed if `{@return XXX}` exists and nothing else. It could be named `allowInlineReturn` and be default to `false` to not be a sort-of breaking change. Extra note while I am going through the OpenJDK item, it looks like this inline return must be the first item in the javadoc to be valid. https://github.com/openjdk/jdk/commit/b29f9cd7#diff-c38f0230e3d3894de14e518961fd61dcf270ca6e10fb487cc68f6d2b3b505991R60 https://github.com/openjdk/jdk/commit/b29f9cd7#diff-873b8bd2b8ecd4acd77f5e500aa0ef469787e2e8976dd8bfc530c19465fcd9d0R257 More examples at: https://github.com/openjdk/jdk/commit/b29f9cd7#diff-873b8bd2b8ecd4acd77f5e500aa0ef469787e2e8976dd8bfc530c19465fcd9d0 I need to see whole html page, summary sentence is something that is printed in table of all methods. @romani Here is the requested information. http://rveach.no-ip.org/checkstyle/regression/9745/ http://rveach.no-ip.org/checkstyle/regression/9745/11/ http://rveach.no-ip.org/checkstyle/regression/9745/16/ ```` $ /usr/lib/jvm/java-16-openjdk/bin/javadoc -d 16 ./Foo.java Loading source file ./Foo.java... Constructing Javadoc information... Creating destination directory: "16/" Building index for all the packages and classes... Standard Doclet version 16.0.2+7-67 Building tree for all the packages and classes... Generating 16/Foo.html... Generating 16/package-summary.html... Generating 16/package-tree.html... Generating 16/overview-tree.html... Building index for all classes... Generating 16/allclasses-index.html... Generating 16/allpackages-index.html... Generating 16/index-all.html... Generating 16/index.html... Generating 16/help-doc.html... $ javadoc -d 11 ./Foo.java Loading source file ./Foo.java... Constructing Javadoc information... Creating destination directory: "11/" Standard Doclet version 11.0.11 Building tree for all the packages and classes... Generating 11/Foo.html... ./Foo.java:7: warning - invalid usage of tag {@return the foo} ./Foo.java:7: warning - invalid usage of tag {@return the foo} Generating 11/package-summary.html... Generating 11/package-tree.html... Generating 11/constant-values.html... Building index for all the packages and classes... Generating 11/overview-tree.html... Generating 11/index-all.html... ./Foo.java:7: warning - invalid usage of tag {@return the foo} Building index for all classes... Generating 11/allclasses-index.html... Generating 11/allpackages-index.html... Generating 11/deprecated-list.html... Building index for all classes... Generating 11/allclasses.html... Generating 11/allclasses.html... Generating 11/index.html... Generating 11/help-doc.html... 3 warnings ```` Any update on this? @Frettman , please do not hesitate to send PR. Whole code is at https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java Testing fully automated, how to run debug https://checkstyle.org/idea.html I mistakenly thought I could use inline `@return` tag because of #10776, but I am actually hitting the current issue :D Anyway, I wanted to report here that this is indeed blocking uses of this javadoc feature. I know Checkstyle development is based on the work of volunteers. Unfortunately I don't have the bandwidth to work on this right now. If my bandwidth clears I will try to fix this. Don't count on me if you don't see a PR from me.
2025-03-18T22:12:14Z
10.22
checkstyle/checkstyle
16,418
checkstyle__checkstyle-16418
[ "12817" ]
16687998321c29ad8519aa02bb48ecfb21595ccb
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java @@ -21,6 +21,7 @@ import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.utils.TokenUtil; /** * Handler for switch statements. @@ -76,6 +77,18 @@ private void checkSwitchExpr() { false); } + @Override + protected IndentLevel getIndentImpl() { + IndentLevel indentLevel = super.getIndentImpl(); + // if switch is starting the line + if (isOnStartOfLine(getMainAst()) + && TokenUtil.isOfType(getMainAst().getParent().getParent(), TokenTypes.ASSIGN)) { + indentLevel = new IndentLevel(indentLevel, + getIndentCheck().getLineWrappingIndentation()); + } + return indentLevel; + } + @Override public void checkIndentation() { checkSwitchExpr();
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java --- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java +++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule4841indentation/IndentationTest.java @@ -94,4 +94,9 @@ public void testCorrectAnnotationArrayInit() throws Exception { public void testFastMatcher() throws Exception { verifyWithWholeConfig(getPath("InputFastMatcher.java")); } + + @Test + public void testSwitchOnTheStartOfTheLine() throws Exception { + verifyWithWholeConfig(getNonCompilablePath("InputSwitchOnStartOfTheLine.java")); + } } diff --git a/src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/rule4841indentation/InputSwitchOnStartOfTheLine.java b/src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/rule4841indentation/InputSwitchOnStartOfTheLine.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/rule4841indentation/InputSwitchOnStartOfTheLine.java @@ -0,0 +1,47 @@ +// non-compiled with javac: Compilable with Java17 + +package com.google.checkstyle.test.chapter4formatting.rule42blockindentation; + +/**some javadoc.*/ +public class InputSwitchOnStartOfTheLine { + String testMethod1(int i) { + String s = + switch (i) { + case 1 -> "one"; + case 2 -> "two"; + default -> "zero"; + }; + return s; + } + + void testMethod2(int month) { + int result = + switch (month) { + case 1, 6, 7 -> 3; + case 2, 9, 10, 11, 12 -> 1; + case 3, 5, 4, 8 -> { + yield month * 4; + } + default -> 0; + }; + } + + void testMethod3Invalid(int num) { + int odd = + switch (num) { // violation '.* incorrect indentation level 6, expected .* 8.' + case 1, 3, 7 -> 1; // violation '.* incorrect indentation level 8, expected .* 10.' + case 2, 4, 6 -> 2; // violation '.* incorrect indentation level 8, expected .* 10.' + default -> 0; // violation '.* incorrect indentation level 8, expected .* 10.' + }; // violation '.* incorrect indentation level 6, expected .* 8.' + } + + String testMethod4Invalid(int i) { + String s = + switch (i) { // violation '.* incorrect indentation level 10, expected .* 8.' + case 1 -> "one"; // violation '.* incorrect indentation level 12, expected .* 10.' + case 2 -> "two"; // violation '.* incorrect indentation level 12, expected .* 10.' + default -> "zero"; // violation '.* incorrect indentation level 12, expected .* 10.' + }; + return s; + } +} diff --git a/src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/rule4841indentation/InputSwitchOnStartOfTheLineCorrect.java b/src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/rule4841indentation/InputSwitchOnStartOfTheLineCorrect.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/rule4841indentation/InputSwitchOnStartOfTheLineCorrect.java @@ -0,0 +1,28 @@ +// non-compiled with javac: Compilable with Java17 + +package com.google.checkstyle.test.chapter4formatting.rule42blockindentation; + +/**some javadoc.*/ +public class InputSwitchOnStartOfTheLineCorrect { + String testMethod1(int i) { + String s = + switch (i) { + case 1 -> "one"; + case 2 -> "two"; + default -> "zero"; + }; + return s; + } + + void testMethod2(int month) { + int result = + switch (month) { + case 1, 6, 7 -> 3; + case 2, 9, 10, 11, 12 -> 1; + case 3, 5, 4, 8 -> { + yield month * 4; + } + default -> 0; + }; + } +} diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java @@ -3057,6 +3057,32 @@ public void testIndentationLineBreakVariableDeclaration() verifyWarns(checkConfig, fileName, expected); } + @Test + public void testIndentationSwitchExpressionOnStartOfTheLine() throws Exception { + final DefaultConfiguration checkConfig = createModuleConfig(IndentationCheck.class); + checkConfig.addProperty("tabWidth", "4"); + checkConfig.addProperty("basicOffset", "2"); + checkConfig.addProperty("braceAdjustment", "2"); + checkConfig.addProperty("caseIndent", "2"); + checkConfig.addProperty("throwsIndent", "4"); + checkConfig.addProperty("lineWrappingIndentation", "4"); + + final String[] expected = { + "40:7: " + getCheckMessage(MSG_ERROR, "switch", 6, 8), + "41:9: " + getCheckMessage(MSG_CHILD_ERROR, "case", 8, 10), + "42:9: " + getCheckMessage(MSG_CHILD_ERROR, "case", 8, 10), + "43:9: " + getCheckMessage(MSG_CHILD_ERROR, "case", 8, 10), + "44:7: " + getCheckMessage(MSG_ERROR, "switch rcurly", 6, 8), + "49:11: " + getCheckMessage(MSG_ERROR, "switch", 10, 8), + "50:13: " + getCheckMessage(MSG_CHILD_ERROR, "case", 12, 10), + "51:13: " + getCheckMessage(MSG_CHILD_ERROR, "case", 12, 10), + "52:13: " + getCheckMessage(MSG_CHILD_ERROR, "case", 12, 10), + }; + + verifyWarns(checkConfig, + getNonCompilablePath("InputIndentationSwitchOnStartOfLine.java"), expected); + } + @Test public void testIndentationPatternMatchingForSwitch() throws Exception { diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationSwitchOnStartOfLine.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationSwitchOnStartOfLine.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/indentation/indentation/InputIndentationSwitchOnStartOfLine.java @@ -0,0 +1,56 @@ +//non-compiled with javac: Compilable with Java17 //indent:0 exp:0 + +package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0 + +/* Config: //indent:0 exp:0 + * This test-input is intended to be checked using following configuration: //indent:1 exp:1 + * basicOffset = 2 //indent:1 exp:1 + * braceAdjustment = 2 //indent:1 exp:1 + * caseIndent = 2 //indent:1 exp:1 + * tabWidth = 4 //indent:1 exp:1 + * lineWrappingIndentation = 4 //indent:1 exp:1 + * throwsIndent = 4 //indent:1 exp:1 + */ //indent:1 exp:1 + +public class InputIndentationSwitchOnStartOfLine { //indent:0 exp:0 + String testMethod1(int i) { //indent:2 exp:2 + String s = //indent:4 exp:4 + switch (i) { //indent:8 exp:8 + case 1 -> "one"; //indent:10 exp:10 + case 2 -> "two"; //indent:10 exp:10 + default -> "zero"; //indent:10 exp:10 + }; //indent:8 exp:8 + return s; //indent:4 exp:4 + } //indent:2 exp:2 + + void testMethod2(int month) { //indent:2 exp:2 + int result = //indent:4 exp:4 + switch (month) { //indent:8 exp:8 + case 1, 6, 7 -> 3; //indent:10 exp:10 + case 2, 9, 10, 11, 12 -> 1; //indent:10 exp:10 + case 3, 5, 4, 8 -> { //indent:10 exp:10 + yield month * 4; //indent:12 exp:12 + } //indent:10 exp:10 + default -> 0; //indent:10 exp:10 + }; //indent:8 exp:8 + } //indent:2 exp:2 + + void testMethod3_invalid(int num) { //indent:2 exp:2 + int odd = //indent:4 exp:4 + switch (num) { //indent:6 exp:8 warn + case 1, 3, 7 -> 1; //indent:8 exp:10 warn + case 2, 4, 6 -> 2; //indent:8 exp:10 warn + default -> 0; //indent:8 exp:10 warn + }; //indent:6 exp:8 warn + } //indent:2 exp:2 + + String testMethod1_invalid(int i) { //indent:2 exp:2 + String s = //indent:4 exp:4 + switch (i) { //indent:10 exp:8 warn + case 1 -> "one"; //indent:12 exp:10 warn + case 2 -> "two"; //indent:12 exp:10 warn + default -> "zero"; //indent:12 exp:10 warn + }; //indent:8 exp:8 + return s; //indent:4 exp:4 + } //indent:2 exp:2 +} //indent:0 exp:0
Incorrect Indentation errors for expression switches with google_checks.xml ```bash $ javac -fullversion javac full version "20-ea+35-2342" $ javac T.java $ wget https://raw.githubusercontent.com/checkstyle/checkstyle/d02e867225c3eaa43dc681c2827ce89799dee88f/src/main/resources/google_checks.xml $ cat T.java class T { void doSomething(int i) { String s = switch (i) { case 1 -> "one"; case 2 -> "two"; default -> throw new AssertionError(); }; } } $ RUN_LOCALE="-Duser.language=en -Duser.country=US" $ java -jar checkstyle-10.8.1-all.jar -c google_checks.xml T.java Starting audit... [WARN] /tmp/tmp.zK57404080/T.java:4:9: 'switch' has incorrect indentation level 8, expected level should be 4. [Indentation] [WARN] /tmp/tmp.zK57404080/T.java:5:11: 'case' child has incorrect indentation level 10, expected level should be 6. [Indentation] [WARN] /tmp/tmp.zK57404080/T.java:6:11: 'case' child has incorrect indentation level 10, expected level should be 6. [Indentation] [WARN] /tmp/tmp.zK57404080/T.java:7:11: 'case' child has incorrect indentation level 10, expected level should be 6. [Indentation] [WARN] /tmp/tmp.zK57404080/T.java:8:9: 'switch rcurly' has incorrect indentation level 8, expected level should be 4. [Indentation] Audit done. ``` **Describe what you expect in detail.** I expected no errors to be produced, because the input is formatted in a way that complies with the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
maybe you are having problem with the compiler i have executed the file and it got implemented corrected.May be you are using the early release version.The file runs correctly with Java(TM) SE Runtime Environment (build 19.0.2+7-44) Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing). `class T { void doSomething(int i) { String s = switch (i) { case 1 -> "one"; case 2 -> "two"; default -> throw new AssertionError(); }; } public static void main(String[] args) { T t = new T(); t.doSomething(1); // calling the doSomething method with the argument 1 } } ` Hi! I have the same issue with switch. I reported in https://github.com/google/google-java-format/issues/915 Thanks! I am also facing this issue, error - 'switch' has incorrect indentation level 8, expected level should be 4. [Indentation] I tried with openjdk 17.0.6 ``` static void testMethod(int month) { int result = switch (month) { case JANUARY, JUNE, JULY -> 3; case FEBRUARY, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER -> 1; case MARCH, MAY, APRIL, AUGUST -> { yield month * 4; } default -> 0; }; }
2025-02-25T03:36:12Z
10.21
checkstyle/checkstyle
15,969
checkstyle__checkstyle-15969
[ "11374" ]
24eedce6a64145442db5b478c7a39ce0763dad8c
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java @@ -562,7 +562,7 @@ private TypeDeclDesc getSuperClassOfAnonInnerClass(DetailAST literalNewAst) { else { final List<TypeDeclDesc> typeDeclWithSameName = typeDeclWithSameName(shortNameOfClass); if (!typeDeclWithSameName.isEmpty()) { - obtainedClass = getTheNearestClass( + obtainedClass = getClosestMatchingTypeDeclaration( anonInnerAstToTypeDeclDesc.get(literalNewAst).getQualifiedName(), typeDeclWithSameName); } @@ -631,10 +631,10 @@ private boolean hasSameNameAsSuperClass(String superClassName, TypeDeclDesc type * @param typeDeclWithSameName typeDeclarations which have the same name as the super class * @return the nearest class */ - private static TypeDeclDesc getTheNearestClass(String outerTypeDeclName, + private static TypeDeclDesc getClosestMatchingTypeDeclaration(String outerTypeDeclName, List<TypeDeclDesc> typeDeclWithSameName) { return Collections.min(typeDeclWithSameName, (first, second) -> { - return getTypeDeclarationNameMatchingCountDiff(outerTypeDeclName, first, second); + return calculateTypeDeclarationDistance(outerTypeDeclName, first, second); }); } @@ -642,23 +642,69 @@ private static TypeDeclDesc getTheNearestClass(String outerTypeDeclName, * Get the difference between type declaration name matching count. If the * difference between them is zero, then their depth is compared to obtain the result. * - * @param outerTypeDeclName outer type declaration of anonymous inner class - * @param firstTypeDecl first input type declaration - * @param secondTypeDecl second input type declaration + * @param outerTypeName outer type declaration of anonymous inner class + * @param firstType first input type declaration + * @param secondType second input type declaration * @return difference between type declaration name matching count */ - private static int getTypeDeclarationNameMatchingCountDiff(String outerTypeDeclName, - TypeDeclDesc firstTypeDecl, - TypeDeclDesc secondTypeDecl) { - int diff = Integer.compare( - CheckUtil.typeDeclarationNameMatchingCount( - outerTypeDeclName, secondTypeDecl.getQualifiedName()), - CheckUtil.typeDeclarationNameMatchingCount( - outerTypeDeclName, firstTypeDecl.getQualifiedName())); - if (diff == 0) { - diff = Integer.compare(firstTypeDecl.getDepth(), secondTypeDecl.getDepth()); + private static int calculateTypeDeclarationDistance(String outerTypeName, + TypeDeclDesc firstType, + TypeDeclDesc secondType) { + final int firstMatchCount = + countMatchingQualifierChars(outerTypeName, firstType.getQualifiedName()); + final int secondMatchCount = + countMatchingQualifierChars(outerTypeName, secondType.getQualifiedName()); + final int matchDistance = Integer.compare(secondMatchCount, firstMatchCount); + + final int distance; + if (matchDistance == 0) { + distance = Integer.compare(firstType.getDepth(), secondType.getDepth()); + } + else { + distance = matchDistance; } - return diff; + + return distance; + } + + /** + * Calculates the type declaration matching count for the superclass of an anonymous inner + * class. + * + * <p> + * For example, if the pattern class is {@code Main.ClassOne} and the class to be matched is + * {@code Main.ClassOne.ClassTwo.ClassThree}, then the matching count would be calculated by + * comparing the characters at each position, and updating the count whenever a '.' + * is encountered. + * This is necessary because pattern class can include anonymous inner classes, unlike regular + * inheritance where nested classes cannot be extended. + * </p> + * + * @param pattern type declaration to match against + * @param candidate type declaration to be matched + * @return the type declaration matching count + */ + private static int countMatchingQualifierChars(String pattern, + String candidate) { + final int typeDeclarationToBeMatchedLength = candidate.length(); + final int minLength = Math + .min(typeDeclarationToBeMatchedLength, pattern.length()); + final boolean shouldCountBeUpdatedAtLastCharacter = + typeDeclarationToBeMatchedLength > minLength + && candidate.charAt(minLength) == PACKAGE_SEPARATOR.charAt(0); + + int result = 0; + for (int idx = 0; + idx < minLength + && pattern.charAt(idx) == candidate.charAt(idx); + idx++) { + + if (shouldCountBeUpdatedAtLastCharacter + || pattern.charAt(idx) == PACKAGE_SEPARATOR.charAt(0)) { + result = idx; + } + } + return result; } /**
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheckTest.java @@ -557,4 +557,26 @@ public void testClearStatePackageDef() throws Exception { Objects::isNull)) .isTrue(); } + + @Test + public void testUnusedLocalVarInAnonInnerClasses2() throws Exception { + final String[] expected = { + "20:13: " + getCheckMessage(MSG_UNUSED_LOCAL_VARIABLE, "s"), + }; + verifyWithInlineConfigParser( + getPath("InputUnusedLocalVariableAnonInnerClasses2.java"), + expected); + } + + @Test + public void testUnusedLocalVarInAnonInnerClasses3() throws Exception { + final String[] expected = { + "13:13: " + getCheckMessage(MSG_UNUSED_LOCAL_VARIABLE, "a"), + "20:13: " + getCheckMessage(MSG_UNUSED_LOCAL_VARIABLE, "obj"), + "32:13: " + getCheckMessage(MSG_UNUSED_LOCAL_VARIABLE, "s"), + }; + verifyWithInlineConfigParser( + getPath("InputUnusedLocalVariableAnonInnerClasses3.java"), + expected); + } } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/InputUnusedLocalVariableAnonInnerClasses2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/InputUnusedLocalVariableAnonInnerClasses2.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/InputUnusedLocalVariableAnonInnerClasses2.java @@ -0,0 +1,55 @@ +/* +UnusedLocalVariable +allowUnnamedVariables = false + +*/ + +package com.puppycrawl.tools.checkstyle.checks.coding.unusedlocalvariable; + +public class InputUnusedLocalVariableAnonInnerClasses2 { + + static class m { + static class h { + public int a = 12; + } + } + + static class j { + static void method() { + int a = 1000; + int s = 13; // violation, 'Unused local variable' + int q = 14; + m.h obj = new m.h() { + @Override + void method() { + Integer.valueOf(a + s); + } + + m.h obj = new m.h() { // ok, anonymous instance field + @Override + void method() { + Integer.valueOf(q); + } + }; + + }; + obj.method(); + } + + static class m { + static class h { + int s = 12; + void method() { + } + } + } + } + + static class jasper { + static class m { + static class h { + int q = 12; + } + } + } +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/InputUnusedLocalVariableAnonInnerClasses3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/InputUnusedLocalVariableAnonInnerClasses3.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/InputUnusedLocalVariableAnonInnerClasses3.java @@ -0,0 +1,64 @@ +/* +UnusedLocalVariable +allowUnnamedVariables = false + +*/ + +package com.puppycrawl.tools.checkstyle.checks.coding.unusedlocalvariable; + +public class InputUnusedLocalVariableAnonInnerClasses3 { + + static class m { + void method() { + int a = 12; // violation, 'Unused local variable' + } + } + + static class myClass { + static void method() { + int a = 12; + m obj = new m() { // violation, 'Unused local variable' + @Override + void method() { + Integer.valueOf(a); + } + }; + } + } + + static class j { + static void method() { + int a = 1000; + int s = 13; // violation, 'Unused local variable' + int q = 14; + m obj = new m() { + @Override + void method() { + Integer.valueOf(a + s); + } + + m obj = new m() { // ok, anonymous instance field + @Override + void method() { + Integer.valueOf(q); + } + }; + + }; + obj.method(); + } + + static class m { + int s = 12; + + void method() { + } + } + } + + static class jasper { + static class m { + int q = 12; + } + } +}
UnusedLocalVariable: False Positive when inner class has same field as variable I have read check documentation: https://checkstyle.sourceforge.io/config_coding.html#UnusedLocalVariable I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words ```bash /var/tmp $ javac Test.java /var/tmp $ cat config.xml ``` ```xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="UnusedLocalVariable"/> </module> </module> ``` ``` /var/tmp $ cat Test.java ``` ```java public class Test { static class m { static class h { public int a = 12; } } static class j { static void method() { int a = 1000; // unexpected violation m.h obj = new m.h() { // object of Test.j.m.h and not of Test.m.h @Override void method() { System.out.println("a = " + a); // local var a } }; obj.method(); } static class m { static class h { void method() { } } } } public static void main(String[] args) { j.method(); } } ``` ``` /var/tmp $ RUN_LOCALE="-Duser.language=en -Duser.country=US" /var/tmp $ java $RUN_LOCALE -jar checkstyle-10.0-all.jar -c config.xml Test.java Starting audit... [ERROR] /var/tmp/Test.java:11:13: Unused local variable 'a'. [UnusedLocalVariable] Audit done. Checkstyle ends with 1 errors. ``` ``` /var/tmp $ java Test.java a = 1000 ``` --- **Describe what you expect in detail.** ``` /var/tmp $ RUN_LOCALE="-Duser.language=en -Duser.country=US" /var/tmp $ java $RUN_LOCALE -jar checkstyle-10.0-all.jar -c config.xml Test.java Starting audit... Audit done. ``` --- Discovered while working on #11365, the source has been identified, the fix has been done locally, will be pushed soon.
@Vishakhakumawat Fix has already been done, just pushing to remote is remaining, it is mentioned in issue description
2024-11-29T11:10:06Z
10.21
checkstyle/checkstyle
15,822
checkstyle__checkstyle-15822
[ "14424" ]
a4b0fc7b36dd1326a6c37d6b2b10070974967448
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java @@ -19,10 +19,14 @@ package com.puppycrawl.tools.checkstyle.checks.design; +import java.util.Collections; +import java.util.Set; + import com.puppycrawl.tools.checkstyle.StatelessCheck; import com.puppycrawl.tools.checkstyle.api.AbstractCheck; import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.utils.AnnotationUtil; /** * <div> @@ -53,6 +57,19 @@ * } * } * </pre> + * <ul> + * <li> + * Property {@code ignoreAnnotatedBy} - Ignore classes annotated + * with the specified annotation(s). Annotation names provided in this property + * must exactly match the annotation names on the classes. If the target class has annotations + * specified with their fully qualified names (including package), the annotations in this + * property should also be specified with their fully qualified names. Similarly, if the target + * class has annotations specified with their simple names, this property should contain the + * annotations with the same simple names. + * Type is {@code java.lang.String[]}. + * Default value is {@code ""}. + * </li> + * </ul> * * <p> * Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} @@ -78,6 +95,33 @@ public class HideUtilityClassConstructorCheck extends AbstractCheck { */ public static final String MSG_KEY = "hide.utility.class"; + /** + * Ignore classes annotated with the specified annotation(s). Annotation names + * provided in this property must exactly match the annotation names on the classes. + * If the target class has annotations specified with their fully qualified names + * (including package), the annotations in this property should also be specified with + * their fully qualified names. Similarly, if the target class has annotations specified + * with their simple names, this property should contain the annotations with the same + * simple names. + */ + private Set<String> ignoreAnnotatedBy = Collections.emptySet(); + + /** + * Setter to ignore classes annotated with the specified annotation(s). Annotation names + * provided in this property must exactly match the annotation names on the classes. + * If the target class has annotations specified with their fully qualified names + * (including package), the annotations in this property should also be specified with + * their fully qualified names. Similarly, if the target class has annotations specified + * with their simple names, this property should contain the annotations with the same + * simple names. + * + * @param annotationNames specified annotation(s) + * @since 10.20.0 + */ + public void setIgnoreAnnotatedBy(String... annotationNames) { + ignoreAnnotatedBy = Set.of(annotationNames); + } + @Override public int[] getDefaultTokens() { return getRequiredTokens(); @@ -96,7 +140,7 @@ public int[] getRequiredTokens() { @Override public void visitToken(DetailAST ast) { // abstract class could not have private constructor - if (!isAbstract(ast)) { + if (!isAbstract(ast) && !shouldIgnoreClass(ast)) { final boolean hasStaticModifier = isStatic(ast); final Details details = new Details(ast); @@ -146,6 +190,16 @@ private static boolean isStatic(DetailAST ast) { .findFirstToken(TokenTypes.LITERAL_STATIC) != null; } + /** + * Checks if class is annotated by specific annotation(s) to skip. + * + * @param ast class to check + * @return true if annotated by ignored annotations + */ + private boolean shouldIgnoreClass(DetailAST ast) { + return AnnotationUtil.containsAnnotation(ast, ignoreAnnotatedBy); + } + /** * Details of class that are required for validation. */ diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckExamplesTest.java --- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckExamplesTest.java +++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckExamplesTest.java @@ -35,10 +35,20 @@ protected String getPackageLocation() { @Test public void testExample1() throws Exception { final String[] expected = { - "12:1: " + getCheckMessage(MSG_KEY), - "37:1: " + getCheckMessage(MSG_KEY), + "13:1: " + getCheckMessage(MSG_KEY), + "39:1: " + getCheckMessage(MSG_KEY), + "45:1: " + getCheckMessage(MSG_KEY), }; verifyWithInlineConfigParser(getPath("Example1.java"), expected); } + + @Test + public void testExample2() throws Exception { + final String[] expected = { + "42:1: " + getCheckMessage(MSG_KEY), + }; + + verifyWithInlineConfigParser(getPath("Example2.java"), expected); + } } diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example1.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example1.java --- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example1.java +++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example1.java @@ -9,7 +9,9 @@ package com.puppycrawl.tools.checkstyle.checks.design.hideutilityclassconstructor; // xdoc section -- start -class Example1 { // violation +// violation below, 'should not have a public or default constructor' [email protected] +class Example1 { public Example1() { } @@ -18,7 +20,7 @@ public static void fun() { } } -class Foo { // OK +class Foo { private Foo() { } @@ -26,7 +28,7 @@ private Foo() { static int n; } -class Bar { // OK +class Bar { protected Bar() { // prevents calls from subclass @@ -34,8 +36,17 @@ protected Bar() { } } -class UtilityClass { // violation +@Deprecated // violation, 'should not have a public or default constructor' +class UtilityClass { static float f; } +// violation below, 'should not have a public or default constructor' +@SpringBootApplication +class Application1 { + + public static void main(String[] args) { + } +} // xdoc section -- end +@interface SpringBootApplication {} diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example2.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example2.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/Example2.java @@ -0,0 +1,54 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="HideUtilityClassConstructor"> + <property name="ignoreAnnotatedBy" + value="SpringBootApplication, java.lang.Deprecated" /> + </module> + </module> +</module> +*/ + +package com.puppycrawl.tools.checkstyle.checks.design.hideutilityclassconstructor; + +// xdoc section -- start +// ok below, skipped by annotation [email protected] +class Example2 { + + public Example2() { + } + + public static void fun() { + } +} + +class Foo2 { + + private Foo2() { + } + + static int n; +} + +class Bar2 { + + protected Bar2() { + // prevents calls from subclass + throw new UnsupportedOperationException(); + } +} + +@Deprecated // violation, 'should not have a public or default constructor' +class UtilityClass2 { + + static float f; +} +// ok below, skipped by annotation +@SpringBootApplication +class Application2 { + + public static void main(String[] args) { + } +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java @@ -146,4 +146,26 @@ public void testGetAcceptableTokens() { .isEqualTo(expected); } + @Test + public void testIgnoreAnnotatedBy() throws Exception { + final String[] expected = { + "30:1: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getPath("InputHideUtilityClassConstructorIgnoreAnnotationBy.java"), + expected + ); + } + + @Test + public void testIgnoreAnnotatedByFullQualifier() throws Exception { + final String[] expected = { + "9:1: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getPath("InputHideUtilityClassConstructor" + + "IgnoreAnnotationByFullyQualifiedName.java"), + expected + ); + } } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/InputHideUtilityClassConstructorIgnoreAnnotationBy.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/InputHideUtilityClassConstructorIgnoreAnnotationBy.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/InputHideUtilityClassConstructorIgnoreAnnotationBy.java @@ -0,0 +1,46 @@ +/* +HideUtilityClassConstructor +ignoreAnnotatedBy = Skip, SkipWithParam, SkipWithAnnotationAsParam + +*/ + +package com.puppycrawl.tools.checkstyle.checks.design.hideutilityclassconstructor; + +@Skip +public class InputHideUtilityClassConstructorIgnoreAnnotationBy { + public static void func() {} +} + +@SkipWithParam(name = "tool1") +class ToolClass1 { + public static void func() {} +} + +@SkipWithAnnotationAsParam(skip = @Skip) +class ToolClass2 { + public static void func() {} +} + +@CommonAnnot +@Skip +class ToolClass3 { + public static void func() {} +} + +@CommonAnnot // violation, should not have a public or default constructor +class ToolClass4 { + public static void func() {} +} + + +@interface Skip {} + +@interface SkipWithParam { + String name(); +} + +@interface SkipWithAnnotationAsParam { + Skip skip(); +} + +@interface CommonAnnot {} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/InputHideUtilityClassConstructorIgnoreAnnotationByFullyQualifiedName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/InputHideUtilityClassConstructorIgnoreAnnotationByFullyQualifiedName.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/hideutilityclassconstructor/InputHideUtilityClassConstructorIgnoreAnnotationByFullyQualifiedName.java @@ -0,0 +1,19 @@ +/* +HideUtilityClassConstructor +ignoreAnnotatedBy = java.lang.Deprecated + +*/ + +package com.puppycrawl.tools.checkstyle.checks.design.hideutilityclassconstructor; + +@Deprecated // violation, should not have a public or default constructor +public class InputHideUtilityClassConstructorIgnoreAnnotationByFullyQualifiedName { + public static void func() {} +} + [email protected] +class DeprecatedClass { + public static void func() {} +} + +@interface Deprecated {}
HideUtilityClassConstructor - Add option to skip validation based on list of annotations I have read check documentation: https://checkstyle.org/checks/design/hideutilityclassconstructor.html I have downloaded the latest cli from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words **How it works Now:** As discussed in #5434, the `HideUtilityClassConstructorCheck` can benefit from an option that allows a list of annotations to skip/ignore the validation. This is especially useful when using frameworks with context containers and dependency injection, like Spring and OSGi implementations. An example of how it's working now is a simple Spring Boot application class. Because the class only contains the static `main(..)` method, the rule expects the class to be `final` and a private/protected constructor to hide the default one. It's not possible to make the class final or the constructor public on the Spring Boot application class because Spring needs to create an instance of it to start the application. **Is your feature request related to a problem? Please describe.** Classes with specific annotations should not be final or hide the default constructor because they need to be instantiated later by some framework like Spring or OSGi implementations. Allowing to easily suppress the `HideUtilityClassConstructor` check when these annotations are present in the class can solve this problem. **Describe the solution you'd like** Add an option to the `HideUtilityClassConstructor` check that allows the define a list of annotations that skips/ignore validation. new property should be named `ignoreAnnotatedBy` , as we did at https://github.com/checkstyle/checkstyle/pull/14553 ``` <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="HideUtilityClassConstructor" > <property name="ignoreAnnotatedBy" value="SpringBootApplication,MySomeOther"> </module> </module> </module> ``` ``` package biz.gabrys.agabrys.sonarqube.falsepositives.d20180106; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @see https://github.com/checkstyle/checkstyle/issues/5434 */ @SpringBootApplication public class HideUtilityClassConstructorCheck { public static void main(String[] args) { SpringApplication.run(HideUtilityClassConstructorCheck.class, args); } } ``` Expected: no violation. **Additional context** So far, one workaround is to add an XPath suppression. However, the query is a bit hard to implement and understand, and adding extra annotations makes the query bigger and not so easy to maintain. Here's an example of the XPath suppression that works for the `@SpringBootApplication` annotation: ```xml <module name="SuppressionXpathSingleFilter"> <property name="files" value="\.java$" /> <property name="checks" value="HideUtilityClassConstructor" /> <property name="query" value="//CLASS_DEF[./MODIFIERS[./ANNOTATION[./IDENT[@text='SpringBootApplication']]]]" /> </module> ``` **Final solution:** new property `ignoreAnnotatedBy`
@nrmancuso , please review and approve if you agree with design. We can also start with simple implementation here (exact match), as we did in https://github.com/checkstyle/checkstyle/pull/14553, and extend check to handle imports as needed later. Hi, I would like to work on this
2024-10-26T20:18:58Z
10.19
checkstyle/checkstyle
15,686
checkstyle__checkstyle-15686
[ "15685" ]
70ef51748bb75f6cf636beea66b8ace18ba3a835
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java @@ -1215,7 +1215,7 @@ public final class TokenTypes { * <pre> * new ArrayList(50); * </pre> - * <p> parses as:</p> + * <p>parses as:</p> * <pre> * |--EXPR -&gt; EXPR * | `--LITERAL_NEW -&gt; new @@ -5184,7 +5184,7 @@ public final class TokenTypes { /** * The type that refers to all types. This node has no children. - * <p> For example: </p> + * <p>For example: </p> * <pre> * * List&lt;?&gt; list; diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java @@ -44,6 +44,10 @@ * <a href="https://www.w3schools.com/html/html_blocks.asp">HTML block-tag</a>, * nested paragraph tags are allowed to do that.</li> * </ul> + * <p><b>ATTENTION:</b></p> + * <p>This Check ignores HTML comments.</p> + * <p>The Check ignores all the nested paragraph tags, + * it will not give any kind of violation if the paragraph tag is nested.</p> * <ul> * <li> * Property {@code allowNewlineParagraph} - Control whether the &lt;p&gt; tag @@ -174,7 +178,8 @@ public void visitJavadocToken(DetailNode ast) { checkEmptyLine(ast); } else if (ast.getType() == JavadocTokenTypes.HTML_ELEMENT - && JavadocUtil.getFirstChild(ast).getType() == JavadocTokenTypes.P_TAG_START) { + && (JavadocUtil.getFirstChild(ast).getType() == JavadocTokenTypes.P_TAG_START + || JavadocUtil.getFirstChild(ast).getType() == JavadocTokenTypes.PARAGRAPH)) { checkParagraphTag(ast); } } @@ -198,25 +203,49 @@ private void checkEmptyLine(DetailNode newline) { * @param tag html tag. */ private void checkParagraphTag(DetailNode tag) { - final DetailNode newLine = getNearestEmptyLine(tag); - if (isFirstParagraph(tag)) { - log(tag.getLineNumber(), tag.getColumnNumber(), MSG_REDUNDANT_PARAGRAPH); - } - else if (newLine == null || tag.getLineNumber() - newLine.getLineNumber() != 1) { - log(tag.getLineNumber(), tag.getColumnNumber(), MSG_LINE_BEFORE); - } + if (!isNestedParagraph(tag)) { + final DetailNode newLine = getNearestEmptyLine(tag); + if (isFirstParagraph(tag)) { + log(tag.getLineNumber(), tag.getColumnNumber(), MSG_REDUNDANT_PARAGRAPH); + } + else if (newLine == null || tag.getLineNumber() - newLine.getLineNumber() != 1) { + log(tag.getLineNumber(), tag.getColumnNumber(), MSG_LINE_BEFORE); + } - final String blockTagName = findFollowedBlockTagName(tag); - if (blockTagName != null) { - log(tag.getLineNumber(), tag.getColumnNumber(), MSG_PRECEDED_BLOCK_TAG, blockTagName); - } + final String blockTagName = findFollowedBlockTagName(tag); + if (blockTagName != null) { + log(tag.getLineNumber(), tag.getColumnNumber(), + MSG_PRECEDED_BLOCK_TAG, blockTagName); + } - if (!allowNewlineParagraph && isImmediatelyFollowedByNewLine(tag)) { - log(tag.getLineNumber(), tag.getColumnNumber(), MSG_MISPLACED_TAG); + if (!allowNewlineParagraph && isImmediatelyFollowedByNewLine(tag)) { + log(tag.getLineNumber(), tag.getColumnNumber(), MSG_MISPLACED_TAG); + } + if (isImmediatelyFollowedByText(tag)) { + log(tag.getLineNumber(), tag.getColumnNumber(), MSG_MISPLACED_TAG); + } } - if (isImmediatelyFollowedByText(tag)) { - log(tag.getLineNumber(), tag.getColumnNumber(), MSG_MISPLACED_TAG); + } + + /** + * Determines whether the paragraph tag is nested. + * + * @param tag html tag. + * @return true, if the paragraph tag is nested. + */ + private static boolean isNestedParagraph(DetailNode tag) { + boolean nested = false; + DetailNode parent = tag; + + while (parent != null) { + if (parent.getType() == JavadocTokenTypes.PARAGRAPH) { + nested = true; + break; + } + parent = parent.getParent(); } + + return nested; } /** @@ -245,9 +274,11 @@ private static String findFollowedBlockTagName(DetailNode tag) { */ @Nullable private static DetailNode findFirstHtmlElementAfter(DetailNode tag) { - DetailNode htmlElement = JavadocUtil.getNextSibling(tag); + DetailNode htmlElement = getNextSibling(tag); - while (htmlElement != null && htmlElement.getType() != JavadocTokenTypes.HTML_ELEMENT) { + while (htmlElement != null + && htmlElement.getType() != JavadocTokenTypes.HTML_ELEMENT + && htmlElement.getType() != JavadocTokenTypes.HTML_TAG) { if ((htmlElement.getType() == JavadocTokenTypes.TEXT || htmlElement.getType() == JavadocTokenTypes.JAVADOC_INLINE_TAG) && !CommonUtil.isBlank(htmlElement.getText())) { @@ -268,7 +299,13 @@ private static DetailNode findFirstHtmlElementAfter(DetailNode tag) { */ @Nullable private static String getHtmlElementName(DetailNode htmlElement) { - final DetailNode htmlTag = JavadocUtil.getFirstChild(htmlElement); + final DetailNode htmlTag; + if (htmlElement.getType() == JavadocTokenTypes.HTML_TAG) { + htmlTag = htmlElement; + } + else { + htmlTag = JavadocUtil.getFirstChild(htmlElement); + } final DetailNode htmlTagFirstChild = JavadocUtil.getFirstChild(htmlTag); final DetailNode htmlTagName = JavadocUtil.findFirstToken(htmlTagFirstChild, JavadocTokenTypes.HTML_TAG_NAME); @@ -364,7 +401,8 @@ private static DetailNode getNearestEmptyLine(DetailNode node) { * @return true, if the paragraph tag is immediately followed by the text. */ private static boolean isImmediatelyFollowedByText(DetailNode tag) { - final DetailNode nextSibling = JavadocUtil.getNextSibling(tag); + final DetailNode nextSibling = getNextSibling(tag); + return nextSibling.getType() == JavadocTokenTypes.EOF || nextSibling.getText().startsWith(" "); } @@ -373,10 +411,35 @@ private static boolean isImmediatelyFollowedByText(DetailNode tag) { * Tests whether the paragraph tag is immediately followed by the new line. * * @param tag html tag. - * @return true, if the paragraph tag is immediately followed by the text. + * @return true, if the paragraph tag is immediately followed by the new line. */ private static boolean isImmediatelyFollowedByNewLine(DetailNode tag) { - final DetailNode nextSibling = JavadocUtil.getNextSibling(tag); - return nextSibling.getType() == JavadocTokenTypes.NEWLINE; + return getNextSibling(tag).getType() == JavadocTokenTypes.NEWLINE; + } + + /** + * Custom getNextSibling method to handle different types of paragraph tag. + * It works for both {@code <p>} and {@code <p></p>} tags. + * + * @param tag HTML_ELEMENT tag. + * @return next sibling of the tag. + */ + private static DetailNode getNextSibling(DetailNode tag) { + DetailNode nextSibling; + + if (JavadocUtil.getFirstChild(tag).getType() == JavadocTokenTypes.PARAGRAPH) { + final DetailNode paragraphToken = JavadocUtil.getFirstChild(tag); + final DetailNode paragraphStartTagToken = JavadocUtil.getFirstChild(paragraphToken); + nextSibling = JavadocUtil.getNextSibling(paragraphStartTagToken); + } + else { + nextSibling = JavadocUtil.getNextSibling(tag); + } + + if (nextSibling.getType() == JavadocTokenTypes.HTML_COMMENT) { + nextSibling = JavadocUtil.getNextSibling(nextSibling); + } + + return nextSibling; } }
diff --git a/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputIncorrectJavadocParagraph.java b/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputIncorrectJavadocParagraph.java --- a/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputIncorrectJavadocParagraph.java +++ b/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule712paragraphs/InputIncorrectJavadocParagraph.java @@ -33,8 +33,7 @@ class InputIncorrectJavadocParagraph { * * <p>Some Javadoc. * - * @see <a href="example.com"> - * Documentation about GWT emulated source</a> + * @see <a href="example.com">Documentation about GWT emulated source</a> */ boolean emulated() { return false; @@ -82,13 +81,12 @@ class InnerInputCorrectJavaDocParagraphCheck { * * <p> * Some Javadoc.<p> - * @see <a href="example.com"> - * Documentation about GWT emulated source</a> + * @see <a href="example.com">Documentation about GWT emulated source</a> */ - // 2 violations 4 lines above: + // 2 violations 3 lines above: // '<p> tag should be placed immediately before the first word' // '<p> tag should be preceded with an empty line.' - // violation 6 lines above 'Javadoc tag '@see' should be preceded with an empty line.' + // violation 5 lines above 'Javadoc tag '@see' should be preceded with an empty line.' boolean emulated() { return false; } @@ -116,8 +114,7 @@ boolean emulated() { * * <p> Some Javadoc. * - * @see <a href="example.com"> - * Documentation about <p> GWT emulated source</a> + * @see <a href="example.com">Documentation about <p> GWT emulated source</a> */ // 2 violations 2 lines above: // '<p> tag should be placed immediately before the first word' @@ -127,14 +124,16 @@ boolean emulated() { } }; - /* 4 lines below, no violation until #15685 */ /** * Some summary. * * <p><h1>Testing...</h1></p> */ + // violation 2 lines above '<p> tag should not precede HTML block-tag '<h1>'' class InnerPrecedingPtag { - /* 5 lines below, no violation until #15685 */ + // 2 violations 6 lines below: + // '<p> tag should be placed immediately before the first word' + // '<p> tag should not precede HTML block-tag '<ul>'' /** * Some summary. * @@ -148,7 +147,9 @@ class InnerPrecedingPtag { */ public void foo() {} - /* 5 lines below, no violation until #15685 */ + // 2 violations 6 lines below: + // '<p> tag should be placed immediately before the first word' + // '<p> tag should not precede HTML block-tag '<table>'' /** * Some summary. * @@ -159,7 +160,9 @@ public void foo() {} */ public void fooo() {} - /* 5 lines below, no violation until #15685 */ + // 2 violations 6 lines below: + // '<p> tag should be placed immediately before the first word' + // '<p> tag should not precede HTML block-tag '<pre>'' /** * Some summary. * diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheckTest.java @@ -188,10 +188,82 @@ public void testAllowNewlineParagraph3() throws Exception { public void testJavadocParagraph() throws Exception { final String[] expected = { "19:4: " + getCheckMessage(MSG_LINE_BEFORE), - "30:7: " + getCheckMessage(MSG_LINE_BEFORE), + "28:7: " + getCheckMessage(MSG_REDUNDANT_PARAGRAPH), + "31:7: " + getCheckMessage(MSG_LINE_BEFORE), + "50:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "ul"), + "65:8: " + getCheckMessage(MSG_LINE_BEFORE), + "76:8: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "table"), + "87:8: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "pre"), }; verifyWithInlineConfigParser( getPath("InputJavadocParagraphCheck1.java"), expected); } + + @Test + public void testJavadocParagraphOpenClosedTag() throws Exception { + final String[] expected = { + "14:4: " + getCheckMessage(MSG_MISPLACED_TAG), + "21:7: " + getCheckMessage(MSG_LINE_BEFORE), + "28:20: " + getCheckMessage(MSG_LINE_BEFORE), + "29:20: " + getCheckMessage(MSG_LINE_BEFORE), + "35:8: " + getCheckMessage(MSG_REDUNDANT_PARAGRAPH), + "36:6: " + getCheckMessage(MSG_TAG_AFTER), + "38:6: " + getCheckMessage(MSG_TAG_AFTER), + "58:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "ul"), + "73:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "h1"), + "85:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "h1"), + }; + + verifyWithInlineConfigParser( + getPath("InputJavadocParagraphIncorrectOpenClosedTag.java"), expected); + } + + @Test + public void testJavadocParagraphOpenClosedTag2() throws Exception { + final String[] expected = { + "14:4: " + getCheckMessage(MSG_MISPLACED_TAG), + "21:7: " + getCheckMessage(MSG_LINE_BEFORE), + "30:20: " + getCheckMessage(MSG_MISPLACED_TAG), + "30:20: " + getCheckMessage(MSG_LINE_BEFORE), + "31:20: " + getCheckMessage(MSG_LINE_BEFORE), + "37:8: " + getCheckMessage(MSG_REDUNDANT_PARAGRAPH), + "38:6: " + getCheckMessage(MSG_TAG_AFTER), + "40:6: " + getCheckMessage(MSG_TAG_AFTER), + "50:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "63:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "63:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "ul"), + "78:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "h1"), + "87:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "91:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "91:7: " + getCheckMessage(MSG_PRECEDED_BLOCK_TAG, "h1"), + }; + + verifyWithInlineConfigParser( + getPath("InputJavadocParagraphIncorrectOpenClosedTag2.java"), expected); + } + + @Test + public void testJavadocParagraphOpenClosedTag3() throws Exception { + final String[] expected = { + "15:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "23:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "31:7: " + getCheckMessage(MSG_MISPLACED_TAG), + }; + + verifyWithInlineConfigParser( + getPath("InputJavadocParagraphIncorrectOpenClosedTag3.java"), expected); + } + + @Test + public void testIncorrect3() throws Exception { + final String[] expected = { + "15:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "23:7: " + getCheckMessage(MSG_MISPLACED_TAG), + "31:7: " + getCheckMessage(MSG_MISPLACED_TAG), + }; + + verifyWithInlineConfigParser( + getPath("InputJavadocParagraphIncorrect6.java"), expected); + } } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphCheck1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphCheck1.java --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphCheck1.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphCheck1.java @@ -23,6 +23,7 @@ public class InputJavadocParagraphCheck1 { // violation 4 lines above '<p> tag should be preceded with an empty line' class Check { + // violation 2 lines below 'Redundant <p> tag.' /** * <p> * Checks whether file contains code. Files which are considered to have no code: @@ -31,4 +32,62 @@ class Check { */ // violation 2 lines above '<p> tag should be preceded with an empty line.' void inheritDocWithThrows() {} + + /** + * Some summary. + * + * <p>The following package declaration:</p> + * <pre> + * package com.puppycrawl.tools.checkstyle; + * </pre> + */ + int iamtoolazyyyyyyy = 45; + + // violation 4 lines below '<p> tag should not precede HTML block-tag '<ul>'' + /** + * Some summary. + * + *<p> + * <ul> // ok until #15762 + * <p> // ok until #15762 + * <li>1</li> should NOT give violation as there is not empty line before + * </p> // false-negative on this line & above until #15762 + * </ul> // ok until #15762 + *</p> + */ + public void foo() {} + + // violation 5 lines below '<p> tag should be preceded with an empty line.' + /** + * Some summary. + * + * <b> + * <p> + * <br/> + * </p> + * </b> + */ + public void fooo() {} + + // violation 4 lines below '<p> tag should not precede HTML block-tag '<table>'' + /** + * Some summary. + * + * <p> + * <table> // ok until #15762 + * </table> // ok until #15762 + * </p> + */ + public void foooo() {} + + // violation 4 lines below '<p> tag should not precede HTML block-tag '<pre>'' + /** + * Some summary. + * + * <p> + * <pre>testing...</pre> // ok until #15762 + * <pre>testing...</pre> // ok until #15762 + * </p> + */ + public void fooooo() {} } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrect6.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrect6.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrect6.java @@ -0,0 +1,42 @@ +/* +JavadocParagraph +violateExecutionOnNonTightHtml = (default)false +allowNewlineParagraph = (default)true + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocparagraph; + +public class InputJavadocParagraphIncorrect6 { + /** + * Some Summary. + * + * <p><!-- comment is required --> extra space in paragraph after comment is violation + */ + // violation 2 lines above '<p> tag should be placed immediately before the first word' + int a; + + /** + * Some Summary. + * + * <p> <!-- comment is required -->extra space in paragraph before comment is violation + */ + // violation 2 lines above '<p> tag should be placed immediately before the first word' + int b; + + /** + * Some Summary. + * + * <p> <!-- comment is required --> both cases combined, this is also violation + */ + // violation 2 lines above '<p> tag should be placed immediately before the first word' + int c; + + /** + * Some Summary. + * + * <p><!-- comment is required -->no extra spaces, this is okay + */ + int d; +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag.java @@ -0,0 +1,91 @@ +/* +JavadocParagraph +violateExecutionOnNonTightHtml = (default)false +allowNewlineParagraph = (default)true + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocparagraph; + +/** + * Some summary. + * + * <p> Some Javadoc. </p> + */ +// violation 2 lines above '<p> tag should be placed immediately before the first word' +public class InputJavadocParagraphIncorrectOpenClosedTag { + + /** + * some javadoc. + * <p></p> + */ + // violation 2 lines above '<p> tag should be preceded with an empty line.' + int a; + + // violation 2 lines below '<p> tag should be preceded with an empty line.' + /** + * Some Javadoc.<P> + * Some Javadoc.<P></P> + */ + // violation 2 lines above '<p> tag should be preceded with an empty line.' + int b; + + // violation below 'Redundant <p> tag.' + /**<p>some javadoc.</p> + * + * Some <p>Javadoc.</p> + * + * Some <p>Javadoc.</p> + */ + // violation 5 lines above 'Empty line should be followed by <p> tag on the next line.' + // violation 4 lines above 'Empty line should be followed by <p> tag on the next line.' + int c; + + /** + * Some Summary. + * + * <p> + * Some Javadoc. // ok until #15762 + * </p> + */ + int d; + + // violation 4 lines below '<p> tag should not precede HTML block-tag '<ul>'' + /** + * Some Summary. + * + * <p> + * <ul> // ok until #15762 + * <li>Item 1</li> // ok until #15762 + * <li>Item 2</li> // ok until #15762 + * <li>Item 3</li> // ok until #15762 + * </ul> // ok until #15762 + * </p> + */ + int e; + + /** + * Some Summary. + * + * <p><b>testing....</b></p> + * + * <p><h1>testing....</h1></p> + */ + // violation 2 lines above '<p> tag should not precede HTML block-tag '<h1>'' + int f; + + /** + * Some Summary. + * + * <p> + * <b>testing....</b> // ok until #15762 + * </p> + * + * <p> + * <h1>testing....</h1> // ok until #15762 + * </p> + */ + // violation 4 lines above '<p> tag should not precede HTML block-tag '<h1>'' + int g; +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag2.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag2.java @@ -0,0 +1,99 @@ +/* +JavadocParagraph +violateExecutionOnNonTightHtml = (default)false +allowNewlineParagraph = false + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocparagraph; + +/** + * Some summary. + * + * <p> Some Javadoc. </p> + */ +// violation 2 lines above '<p> tag should be placed immediately before the first word' +public class InputJavadocParagraphIncorrectOpenClosedTag2 { + + /** + * some javadoc. + * <p></p> + */ + // violation 2 lines above '<p> tag should be preceded with an empty line.' + int a; + + // 2 violations 4 lines below: + // '<p> tag should be placed immediately before the first word' + // '<p> tag should be preceded with an empty line.' + /** + * Some Javadoc.<P> + * Some Javadoc.<P></P> + */ + // violation 2 lines above '<p> tag should be preceded with an empty line.' + int b; + + // violation below 'Redundant <p> tag.' + /**<p>some javadoc.</p> + * + * Some <p>Javadoc.</p> + * + * Some <p>Javadoc.</p> + */ + // violation 5 lines above 'Empty line should be followed by <p> tag on the next line.' + // violation 4 lines above 'Empty line should be followed by <p> tag on the next line.' + int c; + + /** + * Some Summary. + * + * <p> + * Some Javadoc. // ok until #15762 + * </p> + */ + // violation 4 lines above '<p> tag should be placed immediately before the first word' + int d; + + // 2 violations 6 lines below: + // '<p> tag should be placed immediately before the first word' + // '<p> tag should not precede HTML block-tag '<ul>'' + /** + * Some Summary. + * + * <p> + * <ul> // ok until #15762 + * <li>Item 1</li> // ok until #15762 + * <li>Item 2</li> // ok until #15762 + * <li>Item 3</li> // ok until #15762 + * </ul> // ok until #15762 + * </p> + */ + int e; + + /** + * Some Summary. + * + * <p><b>testing....</b></p> + * + * <p><h1>testing....</h1></p> + */ + // violation 2 lines above '<p> tag should not precede HTML block-tag '<h1>'' + int f; + + // violation 4 lines below '<p> tag should be placed immediately before the first word' + /** + * Some Summary. + * + * <p> + * <b>testing....</b> + * </p> + * + * <p> + * <h1>testing....</h1> + * </p> + */ + // 2 violations 4 lines above: + // '<p> tag should be placed immediately before the first word' + // '<p> tag should not precede HTML block-tag '<h1>'' + int g; +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag3.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocparagraph/InputJavadocParagraphIncorrectOpenClosedTag3.java @@ -0,0 +1,42 @@ +/* +JavadocParagraph +violateExecutionOnNonTightHtml = (default)false +allowNewlineParagraph = (default)true + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocparagraph; + +public class InputJavadocParagraphIncorrectOpenClosedTag3 { + /** + * Some Summary. + * + * <p><!-- comment is required --> extra space in paragraph after comment is violation</p> + */ + // violation 2 lines above '<p> tag should be placed immediately before the first word' + int a; + + /** + * Some Summary. + * + * <p> <!-- comment is required -->extra space in paragraph before comment is violation</p> + */ + // violation 2 lines above '<p> tag should be placed immediately before the first word' + int b; + + /** + * Some Summary. + * + * <p> <!-- comment is required --> both cases combined, this is also violation</p> + */ + // violation 2 lines above '<p> tag should be placed immediately before the first word' + int c; + + /** + * Some Summary. + * + * <p><!-- comment is required -->no extra spaces, this is okay</p> + */ + int d; +}
JavadocParagraph does not work when paragraphs have their corresponding closing tag I have read check documentation: https://checkstyle.org/checks/javadoc/javadocparagraph.html I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words Detected at: https://github.com/checkstyle/checkstyle/issues/15503#issuecomment-2362869286 In [JavadocParagraph](https://checkstyle.org/checks/javadoc/javadocparagraph.html)'s implementation, we're only checking for `P` tags which aren't closed, i.e we're checking only for `<p>` which doesn't have corresponding `</p>`. There is a difference in parsed AST when `P` have its corresponding closing tag and when it doesn't have it. As explained in the above referenced comment, AST for `P` when it is not closed looks like this: ``` | | | |--HTML_ELEMENT -> HTML_ELEMENT [4:3] | | | | `--P_TAG_START -> P_TAG_START [4:3] ``` and when it is properly closed, it looks like this: ``` | | | |--HTML_ELEMENT -> HTML_ELEMENT [4:3] | | | | `--PARAGRAPH -> PARAGRAPH [4:3] | | | | |--P_TAG_START -> P_TAG_START [4:3] ``` A new `PARAGRAPH ` appears between the token. What we do in the Check's implementation: https://github.com/checkstyle/checkstyle/blob/d07072b179330e40357c7c8852883af815d6978c/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java#L147-L156 We check if after `HTML_ELEMENT` is there a `P_TAG_START` token? This token is for opening paragraph tag ( `<p>` ). If yes then move further. This case is only valid for `<p>` tags which does not have their corresponding `</p>`, so when we encounter a proper pair of paragraph tag (`<p></p>`), our check ignores that paragraph as a new token ( `PARAGRAPH` ) appears between `HTML_ELEMENT` & `P_TAG_START`. Example: ```xml $ cat .\javadocparagraph_config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="JavadocParagraph"/> </module> </module> ``` ```java $ cat .\InvalidParagraphTagPosition.java /** * Some summary. * * <p> Some Javadoc. * * <p> Some Javadoc. </p> // false-negative */ public class InvalidParagraphTagPosition { /** * some javadoc. * <p> * * <p></p> // false-negative */ int a; /** * Some Javadoc.<P> * Some Javadoc.<P></P> // false-negative */ int b; } ``` ``` $ java -jar .\checkstyle-10.18.1-all.jar -c .\javadocparagraph_config.xml .\InvalidParagraphTagPosition.java Starting audit... [ERROR] C:\checkstyle testing\.\InvalidParagraphTagPosition.java:4: <p> tag should be placed immediately before the first word, with no space after. [JavadocParagraph] [ERROR] C:\checkstyle testing\.\InvalidParagraphTagPosition.java:11: <p> tag should be placed immediately before the first word, with no space after. [JavadocParagraph] [ERROR] C:\checkstyle testing\.\InvalidParagraphTagPosition.java:11: <p> tag should be preceded with an empty line. [JavadocParagraph] [ERROR] C:\checkstyle testing\.\InvalidParagraphTagPosition.java:18: <p> tag should be placed immediately before the first word, with no space after. [JavadocParagraph] [ERROR] C:\checkstyle testing\.\InvalidParagraphTagPosition.java:18: <p> tag should be preceded with an empty line. [JavadocParagraph] Audit done. Checkstyle ends with 5 errors. ``` We get errors only for `<p>` which are not closed, we don't get any violations for `<p>` which are closed properly. We expect the same errors as we got for `<p>` --- **Describe what you expect in detail.** Fix the check's implementation to check for both types of tags: `<p>` & `<p></p>`
2024-09-21T21:04:41Z
10.18
checkstyle/checkstyle
15,681
checkstyle__checkstyle-15681
[ "15263" ]
3d523d46c905d23131334073d882bfe490deac55
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java @@ -19,6 +19,9 @@ package com.puppycrawl.tools.checkstyle.checks.coding; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.regex.Pattern; import com.puppycrawl.tools.checkstyle.FileStatefulCheck; @@ -441,6 +444,7 @@ public int[] getAcceptableTokens() { TokenTypes.BXOR, TokenTypes.BOR, TokenTypes.BAND, + TokenTypes.QUESTION, }; } @@ -458,6 +462,10 @@ public void visitToken(DetailAST ast) { if (isLambdaSingleParameterSurrounded(ast)) { log(ast, MSG_LAMBDA); } + else if (ast.getType() == TokenTypes.QUESTION) { + getParenthesesChildrenAroundQuestion(ast) + .forEach(unnecessaryChild -> log(unnecessaryChild, MSG_EXPR)); + } else if (parent.getType() != TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR) { final int type = ast.getType(); final boolean surrounded = isSurrounded(ast); @@ -684,6 +692,27 @@ private static boolean isLambdaSingleParameterSurrounded(DetailAST ast) { return result; } + /** + * Returns the direct LPAREN tokens children to a given QUESTION token which + * contain an expression not a literal variable. + * + * @param questionToken {@code DetailAST} question token to be checked + * @return the direct children to the given question token which their types are LPAREN + * tokens and not contain a literal inside the parentheses + */ + private static List<DetailAST> getParenthesesChildrenAroundQuestion(DetailAST questionToken) { + final List<DetailAST> surroundedChildren = new ArrayList<>(); + DetailAST directChild = questionToken.getFirstChild(); + while (directChild != null) { + if (directChild.getType() == TokenTypes.LPAREN + && !TokenUtil.isOfType(directChild.getNextSibling(), LITERALS)) { + surroundedChildren.add(directChild); + } + directChild = directChild.getNextSibling(); + } + return Collections.unmodifiableList(surroundedChildren); + } + /** * Returns the specified string chopped to {@code MAX_QUOTED_LENGTH} * plus an ellipsis (...) if the length of the string exceeds {@code diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/Example3.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/Example3.java @@ -0,0 +1,24 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="UnnecessaryParentheses"> + <property name="tokens" value="QUESTION" /> + </module> + </module> +</module> +*/ +package com.puppycrawl.tools.checkstyle.checks.coding.unnecessaryparentheses; + +// xdoc section -- start +class Example3 { + + void method() { + int a = 9, b = 8; + int c = (a > b) ? 1 : 0; // violation 'Unnecessary parentheses around expression' + + int d = c == 1 ? (b % 2 == 0) ? 1 : 0 : 5; + // violation above 'Unnecessary parentheses around expression' + } + +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java @@ -357,4 +357,22 @@ public void testWhenExpressions() throws Exception { verifyWithInlineConfigParser( getNonCompilablePath("InputUnnecessaryParenthesesWhenExpressions.java"), expected); } + + @Test + public void testUnnecessaryParenthesesConditionalExpression() throws Exception { + final String[] expected = { + "19:17: " + getCheckMessage(MSG_EXPR), + "19:29: " + getCheckMessage(MSG_LITERAL, "3"), + "19:35: " + getCheckMessage(MSG_LITERAL, "4"), + "25:18: " + getCheckMessage(MSG_EXPR), + "28:18: " + getCheckMessage(MSG_EXPR), + "28:33: " + getCheckMessage(MSG_EXPR), + "35:26: " + getCheckMessage(MSG_EXPR), + "36:17: " + getCheckMessage(MSG_EXPR), + "36:41: " + getCheckMessage(MSG_EXPR), + }; + verifyWithInlineConfigParser( + getPath("InputUnnecessaryParenthesesConditionalExpression.java"), expected); + + } } diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesConditionalExpression.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesConditionalExpression.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessaryparentheses/InputUnnecessaryParenthesesConditionalExpression.java @@ -0,0 +1,42 @@ +/* +UnnecessaryParentheses +tokens = EXPR, IDENT, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, \ + STRING_LITERAL, LITERAL_NULL, LITERAL_FALSE, LITERAL_TRUE, ASSIGN, \ + BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN, BXOR_ASSIGN, DIV_ASSIGN, \ + MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, SL_ASSIGN, SR_ASSIGN, STAR_ASSIGN, \ + LAMBDA, TEXT_BLOCK_LITERAL_BEGIN, LAND, LITERAL_INSTANCEOF, GT, LT, GE, \ + LE, EQUAL, NOT_EQUAL, UNARY_MINUS, UNARY_PLUS, INC, DEC, LNOT, BNOT, \ + POST_INC, POST_DEC, QUESTION + + +*/ + +package com.puppycrawl.tools.checkstyle.checks.coding.unnecessaryparentheses; + +public class InputUnnecessaryParenthesesConditionalExpression { + void method() { + int w = 5; + int x = (w == 3) ? (3) : (4); + // 3 violations above + // 'Unnecessary parentheses around expression' + // 'Unnecessary parentheses around literal '3''. + // 'Unnecessary parentheses around literal '4''. + int y = !(w>x) ? 3 : 4; + int z1 = (!(y >= w)) ? 5 : 6; // violation 'Unnecessary parentheses around expression' + + int z2 = 5 > 3 ? 2 : 1; + int z3 = (z2 > 0) ? 5 : (z2 < -10) ? 7 : 3; + // 2 violations above + // 'Unnecessary parentheses around expression' + // 'Unnecessary parentheses around expression' + + Object o = ""; + // violation below 'Unnecessary parentheses around expression' + boolean result = (o instanceof String) ? + (o instanceof String) : (!(o instanceof String)); + // 2 violations above + // 'Unnecessary parentheses around expression' + // 'Unnecessary parentheses around expression' + + } +}
UnnecessaryParenthesesCheck does not flag unnecessary parentheses in conditional expression detected at https://github.com/checkstyle/checkstyle/pull/15250#discussion_r1676837498 I have read check documentation: https://checkstyle.org/checks/coding/unnecessaryparentheses.html#UnnecessaryParentheses I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words --- ``` PS D:\CS\test> javac src/Test.java PS D:\CS\test> cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="haltOnException" value="true"/> <module name="TreeWalker"> <module name="UnnecessaryParentheses"> </module> </module> </module> PS D:\CS\test> cat src/Test.java public class Test { void test(int x) { boolean a = (x == 3); // violation boolean b = (!(x == 3)); // violation boolean c = (x == 3) ? (x == 3) : (!(x == 3)); // expected 3 violations } } PS D:\CS\test> java -jar checkstyle-10.17.0-all.jar -c config.xml src/Test.java Starting audit... [ERROR] D:\CS\test\src\Test.java:4:21: Unnecessary parentheses around assignment right-hand side. [UnnecessaryParentheses] [ERROR] D:\CS\test\src\Test.java:5:21: Unnecessary parentheses around assignment right-hand side. [UnnecessaryParentheses] Audit done. Checkstyle ends with 2 errors. ``` --- **Describe what you expect in detail.** `UnnecessaryParentheses` should flag unnecessary parentheses in conditional expressions. We should add `Question` to the acceptable tokens or something. ---
Issue looks good to me. please add false negative label we usually place "bug" label after fix (as this label is for release notes) Is this still open and not assigned ? I think I have a solution for it but not sure if precedence order would affect this solution @MohanadKh03 , thanks a lot for help, you are always welcome to fix any issues. We highly recommend (but not a mandatory requirement) for new contributors to finish one issue in. Each group "good xxxx issue" in this case contributor learning gradually how our project works, and there less likely to be failure to finish fix. @romani I have actually reviewed some of the previous fixes in this check especially so I have a brief idea about it. But I have some questions regarding how should the multiple violations in a single line be reported ? Like as a `MSG_EXPR` ? I already have an idea about how it could be fixed so if it's possible I can raise a PR and we can discuss more details about it there ? Better to discuss in PR, see you in PR
2024-09-19T15:26:31Z
10.18
checkstyle/checkstyle
15,430
checkstyle__checkstyle-15430
[ "15047" ]
d325ed0fb7ede71fe1327bc2bfef362d51bdaf99
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java @@ -139,6 +139,14 @@ public final class NPathComplexityCheck extends AbstractCheck { */ public static final String MSG_KEY = "npathComplexity"; + /** Tokens that are considered as case labels. */ + private static final int[] CASE_LABEL_TOKENS = { + TokenTypes.EXPR, + TokenTypes.PATTERN_DEF, + TokenTypes.PATTERN_VARIABLE_DEF, + TokenTypes.RECORD_PATTERN_DEF, + }; + /** Default allowed complexity. */ private static final int DEFAULT_MAX = 200; @@ -508,17 +516,21 @@ private static int countCaseTokens(DetailAST ast) { } /** - * Counts number of case constants (EXPR) tokens in a switch labeled rule. + * Counts number of case constants tokens in a switch labeled rule. * * @param ast switch rule token. - * @return number of case constant (EXPR) tokens. + * @return number of case constant tokens. */ private static int countCaseConstants(DetailAST ast) { final AtomicInteger counter = new AtomicInteger(); final DetailAST literalCase = ast.getFirstChild(); - TokenUtil.forEachChild(literalCase, - TokenTypes.EXPR, node -> counter.getAndIncrement()); + for (DetailAST node = literalCase.getFirstChild(); node != null; + node = node.getNextSibling()) { + if (TokenUtil.isOfType(node, CASE_LABEL_TOKENS)) { + counter.getAndIncrement(); + } + } return counter.get(); }
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java @@ -249,6 +249,28 @@ public void testCount() throws Exception { expected); } + @Test + public void testPatternMatchingForSwitch() throws Exception { + + final String[] expected = { + "14:5: " + getCheckMessage(MSG_KEY, 3, 1), + "23:5: " + getCheckMessage(MSG_KEY, 3, 1), + "32:5: " + getCheckMessage(MSG_KEY, 3, 1), + "41:5: " + getCheckMessage(MSG_KEY, 3, 1), + "50:5: " + getCheckMessage(MSG_KEY, 3, 1), + "59:5: " + getCheckMessage(MSG_KEY, 3, 1), + "68:5: " + getCheckMessage(MSG_KEY, 4, 1), + "76:5: " + getCheckMessage(MSG_KEY, 4, 1), + "86:5: " + getCheckMessage(MSG_KEY, 3, 1), + "95:5: " + getCheckMessage(MSG_KEY, 3, 1), + }; + + verifyWithInlineConfigParser( + getNonCompilablePath("InputNPathComplexityPatternMatchingForSwitch.java"), + expected); + + } + @Test public void testGetAcceptableTokens() { final NPathComplexityCheck npathComplexityCheckObj = new NPathComplexityCheck(); diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/metrics/npathcomplexity/InputNPathComplexityPatternMatchingForSwitch.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/metrics/npathcomplexity/InputNPathComplexityPatternMatchingForSwitch.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/metrics/npathcomplexity/InputNPathComplexityPatternMatchingForSwitch.java @@ -0,0 +1,105 @@ +/* +NPathComplexity +max = 1 + + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.metrics.npathcomplexity; + +public class InputNPathComplexityPatternMatchingForSwitch { + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testPatternWithRule(Object o) { + switch (o) { + case Integer _ -> {} + case String _ -> {} + default -> {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testPatternWithStatement(Object o) { + switch (o) { + case Integer _: {} + case String _: {} + default : {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testRecordPatternWithRule(Object o) { + switch (o) { + case A(int x) -> {} + case B(String s) -> {} + default -> {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testRecordPatternWithStatement(Object o) { + switch (o) { + case A(int x) : {} break; + case B(String s) : {} + default : {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testGuardsInRule(Object o) { + switch (o) { + case Integer i when i > 0 -> {} + case String s when s.length() > 0 -> {} + default -> {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testGuardsInStatement(Object o) { + switch (o) { + case Integer i when i > 0 : {} break; + case String s when s.length() > 0 : {} + default : {} + } + } + + // violation below, 'NPath Complexity is 4 (max allowed is 1)' + void testMultiCaseLabelWithRule(Object o) { + switch (o) { + case Integer _, String _ , Double _ -> {} + default -> {} + } + } + + // violation below, 'NPath Complexity is 4 (max allowed is 1)' + void testMultiCaseLabelWithStatement(Object o) { + switch (o) { + case Integer _ : + case String _ : + case Double _ : {} + default : {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testExprInRule(int x) { + switch (x) { + case 1 -> {} + case 2 -> {} + default -> {} + } + } + + // violation below, 'NPath Complexity is 3 (max allowed is 1)' + void testExprInStatement(int x) { + switch (x) { + case 1 : {} + case 2 : {} + default : {} + } + } + + record A(int x) {} + record B(String s) {} +}
Add Check Support for Java 21 Pattern Matching for Switch Syntax: NPathComplexity child of https://github.com/checkstyle/checkstyle/issues/14961 I have read check documentation:https://checkstyle.org/checks/metrics/npathcomplexity.html I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words --- ``` c cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="charset" value="UTF-8"/> <module name="TreeWalker"> <module name="NPathComplexity"> <property name="max" value="1"/> </module> </module> </module> ➜ src cat Test.java record ColoredPoint(int p, int x, boolean c) { } record Rectangle(ColoredPoint upperLeft, ColoredPoint lowerRight) { } public class Test { void test(Object obj) { switch (obj) { case ColoredPoint(int a, int b, _) when (a >= b) : {} break; case ColoredPoint(int a, int b, _) when (b > 100) : {} break; case ColoredPoint(int a, int b, _) when (b != 1000) : {} break; case ColoredPoint(int a, int b, _) when (b != 100000) : {} break; case Rectangle(_,_) : {} default : System.out.println("none"); }; } void test2(Object obj) { switch (obj) { case ColoredPoint(int a, int b, _) when (a >= b) -> {} case ColoredPoint(int a, int b, _) when (b > 100) -> {} case ColoredPoint(int a, int b, _) when (b != 1000) -> {} case ColoredPoint(int a, int b, _) when (b != 100000) -> {} case Rectangle(_,_) -> {} default -> System.out.println("none"); }; } } ➜ src javac --enable-preview --release 21 Test.java Note: Test.java uses preview features of Java SE 21. Note: Recompile with -Xlint:preview for details. ➜ src java -jar checkstyle-10.18.1-SNAPSHOT-all.jar -c config.xml Test.java Starting audit... [ERROR] /home/nick/IdeaProjects/tester/src/Test.java:5:5: NPath Complexity is 6 (max allowed is 1). [NPathComplexity] [ERROR] /home/nick/IdeaProjects/tester/src/Test.java:16:5: NPath Complexity is 2 (max allowed is 1). [NPathComplexity] Audit done. Checkstyle ends with 2 errors. ``` --- Describe what you want in detail I expect both methods to have the same NPathComplexity. There is a problem in counting when case labels are in the switch rule `(->)`.The colon syntax ( `:` ) is the correct one in terms of NPath counting
Looks like a false negative, approving this one. https://checkstyle.org/checks/metrics/npathcomplexity.html#Description > Expressions Number of && and || operators in expression. No operators - 0 This check also counts expressions, so fixing `when` may cause other effects here. OP is updated, same result as before, false negative on `->` syntax.
2024-08-03T13:16:45Z
10.17
checkstyle/checkstyle
15,334
checkstyle__checkstyle-15334
[ "15322" ]
6a3ab019020cf67973e4f3fdc8ace6d197eadddc
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java @@ -177,8 +177,7 @@ private boolean isBracesNeeded(DetailAST ast) { break; case TokenTypes.LITERAL_CASE: case TokenTypes.LITERAL_DEFAULT: - result = hasUnbracedStatements(ast) - && !isSwitchLabeledExpression(ast); + result = hasUnbracedStatements(ast); break; case TokenTypes.LITERAL_ELSE: result = ast.findFirstToken(TokenTypes.LITERAL_IF) == null; @@ -418,35 +417,6 @@ private static boolean isInSwitchRule(DetailAST ast) { return ast.getParent().getType() == TokenTypes.SWITCH_RULE; } - /** - * Checks if current expression is a switch labeled expression. If so, - * braces are not allowed e.g.: - * <p> - * {@code - * case 1 -> 4; - * } - * </p> - * - * @param ast the ast to check - * @return true if current expression is a switch labeled expression. - */ - private static boolean isSwitchLabeledExpression(DetailAST ast) { - final DetailAST parent = ast.getParent(); - return switchRuleHasSingleExpression(parent); - } - - /** - * Checks if current switch labeled expression contains only a single expression. - * - * @param switchRule {@link TokenTypes#SWITCH_RULE}. - * @return true if current switch rule has a single expression. - */ - private static boolean switchRuleHasSingleExpression(DetailAST switchRule) { - final DetailAST possibleExpression = switchRule.findFirstToken(TokenTypes.EXPR); - return possibleExpression != null - && possibleExpression.getFirstChild().getFirstChild() == null; - } - /** * Checks if switch member (case or default statement) in a switch rule or * case group is on a single-line.
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java @@ -246,7 +246,10 @@ public void testNeedBracesSwitchExpressionNoSingleLine() throws Exception { "59:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), "73:47: " + getCheckMessage(MSG_KEY_NEED_BRACES, "->"), "80:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), - }; + "87:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "88:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "89:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + }; verifyWithInlineConfigParser( getNonCompilablePath("InputNeedBracesTestSwitchExpressionNoSingleLine.java"), expected); @@ -291,8 +294,10 @@ public void testPatternMatchingForSwitch() throws Exception { "78:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), "80:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), "83:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), + "88:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "89:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), "90:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), - "91:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "96:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), }; verifyWithInlineConfigParser( getNonCompilablePath("InputNeedBracesPatternMatchingForSwitch.java"), @@ -320,4 +325,37 @@ public void testPatternMatchingForSwitchAllowSingleLine() throws Exception { expected); } + @Test + public void testNeedBracesSwitchExpressionAndLambda() throws Exception { + final String[] expected = { + "21:24: " + getCheckMessage(MSG_KEY_NEED_BRACES, "->"), + "24:24: " + getCheckMessage(MSG_KEY_NEED_BRACES, "->"), + "27:24: " + getCheckMessage(MSG_KEY_NEED_BRACES, "->"), + "50:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "51:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), + "56:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "58:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), + "62:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "63:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "65:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "66:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "default"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputNeedBracesSwitchExpressionAndLambda.java"), + expected); + } + + @Test + public void testNeedBracesSwitchExpressionAndLambdaAllowSingleLine() throws Exception { + final String[] expected = { + "27:24: " + getCheckMessage(MSG_KEY_NEED_BRACES, "->"), + "46:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + "53:13: " + getCheckMessage(MSG_KEY_NEED_BRACES, "case"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath( + "InputNeedBracesSwitchExpressionAndLambdaAllowSingleLine.java"), + expected); + } + } diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitch.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitch.java --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitch.java +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitch.java @@ -85,16 +85,15 @@ case Point(int x, int y ) when (x>=0 && y >=0) : // violation }; int b = switch (o) { - case Integer i when (i == 0) -> i; - // until https://github.com/checkstyle/checkstyle/issues/15322 - case String s when (s.equals("a")) -> s.length(); // violation - case Point(int x, int y ) when (x>=0 && y >=0) -> // violation + case Integer i when (i == 0) -> i; // violation + case String s when (s.equals("a")) -> s.length(); // violation + case Point(int x, int y ) when (x>=0 && y >=0) -> // violation x + y; case Integer i when (i == 9) -> { int n = i; yield n; } - default -> 0; + default -> 0; // violation }; } record Point(int x, int y) {} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitchAllowSingleLine.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitchAllowSingleLine.java --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitchAllowSingleLine.java +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesPatternMatchingForSwitchAllowSingleLine.java @@ -84,10 +84,10 @@ case Point(int x, int y ) when (x>=0 && y >=0) : // violation yield 0; }; - int b = switch (o) { + int b = switch (o) { case Integer i when (i == 0) -> i; case String s when (s.equals("a")) -> s.length(); - case Point(int x, int y ) when (x>=0 && y >=0) -> // violation + case Point(int x, int y ) when (x>=0 && y >=0) -> // violation x + y; case Integer i when (i == 9) -> { int n = i; diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesSwitchExpressionAndLambda.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesSwitchExpressionAndLambda.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesSwitchExpressionAndLambda.java @@ -0,0 +1,105 @@ +/* +NeedBraces +allowSingleLineStatement = false +allowEmptyLoopBody = (default)false +tokens = LITERAL_CASE, LITERAL_DEFAULT, LAMBDA + + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.blocks.needbraces; + +import java.util.Arrays; +import java.util.List; + +public class InputNeedBracesSwitchExpressionAndLambda { + + public void testLambda(String x, String y, String z) { + List<Integer> numbers = Arrays.asList(1, 2, 3); + numbers = numbers.stream() + .map(i -> 0).toList(); // violation + + numbers = numbers.stream() + .map(i -> x.length()).toList(); // violation + + numbers = numbers.stream() + .map(i -> x.length() + y.length() // violation + + z.length() + ).toList(); + + numbers = numbers.stream() + .map(i -> { + return 0; + }).toList(); + + numbers = numbers.stream() + .map(i -> { + return x.length(); + }).toList(); + + numbers = numbers.stream() + .map(i -> { + return x.length() + y.length() + + z.length(); + }).toList(); + } + + public void testSwitchExpression(int x, String s, Object o) { + int a = switch (x) { + case 1 -> 1; // violation + default -> 0; // violation + }; + + int b; + b = switch (x) { + case 1 -> 1 + 2 // violation + + 3 + 4 * 5; + default -> throw new IllegalStateException(); // violation + }; + + int c = switch (o) { + case Integer i -> i; // violation + case String str when x == 1 -> str.length() // violation + + str.length() * 5 + str.lastIndexOf("a"); + case String str -> str.length(); // violation + default -> 0; // violation + }; + + int aa = switch (x) { + case 1 -> { + yield 1; + } + default -> { + yield 0; + } + }; + + int bb; + bb = switch (x) { + case 1 -> { + yield 1 + 2 + + 3 + 4 * 5; + } + default -> { + throw new IllegalStateException(); + } + }; + + int cc = switch (o) { + case Integer i -> { + yield i; + } + case String str when x == 1 -> { + yield str.length() + + str.length() * 5 + str.lastIndexOf("a"); + } + case String str -> { + yield str.length(); + } + default -> { + yield 0; + } + }; + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesSwitchExpressionAndLambdaAllowSingleLine.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesSwitchExpressionAndLambdaAllowSingleLine.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesSwitchExpressionAndLambdaAllowSingleLine.java @@ -0,0 +1,78 @@ +/* +NeedBraces +allowSingleLineStatement = true +allowEmptyLoopBody = (default)false +tokens = LITERAL_CASE, LITERAL_DEFAULT, LAMBDA + + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.blocks.needbraces; + +import java.util.Arrays; +import java.util.List; + +public class InputNeedBracesSwitchExpressionAndLambdaAllowSingleLine { + + public void testLambda(String x, String y, String z) { + List<Integer> numbers = Arrays.asList(1, 2, 3); + numbers = numbers.stream() + .map(i -> 0).toList(); + + numbers = numbers.stream() + .map(i -> x.length()).toList(); + + numbers = numbers.stream() + .map(i -> x.length() + y.length() // violation + + z.length() + ).toList(); + + numbers = numbers.stream() + .map(i -> { + return x.length() + y.length() + + z.length(); + }).toList(); + } + + public void testSwitchExpression(int x, String s, Object o) { + int a = switch (x) { + case 1 -> 1; + default -> 0; + }; + + int b; + b = switch (x) { + case 1 -> 1 + 2 // violation + + 3 + 4 * 5; + default -> throw new IllegalStateException(); + }; + + int c = switch (o) { + case Integer i -> i; + case String str when x == 1 -> str.length() // violation + + str.length() * 5 + str.lastIndexOf("a"); + case String str -> str.length(); + default -> 0; + }; + + int bb; + bb = switch (x) { + case 1 -> { + yield 1 + 2 + + 3 + 4 * 5; + } + default -> throw new IllegalStateException(); + }; + + int cc = switch (o) { + case Integer i -> i; + case String str when x == 1 -> { + yield str.length() + + str.length() * 5 + str.lastIndexOf("a"); + } + case String str -> str.length(); + default -> 0; + }; + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesTestSwitchExpressionNoSingleLine.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesTestSwitchExpressionNoSingleLine.java --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesTestSwitchExpressionNoSingleLine.java +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/needbraces/InputNeedBracesTestSwitchExpressionNoSingleLine.java @@ -82,14 +82,11 @@ int howMany4(Nums k) { }; } - /** - * Braces not allowed in switch expression with switch labeled expression - */ int howMany5(Nums k) { return switch (k) { - case ONE -> 1; // braces not allowed, ok - case TWO, THREE -> 3; // braces not allowed, ok - case FOUR -> 4; // braces not allowed, ok + case ONE -> 1; // violation + case TWO, THREE -> 3; // violation + case FOUR -> 4; // violation default -> { throw new IllegalStateException("Not a Nums"); }
NeedBraces Check Should violate Switch Expressions with Arrow Syntax That Directly Yields a Value detected at https://github.com/checkstyle/checkstyle/pull/15321#discussion_r1684288238 I have read check documentation:https://checkstyle.org/checks/blocks/needbraces.html#NeedBraces I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words ``` D:\CS\test javac src/Test.java D:\CS\test cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="NeedBraces"> <property name="tokens" value="LAMBDA, LITERAL_CASE"/> </module> </module> </module> D:\CS\test cat src/Test.java import java.util.Arrays; import java.util.List; public class Test { int test(Object o, String z) { List<Integer> numbers = Arrays.asList(1, 2, 3); numbers = numbers.stream() .map(x -> 0) // violation .toList(); numbers = numbers.stream() .map(x -> z.length()) // violation .toList(); return switch (o) { case Integer _ -> 5; // should be violation same as the line below and lambda examples above case String s -> s.length(); // violation default -> 0; }; } } D:\CS\test java -jar checkstyle-10.17.0-all.jar -c config.xml src/Test.java Starting audit... [ERROR] D:\CS\test\src\Test.java:8:24: '->' construct must use '{}'s. [NeedBraces] [ERROR] D:\CS\test\src\Test.java:12:24: '->' construct must use '{}'s. [NeedBraces] [ERROR] D:\CS\test\src\Test.java:17:13: 'case' construct must use '{}'s. [NeedBraces] Audit done. Checkstyle ends with 3 errors. z ``` --- **Describe what you expect in detail.** I expect a violation on line 16. We can add braces and the `yield` keyword. We should be consistent with Lambdas. We violate them and the fix will be add braces and the `return` keyword. If some users don't want to violate these examples they should enable `allowSingleLineStatement`. ---
2024-07-21T00:35:38Z
10.17
checkstyle/checkstyle
15,337
checkstyle__checkstyle-15337
[ "14975" ]
b10a1bf0d165a506a684aa8e1f84f485769c4986
diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionSealedShouldHavePermitsListTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionSealedShouldHavePermitsListTest.java new file mode 100644 --- /dev/null +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionSealedShouldHavePermitsListTest.java @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package org.checkstyle.suppressionxpathfilter; + +import java.io.File; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.DefaultConfiguration; +import com.puppycrawl.tools.checkstyle.checks.design.SealedShouldHavePermitsListCheck; + +public class XpathRegressionSealedShouldHavePermitsListTest extends AbstractXpathTestSupport { + + private final String checkName = SealedShouldHavePermitsListCheck.class.getSimpleName(); + + @Override + protected String getCheckName() { + return checkName; + } + + @Test + public void testInner() throws Exception { + final File fileToProcess = + new File(getNonCompilablePath("InputXpathSealedShouldHavePermitsListInner.java")); + + final DefaultConfiguration moduleConfig = + createModuleConfig(SealedShouldHavePermitsListCheck.class); + + final String[] expectedViolation = { + "5:4: " + getCheckMessage(SealedShouldHavePermitsListCheck.class, + SealedShouldHavePermitsListCheck.MSG_KEY), + }; + + final List<String> expectedXpathQueries = Arrays.asList( + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathSealedShouldHavePermitsListInner']]" + + "/OBJBLOCK/CLASS_DEF[./IDENT[@text='A']]", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathSealedShouldHavePermitsListInner']]" + + "/OBJBLOCK/CLASS_DEF[./IDENT[@text='A']]/MODIFIERS", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathSealedShouldHavePermitsListInner']]" + + "/OBJBLOCK/CLASS_DEF[./IDENT[@text='A']]/MODIFIERS/LITERAL_SEALED" + ); + + runVerifications(moduleConfig, fileToProcess, expectedViolation, + expectedXpathQueries); + } + + @Test + public void testTopLevel() throws Exception { + final File fileToProcess = + new File(getNonCompilablePath( + "InputXpathSealedShouldHavePermitsListTopLevel.java")); + + final DefaultConfiguration moduleConfig = + createModuleConfig(SealedShouldHavePermitsListCheck.class); + + final String[] expectedViolation = { + "4:1: " + getCheckMessage(SealedShouldHavePermitsListCheck.class, + SealedShouldHavePermitsListCheck.MSG_KEY), + }; + + final List<String> expectedXpathQueries = Arrays.asList( + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathSealedShouldHavePermitsListTopLevel']]", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathSealedShouldHavePermitsListTopLevel']]/MODIFIERS", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathSealedShouldHavePermitsListTopLevel']]" + + "/MODIFIERS/LITERAL_PUBLIC" + ); + + runVerifications(moduleConfig, fileToProcess, expectedViolation, + expectedXpathQueries); + } +} diff --git a/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/sealedshouldhavepermitslist/InputXpathSealedShouldHavePermitsListInner.java b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/sealedshouldhavepermitslist/InputXpathSealedShouldHavePermitsListInner.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/sealedshouldhavepermitslist/InputXpathSealedShouldHavePermitsListInner.java @@ -0,0 +1,9 @@ +//non-compiled with javac: Compilable with Java17 +package org.checkstyle.suppressionxpathfilter.sealedshouldhavepermitslist; + +public class InputXpathSealedShouldHavePermitsListInner { + sealed class A {} // warn + final class B extends A {} + final class C extends A {} + final class D { } +} diff --git a/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/sealedshouldhavepermitslist/InputXpathSealedShouldHavePermitsListTopLevel.java b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/sealedshouldhavepermitslist/InputXpathSealedShouldHavePermitsListTopLevel.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/sealedshouldhavepermitslist/InputXpathSealedShouldHavePermitsListTopLevel.java @@ -0,0 +1,8 @@ +//non-compiled with javac: Compilable with Java17 +package org.checkstyle.suppressionxpathfilter.sealedshouldhavepermitslist; + +public sealed class InputXpathSealedShouldHavePermitsListTopLevel { // warn + final class B extends InputXpathSealedShouldHavePermitsListTopLevel {} + final class C extends InputXpathSealedShouldHavePermitsListTopLevel {} + final class D { } +} diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java @@ -621,6 +621,8 @@ private static void fillChecksFromDesignPackage() { BASE_PACKAGE + ".checks.design.MutableExceptionCheck"); NAME_TO_FULL_MODULE_NAME.put("OneTopLevelClassCheck", BASE_PACKAGE + ".checks.design.OneTopLevelClassCheck"); + NAME_TO_FULL_MODULE_NAME.put("SealedShouldHavePermitsListCheck", + BASE_PACKAGE + ".checks.design.SealedShouldHavePermitsListCheck"); NAME_TO_FULL_MODULE_NAME.put("ThrowsCountCheck", BASE_PACKAGE + ".checks.design.ThrowsCountCheck"); NAME_TO_FULL_MODULE_NAME.put("VisibilityModifierCheck", diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheck.java new file mode 100644 --- /dev/null +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheck.java @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.design; + +import com.puppycrawl.tools.checkstyle.StatelessCheck; +import com.puppycrawl.tools.checkstyle.api.AbstractCheck; +import com.puppycrawl.tools.checkstyle.api.DetailAST; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; + +/** + * <p> + * Checks that sealed classes and interfaces have a permits list. + * </p> + * <p> + * Rationale: When a permits clause is omitted from a sealed class, + * any class within the same compilation unit can extend it. This differs + * from other sealed classes where permitted subclasses are explicitly + * declared, making them readily visible to the reader. Without a permits + * clause, identifying potential subclasses requires searching the entire + * compilation unit, which can be challenging, especially in large files + * with complex class hierarchies. + * </p> + * <p> + * See the <a href="https://docs.oracle.com/javase/specs/jls/se22/html/jls-13.html#jls-13.4.2"> + * Java Language Specification</a> for more information about sealed classes. + * </p> + * <p> + * Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} + * </p> + * <p> + * Violation Message Keys: + * </p> + * <ul> + * <li> + * {@code sealed.should.have.permits} + * </li> + * </ul> + * + * @since 10.18.0 + */ + +@StatelessCheck +public class SealedShouldHavePermitsListCheck extends AbstractCheck { + + /** + * A key is pointing to the warning message text in "messages.properties" + * file. + */ + public static final String MSG_KEY = "sealed.should.have.permits"; + + @Override + public int[] getDefaultTokens() { + return getRequiredTokens(); + } + + @Override + public int[] getAcceptableTokens() { + return getRequiredTokens(); + } + + @Override + public int[] getRequiredTokens() { + return new int[] { + TokenTypes.CLASS_DEF, + TokenTypes.INTERFACE_DEF, + }; + } + + @Override + public void visitToken(DetailAST ast) { + final DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS); + final boolean isSealed = modifiers.findFirstToken(TokenTypes.LITERAL_SEALED) != null; + final boolean hasPermitsList = ast.findFirstToken(TokenTypes.PERMITS_CLAUSE) != null; + + if (isSealed && !hasPermitsList) { + log(ast, MSG_KEY); + } + } +} diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheckExamplesTest.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheckExamplesTest.java @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.design; + +import static com.puppycrawl.tools.checkstyle.checks.design.SealedShouldHavePermitsListCheck.MSG_KEY; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.AbstractExamplesModuleTestSupport; + +public class SealedShouldHavePermitsListCheckExamplesTest extends + AbstractExamplesModuleTestSupport { + + @Override + protected String getPackageLocation() { + return "com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist"; + } + + @Test + public void testExample1() throws Exception { + final String[] expected = { + "18:3: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("Example1.java"), + expected); + } +} diff --git a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/Example1.java b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/Example1.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/Example1.java @@ -0,0 +1,31 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="SealedShouldHavePermitsList"/> + </module> +</module> +*/ + + +//non-compiled with javac: Compilable with Java17 +package com.puppycrawl.tools.checkstyle.checks.design.sealedshouldhavepermitslist; + +// xdoc section -- start +public class Example1 { + + // imagine hundreds of lines of code... + + sealed class A {} // violation + final class B extends A {} + final class C extends A {} + final class D { } // this can extend A, so as any other class in the same file +} + +// all subclasses are declared at the enclosing class level, for easy reading +class CorrectedExample1 { + sealed class A permits B, C {} // ok, explicitly declared permitted subclasses + final class B extends A {} + final class C extends A {} + final class D { } // this can not extend A +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheckTest.java new file mode 100644 --- /dev/null +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/SealedShouldHavePermitsListCheckTest.java @@ -0,0 +1,105 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.design; + +import static com.google.common.truth.Truth.assertWithMessage; +import static com.puppycrawl.tools.checkstyle.checks.design.SealedShouldHavePermitsListCheck.MSG_KEY; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; + +public class SealedShouldHavePermitsListCheckTest extends AbstractModuleTestSupport { + + @Override + protected String getPackageLocation() { + return "com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist"; + } + + @Test + public void testGetRequiredTokens() { + final SealedShouldHavePermitsListCheck checkObj = new SealedShouldHavePermitsListCheck(); + final int[] expected = {TokenTypes.CLASS_DEF, TokenTypes.INTERFACE_DEF}; + assertWithMessage("Default required tokens are invalid") + .that(checkObj.getRequiredTokens()) + .isEqualTo(expected); + assertWithMessage("Default acceptable tokens are invalid") + .that(checkObj.getAcceptableTokens()) + .isEqualTo(expected); + assertWithMessage("Default tokens are invalid") + .that(checkObj.getDefaultTokens()) + .isEqualTo(expected); + } + + @Test + public void testInnerSealedClass() throws Exception { + final String[] expected = { + "10:5: " + getCheckMessage(MSG_KEY), + "15:5: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputSealedShouldHavePermitsListInnerClass.java"), + expected); + } + + @Test + public void testInnerSealedInterface() throws Exception { + final String[] expected = { + "10:5: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputSealedShouldHavePermitsListInnerInterface.java"), + expected); + } + + @Test + public void testTopLevelSealedClass() throws Exception { + final String[] expected = { + "9:1: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputSealedShouldHavePermitsListTopLevelSealedClass.java"), + expected); + } + + @Test + public void testTopLevelSealedInterface() throws Exception { + final String[] expected = { + "9:1: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath( + "InputSealedShouldHavePermitsListTopLevelSealedInterface.java"), + expected); + } + + @Test + public void testJepExample() throws Exception { + final String[] expected = { + "10:1: " + getCheckMessage(MSG_KEY), + "24:1: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath( + "InputSealedShouldHavePermitsListJepExample.java"), + expected); + } +} diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java @@ -40,20 +40,20 @@ protected String getPackageLocation() { @Test public void test() { - assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny()).hasSize(204); + assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny()).hasSize(205); } @Test public void testDuplicatePackage() { assertThat(XmlMetaReader .readAllModulesIncludingThirdPartyIfAny("com.puppycrawl.tools.checkstyle.meta")) - .hasSize(204); + .hasSize(205); } @Test public void testBadPackage() { assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny("DOES.NOT.EXIST")) - .hasSize(204); + .hasSize(205); } @Test diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListInnerClass.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListInnerClass.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListInnerClass.java @@ -0,0 +1,31 @@ +/* +SealedShouldHavePermitsList + +*/ + +//non-compiled with javac: Compilable with Java17 +package com.puppycrawl.tools.checkstyle.checks.design.sealedshouldhavepermitslist; + +public class InputSealedShouldHavePermitsListInnerClass { + sealed class A {} // violation + final class B extends A {} + final class C extends A {} + final class D { } // this can extend A, so as any other class in the compilation unit + non-sealed class F extends A {} + sealed class G extends A {} // violation + final class I extends G {} + enum E {} + record R(int x) {} +} + +class InputSealedShouldHavePermitsListInnerClassCorrected { + sealed class A permits B, C, F, G { } // ok, explicitly declared the permitted subclasses + final class B extends A { } + final class C extends A { } + final class D { } // this can't extend A + non-sealed class F extends A {} + sealed class G extends A permits I {} + final class I extends G {} + enum E {} + record R(int x) {} +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListInnerInterface.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListInnerInterface.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListInnerInterface.java @@ -0,0 +1,29 @@ +/* +SealedShouldHavePermitsList + +*/ + +//non-compiled with javac: Compilable with Java17 +package com.puppycrawl.tools.checkstyle.checks.design.sealedshouldhavepermitslist; + +public class InputSealedShouldHavePermitsListInnerInterface { + sealed interface A {} // violation + final class B implements A {} + final class C implements A {} + final class D { } // this can implement A, so as any other class in the compilation unit + non-sealed class F implements A {} + static final class G {} + record R(int x) implements A {} + enum E implements A {} +} + +class InputSealedShouldHavePermitsListInnerInterfaceCorrected { + sealed interface A permits B, C, F, R, E {} // ok, explicitly declared the permitted subclasses + final class B implements A { } + final class C implements A { } + final class D { } // this can't implement A + non-sealed class F implements A {} + static final class G {} + record R(int x) implements A {} + enum E implements A {} +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListJepExample.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListJepExample.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListJepExample.java @@ -0,0 +1,29 @@ +/* +SealedShouldHavePermitsList + +*/ + +//non-compiled with javac: Compilable with Java17 +package com.puppycrawl.tools.checkstyle.checks.design.sealedshouldhavepermitslist; + +// violation below +public sealed class InputSealedShouldHavePermitsListJepExample + // The permits clause has been omitted + // as its permitted classes have been + // defined in the same file. +{ } + +final class Circle extends InputSealedShouldHavePermitsListJepExample { + float radius; +} +non-sealed class Square extends InputSealedShouldHavePermitsListJepExample { + float side; +} + +// violation below +sealed class Rectangle extends InputSealedShouldHavePermitsListJepExample { + float length, width; +} +final class FilledRectangle extends Rectangle { + int red, green, blue; +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListTopLevelSealedClass.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListTopLevelSealedClass.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListTopLevelSealedClass.java @@ -0,0 +1,28 @@ +/* +SealedShouldHavePermitsList + +*/ + +//non-compiled with javac: Compilable with Java17 +package com.puppycrawl.tools.checkstyle.checks.design.sealedshouldhavepermitslist; + +public sealed class InputSealedShouldHavePermitsListTopLevelSealedClass { // violation + final class B extends InputSealedShouldHavePermitsListTopLevelSealedClass {} + final class C extends InputSealedShouldHavePermitsListTopLevelSealedClass {} + final class D { } + record R(int x) {} + enum E {} + static final class F extends InputSealedShouldHavePermitsListTopLevelSealedClass {} +} + +sealed class InputSealedShouldHavePermitsListTopLevelSealedClassCorrected + permits InputSealedShouldHavePermitsListTopLevelSealedClassCorrected.B, + InputSealedShouldHavePermitsListTopLevelSealedClassCorrected.C, + InputSealedShouldHavePermitsListTopLevelSealedClassCorrected.F { + final class B extends InputSealedShouldHavePermitsListTopLevelSealedClassCorrected { } + final class C extends InputSealedShouldHavePermitsListTopLevelSealedClassCorrected { } + final class D { } + record R(int x) {} + enum E {} + static final class F extends InputSealedShouldHavePermitsListTopLevelSealedClassCorrected {} +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListTopLevelSealedInterface.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListTopLevelSealedInterface.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/design/sealedshouldhavepermitslist/InputSealedShouldHavePermitsListTopLevelSealedInterface.java @@ -0,0 +1,32 @@ +/* +SealedShouldHavePermitsList + +*/ + +//non-compiled with javac: Compilable with Java17 +package com.puppycrawl.tools.checkstyle.checks.design.sealedshouldhavepermitslist; + +public sealed interface InputSealedShouldHavePermitsListTopLevelSealedInterface { // violation + final class B implements InputSealedShouldHavePermitsListTopLevelSealedInterface {} + final class C implements InputSealedShouldHavePermitsListTopLevelSealedInterface {} + final class D { } + record R(int x) implements InputSealedShouldHavePermitsListTopLevelSealedInterface {} + enum E implements InputSealedShouldHavePermitsListTopLevelSealedInterface {} + static non-sealed class S implements InputSealedShouldHavePermitsListTopLevelSealedInterface {} +} + +sealed interface InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected + permits InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected.B, + InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected.C, + InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected.R, + InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected.E, + InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected.S { + + final class B implements InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected { } + final class C implements InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected { } + final class D { } + record R(int x) implements InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected {} + enum E implements InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected {} + static non-sealed class S implements + InputSealedShouldHavePermitsListTopLevelSealedInterfaceCorrected {} +}
Add Check Support for Java 17 Sealed Classes: New Check SealedShouldHavePermitsList child of #14969 : > the sealed class may omit the permits clause and the Java compiler will infer the permitted subclasses from the declarations in the source file. (The subclasses may be auxiliary or nested classes.) A sealed class restricts which other classes can extend it. This is typically achieved using the permits clause. However, if a sealed class does not specify any permitted subclasses using the permits clause, it implicitly allows any class within the same file to extend it. This can lead to unintended inheritance classes that should not have been allowed to extend the sealed class can do so at any time. I propose the implementation of a check that violates any sealed class or interface without a `permits` clause. This check will help ensure that we explicitly defining permitted subclasses, therefore avoiding unintended extensions. --- **Config** ```XML $ cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="SealedShouldHavePermitsList"/> </module> </module> ``` --- **Example** ```Java public class SealedClasses { sealed class A {} // violation final class B extends A {} final class C extends A {} final class D { } // this is not intended to be a subclass of A // but it can do so anytime as there is no restrictive permits clause } ``` --- **Expected Output** ``` $ java -jar checkstyle-10.19.0-all.jar -c config.xml SealedClasses.java Starting audit... [ERROR] D:\SealedClasses.java:2:5: Sealed classes or interfaces should explicitly declare permitted subclasses. Audit done. Checkstyle ends with 1 errors. ```
Can you show what valid code should be (violations corrected by user). Also, what if we have another input file where sealed class A isn't a sub-class. Either it is the same subclasses as you showed now, or they are sibling classes in the same file. > ShouldPermitsSubClasses > subclasses are missing from permits clause of a sealed class > violates any sealed class or interface without a permits clause The first 2 sentences seem to conflict with the last sentence in the fact of sub-classes versus regular classes. What if there are no sub-classes in the file, will it still be a violation? Also, we talked in discord about a `SealedClassShouldHaveExplicitPermitsList` check. Would it make more sense to just implement that type of check, where we violate all seals without a permit list? > Can you show what valid code should be (violations corrected by user). ``` public class SealedClasses { sealed class A permits B, C {} final class B extends A {} final class C extends A {} final class D { } } ``` > Also, what if we have another input file where sealed class A isn't a sub-class. can you clarify this because sealed class A here isn't a sub-class? > What if there are no sub-classes in the file, will it still be a violation? this won't compile => `sealed class must have subclasses` > Also, we talked in discord about a SealedClassShouldHaveExplicitPermitsList check. Would it make more sense to just implement that type of check, where we violate all seals without a permit list? yes, that is true the check name now may be confusing. I will edit it to keep everything consistent. we will violate seals without permits > Also, what if we have another input file where sealed class A isn't a sub-class. > can you clarify this because sealed class A here isn't a sub-class? I consider A a sub-class because it is inside `SealedClasses`. Maybe the proper term is really nested. > this won't compile => sealed class must have subclasses So a top-level class can never be sealed as I understand it? It can be top-level. I think you want to see an example like this: ```Java public sealed class Test { public final class M extends Test { } public final class X extends Test { } public final class Y { } // this can extend Test } ``` the above example is valid after fixing the violation it will be ```Java public sealed class Test permits Test.M, Test.X { public final class M extends Test { } public final class X extends Test { } public final class Y { } // can't extend Test } ``` so you can say that all nested classes inside top-level sealed classes without `permits` can extend these top-level classes. with `permits` we can restrict the extension to the classes in the `permits` list only ` I am good to approve this issue if we can update the check's message to `Sealed classes or interfaces should explicitly declare permitted subclasses.` @rnveach please add approved label when you are good This check can live in with design checks.
2024-07-21T18:50:57Z
10.17
checkstyle/checkstyle
15,358
checkstyle__checkstyle-15358
[ "15058" ]
aeef199a44b3a54ac423830ade2c870f66f4bd0b
diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionUnusedCatchParameterShouldBeUnnamedTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionUnusedCatchParameterShouldBeUnnamedTest.java new file mode 100644 --- /dev/null +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionUnusedCatchParameterShouldBeUnnamedTest.java @@ -0,0 +1,122 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package org.checkstyle.suppressionxpathfilter; + +import java.io.File; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.DefaultConfiguration; +import com.puppycrawl.tools.checkstyle.checks.coding.UnusedCatchParameterShouldBeUnnamedCheck; + +public class XpathRegressionUnusedCatchParameterShouldBeUnnamedTest + extends AbstractXpathTestSupport { + + private final String checkName = UnusedCatchParameterShouldBeUnnamedCheck.class + .getSimpleName(); + + @Override + protected String getCheckName() { + return checkName; + } + + @Test + public void testSimple() throws Exception { + final File fileToProcess = + new File(getNonCompilablePath( + "InputXpathUnusedCatchParameterShouldBeUnnamedSimple.java")); + + final DefaultConfiguration moduleConfig = + createModuleConfig(UnusedCatchParameterShouldBeUnnamedCheck.class); + + final String[] expectedViolation = { + "10:16: " + getCheckMessage(UnusedCatchParameterShouldBeUnnamedCheck.class, + UnusedCatchParameterShouldBeUnnamedCheck.MSG_UNUSED_CATCH_PARAMETER, + "e"), + }; + + final List<String> expectedXpathQueries = Arrays.asList( + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathUnusedCatchParameterShouldBeUnnamedSimple']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY/" + + "LITERAL_CATCH/PARAMETER_DEF[./IDENT[@text='e']]", + "/COMPILATION_UNIT/CLASS_DEF[" + + "./IDENT[@text='InputXpathUnusedCatchParameterShouldBeUnnamedSimple']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/" + + "LITERAL_TRY/LITERAL_CATCH/PARAMETER_DEF[./IDENT[@text='e']]/MODIFIERS", + "/COMPILATION_UNIT/CLASS_DEF[" + + "./IDENT[@text='InputXpathUnusedCatchParameterShouldBeUnnamedSimple']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY/" + + "LITERAL_CATCH/PARAMETER_DEF[./IDENT[@text='e']]" + + "/TYPE[./IDENT[@text='Exception']]", + "/COMPILATION_UNIT/CLASS_DEF" + + "[./IDENT[@text='InputXpathUnusedCatchParameterShouldBeUnnamedSimple']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY" + + "/LITERAL_CATCH/PARAMETER_DEF[./IDENT[@text='e']]" + + "/TYPE/IDENT[@text='Exception']" + ); + + runVerifications(moduleConfig, fileToProcess, expectedViolation, + expectedXpathQueries); + } + + @Test + public void testNested() throws Exception { + final File fileToProcess = + new File(getNonCompilablePath( + "InputXpathUnusedCatchParameterShouldBeUnnamedNested.java")); + + final DefaultConfiguration moduleConfig = + createModuleConfig(UnusedCatchParameterShouldBeUnnamedCheck.class); + + final String[] expectedViolation = { + "14:20: " + getCheckMessage(UnusedCatchParameterShouldBeUnnamedCheck.class, + UnusedCatchParameterShouldBeUnnamedCheck.MSG_UNUSED_CATCH_PARAMETER, + "exception"), + }; + + final List<String> expectedXpathQueries = Arrays.asList( + "/COMPILATION_UNIT/CLASS_DEF[" + + "./IDENT[@text='InputXpathUnusedCatchParameterShouldBeUnnamedNested']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY/" + + "LITERAL_CATCH/SLIST/LITERAL_TRY/LITERAL_CATCH/PARAMETER_DEF" + + "[./IDENT[@text='exception']]", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT" + + "[@text='InputXpathUnusedCatchParameterShouldBeUnnamedNested']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY" + + "/LITERAL_CATCH/SLIST/LITERAL_TRY/LITERAL_CATCH/PARAMETER_DEF[" + + "./IDENT[@text='exception']]/MODIFIERS", + "/COMPILATION_UNIT/CLASS_DEF" + + "[./IDENT[@text='InputXpathUnusedCatchParameterShouldBeUnnamedNested']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY/" + + "LITERAL_CATCH/SLIST/LITERAL_TRY/LITERAL_CATCH/PARAMETER_DEF" + + "[./IDENT[@text='exception']]/TYPE[./IDENT[@text='Exception']]", + "/COMPILATION_UNIT/CLASS_DEF" + + "[./IDENT[@text='InputXpathUnusedCatchParameterShouldBeUnnamedNested']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_TRY" + + "/LITERAL_CATCH/SLIST/LITERAL_TRY/LITERAL_CATCH/PARAMETER_DEF" + + "[./IDENT[@text='exception']]/TYPE/IDENT[@text='Exception']" + ); + runVerifications(moduleConfig, fileToProcess, expectedViolation, + expectedXpathQueries); + } +} diff --git a/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/unusedcatchparametershouldbeunnamed/InputXpathUnusedCatchParameterShouldBeUnnamedNested.java b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/unusedcatchparametershouldbeunnamed/InputXpathUnusedCatchParameterShouldBeUnnamedNested.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/unusedcatchparametershouldbeunnamed/InputXpathUnusedCatchParameterShouldBeUnnamedNested.java @@ -0,0 +1,20 @@ +//non-compiled with javac: Compilable with Java21 +package org.checkstyle.suppressionxpathfilter.unusedcatchparametershouldbeunnamed; + +public class InputXpathUnusedCatchParameterShouldBeUnnamedNested { + + void test() { + try { + int x = 1 / 0; + } + catch (Exception e) { + try { + int z = 5 / 0; + } + catch (Exception exception) { // warn + System.out.println("infinity"); + } + e.printStackTrace(); + } + } +} diff --git a/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/unusedcatchparametershouldbeunnamed/InputXpathUnusedCatchParameterShouldBeUnnamedSimple.java b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/unusedcatchparametershouldbeunnamed/InputXpathUnusedCatchParameterShouldBeUnnamedSimple.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/unusedcatchparametershouldbeunnamed/InputXpathUnusedCatchParameterShouldBeUnnamedSimple.java @@ -0,0 +1,14 @@ +//non-compiled with javac: Compilable with Java21 +package org.checkstyle.suppressionxpathfilter.unusedcatchparametershouldbeunnamed; + +public class InputXpathUnusedCatchParameterShouldBeUnnamedSimple { + + void test() { + try { + int x = 1 / 0; + } + catch (Exception e) { // warn + System.out.println("infinity"); + } + } +} diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java @@ -601,6 +601,8 @@ private static void fillChecksFromCodingPackage() { BASE_PACKAGE + ".checks.coding.MatchXpathCheck"); NAME_TO_FULL_MODULE_NAME.put("UnusedLocalVariableCheck", BASE_PACKAGE + ".checks.coding.UnusedLocalVariableCheck"); + NAME_TO_FULL_MODULE_NAME.put("UnusedCatchParameterShouldBeUnnamedCheck", + BASE_PACKAGE + ".checks.coding.UnusedCatchParameterShouldBeUnnamedCheck"); } /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheck.java new file mode 100644 --- /dev/null +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheck.java @@ -0,0 +1,263 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.coding; + +import java.util.ArrayDeque; +import java.util.Deque; +import java.util.Optional; + +import com.puppycrawl.tools.checkstyle.FileStatefulCheck; +import com.puppycrawl.tools.checkstyle.api.AbstractCheck; +import com.puppycrawl.tools.checkstyle.api.DetailAST; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.utils.TokenUtil; + +/** + * <p> + * Ensures that catch parameters that are not used are declared as an unnamed variable. + * </p> + * <p> + * Rationale: + * </p> + * <ul> + * <li> + * Improves code readability by clearly indicating which parameters are unused. + * </li> + * <li> + * Follows Java conventions for denoting unused parameters with an underscore ({@code _}). + * </li> + * </ul> + * <p> + * See the <a href="https://docs.oracle.com/en/java/javase/21/docs/specs/unnamed-jls.html"> + * Java Language Specification</a> for more information about unnamed variables. + * </p> + * <p> + * <b>Attention</b>: This check should be activated only on source code + * that is compiled by jdk21 or higher; + * unnamed catch parameters came out as the first preview in Java 21. + * </p> + * <p> + * Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} + * </p> + * <p> + * Violation Message Keys: + * </p> + * <ul> + * <li> + * {@code unused.catch.parameter} + * </li> + * </ul> + * + * @since 10.18.0 + * + */ + +@FileStatefulCheck +public class UnusedCatchParameterShouldBeUnnamedCheck extends AbstractCheck { + + /** + * A key is pointing to the warning message text in "messages.properties" + * file. + */ + public static final String MSG_UNUSED_CATCH_PARAMETER = "unused.catch.parameter"; + + /** + * Invalid parents of the catch parameter identifier. + */ + private static final int[] INVALID_CATCH_PARAM_IDENT_PARENTS = { + TokenTypes.DOT, + TokenTypes.LITERAL_NEW, + TokenTypes.METHOD_CALL, + TokenTypes.TYPE, + }; + + /** + * Keeps track of the catch parameters in a block. + */ + private final Deque<CatchParameterDetails> catchParameters = new ArrayDeque<>(); + + @Override + public int[] getDefaultTokens() { + return getRequiredTokens(); + } + + @Override + public int[] getAcceptableTokens() { + return getRequiredTokens(); + } + + @Override + public int[] getRequiredTokens() { + return new int[] { + TokenTypes.LITERAL_CATCH, + TokenTypes.IDENT, + }; + } + + @Override + public void beginTree(DetailAST rootAST) { + catchParameters.clear(); + } + + @Override + public void visitToken(DetailAST ast) { + if (ast.getType() == TokenTypes.LITERAL_CATCH) { + final CatchParameterDetails catchParameter = new CatchParameterDetails(ast); + catchParameters.push(catchParameter); + } + else if (isCatchParameterIdentifierCandidate(ast) && !isLeftHandOfAssignment(ast)) { + // we do not count reassignment as usage + catchParameters.stream() + .filter(parameter -> parameter.getName().equals(ast.getText())) + .findFirst() + .ifPresent(CatchParameterDetails::registerAsUsed); + } + } + + @Override + public void leaveToken(DetailAST ast) { + if (ast.getType() == TokenTypes.LITERAL_CATCH) { + final Optional<CatchParameterDetails> unusedCatchParameter = + Optional.ofNullable(catchParameters.peek()) + .filter(parameter -> !parameter.isUsed()) + .filter(parameter -> !"_".equals(parameter.getName())); + + unusedCatchParameter.ifPresent(parameter -> { + log(parameter.getParameterDefinition(), + MSG_UNUSED_CATCH_PARAMETER, + parameter.getName()); + }); + catchParameters.pop(); + } + } + + /** + * Visit ast of type {@link TokenTypes#IDENT} + * and check if it is a candidate for a catch parameter identifier. + * + * @param identifierAst token representing {@link TokenTypes#IDENT} + * @return true if the given {@link TokenTypes#IDENT} could be a catch parameter identifier + */ + private static boolean isCatchParameterIdentifierCandidate(DetailAST identifierAst) { + // we should ignore the ident if it is in the exception declaration + final boolean isCatchParameterDeclaration = + identifierAst.getParent().getParent().getType() == TokenTypes.LITERAL_CATCH; + + final boolean hasValidParentToken = + !TokenUtil.isOfType(identifierAst.getParent(), INVALID_CATCH_PARAM_IDENT_PARENTS); + + final boolean isMethodInvocation = isMethodInvocation(identifierAst); + + return !isCatchParameterDeclaration && (hasValidParentToken || isMethodInvocation); + } + + /** + * Check if the given {@link TokenTypes#IDENT} is a child of a dot operator + * and is a candidate for catch parameter. + * + * @param identAst token representing {@link TokenTypes#IDENT} + * @return true if the given {@link TokenTypes#IDENT} is a child of a dot operator + * and a candidate for catch parameter. + */ + private static boolean isMethodInvocation(DetailAST identAst) { + final DetailAST parent = identAst.getParent(); + return parent.getType() == TokenTypes.DOT + && identAst.equals(parent.getFirstChild()); + } + + /** + * Check if the given {@link TokenTypes#IDENT} is a left hand side value. + * + * @param identAst token representing {@link TokenTypes#IDENT} + * @return true if the given {@link TokenTypes#IDENT} is a left hand side value. + */ + private static boolean isLeftHandOfAssignment(DetailAST identAst) { + final DetailAST parent = identAst.getParent(); + return parent.getType() == TokenTypes.ASSIGN + && !identAst.equals(parent.getLastChild()); + } + + /** + * Maintains information about the catch parameter. + */ + private static final class CatchParameterDetails { + + /** + * The name of the catch parameter. + */ + private final String name; + + /** + * Ast of type {@link TokenTypes#PARAMETER_DEF} to use it when logging. + */ + private final DetailAST parameterDefinition; + + /** + * Is the variable used. + */ + private boolean used; + + /** + * Create a new catch parameter instance. + * + * @param enclosingCatchClause ast of type {@link TokenTypes#LITERAL_CATCH} + */ + private CatchParameterDetails(DetailAST enclosingCatchClause) { + parameterDefinition = + enclosingCatchClause.findFirstToken(TokenTypes.PARAMETER_DEF); + name = parameterDefinition.findFirstToken(TokenTypes.IDENT).getText(); + } + + /** + * Register the catch parameter as used. + */ + private void registerAsUsed() { + used = true; + } + + /** + * Get the name of the catch parameter. + * + * @return the name of the catch parameter + */ + private String getName() { + return name; + } + + /** + * Check if the catch parameter is used. + * + * @return true if the catch parameter is used + */ + private boolean isUsed() { + return used; + } + + /** + * Get the parameter definition token of the catch parameter + * represented by ast of type {@link TokenTypes#PARAMETER_DEF}. + * + * @return the ast of type {@link TokenTypes#PARAMETER_DEF} + */ + private DetailAST getParameterDefinition() { + return parameterDefinition; + } + } +} diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheckExamplesTest.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheckExamplesTest.java @@ -0,0 +1,46 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.coding; + +import static com.puppycrawl.tools.checkstyle.checks.coding.UnusedCatchParameterShouldBeUnnamedCheck.MSG_UNUSED_CATCH_PARAMETER; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.AbstractExamplesModuleTestSupport; + +public class UnusedCatchParameterShouldBeUnnamedCheckExamplesTest extends + AbstractExamplesModuleTestSupport { + + @Override + protected String getPackageLocation() { + return "com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed"; + } + + @Test + public void testExample1() throws Exception { + final String[] expected = { + "20:14: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "exception"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("Example1.java"), + expected); + } + +} diff --git a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/Example1.java b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/Example1.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/Example1.java @@ -0,0 +1,40 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="UnusedCatchParameterShouldBeUnnamed"/> + </module> +</module> +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.unusedcatchparametershouldbeunnamed; + +// xdoc section -- start +class Example1 { + + void test() { + + try { + int x = 1 / 0; + // violation below, 'Unused catch parameter 'exception' should be unnamed' + } catch (Exception exception) { + System.out.println("infinity"); + } + + try { + int x = 1 / 0; + // ok below, 'declared as unnamed parameter' + } catch (Exception _) { + System.out.println("infinity"); + } + + try { + int x = 1 / 0; + // ok below, ''exception' is used' + } catch (Exception exception) { + System.out.println("Got Exception - " + exception.getMessage()); + } + + } +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheckTest.java new file mode 100644 --- /dev/null +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedCatchParameterShouldBeUnnamedCheckTest.java @@ -0,0 +1,148 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.coding; + +import static com.google.common.truth.Truth.assertWithMessage; +import static com.puppycrawl.tools.checkstyle.checks.coding.UnusedCatchParameterShouldBeUnnamedCheck.MSG_UNUSED_CATCH_PARAMETER; + +import java.io.File; +import java.util.Collection; +import java.util.Optional; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport; +import com.puppycrawl.tools.checkstyle.JavaParser; +import com.puppycrawl.tools.checkstyle.api.DetailAST; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.internal.utils.TestUtil; + +public class UnusedCatchParameterShouldBeUnnamedCheckTest extends AbstractModuleTestSupport { + + @Override + protected String getPackageLocation() { + return "com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed"; + } + + @Test + public void testGetRequiredTokens() { + final UnusedCatchParameterShouldBeUnnamedCheck checkObj = + new UnusedCatchParameterShouldBeUnnamedCheck(); + final int[] expected = { + TokenTypes.LITERAL_CATCH, + TokenTypes.IDENT, + }; + assertWithMessage("Default required tokens are invalid") + .that(checkObj.getRequiredTokens()) + .isEqualTo(expected); + assertWithMessage("Default acceptable tokens are invalid") + .that(checkObj.getAcceptableTokens()) + .isEqualTo(expected); + assertWithMessage("Default tokens are invalid") + .that(checkObj.getDefaultTokens()) + .isEqualTo(expected); + } + + @Test + public void testUnusedCatchParameterShouldBeUnnamed() throws Exception { + final String[] expected = { + "17:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "24:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "31:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "52:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "65:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "A"), + "72:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "A"), + "79:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "103:16: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputUnusedCatchParameterShouldBeUnnamed.java"), + expected); + } + + @Test + public void testUnusedCatchParameterShouldBeUnnamedWithResourceAndFinally() throws Exception { + final String[] expected = { + "19:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "38:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "48:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "69:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath( + "InputUnusedCatchParameterShouldBeUnnamedWithResourceAndFinally.java"), + expected); + } + + @Test + public void testUnusedCatchParameterShouldBeUnnamedNested() throws Exception { + final String[] expected = { + "15:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "18:22: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "ex"), + "31:22: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "ex"), + "42:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "87:22: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "ex"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath( + "InputUnusedCatchParameterShouldBeUnnamedNested.java"), + expected); + } + + @Test + public void testUnusedCatchParameterShouldBeUnnamedInsideAnonClass() throws Exception { + final String[] expected = { + "14:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "39:28: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "50:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "57:28: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + "92:30: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "ex"), + "103:18: " + getCheckMessage(MSG_UNUSED_CATCH_PARAMETER, "e"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath( + "InputUnusedCatchParameterShouldBeUnnamedInsideAnonClass.java"), + expected); + } + + @Test + public void testClearState() throws Exception { + final UnusedCatchParameterShouldBeUnnamedCheck check = + new UnusedCatchParameterShouldBeUnnamedCheck(); + + final DetailAST root = JavaParser.parseFile( + new File(getNonCompilablePath( + "InputUnusedCatchParameterShouldBeUnnamed.java")), + JavaParser.Options.WITHOUT_COMMENTS); + + final Optional<DetailAST> literalCatch = TestUtil.findTokenInAstByPredicate(root, + ast -> ast.getType() == TokenTypes.LITERAL_CATCH); + + assertWithMessage("State is not cleared on beginTree") + .that(TestUtil.isStatefulFieldClearedDuringBeginTree(check, + literalCatch.orElseThrow(), + "catchParameters", + catchParameters -> { + return ((Collection<?>) catchParameters).isEmpty(); + })) + .isTrue(); + } + +} diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java @@ -40,20 +40,20 @@ protected String getPackageLocation() { @Test public void test() { - assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny()).hasSize(205); + assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny()).hasSize(206); } @Test public void testDuplicatePackage() { assertThat(XmlMetaReader .readAllModulesIncludingThirdPartyIfAny("com.puppycrawl.tools.checkstyle.meta")) - .hasSize(205); + .hasSize(206); } @Test public void testBadPackage() { assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny("DOES.NOT.EXIST")) - .hasSize(205); + .hasSize(206); } @Test diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamed.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamed.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamed.java @@ -0,0 +1,118 @@ +/* +UnusedCatchParameterShouldBeUnnamed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.unusedcatchparametershouldbeunnamed; + +public class InputUnusedCatchParameterShouldBeUnnamed { + private E e; + Exception exception; + + void test(Object o) { + try { + int x = 1/ 0; + } + catch (Exception e) { // violation + System.out.println("infinity"); + } + + try { + int x = 1/ 0; + } + catch (final Exception e) { // violation + + } + + try { + int x = 1/ 0; + } + catch (@SuppressWarnings("") Exception e) { // violation + this.e.printStackTrace(); + } + + try { + int x = 1/ 0; + } + catch (Exception e) { + System.out.println(e); + } + + try { + int x = 1/ 0; + } + catch (Exception e) { + System.out.println(e.getMessage()); + } + + try { + int x = 1/ 0; + } + catch (Exception e) { // violation + e = new Exception(); + } + try { + int x = 1/ 0; + } + catch (Exception e) { + exception = e; + } + + try { + int x = 1/ 0; + } + catch (Exception A) { // violation + A a; + } + + try { + int x = 1/ 0; + } + catch (Exception A) { // violation + Object a = new A(); + } + + try { + int x = 1/ 0; + } + catch (Exception e) { // violation + System.out.println(this.e); + } + + try { + int x = 1/ 0; + } + catch (Exception e) { + try { int y = 1/0; } + catch (Exception _) { + System.out.println(e.getLocalizedMessage()); + } + } + + try { + int x = 1/ 0; + } + catch (Exception e) { + test(e); + } + + try { + int x = 1/ 0; + } + catch (Exception e) { // violation + e(); + } + + try { + int x = 1/ 0; + } + catch (Exception _) { + System.out.println("infinity"); + } + } + void e() { } +} + +class E { void printStackTrace() {}} +class A {} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedInsideAnonClass.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedInsideAnonClass.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedInsideAnonClass.java @@ -0,0 +1,116 @@ +/* +UnusedCatchParameterShouldBeUnnamed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.unusedcatchparametershouldbeunnamed; + +public class InputUnusedCatchParameterShouldBeUnnamedInsideAnonClass { + + void testNestedInsideAnonClass() { + try { + int x = 1 / 0; + } catch (Exception e) { // violation + Runnable runnable = new Runnable() { + @Override + public void run() { + try { + int x = 1 / 0; + } catch (Exception e) { + System.out.println(e.getMessage()); + } + } + }; + } + } + + void testNestedInsideAnonClass2() { + try { + int x = 1 / 0; + } catch (Exception e) { + Runnable runnable = new Runnable() { + @Override + public void run() { + try { + int x = 1 / 0; + throw e; + } + catch (Exception e) { // violation + + } + } + }; + } + } + + void testNestedInsideAnonClass3() { + try { + int x = 1 / 0; + } catch (Exception e) { // violation + Runnable runnable = new Runnable() { + @Override + public void run() { + try { + int x = 1 / 0; + } + catch (Exception e) { // violation + + } + } + }; + } + } + + void testNestedInsideAnonClass4() { + try { + int x = 1 / 0; + } catch (Exception e) { + Runnable runnable = new Runnable() { + @Override + public void run() { + try { + int x = 1 / 0; + } catch (Exception e) { + System.out.println(e.getMessage()); + } + System.out.println(e.getMessage()); + } + }; + } + } + + void testNestedInsideAnonClass5() { + try { + int x = 1 / 0; + } catch (final Exception e) { + Runnable runnable = new Runnable() { + @Override + public void run() { + try { + int x = 1 / 0; + } catch (Exception ex) { // violation + System.out.println(e.getMessage()); + } + } + }; + } + } + + void testNestedInsideAnonClass6() { + try { + int x = 1 / 0; + } catch (final Exception e) { // violation + Runnable runnable = new Runnable() { + @Override + public void run() { + try { + int x = 1 / 0; + } catch (Exception ex) { + System.out.println(ex.getMessage()); + } + } + }; + } + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedNested.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedNested.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedNested.java @@ -0,0 +1,100 @@ +/* +UnusedCatchParameterShouldBeUnnamed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.unusedcatchparametershouldbeunnamed; + +public class InputUnusedCatchParameterShouldBeUnnamedNested { + + + void testNestedCatch1() { + try { + int x = 1 / 0; + } catch (Exception e) { // violation + try { + int y = 1 / 0; + } catch (Exception ex) { // violation + System.out.println("infinity"); + } + System.out.println("infinity"); + } + } + + void testNestedCatch2() { + try { + int x = 1 / 0; + } catch (Exception e) { + try { + int y = 1 / 0; + } catch (Exception ex) { // violation + e.printStackTrace(); + System.out.println("infinity"); + } + System.out.println("infinity"); + } + } + + void testNestedCatch3() { + try { + int x = 1 / 0; + } catch (Exception e) { // violation + try { + int y = 1 / 0; + } catch (Exception ex) { + ex.printStackTrace(); + System.out.println("infinity"); + } + System.out.println("infinity"); + } + } + + void testNestedCatch4() { + try { + int x = 1 / 0; + } catch (Exception e) { + try { + int y = 1 / 0; + e.printStackTrace(); + } catch (Exception ex) { + ex.printStackTrace(); + System.out.println("infinity"); + } + System.out.println("infinity"); + } + } + + void testNestedCatch5() { + try { + int x = 1 / 0; + } catch (Exception _) { + try { + int y = 1 / 0; + } catch (Exception _) { + System.out.println("infinity"); + } + System.out.println("infinity"); + } + } + + void testNestedCatchTwoLevels() { + try { + int x = 1 / 0; + } catch (Exception e) { + try { + int y = 1 / 0; + } catch (Exception ex) { // violation + try { + int z = 1 / 0; + } catch (Exception exx) { + exx.printStackTrace(); + System.out.println("infinity"); + } + e.printStackTrace(); + System.out.println("infinity"); + } + System.out.println("infinity"); + } + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedWithResourceAndFinally.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedWithResourceAndFinally.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/InputUnusedCatchParameterShouldBeUnnamedWithResourceAndFinally.java @@ -0,0 +1,98 @@ +/* +UnusedCatchParameterShouldBeUnnamed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.unusedcatchparametershouldbeunnamed; + +import java.io.File; + +public class InputUnusedCatchParameterShouldBeUnnamedWithResourceAndFinally { + private E e; + Exception exception; + + void testMultiCatch() { + try { + int y = 5; + File file = new File("file.txt"); + } catch (NullPointerException | IllegalArgumentException e) { // violation + this.e.printStackTrace(); + } + + try { + int y = 5; + File file = new File("file.txt"); + } catch (NullPointerException | IllegalArgumentException _) { + this.e.printStackTrace(); + } + + try { + File file = new File("file.txt"); + } catch (NullPointerException | IllegalArgumentException e) { + e.printStackTrace(); + } + + try { + File file = new File("file.txt"); + } catch (NullPointerException e) { // violation + System.out.println("null pointer exception"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + void testTryWithResource() { + try (var a = lock()) { + int y = 5; + } catch (Exception e) { // violation + // no code + } + + try (var a = lock()) { + int y = 5; + } catch (Exception e) { + System.out.println(e.toString()); + } + + try (var a = lock()) { + int y = 5; + } catch (Exception _) { + System.out.println(e.toString()); + } + + } + + void tryCatchFinally() { + try { + File file = new File("file.txt"); + } catch (NullPointerException | IllegalArgumentException e) { // violation + this.e.printStackTrace(); + } finally { + System.out.println(e); // catch parameter is not in this scope + } + + try { + File file = new File("file.txt"); + } catch (NullPointerException | IllegalArgumentException e) { + e.printStackTrace(); + } finally { + System.out.println("close the file"); + } + } + + void e() { + } + + AutoCloseable lock() { + return null; + } +} + +class E { + void printStackTrace() { + } +} + +class A { +}
Add Check Support for Java 21 Unnamed Variables & Patterns Syntax: New Check UnusedCatchParameterShouldBeUnnamed child of #14942 violate the non-use of the catch parameters. They should be unnamed. --- **Config** ```XML $ cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="UnusedCatchParameterShouldBeUnnamed"/> </module> </module> ``` --- **Example** ```Java public class Test { void test(Object obj) { try { int x = 1 / 0; } catch (Exception e) { // violation System.out.println("error"); } try { int x = 1 / 0; } catch (Exception _) { System.out.println("error"); } } } ``` --- **Expected Output** ```PowerShell $ java -jar checkstyle-10.19.0-all.jar -c config.xml Test.java Starting audit... [ERROR] D:\Test.java:5:28:Unused catch parameter should be unnamed [UnusedCatchParameterShouldBeUnnamed] Audit done. Checkstyle ends with 1 errors. ``` >How we could suppress violations in this check for (ignore|ignored) naming convention https://github.com/checkstyle/checkstyle/issues/15058#issuecomment-2254523431
I am good with this. > `} catch (Exception e) { // violation` > `} catch (Exception _) {` Technically 2nd is "expected violation". 1st should be violation of old check? This is a new check and there are no actual violations yet. > Technically 2nd is "expected violation". 1st should be violation of old check? This is a new check and there are no actual violations yet. can you restate this I don't understand. but for now `UnusedLocalVariable` doesn't validate the catch parameters. this new check will violate the non-use of the catch parameters and require them to be unnamed. ( and we will not violate the unnamed parameters `_`) Sorry, I was trying to convey that calling this a violation but have it listed in the "expected output" didn't seem right, but I think I am just being overly picky. My comment can be ignored, I am still good with this issue.
2024-07-24T14:35:20Z
10.17
checkstyle/checkstyle
15,212
checkstyle__checkstyle-15212
[ "14805" ]
947002a3d66557d7e62a5aee81c7de449ce5f168
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java b/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/JavaAstVisitor.java @@ -23,7 +23,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import java.util.Objects; import java.util.Optional; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; @@ -104,9 +103,6 @@ public final class JavaAstVisitor extends JavaLanguageParserBaseVisitor<DetailAs /** String representation of the right shift operator. */ private static final String RIGHT_SHIFT = ">>"; - /** String representation of the double quote character. */ - private static final String QUOTE = "\""; - /** * The tokens here are technically expressions, but should * not return an EXPR token as their root. @@ -1537,14 +1533,6 @@ public DetailAstImpl visitPrimaryExp(JavaLanguageParser.PrimaryExpContext ctx) { return flattenedTree(ctx); } - @Override - public DetailAstImpl visitTemplateExp(JavaLanguageParser.TemplateExpContext ctx) { - final DetailAstImpl dot = create(ctx.DOT()); - dot.addChild(visit(ctx.expr())); - dot.addChild(visit(ctx.templateArgument())); - return dot; - } - @Override public DetailAstImpl visitPostfix(JavaLanguageParser.PostfixContext ctx) { final DetailAstImpl postfix; @@ -1754,137 +1742,6 @@ public DetailAstImpl visitPrimitivePrimary(JavaLanguageParser.PrimitivePrimaryCo return dot; } - @Override - public DetailAstImpl visitTemplateArgument(JavaLanguageParser.TemplateArgumentContext ctx) { - return Objects.requireNonNullElseGet(visit(ctx.template()), - () -> buildSimpleStringTemplateArgument(ctx)); - } - - /** - * Builds a simple string template argument AST, which basically means that we - * transform a string literal into a string template AST because it is a - * string template argument. - * - * @param ctx the TemplateArgumentContext to build AST from - * @return DetailAstImpl of string template argument - */ - private static DetailAstImpl buildSimpleStringTemplateArgument( - JavaLanguageParser.TemplateArgumentContext ctx) { - final int startColumn = ctx.start.getCharPositionInLine(); - final int endColumn = startColumn + ctx.getText().length() - 1; - final int lineNumber = ctx.start.getLine(); - - final DetailAstImpl templateArgument = createImaginary( - TokenTypes.STRING_TEMPLATE_BEGIN, QUOTE, - lineNumber, startColumn - ); - - final int quoteLength = QUOTE.length(); - final int tokenTextLength = ctx.getText().length(); - - final String actualContent = ctx.getText() - .substring(quoteLength, tokenTextLength - quoteLength); - - final DetailAstImpl content = createImaginary( - TokenTypes.STRING_TEMPLATE_CONTENT, actualContent, - lineNumber, startColumn + quoteLength - ); - templateArgument.addChild(content); - - final DetailAstImpl end = createImaginary( - TokenTypes.STRING_TEMPLATE_END, QUOTE, - lineNumber, endColumn - ); - templateArgument.addChild(end); - - return templateArgument; - } - - @Override - public DetailAstImpl visitStringTemplate(JavaLanguageParser.StringTemplateContext ctx) { - final DetailAstImpl stringTemplateBegin = visit(ctx.stringTemplateBegin()); - - final Optional<DetailAstImpl> expression = Optional.ofNullable(ctx.expr()) - .map(this::visit); - - if (expression.isPresent()) { - final DetailAstImpl imaginaryExpression = - createImaginary(TokenTypes.EMBEDDED_EXPRESSION); - imaginaryExpression.addChild(expression.orElseThrow()); - stringTemplateBegin.addChild(imaginaryExpression); - } - - ctx.stringTemplateMiddle().stream() - .map(this::buildStringTemplateMiddle) - .forEach(stringTemplateBegin::addChild); - - final DetailAstImpl stringTemplateEnd = visit(ctx.stringTemplateEnd()); - stringTemplateBegin.addChild(stringTemplateEnd); - return stringTemplateBegin; - } - - /** - * Builds a string template middle AST. - * - * @param ctx the StringTemplateMiddleContext to build AST from - * @return DetailAstImpl of string template middle - */ - private DetailAstImpl buildStringTemplateMiddle( - JavaLanguageParser.StringTemplateMiddleContext ctx) { - final DetailAstImpl stringTemplateMiddle = - visit(ctx.stringTemplateMid()); - - final Optional<DetailAstImpl> expression = Optional.ofNullable(ctx.expr()) - .map(this::visit); - - if (expression.isPresent()) { - final DetailAstImpl imaginaryExpression = - createImaginary(TokenTypes.EMBEDDED_EXPRESSION); - imaginaryExpression.addChild(expression.orElseThrow()); - addLastSibling(stringTemplateMiddle, imaginaryExpression); - } - - return stringTemplateMiddle; - } - - @Override - public DetailAstImpl visitStringTemplateBegin( - JavaLanguageParser.StringTemplateBeginContext ctx) { - final DetailAstImpl stringTemplateBegin = - create(ctx.STRING_TEMPLATE_BEGIN()); - final Optional<DetailAstImpl> stringTemplateContent = - Optional.ofNullable(ctx.STRING_TEMPLATE_CONTENT()) - .map(this::create); - stringTemplateContent.ifPresent(stringTemplateBegin::addChild); - final DetailAstImpl embeddedExpressionBegin = create(ctx.EMBEDDED_EXPRESSION_BEGIN()); - stringTemplateBegin.addChild(embeddedExpressionBegin); - return stringTemplateBegin; - } - - @Override - public DetailAstImpl visitStringTemplateMid(JavaLanguageParser.StringTemplateMidContext ctx) { - final DetailAstImpl embeddedExpressionEnd = create(ctx.EMBEDDED_EXPRESSION_END()); - final Optional<DetailAstImpl> stringTemplateContent = - Optional.ofNullable(ctx.STRING_TEMPLATE_CONTENT()) - .map(this::create); - stringTemplateContent.ifPresent(self -> addLastSibling(embeddedExpressionEnd, self)); - final DetailAstImpl embeddedExpressionBegin = create(ctx.EMBEDDED_EXPRESSION_BEGIN()); - addLastSibling(embeddedExpressionEnd, embeddedExpressionBegin); - return embeddedExpressionEnd; - } - - @Override - public DetailAstImpl visitStringTemplateEnd(JavaLanguageParser.StringTemplateEndContext ctx) { - final DetailAstImpl embeddedExpressionEnd = create(ctx.EMBEDDED_EXPRESSION_END()); - final Optional<DetailAstImpl> stringTemplateContent = - Optional.ofNullable(ctx.STRING_TEMPLATE_CONTENT()) - .map(this::create); - stringTemplateContent.ifPresent(self -> addLastSibling(embeddedExpressionEnd, self)); - final DetailAstImpl stringTemplateEnd = create(ctx.STRING_TEMPLATE_END()); - addLastSibling(embeddedExpressionEnd, stringTemplateEnd); - return embeddedExpressionEnd; - } - @Override public DetailAstImpl visitCreator(JavaLanguageParser.CreatorContext ctx) { return flattenedTree(ctx); @@ -2252,39 +2109,6 @@ private static DetailAstImpl createImaginary(int tokenType) { return detailAst; } - /** - * Create a DetailAstImpl from a given token type and text. This method - * should be used for imaginary nodes only, i.e. 'OBJBLOCK -&gt; OBJBLOCK', - * where the text on the RHS matches the text on the LHS. - * - * @param tokenType the token type of this DetailAstImpl - * @param text the text of this DetailAstImpl - * @return new DetailAstImpl of given type - */ - private static DetailAstImpl createImaginary(int tokenType, String text) { - final DetailAstImpl imaginary = new DetailAstImpl(); - imaginary.setType(tokenType); - imaginary.setText(text); - return imaginary; - } - - /** - * Creates an imaginary DetailAstImpl with the given token details. - * - * @param tokenType the token type of this DetailAstImpl - * @param text the text of this DetailAstImpl - * @param lineNumber the line number of this DetailAstImpl - * @param columnNumber the column number of this DetailAstImpl - * @return imaginary DetailAstImpl from given details - */ - private static DetailAstImpl createImaginary( - int tokenType, String text, int lineNumber, int columnNumber) { - final DetailAstImpl imaginary = createImaginary(tokenType, text); - imaginary.setLineNo(lineNumber); - imaginary.setColumnNo(columnNumber); - return imaginary; - } - /** * Create a DetailAstImpl from a given token and token type. This method * should be used for literal nodes only, i.e. 'PACKAGE_DEF -&gt; package'. diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/JavaParser.java b/src/main/java/com/puppycrawl/tools/checkstyle/JavaParser.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/JavaParser.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/JavaParser.java @@ -40,7 +40,6 @@ import com.puppycrawl.tools.checkstyle.api.FileContents; import com.puppycrawl.tools.checkstyle.api.FileText; import com.puppycrawl.tools.checkstyle.api.TokenTypes; -import com.puppycrawl.tools.checkstyle.grammar.CompositeLexerContextCache; import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageLexer; import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser; import com.puppycrawl.tools.checkstyle.utils.ParserUtil; @@ -85,9 +84,7 @@ public static DetailAST parse(FileContents contents) final String fullText = contents.getText().getFullText().toString(); final CharStream codePointCharStream = CharStreams.fromString(fullText); final JavaLanguageLexer lexer = new JavaLanguageLexer(codePointCharStream, true); - final CompositeLexerContextCache contextCache = new CompositeLexerContextCache(lexer); lexer.setCommentListener(contents); - lexer.setContextCache(contextCache); final CommonTokenStream tokenStream = new CommonTokenStream(lexer); final JavaLanguageParser parser = diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java @@ -6461,288 +6461,6 @@ public final class TokenTypes { public static final int RECORD_PATTERN_COMPONENTS = JavaLanguageLexer.RECORD_PATTERN_COMPONENTS; - /** - * A string template opening delimiter. This element ({@code "}) appears - * at the beginning of a string template. - * <p>For example:</p> - * <pre> - * String s = STR."Hello, \{firstName + " " + lastName}!"; - * </pre> - * <p>parses as:</p> - * <pre> - * VARIABLE_DEF -&gt; VARIABLE_DEF - * |--MODIFIERS -&gt; MODIFIERS - * |--TYPE -&gt; TYPE - * | `--IDENT -&gt; String - * |--IDENT -&gt; s - * `--ASSIGN -&gt; = - * `--EXPR -&gt; EXPR - * `--DOT -&gt; . - * |--IDENT -&gt; STR - * `--STRING_TEMPLATE_BEGIN -&gt; " - * |--STRING_TEMPLATE_CONTENT -&gt; Hello, - * |--EMBEDDED_EXPRESSION_BEGIN -&gt; \{ - * |--EMBEDDED_EXPRESSION -&gt; EMBEDDED_EXPRESSION - * | `--PLUS -&gt; + - * | |--PLUS -&gt; + - * | | |--IDENT -&gt; firstName - * | | `--STRING_LITERAL -&gt; " " - * | `--IDENT -&gt; lastName - * |--EMBEDDED_EXPRESSION_END -&gt; } - * |--STRING_TEMPLATE_CONTENT -&gt; ! - * `--STRING_TEMPLATE_END -&gt; " - * </pre> - * - * @see #STRING_TEMPLATE_END - * @see #STRING_TEMPLATE_CONTENT - * @see #EMBEDDED_EXPRESSION_BEGIN - * @see #EMBEDDED_EXPRESSION - * @see #EMBEDDED_EXPRESSION_END - * @see #STRING_LITERAL - * - * @since 10.13.0 - */ - public static final int STRING_TEMPLATE_BEGIN = - JavaLanguageLexer.STRING_TEMPLATE_BEGIN; - - /** - * A string template closing delimiter. This element ({@code "}) appears - * at the end of a string template. - * <p>For example:</p> - * <pre> - * String s = STR."Hello, \{firstName + " " + lastName}!"; - * </pre> - * <p>parses as:</p> - * <pre> - * VARIABLE_DEF -&gt; VARIABLE_DEF - * |--MODIFIERS -&gt; MODIFIERS - * |--TYPE -&gt; TYPE - * | `--IDENT -&gt; String - * |--IDENT -&gt; s - * `--ASSIGN -&gt; = - * `--EXPR -&gt; EXPR - * `--DOT -&gt; . - * |--IDENT -&gt; STR - * `--STRING_TEMPLATE_BEGIN -&gt; " - * |--STRING_TEMPLATE_CONTENT -&gt; Hello, - * |--EMBEDDED_EXPRESSION_BEGIN -&gt; \{ - * |--EMBEDDED_EXPRESSION -&gt; EMBEDDED_EXPRESSION - * | `--PLUS -&gt; + - * | |--PLUS -&gt; + - * | | |--IDENT -&gt; firstName - * | | `--STRING_LITERAL -&gt; " " - * | `--IDENT -&gt; lastName - * |--EMBEDDED_EXPRESSION_END -&gt; } - * |--STRING_TEMPLATE_CONTENT -&gt; ! - * `--STRING_TEMPLATE_END -&gt; " - * </pre> - * - * @see #STRING_TEMPLATE_END - * @see #STRING_TEMPLATE_CONTENT - * @see #EMBEDDED_EXPRESSION_BEGIN - * @see #EMBEDDED_EXPRESSION - * @see #EMBEDDED_EXPRESSION_END - * @see #STRING_LITERAL - * - * @since 10.13.0 - */ - public static final int STRING_TEMPLATE_END = - JavaLanguageLexer.STRING_TEMPLATE_END; - - /** - * The (possibly empty) content of a string template. A given string - * template may have more than one node of this type. - * <p>For example:</p> - * <pre> - * String s = STR."Hello, \{firstName + " " + lastName}"; - * </pre> - * <p>parses as:</p> - * <pre> - * VARIABLE_DEF -&gt; VARIABLE_DEF - * |--MODIFIERS -&gt; MODIFIERS - * |--TYPE -&gt; TYPE - * | `--IDENT -&gt; String - * |--IDENT -&gt; s - * `--ASSIGN -&gt; = - * `--EXPR -&gt; EXPR - * `--DOT -&gt; . - * |--IDENT -&gt; STR - * `--STRING_TEMPLATE_BEGIN -&gt; " - * |--STRING_TEMPLATE_CONTENT -&gt; Hello, - * |--EMBEDDED_EXPRESSION_BEGIN -&gt; \{ - * |--EMBEDDED_EXPRESSION -&gt; EMBEDDED_EXPRESSION - * | `--PLUS -&gt; + - * | |--PLUS -&gt; + - * | | |--IDENT -&gt; firstName - * | | `--STRING_LITERAL -&gt; " " - * | `--IDENT -&gt; lastName - * |--EMBEDDED_EXPRESSION_END -&gt; } - * `--STRING_TEMPLATE_END -&gt; " - * </pre> - * - * @see #STRING_TEMPLATE_END - * @see #STRING_TEMPLATE_CONTENT - * @see #EMBEDDED_EXPRESSION_BEGIN - * @see #EMBEDDED_EXPRESSION - * @see #EMBEDDED_EXPRESSION_END - * @see #STRING_LITERAL - * - * @since 10.13.0 - */ - public static final int STRING_TEMPLATE_CONTENT = - JavaLanguageLexer.STRING_TEMPLATE_CONTENT; - - /** - * The opening delimiter of an embedded expression within a string template. - * <p>For example:</p> - * <pre> - * String s = STR."Hello, \{getName("Mr. ", firstName, lastName)}!"; - * </pre> - * <p>parses as:</p> - * <pre> - * VARIABLE_DEF -&gt; VARIABLE_DEF - * |--MODIFIERS -&gt; MODIFIERS - * |--TYPE -&gt; TYPE - * | `--IDENT -&gt; String - * |--IDENT -&gt; s - * `--ASSIGN -&gt; = - * `--EXPR -&gt; EXPR - * `--DOT -&gt; . - * |--IDENT -&gt; STR - * `--STRING_TEMPLATE_BEGIN -&gt; " - * |--STRING_TEMPLATE_CONTENT -&gt; Hello, - * |--EMBEDDED_EXPRESSION_BEGIN -&gt; \{ - * |--EMBEDDED_EXPRESSION -&gt; EMBEDDED_EXPRESSION - * | `--METHOD_CALL -&gt; ( - * | |--IDENT -&gt; getName - * | |--ELIST -&gt; ELIST - * | | |--EXPR -&gt; EXPR - * | | | `--STRING_LITERAL -&gt; "Mr. " - * | | |--COMMA -&gt; , - * | | |--EXPR -&gt; EXPR - * | | | `--IDENT -&gt; firstName - * | | |--COMMA -&gt; , - * | | `--EXPR -&gt; EXPR - * | | `--IDENT -&gt; lastName - * | `--RPAREN -&gt; ) - * |--EMBEDDED_EXPRESSION_END -&gt; } - * |--STRING_TEMPLATE_CONTENT -&gt; ! - * `--STRING_TEMPLATE_END -&gt; " - * </pre> - * - * @see #STRING_TEMPLATE_END - * @see #STRING_TEMPLATE_CONTENT - * @see #EMBEDDED_EXPRESSION_BEGIN - * @see #EMBEDDED_EXPRESSION - * @see #EMBEDDED_EXPRESSION_END - * @see #STRING_LITERAL - * - * @since 10.13.0 - */ - public static final int EMBEDDED_EXPRESSION_BEGIN = - JavaLanguageLexer.EMBEDDED_EXPRESSION_BEGIN; - - /** - * An expression embedded within a string template. - * <p>For example:</p> - * <pre> - * String s = STR."Hello, \{getName("Mr. ", firstName, lastName)}!"; - * </pre> - * <p>parses as:</p> - * <pre> - * VARIABLE_DEF -&gt; VARIABLE_DEF - * |--MODIFIERS -&gt; MODIFIERS - * |--TYPE -&gt; TYPE - * | `--IDENT -&gt; String - * |--IDENT -&gt; s - * `--ASSIGN -&gt; = - * `--EXPR -&gt; EXPR - * `--DOT -&gt; . - * |--IDENT -&gt; STR - * `--STRING_TEMPLATE_BEGIN -&gt; " - * |--STRING_TEMPLATE_CONTENT -&gt; Hello, - * |--EMBEDDED_EXPRESSION_BEGIN -&gt; \{ - * |--EMBEDDED_EXPRESSION -&gt; EMBEDDED_EXPRESSION - * | `--METHOD_CALL -&gt; ( - * | |--IDENT -&gt; getName - * | |--ELIST -&gt; ELIST - * | | |--EXPR -&gt; EXPR - * | | | `--STRING_LITERAL -&gt; "Mr. " - * | | |--COMMA -&gt; , - * | | |--EXPR -&gt; EXPR - * | | | `--IDENT -&gt; firstName - * | | |--COMMA -&gt; , - * | | `--EXPR -&gt; EXPR - * | | `--IDENT -&gt; lastName - * | `--RPAREN -&gt; ) - * |--EMBEDDED_EXPRESSION_END -&gt; } - * |--STRING_TEMPLATE_CONTENT -&gt; ! - * `--STRING_TEMPLATE_END -&gt; " - * </pre> - * - * @see #STRING_TEMPLATE_END - * @see #STRING_TEMPLATE_CONTENT - * @see #EMBEDDED_EXPRESSION_BEGIN - * @see #EMBEDDED_EXPRESSION - * @see #EMBEDDED_EXPRESSION_END - * @see #STRING_LITERAL - * - * @since 10.13.0 - */ - public static final int EMBEDDED_EXPRESSION = - JavaLanguageLexer.EMBEDDED_EXPRESSION; - - /** - * The closing delimiter of an embedded expression within a string - * template. - * <p>For example:</p> - * <pre> - * String s = STR."Hello, \{getName("Mr. ", firstName, lastName)}!"; - * </pre> - * <p>parses as:</p> - * <pre> - * VARIABLE_DEF -&gt; VARIABLE_DEF - * |--MODIFIERS -&gt; MODIFIERS - * |--TYPE -&gt; TYPE - * | `--IDENT -&gt; String - * |--IDENT -&gt; s - * `--ASSIGN -&gt; = - * `--EXPR -&gt; EXPR - * `--DOT -&gt; . - * |--IDENT -&gt; STR - * `--STRING_TEMPLATE_BEGIN -&gt; " - * |--STRING_TEMPLATE_CONTENT -&gt; Hello, - * |--EMBEDDED_EXPRESSION_BEGIN -&gt; \{ - * |--EMBEDDED_EXPRESSION -&gt; EMBEDDED_EXPRESSION - * | `--METHOD_CALL -&gt; ( - * | |--IDENT -&gt; getName - * | |--ELIST -&gt; ELIST - * | | |--EXPR -&gt; EXPR - * | | | `--STRING_LITERAL -&gt; "Mr. " - * | | |--COMMA -&gt; , - * | | |--EXPR -&gt; EXPR - * | | | `--IDENT -&gt; firstName - * | | |--COMMA -&gt; , - * | | `--EXPR -&gt; EXPR - * | | `--IDENT -&gt; lastName - * | `--RPAREN -&gt; ) - * |--EMBEDDED_EXPRESSION_END -&gt; } - * |--STRING_TEMPLATE_CONTENT -&gt; ! - * `--STRING_TEMPLATE_END -&gt; " - * </pre> - * - * @see #STRING_TEMPLATE_END - * @see #STRING_TEMPLATE_CONTENT - * @see #EMBEDDED_EXPRESSION_BEGIN - * @see #EMBEDDED_EXPRESSION - * @see #EMBEDDED_EXPRESSION_END - * @see #STRING_LITERAL - * - * @since 10.13.0 - */ - public static final int EMBEDDED_EXPRESSION_END = - JavaLanguageLexer.EMBEDDED_EXPRESSION_END; - /** * An unnamed pattern variable definition. Appears as part of a pattern definition. * <p>For example:</p> diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/grammar/CompositeLexerContextCache.java b/src/main/java/com/puppycrawl/tools/checkstyle/grammar/CompositeLexerContextCache.java deleted file mode 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/grammar/CompositeLexerContextCache.java +++ /dev/null @@ -1,163 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////// -// checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2024 the original author or authors. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -/////////////////////////////////////////////////////////////////////////////////////////////// - -package com.puppycrawl.tools.checkstyle.grammar; - -import java.util.ArrayDeque; -import java.util.Deque; - -import org.antlr.v4.runtime.Lexer; - -import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageLexer; - -/** - * This class is used to keep track of the lexer context to help us determine - * when to switch lexer modes. - */ -public final class CompositeLexerContextCache { - - /** Stack for tracking string template contexts. */ - private final Deque<StringTemplateContext> stringTemplateContextStack; - - /** The lexer to use. */ - private final Lexer lexer; - - /** - * Creates a new CompositeLexerContextCache instance. - * - * @param lexer the lexer to use - */ - public CompositeLexerContextCache(Lexer lexer) { - stringTemplateContextStack = new ArrayDeque<>(); - this.lexer = lexer; - } - - /** - * Enter a string template context. - * - * @param mode the lexer mode to enter - */ - public void enterTemplateContext(int mode) { - final StringTemplateContext newContext = - new StringTemplateContext(mode, 0); - stringTemplateContextStack.push(newContext); - lexer.pushMode(mode); - } - - /** - * Exit a string template context. - */ - public void exitTemplateContext() { - stringTemplateContextStack.pop(); - lexer.popMode(); - } - - /** - * Update the left curly brace context if we are in a string template. - */ - public void updateLeftCurlyBraceContext() { - if (isInStringTemplateContext()) { - final StringTemplateContext currentContext = stringTemplateContextStack.pop(); - final StringTemplateContext newContext = new StringTemplateContext( - currentContext.getMode(), - currentContext.getCurlyBraceDepth() + 1 - ); - stringTemplateContextStack.push(newContext); - } - } - - /** - * Update the right curly brace context if we are in a string template. - */ - public void updateRightCurlyBraceContext() { - if (isInStringTemplateContext()) { - final StringTemplateContext currentContext = stringTemplateContextStack.pop(); - if (currentContext.getCurlyBraceDepth() == 0) { - // This right curly brace is the start delimiter - // of a template middle or end. We consume - // the right curly brace to be used as the first token - // in the appropriate lexer mode rule, enter - // the corresponding lexer mode, and keep consuming - // the rest of the template middle or end. - stringTemplateContextStack.push(currentContext); - lexer.setType(JavaLanguageLexer.EMBEDDED_EXPRESSION_END); - lexer.pushMode(currentContext.getMode()); - } - else { - // We've consumed a right curly brace within an embedded expression. - final StringTemplateContext newContext = new StringTemplateContext( - currentContext.getMode(), - currentContext.getCurlyBraceDepth() - 1 - ); - stringTemplateContextStack.push(newContext); - } - } - } - - /** - * Check if we are in a string template context. - * - * @return true if we are in a string template context - */ - private boolean isInStringTemplateContext() { - return !stringTemplateContextStack.isEmpty(); - } - - /** - * A class to represent the context of a string template. - */ - private static final class StringTemplateContext { - - /** The lexer mode of this context. */ - private final int mode; - - /** The depth of this context. */ - private final int curlyBraceDepth; - - /** - * Creates a new TemplateContext instance. - * - * @param mode the lexer mode of this context - * @param curlyBraceDepth the depth of this context - */ - private StringTemplateContext(int mode, int curlyBraceDepth) { - this.mode = mode; - this.curlyBraceDepth = curlyBraceDepth; - } - - /** - * Get the lexer mode of this context. - * - * @return current lexer mode - */ - public int getMode() { - return mode; - } - - /** - * Current depth of this context. - * - * @return current depth - */ - public int getCurlyBraceDepth() { - return curlyBraceDepth; - } - } - -}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/JavaAstVisitorTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/JavaAstVisitorTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/JavaAstVisitorTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/JavaAstVisitorTest.java @@ -41,7 +41,6 @@ import com.puppycrawl.tools.checkstyle.api.FileContents; import com.puppycrawl.tools.checkstyle.api.FileText; import com.puppycrawl.tools.checkstyle.api.TokenTypes; -import com.puppycrawl.tools.checkstyle.grammar.CompositeLexerContextCache; import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageLexer; import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser; import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParserBaseVisitor; @@ -89,12 +88,7 @@ public class JavaAstVisitorTest extends AbstractModuleTestSupport { "visitClassType", "visitClassOrInterfaceTypeExtended", "visitQualifiedNameExtended", - "visitGuard", - - // until removal in https://github.com/checkstyle/checkstyle/issues/14805 - "visitTemplate", - // handled as a list in the parent rule - "visitStringTemplateMiddle" + "visitGuard" ); @Override @@ -186,7 +180,7 @@ public void countExprUsagesInParserGrammar() throws IOException { // Any time we update this count, we should question why we are not building an imaginary // 'EXPR' node. - final int expectedExprCount = 45; + final int expectedExprCount = 44; assertWithMessage("The 'expr' parser rule does not build an imaginary" + " 'EXPR' node. Any usage of this rule should be questioned.") @@ -279,9 +273,7 @@ public void testNoStackOverflowOnDeepStringConcat() throws Exception { final String fullText = contents.getText().getFullText().toString(); final CharStream codePointCharStream = CharStreams.fromString(fullText); final JavaLanguageLexer lexer = new JavaLanguageLexer(codePointCharStream, true); - final CompositeLexerContextCache contextCache = new CompositeLexerContextCache(lexer); lexer.setCommentListener(contents); - lexer.setContextCache(contextCache); final CommonTokenStream tokenStream = new CommonTokenStream(lexer); final JavaLanguageParser parser = new JavaLanguageParser(tokenStream); diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java @@ -161,7 +161,7 @@ public void testOrderOfProperties() { @Test public void testAcceptableTokensMakeSense() { - final int expectedTokenTypesTotalNumber = 195; + final int expectedTokenTypesTotalNumber = 189; assertWithMessage("Total number of TokenTypes has changed, acceptable tokens in" + " IllegalTokenTextCheck need to be reconsidered.") .that(TokenUtil.getTokenTypesTotalNumber()) diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammar/GeneratedJavaTokenTypesTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammar/GeneratedJavaTokenTypesTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/grammar/GeneratedJavaTokenTypesTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammar/GeneratedJavaTokenTypesTest.java @@ -736,27 +736,6 @@ public void testTokenNumbering() { assertWithMessage(message) .that(JavaLanguageLexer.RECORD_PATTERN_COMPONENTS) .isEqualTo(216); - assertWithMessage(message) - .that(JavaLanguageLexer.STRING_TEMPLATE_BEGIN) - .isEqualTo(217); - assertWithMessage(message) - .that(JavaLanguageLexer.STRING_TEMPLATE_MID) - .isEqualTo(218); - assertWithMessage(message) - .that(JavaLanguageLexer.STRING_TEMPLATE_END) - .isEqualTo(219); - assertWithMessage(message) - .that(JavaLanguageLexer.STRING_TEMPLATE_CONTENT) - .isEqualTo(220); - assertWithMessage(message) - .that(JavaLanguageLexer.EMBEDDED_EXPRESSION_BEGIN) - .isEqualTo(221); - assertWithMessage(message) - .that(JavaLanguageLexer.EMBEDDED_EXPRESSION) - .isEqualTo(222); - assertWithMessage(message) - .that(JavaLanguageLexer.EMBEDDED_EXPRESSION_END) - .isEqualTo(223); assertWithMessage(message) .that(JavaLanguageLexer.LITERAL_UNDERSCORE) .isEqualTo(224); diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammar/java21/Java21AstRegressionTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammar/java21/Java21AstRegressionTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/grammar/java21/Java21AstRegressionTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammar/java21/Java21AstRegressionTest.java @@ -37,48 +37,6 @@ protected String getPackageLocation() { return "com/puppycrawl/tools/checkstyle/grammar/java21"; } - @Test - public void testBasicStringTemplate() throws Exception { - verifyAst( - getNonCompilablePath( - "ExpectedStringTemplateBasic.txt"), - getNonCompilablePath( - "InputStringTemplateBasic.java")); - } - - /** - * The purpose of this test is to exercise the - * {@link com.puppycrawl.tools.checkstyle.grammar.CompositeLexerContextCache}: - * getting some curly brace contexts on the stack, making sure that each - * element in the stack has some depth. This ensures that we can handle - * many nested curly braces within an embedded template expression. - * - * @throws Exception upon failure - */ - @Test - public void testStringTemplateNested() throws Exception { - verifyAst( - getNonCompilablePath( - "ExpectedStringTemplateNested.txt"), - getNonCompilablePath( - "InputStringTemplateNested.java")); - } - - /** - * Test for tabs instead of spaces in the input file. - * All node columns are -3 when compared to the above test. This is - * because the input file has tabs instead of spaces. '\t' is - * one character vs. four spaces. - */ - @Test - public void testBasicStringTemplateWithTabs() throws Exception { - verifyAst( - getNonCompilablePath( - "ExpectedStringTemplateBasicWithTabs.txt"), - getNonCompilablePath( - "InputStringTemplateBasicWithTabs.java")); - } - @Test public void testUnnamedVariableBasic() throws Exception { verifyAst( @@ -106,17 +64,6 @@ public void testTextBlockConsecutiveEscapes() throws Exception { "InputTextBlockConsecutiveEscapes.java")); } - @Test - public void testStringTemplateMultiLineWithComments() throws Exception { - verifyAst( - getNonCompilablePath( - "ExpectedStringTemplateMultiLineWithComments.txt"), - getNonCompilablePath( - "InputStringTemplateMultiLineWithComments.java"), - JavaParser.Options.WITH_COMMENTS - ); - } - /** * Unusual test case, but important to prevent regressions. We need to * make sure that we only consume legal escapes in text blocks, and diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/utils/TokenUtilTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/utils/TokenUtilTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/utils/TokenUtilTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/utils/TokenUtilTest.java @@ -228,7 +228,7 @@ public void testGetTokenTypesTotalNumber() { assertWithMessage("Invalid token total number") .that(tokenTypesTotalNumber) - .isEqualTo(195); + .isEqualTo(189); } @Test @@ -238,10 +238,10 @@ public void testGetAllTokenIds() { assertWithMessage("Invalid token length") .that(allTokenIds.length) - .isEqualTo(195); + .isEqualTo(189); assertWithMessage("invalid sum") .that(sum) - .isEqualTo(21142); + .isEqualTo(19820); } @Test diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateBasic.txt b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateBasic.txt deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateBasic.txt +++ /dev/null @@ -1,564 +0,0 @@ -COMPILATION_UNIT -> COMPILATION_UNIT [2:0] -|--PACKAGE_DEF -> package [2:0] -| |--ANNOTATIONS -> ANNOTATIONS [2:47] -| |--DOT -> . [2:47] -| | |--DOT -> . [2:39] -| | | |--DOT -> . [2:28] -| | | | |--DOT -> . [2:22] -| | | | | |--DOT -> . [2:11] -| | | | | | |--IDENT -> com [2:8] -| | | | | | `--IDENT -> puppycrawl [2:12] -| | | | | `--IDENT -> tools [2:23] -| | | | `--IDENT -> checkstyle [2:29] -| | | `--IDENT -> grammar [2:40] -| | `--IDENT -> java21 [2:48] -| `--SEMI -> ; [2:54] -|--IMPORT -> import [4:0] -| |--DOT -> . [4:16] -| | |--DOT -> . [4:11] -| | | |--IDENT -> java [4:7] -| | | `--IDENT -> util [4:12] -| | `--IDENT -> List [4:17] -| `--SEMI -> ; [4:21] -`--CLASS_DEF -> CLASS_DEF [6:0] - |--MODIFIERS -> MODIFIERS [6:0] - | `--LITERAL_PUBLIC -> public [6:0] - |--LITERAL_CLASS -> class [6:7] - |--IDENT -> InputStringTemplateBasic [6:13] - `--OBJBLOCK -> OBJBLOCK [6:38] - |--LCURLY -> { [6:38] - |--VARIABLE_DEF -> VARIABLE_DEF [7:4] - | |--MODIFIERS -> MODIFIERS [7:4] - | |--TYPE -> TYPE [7:4] - | | `--LITERAL_INT -> int [7:4] - | |--IDENT -> x [7:8] - | |--ASSIGN -> = [7:10] - | | `--EXPR -> EXPR [7:12] - | | `--NUM_INT -> 10 [7:12] - | `--SEMI -> ; [7:14] - |--VARIABLE_DEF -> VARIABLE_DEF [8:4] - | |--MODIFIERS -> MODIFIERS [8:4] - | |--TYPE -> TYPE [8:4] - | | `--LITERAL_INT -> int [8:4] - | |--IDENT -> y [8:8] - | |--ASSIGN -> = [8:10] - | | `--EXPR -> EXPR [8:12] - | | `--NUM_INT -> 20 [8:12] - | `--SEMI -> ; [8:14] - |--VARIABLE_DEF -> VARIABLE_DEF [11:4] - | |--MODIFIERS -> MODIFIERS [11:4] - | |--TYPE -> TYPE [11:4] - | | `--IDENT -> String [11:4] - | |--IDENT -> result1 [11:11] - | |--ASSIGN -> = [11:19] - | | `--EXPR -> EXPR [11:24] - | | `--DOT -> . [11:24] - | | |--IDENT -> STR [11:21] - | | `--STRING_TEMPLATE_BEGIN -> " [11:25] - | | |--STRING_TEMPLATE_CONTENT -> [11:26] - | | `--STRING_TEMPLATE_END -> " [11:26] - | `--SEMI -> ; [11:27] - |--VARIABLE_DEF -> VARIABLE_DEF [13:4] - | |--MODIFIERS -> MODIFIERS [13:4] - | |--TYPE -> TYPE [13:4] - | | `--IDENT -> String [13:4] - | |--IDENT -> result1_1 [13:11] - | |--ASSIGN -> = [13:21] - | | `--EXPR -> EXPR [13:26] - | | `--DOT -> . [13:26] - | | |--IDENT -> STR [13:23] - | | `--STRING_TEMPLATE_BEGIN -> " [13:27] - | | |--STRING_TEMPLATE_CONTENT -> Hello world! [13:28] - | | `--STRING_TEMPLATE_END -> " [13:40] - | `--SEMI -> ; [13:41] - |--VARIABLE_DEF -> VARIABLE_DEF [16:4] - | |--MODIFIERS -> MODIFIERS [16:4] - | |--TYPE -> TYPE [16:4] - | | `--IDENT -> String [16:4] - | |--IDENT -> result1_2 [16:11] - | |--ASSIGN -> = [16:21] - | | `--EXPR -> EXPR [16:26] - | | `--DOT -> . [16:26] - | | |--IDENT -> STR [16:23] - | | `--STRING_TEMPLATE_BEGIN -> " [16:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [16:28] - | | |--EMBEDDED_EXPRESSION_END -> } [16:32] - | | `--STRING_TEMPLATE_END -> " [16:33] - | `--SEMI -> ; [16:34] - |--VARIABLE_DEF -> VARIABLE_DEF [19:4] - | |--MODIFIERS -> MODIFIERS [19:4] - | |--TYPE -> TYPE [19:4] - | | `--IDENT -> String [19:4] - | |--IDENT -> result2 [19:11] - | |--ASSIGN -> = [19:19] - | | `--EXPR -> EXPR [19:24] - | | `--DOT -> . [19:24] - | | |--IDENT -> STR [19:21] - | | `--STRING_TEMPLATE_BEGIN -> " [19:26] - | | |--STRING_TEMPLATE_CONTENT -> x [19:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [19:28] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [19:31] - | | | `--IDENT -> x [19:31] - | | |--EMBEDDED_EXPRESSION_END -> } [19:33] - | | |--STRING_TEMPLATE_CONTENT -> x [19:34] - | | `--STRING_TEMPLATE_END -> " [19:35] - | `--SEMI -> ; [19:36] - |--VARIABLE_DEF -> VARIABLE_DEF [22:4] - | |--MODIFIERS -> MODIFIERS [22:4] - | |--TYPE -> TYPE [22:4] - | | `--IDENT -> String [22:4] - | |--IDENT -> result3 [22:11] - | |--ASSIGN -> = [22:19] - | | `--EXPR -> EXPR [22:24] - | | `--DOT -> . [22:24] - | | |--IDENT -> STR [22:21] - | | `--STRING_TEMPLATE_BEGIN -> " [22:26] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [22:27] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [22:31] - | | | `--METHOD_CALL -> ( [22:31] - | | | |--IDENT -> y [22:30] - | | | |--ELIST -> ELIST [22:33] - | | | | `--EXPR -> EXPR [22:33] - | | | | `--METHOD_CALL -> ( [22:33] - | | | | |--IDENT -> y [22:32] - | | | | |--ELIST -> ELIST [22:34] - | | | | | `--EXPR -> EXPR [22:34] - | | | | | `--STRING_LITERAL -> "y" [22:34] - | | | | `--RPAREN -> ) [22:37] - | | | `--RPAREN -> ) [22:38] - | | |--EMBEDDED_EXPRESSION_END -> } [22:40] - | | `--STRING_TEMPLATE_END -> " [22:41] - | `--SEMI -> ; [22:42] - |--VARIABLE_DEF -> VARIABLE_DEF [25:4] - | |--MODIFIERS -> MODIFIERS [25:4] - | |--TYPE -> TYPE [25:4] - | | `--IDENT -> String [25:4] - | |--IDENT -> result4 [25:11] - | |--ASSIGN -> = [25:19] - | | `--EXPR -> EXPR [25:36] - | | `--PLUS -> + [25:36] - | | |--DOT -> . [25:24] - | | | |--IDENT -> STR [25:21] - | | | `--STRING_TEMPLATE_BEGIN -> " [25:26] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [25:27] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [25:30] - | | | | `--IDENT -> x [25:30] - | | | |--EMBEDDED_EXPRESSION_END -> } [25:32] - | | | `--STRING_TEMPLATE_END -> " [25:33] - | | `--DOT -> . [25:41] - | | |--IDENT -> STR [25:38] - | | `--STRING_TEMPLATE_BEGIN -> " [25:43] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [25:44] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [25:47] - | | | `--IDENT -> y [25:47] - | | |--EMBEDDED_EXPRESSION_END -> } [25:49] - | | `--STRING_TEMPLATE_END -> " [25:50] - | `--SEMI -> ; [25:51] - |--VARIABLE_DEF -> VARIABLE_DEF [28:4] - | |--MODIFIERS -> MODIFIERS [28:4] - | |--TYPE -> TYPE [28:4] - | | `--IDENT -> String [28:4] - | |--IDENT -> result5 [28:11] - | |--ASSIGN -> = [28:19] - | | `--EXPR -> EXPR [28:44] - | | `--PLUS -> + [28:44] - | | |--DOT -> . [28:24] - | | | |--IDENT -> STR [28:21] - | | | `--STRING_TEMPLATE_BEGIN -> " [28:26] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [28:27] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [28:31] - | | | | `--METHOD_CALL -> ( [28:31] - | | | | |--IDENT -> y [28:30] - | | | | |--ELIST -> ELIST [28:33] - | | | | | `--EXPR -> EXPR [28:33] - | | | | | `--METHOD_CALL -> ( [28:33] - | | | | | |--IDENT -> y [28:32] - | | | | | |--ELIST -> ELIST [28:34] - | | | | | | `--EXPR -> EXPR [28:34] - | | | | | | `--STRING_LITERAL -> "y" [28:34] - | | | | | `--RPAREN -> ) [28:37] - | | | | `--RPAREN -> ) [28:38] - | | | |--EMBEDDED_EXPRESSION_END -> } [28:40] - | | | `--STRING_TEMPLATE_END -> " [28:41] - | | `--DOT -> . [28:49] - | | |--IDENT -> STR [28:46] - | | `--STRING_TEMPLATE_BEGIN -> " [28:51] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [28:52] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [28:56] - | | | `--METHOD_CALL -> ( [28:56] - | | | |--IDENT -> y [28:55] - | | | |--ELIST -> ELIST [28:58] - | | | | `--EXPR -> EXPR [28:58] - | | | | `--METHOD_CALL -> ( [28:58] - | | | | |--IDENT -> y [28:57] - | | | | |--ELIST -> ELIST [28:59] - | | | | | `--EXPR -> EXPR [28:59] - | | | | | `--STRING_LITERAL -> "y" [28:59] - | | | | `--RPAREN -> ) [28:62] - | | | `--RPAREN -> ) [28:63] - | | |--EMBEDDED_EXPRESSION_END -> } [28:65] - | | `--STRING_TEMPLATE_END -> " [28:66] - | `--SEMI -> ; [28:67] - |--VARIABLE_DEF -> VARIABLE_DEF [31:4] - | |--MODIFIERS -> MODIFIERS [31:4] - | |--TYPE -> TYPE [31:4] - | | `--IDENT -> String [31:4] - | |--IDENT -> result6 [31:11] - | |--ASSIGN -> = [31:19] - | | `--EXPR -> EXPR [31:36] - | | `--PLUS -> + [31:36] - | | |--DOT -> . [31:24] - | | | |--IDENT -> STR [31:21] - | | | `--STRING_TEMPLATE_BEGIN -> " [31:26] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [31:27] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [31:30] - | | | | `--IDENT -> x [31:30] - | | | |--EMBEDDED_EXPRESSION_END -> } [31:32] - | | | `--STRING_TEMPLATE_END -> " [31:33] - | | `--DOT -> . [31:41] - | | |--IDENT -> STR [31:38] - | | `--STRING_TEMPLATE_BEGIN -> " [31:43] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [31:44] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [31:47] - | | | `--IDENT -> y [31:47] - | | |--EMBEDDED_EXPRESSION_END -> } [31:49] - | | `--STRING_TEMPLATE_END -> " [31:50] - | `--SEMI -> ; [31:51] - |--VARIABLE_DEF -> VARIABLE_DEF [34:4] - | |--MODIFIERS -> MODIFIERS [34:4] - | |--TYPE -> TYPE [34:4] - | | `--IDENT -> String [34:4] - | |--IDENT -> result7 [34:11] - | |--ASSIGN -> = [34:19] - | | `--EXPR -> EXPR [34:24] - | | `--DOT -> . [34:24] - | | |--IDENT -> STR [34:21] - | | `--STRING_TEMPLATE_BEGIN -> " [34:26] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [34:27] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [34:32] - | | | `--PLUS -> + [34:32] - | | | |--IDENT -> x [34:30] - | | | `--IDENT -> y [34:34] - | | |--EMBEDDED_EXPRESSION_END -> } [34:36] - | | `--STRING_TEMPLATE_END -> " [34:37] - | `--SEMI -> ; [34:38] - |--VARIABLE_DEF -> VARIABLE_DEF [37:4] - | |--MODIFIERS -> MODIFIERS [37:4] - | |--TYPE -> TYPE [37:4] - | | `--IDENT -> String [37:4] - | |--IDENT -> result8 [37:11] - | |--ASSIGN -> = [37:19] - | | `--EXPR -> EXPR [37:24] - | | `--DOT -> . [37:24] - | | |--IDENT -> STR [37:21] - | | `--STRING_TEMPLATE_BEGIN -> " [37:26] - | | |--STRING_TEMPLATE_CONTENT -> hey [37:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [37:31] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [37:44] - | | | `--PLUS -> + [37:44] - | | | |--METHOD_CALL -> ( [37:35] - | | | | |--IDENT -> y [37:34] - | | | | |--ELIST -> ELIST [37:37] - | | | | | `--EXPR -> EXPR [37:37] - | | | | | `--METHOD_CALL -> ( [37:37] - | | | | | |--IDENT -> y [37:36] - | | | | | |--ELIST -> ELIST [37:38] - | | | | | | `--EXPR -> EXPR [37:38] - | | | | | | `--STRING_LITERAL -> "y" [37:38] - | | | | | `--RPAREN -> ) [37:41] - | | | | `--RPAREN -> ) [37:42] - | | | `--METHOD_CALL -> ( [37:47] - | | | |--IDENT -> y [37:46] - | | | |--ELIST -> ELIST [37:49] - | | | | `--EXPR -> EXPR [37:49] - | | | | `--METHOD_CALL -> ( [37:49] - | | | | |--IDENT -> y [37:48] - | | | | |--ELIST -> ELIST [37:50] - | | | | | `--EXPR -> EXPR [37:50] - | | | | | `--STRING_LITERAL -> "y" [37:50] - | | | | `--RPAREN -> ) [37:53] - | | | `--RPAREN -> ) [37:54] - | | |--EMBEDDED_EXPRESSION_END -> } [37:56] - | | |--STRING_TEMPLATE_CONTENT -> there [37:57] - | | `--STRING_TEMPLATE_END -> " [37:63] - | `--SEMI -> ; [37:64] - |--VARIABLE_DEF -> VARIABLE_DEF [40:4] - | |--MODIFIERS -> MODIFIERS [40:4] - | |--TYPE -> TYPE [40:4] - | | `--IDENT -> String [40:4] - | |--IDENT -> result9 [40:11] - | |--ASSIGN -> = [40:19] - | | `--EXPR -> EXPR [40:24] - | | `--DOT -> . [40:24] - | | |--IDENT -> STR [40:21] - | | `--STRING_TEMPLATE_BEGIN -> " [40:26] - | | |--STRING_TEMPLATE_CONTENT -> hey [40:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [40:31] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [41:22] - | | | `--PLUS -> + [41:22] - | | | |--METHOD_CALL -> ( [41:13] - | | | | |--IDENT -> y [41:12] - | | | | |--ELIST -> ELIST [41:15] - | | | | | `--EXPR -> EXPR [41:15] - | | | | | `--METHOD_CALL -> ( [41:15] - | | | | | |--IDENT -> y [41:14] - | | | | | |--ELIST -> ELIST [41:16] - | | | | | | `--EXPR -> EXPR [41:16] - | | | | | | `--STRING_LITERAL -> "y" [41:16] - | | | | | `--RPAREN -> ) [41:19] - | | | | `--RPAREN -> ) [41:20] - | | | `--METHOD_CALL -> ( [41:25] - | | | |--IDENT -> y [41:24] - | | | |--ELIST -> ELIST [41:27] - | | | | `--EXPR -> EXPR [41:27] - | | | | `--METHOD_CALL -> ( [41:27] - | | | | |--IDENT -> y [41:26] - | | | | |--ELIST -> ELIST [41:28] - | | | | | `--EXPR -> EXPR [41:28] - | | | | | `--STRING_LITERAL -> "y" [41:28] - | | | | `--RPAREN -> ) [41:31] - | | | `--RPAREN -> ) [41:32] - | | |--EMBEDDED_EXPRESSION_END -> } [42:12] - | | |--STRING_TEMPLATE_CONTENT -> there [42:13] - | | `--STRING_TEMPLATE_END -> " [42:19] - | `--SEMI -> ; [42:20] - |--VARIABLE_DEF -> VARIABLE_DEF [45:4] - | |--MODIFIERS -> MODIFIERS [45:4] - | |--TYPE -> TYPE [45:4] - | | `--IDENT -> String [45:4] - | |--IDENT -> result10 [45:11] - | |--ASSIGN -> = [45:20] - | | `--EXPR -> EXPR [45:25] - | | `--DOT -> . [45:25] - | | |--IDENT -> STR [45:22] - | | `--STRING_TEMPLATE_BEGIN -> " [45:27] - | | |--STRING_TEMPLATE_CONTENT -> hey [45:28] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [45:32] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [46:22] - | | | `--PLUS -> + [46:22] - | | | |--METHOD_CALL -> ( [46:13] - | | | | |--IDENT -> y [46:12] - | | | | |--ELIST -> ELIST [46:15] - | | | | | `--EXPR -> EXPR [46:15] - | | | | | `--METHOD_CALL -> ( [46:15] - | | | | | |--IDENT -> y [46:14] - | | | | | |--ELIST -> ELIST [46:16] - | | | | | | `--EXPR -> EXPR [46:16] - | | | | | | `--STRING_LITERAL -> "y" [46:16] - | | | | | `--RPAREN -> ) [46:19] - | | | | `--RPAREN -> ) [46:20] - | | | `--METHOD_CALL -> ( [46:25] - | | | |--IDENT -> y [46:24] - | | | |--ELIST -> ELIST [46:27] - | | | | `--EXPR -> EXPR [46:27] - | | | | `--METHOD_CALL -> ( [46:27] - | | | | |--IDENT -> y [46:26] - | | | | |--ELIST -> ELIST [46:28] - | | | | | `--EXPR -> EXPR [46:28] - | | | | | `--STRING_LITERAL -> "y" [46:28] - | | | | `--RPAREN -> ) [46:31] - | | | `--RPAREN -> ) [46:32] - | | |--EMBEDDED_EXPRESSION_END -> } [47:12] - | | |--STRING_TEMPLATE_CONTENT -> there [47:13] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [47:20] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [49:12] - | | | `--PLUS -> + [49:12] - | | | |--PLUS -> + [48:22] - | | | | |--METHOD_CALL -> ( [48:13] - | | | | | |--IDENT -> y [48:12] - | | | | | |--ELIST -> ELIST [48:15] - | | | | | | `--EXPR -> EXPR [48:15] - | | | | | | `--METHOD_CALL -> ( [48:15] - | | | | | | |--IDENT -> y [48:14] - | | | | | | |--ELIST -> ELIST [48:16] - | | | | | | | `--EXPR -> EXPR [48:16] - | | | | | | | `--STRING_LITERAL -> "y" [48:16] - | | | | | | `--RPAREN -> ) [48:19] - | | | | | `--RPAREN -> ) [48:20] - | | | | `--METHOD_CALL -> ( [48:25] - | | | | |--IDENT -> y [48:24] - | | | | |--ELIST -> ELIST [48:27] - | | | | | `--EXPR -> EXPR [48:27] - | | | | | `--METHOD_CALL -> ( [48:27] - | | | | | |--IDENT -> y [48:26] - | | | | | |--ELIST -> ELIST [48:28] - | | | | | | `--EXPR -> EXPR [48:28] - | | | | | | `--STRING_LITERAL -> "y" [48:28] - | | | | | `--RPAREN -> ) [48:31] - | | | | `--RPAREN -> ) [48:32] - | | | `--DOT -> . [49:17] - | | | |--IDENT -> STR [49:14] - | | | `--STRING_TEMPLATE_BEGIN -> " [49:18] - | | | |--STRING_TEMPLATE_CONTENT -> x [49:19] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [49:20] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [49:23] - | | | | `--IDENT -> x [49:23] - | | | |--EMBEDDED_EXPRESSION_END -> } [49:25] - | | | |--STRING_TEMPLATE_CONTENT -> x [49:26] - | | | `--STRING_TEMPLATE_END -> " [49:27] - | | |--EMBEDDED_EXPRESSION_END -> } [50:12] - | | `--STRING_TEMPLATE_END -> " [50:13] - | `--SEMI -> ; [50:14] - |--VARIABLE_DEF -> VARIABLE_DEF [52:4] - | |--MODIFIERS -> MODIFIERS [52:4] - | |--TYPE -> TYPE [52:4] - | | `--IDENT -> String [52:4] - | |--IDENT -> name [52:11] - | |--ASSIGN -> = [52:16] - | | `--EXPR -> EXPR [52:18] - | | `--STRING_LITERAL -> "world" [52:18] - | `--SEMI -> ; [52:25] - |--VARIABLE_DEF -> VARIABLE_DEF [53:4] - | |--MODIFIERS -> MODIFIERS [53:4] - | |--TYPE -> TYPE [53:4] - | | `--IDENT -> String [53:4] - | |--IDENT -> s [53:11] - | |--ASSIGN -> = [53:13] - | | `--EXPR -> EXPR [53:18] - | | `--DOT -> . [53:18] - | | |--IDENT -> STR [53:15] - | | `--STRING_TEMPLATE_BEGIN -> " [53:19] - | | |--STRING_TEMPLATE_CONTENT -> Hello, [53:20] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [53:27] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [53:30] - | | | `--IDENT -> name [53:30] - | | |--EMBEDDED_EXPRESSION_END -> } [53:35] - | | |--STRING_TEMPLATE_CONTENT -> ! [53:36] - | | `--STRING_TEMPLATE_END -> " [53:37] - | `--SEMI -> ; [53:38] - |--METHOD_DEF -> METHOD_DEF [55:4] - | |--MODIFIERS -> MODIFIERS [55:4] - | | |--LITERAL_PRIVATE -> private [55:4] - | | `--LITERAL_STATIC -> static [55:12] - | |--TYPE -> TYPE [55:19] - | | `--IDENT -> String [55:19] - | |--IDENT -> y [55:26] - | |--LPAREN -> ( [55:27] - | |--PARAMETERS -> PARAMETERS [55:28] - | | `--PARAMETER_DEF -> PARAMETER_DEF [55:28] - | | |--MODIFIERS -> MODIFIERS [55:28] - | | |--TYPE -> TYPE [55:28] - | | | `--IDENT -> String [55:28] - | | `--IDENT -> y [55:35] - | |--RPAREN -> ) [55:36] - | `--SLIST -> { [55:38] - | |--LITERAL_RETURN -> return [56:8] - | | |--EXPR -> EXPR [56:15] - | | | `--STRING_LITERAL -> "y" [56:15] - | | `--SEMI -> ; [56:18] - | `--RCURLY -> } [57:4] - |--METHOD_DEF -> METHOD_DEF [60:4] - | |--MODIFIERS -> MODIFIERS [60:4] - | |--TYPE -> TYPE [60:4] - | | `--LITERAL_VOID -> void [60:4] - | |--IDENT -> x [60:9] - | |--LPAREN -> ( [60:10] - | |--PARAMETERS -> PARAMETERS [60:11] - | | `--PARAMETER_DEF -> PARAMETER_DEF [60:11] - | | |--MODIFIERS -> MODIFIERS [60:11] - | | |--TYPE -> TYPE [60:11] - | | | |--IDENT -> List [60:11] - | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [60:15] - | | | |--GENERIC_START -> < [60:15] - | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:16] - | | | | |--WILDCARD_TYPE -> ? [60:16] - | | | | `--TYPE_UPPER_BOUNDS -> extends [60:18] - | | | | `--DOT -> . [60:40] - | | | | |--IDENT -> StringTemplate [60:26] - | | | | |--IDENT -> Processor [60:41] - | | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [60:50] - | | | | |--GENERIC_START -> < [60:50] - | | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:51] - | | | | | `--IDENT -> String [60:51] - | | | | |--COMMA -> , [60:57] - | | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:59] - | | | | | `--IDENT -> RuntimeException [60:59] - | | | | `--GENERIC_END -> > [60:75] - | | | `--GENERIC_END -> > [60:76] - | | `--IDENT -> list [60:78] - | |--RPAREN -> ) [60:82] - | `--SLIST -> { [60:84] - | |--EXPR -> EXPR [61:19] - | | `--DOT -> . [61:19] - | | |--METHOD_CALL -> ( [61:16] - | | | |--DOT -> . [61:12] - | | | | |--IDENT -> list [61:8] - | | | | `--IDENT -> get [61:13] - | | | |--ELIST -> ELIST [61:17] - | | | | `--EXPR -> EXPR [61:17] - | | | | `--NUM_INT -> 0 [61:17] - | | | `--RPAREN -> ) [61:18] - | | `--STRING_TEMPLATE_BEGIN -> " [61:20] - | | |--STRING_TEMPLATE_CONTENT -> [61:21] - | | `--STRING_TEMPLATE_END -> " [61:21] - | |--SEMI -> ; [61:22] - | |--EXPR -> EXPR [62:19] - | | `--DOT -> . [62:19] - | | |--METHOD_CALL -> ( [62:16] - | | | |--DOT -> . [62:12] - | | | | |--IDENT -> list [62:8] - | | | | `--IDENT -> get [62:13] - | | | |--ELIST -> ELIST [62:17] - | | | | `--EXPR -> EXPR [62:17] - | | | | `--NUM_INT -> 0 [62:17] - | | | `--RPAREN -> ) [62:18] - | | `--STRING_TEMPLATE_BEGIN -> " [62:20] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [62:21] - | | |--EMBEDDED_EXPRESSION_END -> } [62:25] - | | `--STRING_TEMPLATE_END -> " [62:26] - | |--SEMI -> ; [62:27] - | |--EXPR -> EXPR [63:19] - | | `--DOT -> . [63:19] - | | |--METHOD_CALL -> ( [63:16] - | | | |--DOT -> . [63:12] - | | | | |--IDENT -> list [63:8] - | | | | `--IDENT -> get [63:13] - | | | |--ELIST -> ELIST [63:17] - | | | | `--EXPR -> EXPR [63:17] - | | | | `--NUM_INT -> 0 [63:17] - | | | `--RPAREN -> ) [63:18] - | | `--STRING_TEMPLATE_BEGIN -> " [63:21] - | | |--STRING_TEMPLATE_CONTENT -> x [63:22] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [63:23] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [63:26] - | | | `--IDENT -> x [63:26] - | | |--EMBEDDED_EXPRESSION_END -> } [63:28] - | | |--STRING_TEMPLATE_CONTENT -> x [63:29] - | | `--STRING_TEMPLATE_END -> " [63:30] - | |--SEMI -> ; [63:31] - | |--EXPR -> EXPR [64:19] - | | `--DOT -> . [64:19] - | | |--METHOD_CALL -> ( [64:16] - | | | |--DOT -> . [64:12] - | | | | |--IDENT -> list [64:8] - | | | | `--IDENT -> get [64:13] - | | | |--ELIST -> ELIST [64:17] - | | | | `--EXPR -> EXPR [64:17] - | | | | `--NUM_INT -> 0 [64:17] - | | | `--RPAREN -> ) [64:18] - | | `--STRING_TEMPLATE_BEGIN -> " [64:21] - | | |--STRING_TEMPLATE_CONTENT -> . [64:22] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:23] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:26] - | | | `--IDENT -> x [64:26] - | | |--EMBEDDED_EXPRESSION_END -> } [64:28] - | | |--STRING_TEMPLATE_CONTENT -> . [64:29] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:30] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:33] - | | | `--IDENT -> y [64:33] - | | |--EMBEDDED_EXPRESSION_END -> } [64:35] - | | |--STRING_TEMPLATE_CONTENT -> . [64:36] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:37] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:40] - | | | `--IDENT -> x [64:40] - | | |--EMBEDDED_EXPRESSION_END -> } [64:42] - | | |--STRING_TEMPLATE_CONTENT -> . [64:43] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:44] - | | |--EMBEDDED_EXPRESSION_END -> } [64:46] - | | |--STRING_TEMPLATE_CONTENT -> . [64:47] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:48] - | | |--EMBEDDED_EXPRESSION_END -> } [64:50] - | | `--STRING_TEMPLATE_END -> " [64:51] - | |--SEMI -> ; [64:52] - | `--RCURLY -> } [65:4] - `--RCURLY -> } [66:0] diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateBasicWithTabs.txt b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateBasicWithTabs.txt deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateBasicWithTabs.txt +++ /dev/null @@ -1,564 +0,0 @@ -COMPILATION_UNIT -> COMPILATION_UNIT [2:0] -|--PACKAGE_DEF -> package [2:0] -| |--ANNOTATIONS -> ANNOTATIONS [2:47] -| |--DOT -> . [2:47] -| | |--DOT -> . [2:39] -| | | |--DOT -> . [2:28] -| | | | |--DOT -> . [2:22] -| | | | | |--DOT -> . [2:11] -| | | | | | |--IDENT -> com [2:8] -| | | | | | `--IDENT -> puppycrawl [2:12] -| | | | | `--IDENT -> tools [2:23] -| | | | `--IDENT -> checkstyle [2:29] -| | | `--IDENT -> grammar [2:40] -| | `--IDENT -> java21 [2:48] -| `--SEMI -> ; [2:54] -|--IMPORT -> import [4:0] -| |--DOT -> . [4:16] -| | |--DOT -> . [4:11] -| | | |--IDENT -> java [4:7] -| | | `--IDENT -> util [4:12] -| | `--IDENT -> List [4:17] -| `--SEMI -> ; [4:21] -`--CLASS_DEF -> CLASS_DEF [6:0] - |--MODIFIERS -> MODIFIERS [6:0] - | `--LITERAL_PUBLIC -> public [6:0] - |--LITERAL_CLASS -> class [6:7] - |--IDENT -> InputStringTemplateBasicWithTabs [6:13] - `--OBJBLOCK -> OBJBLOCK [6:46] - |--LCURLY -> { [6:46] - |--VARIABLE_DEF -> VARIABLE_DEF [7:1] - | |--MODIFIERS -> MODIFIERS [7:1] - | |--TYPE -> TYPE [7:1] - | | `--LITERAL_INT -> int [7:1] - | |--IDENT -> x [7:5] - | |--ASSIGN -> = [7:7] - | | `--EXPR -> EXPR [7:9] - | | `--NUM_INT -> 10 [7:9] - | `--SEMI -> ; [7:11] - |--VARIABLE_DEF -> VARIABLE_DEF [8:1] - | |--MODIFIERS -> MODIFIERS [8:1] - | |--TYPE -> TYPE [8:1] - | | `--LITERAL_INT -> int [8:1] - | |--IDENT -> y [8:5] - | |--ASSIGN -> = [8:7] - | | `--EXPR -> EXPR [8:9] - | | `--NUM_INT -> 20 [8:9] - | `--SEMI -> ; [8:11] - |--VARIABLE_DEF -> VARIABLE_DEF [11:1] - | |--MODIFIERS -> MODIFIERS [11:1] - | |--TYPE -> TYPE [11:1] - | | `--IDENT -> String [11:1] - | |--IDENT -> result1 [11:8] - | |--ASSIGN -> = [11:16] - | | `--EXPR -> EXPR [11:21] - | | `--DOT -> . [11:21] - | | |--IDENT -> STR [11:18] - | | `--STRING_TEMPLATE_BEGIN -> " [11:22] - | | |--STRING_TEMPLATE_CONTENT -> [11:23] - | | `--STRING_TEMPLATE_END -> " [11:23] - | `--SEMI -> ; [11:24] - |--VARIABLE_DEF -> VARIABLE_DEF [13:1] - | |--MODIFIERS -> MODIFIERS [13:1] - | |--TYPE -> TYPE [13:1] - | | `--IDENT -> String [13:1] - | |--IDENT -> result1_1 [13:8] - | |--ASSIGN -> = [13:18] - | | `--EXPR -> EXPR [13:23] - | | `--DOT -> . [13:23] - | | |--IDENT -> STR [13:20] - | | `--STRING_TEMPLATE_BEGIN -> " [13:24] - | | |--STRING_TEMPLATE_CONTENT -> Hello world! [13:25] - | | `--STRING_TEMPLATE_END -> " [13:37] - | `--SEMI -> ; [13:38] - |--VARIABLE_DEF -> VARIABLE_DEF [16:1] - | |--MODIFIERS -> MODIFIERS [16:1] - | |--TYPE -> TYPE [16:1] - | | `--IDENT -> String [16:1] - | |--IDENT -> result1_2 [16:8] - | |--ASSIGN -> = [16:18] - | | `--EXPR -> EXPR [16:23] - | | `--DOT -> . [16:23] - | | |--IDENT -> STR [16:20] - | | `--STRING_TEMPLATE_BEGIN -> " [16:24] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [16:25] - | | |--EMBEDDED_EXPRESSION_END -> } [16:29] - | | `--STRING_TEMPLATE_END -> " [16:30] - | `--SEMI -> ; [16:31] - |--VARIABLE_DEF -> VARIABLE_DEF [19:1] - | |--MODIFIERS -> MODIFIERS [19:1] - | |--TYPE -> TYPE [19:1] - | | `--IDENT -> String [19:1] - | |--IDENT -> result2 [19:8] - | |--ASSIGN -> = [19:16] - | | `--EXPR -> EXPR [19:21] - | | `--DOT -> . [19:21] - | | |--IDENT -> STR [19:18] - | | `--STRING_TEMPLATE_BEGIN -> " [19:23] - | | |--STRING_TEMPLATE_CONTENT -> x [19:24] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [19:25] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [19:28] - | | | `--IDENT -> x [19:28] - | | |--EMBEDDED_EXPRESSION_END -> } [19:30] - | | |--STRING_TEMPLATE_CONTENT -> x [19:31] - | | `--STRING_TEMPLATE_END -> " [19:32] - | `--SEMI -> ; [19:33] - |--VARIABLE_DEF -> VARIABLE_DEF [22:1] - | |--MODIFIERS -> MODIFIERS [22:1] - | |--TYPE -> TYPE [22:1] - | | `--IDENT -> String [22:1] - | |--IDENT -> result3 [22:8] - | |--ASSIGN -> = [22:16] - | | `--EXPR -> EXPR [22:21] - | | `--DOT -> . [22:21] - | | |--IDENT -> STR [22:18] - | | `--STRING_TEMPLATE_BEGIN -> " [22:23] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [22:24] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [22:28] - | | | `--METHOD_CALL -> ( [22:28] - | | | |--IDENT -> y [22:27] - | | | |--ELIST -> ELIST [22:30] - | | | | `--EXPR -> EXPR [22:30] - | | | | `--METHOD_CALL -> ( [22:30] - | | | | |--IDENT -> y [22:29] - | | | | |--ELIST -> ELIST [22:31] - | | | | | `--EXPR -> EXPR [22:31] - | | | | | `--STRING_LITERAL -> "y" [22:31] - | | | | `--RPAREN -> ) [22:34] - | | | `--RPAREN -> ) [22:35] - | | |--EMBEDDED_EXPRESSION_END -> } [22:37] - | | `--STRING_TEMPLATE_END -> " [22:38] - | `--SEMI -> ; [22:39] - |--VARIABLE_DEF -> VARIABLE_DEF [25:1] - | |--MODIFIERS -> MODIFIERS [25:1] - | |--TYPE -> TYPE [25:1] - | | `--IDENT -> String [25:1] - | |--IDENT -> result4 [25:8] - | |--ASSIGN -> = [25:16] - | | `--EXPR -> EXPR [25:33] - | | `--PLUS -> + [25:33] - | | |--DOT -> . [25:21] - | | | |--IDENT -> STR [25:18] - | | | `--STRING_TEMPLATE_BEGIN -> " [25:23] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [25:24] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [25:27] - | | | | `--IDENT -> x [25:27] - | | | |--EMBEDDED_EXPRESSION_END -> } [25:29] - | | | `--STRING_TEMPLATE_END -> " [25:30] - | | `--DOT -> . [25:38] - | | |--IDENT -> STR [25:35] - | | `--STRING_TEMPLATE_BEGIN -> " [25:40] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [25:41] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [25:44] - | | | `--IDENT -> y [25:44] - | | |--EMBEDDED_EXPRESSION_END -> } [25:46] - | | `--STRING_TEMPLATE_END -> " [25:47] - | `--SEMI -> ; [25:48] - |--VARIABLE_DEF -> VARIABLE_DEF [28:1] - | |--MODIFIERS -> MODIFIERS [28:1] - | |--TYPE -> TYPE [28:1] - | | `--IDENT -> String [28:1] - | |--IDENT -> result5 [28:8] - | |--ASSIGN -> = [28:16] - | | `--EXPR -> EXPR [28:41] - | | `--PLUS -> + [28:41] - | | |--DOT -> . [28:21] - | | | |--IDENT -> STR [28:18] - | | | `--STRING_TEMPLATE_BEGIN -> " [28:23] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [28:24] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [28:28] - | | | | `--METHOD_CALL -> ( [28:28] - | | | | |--IDENT -> y [28:27] - | | | | |--ELIST -> ELIST [28:30] - | | | | | `--EXPR -> EXPR [28:30] - | | | | | `--METHOD_CALL -> ( [28:30] - | | | | | |--IDENT -> y [28:29] - | | | | | |--ELIST -> ELIST [28:31] - | | | | | | `--EXPR -> EXPR [28:31] - | | | | | | `--STRING_LITERAL -> "y" [28:31] - | | | | | `--RPAREN -> ) [28:34] - | | | | `--RPAREN -> ) [28:35] - | | | |--EMBEDDED_EXPRESSION_END -> } [28:37] - | | | `--STRING_TEMPLATE_END -> " [28:38] - | | `--DOT -> . [28:46] - | | |--IDENT -> STR [28:43] - | | `--STRING_TEMPLATE_BEGIN -> " [28:48] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [28:49] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [28:53] - | | | `--METHOD_CALL -> ( [28:53] - | | | |--IDENT -> y [28:52] - | | | |--ELIST -> ELIST [28:55] - | | | | `--EXPR -> EXPR [28:55] - | | | | `--METHOD_CALL -> ( [28:55] - | | | | |--IDENT -> y [28:54] - | | | | |--ELIST -> ELIST [28:56] - | | | | | `--EXPR -> EXPR [28:56] - | | | | | `--STRING_LITERAL -> "y" [28:56] - | | | | `--RPAREN -> ) [28:59] - | | | `--RPAREN -> ) [28:60] - | | |--EMBEDDED_EXPRESSION_END -> } [28:62] - | | `--STRING_TEMPLATE_END -> " [28:63] - | `--SEMI -> ; [28:64] - |--VARIABLE_DEF -> VARIABLE_DEF [31:1] - | |--MODIFIERS -> MODIFIERS [31:1] - | |--TYPE -> TYPE [31:1] - | | `--IDENT -> String [31:1] - | |--IDENT -> result6 [31:8] - | |--ASSIGN -> = [31:16] - | | `--EXPR -> EXPR [31:33] - | | `--PLUS -> + [31:33] - | | |--DOT -> . [31:21] - | | | |--IDENT -> STR [31:18] - | | | `--STRING_TEMPLATE_BEGIN -> " [31:23] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [31:24] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [31:27] - | | | | `--IDENT -> x [31:27] - | | | |--EMBEDDED_EXPRESSION_END -> } [31:29] - | | | `--STRING_TEMPLATE_END -> " [31:30] - | | `--DOT -> . [31:38] - | | |--IDENT -> STR [31:35] - | | `--STRING_TEMPLATE_BEGIN -> " [31:40] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [31:41] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [31:44] - | | | `--IDENT -> y [31:44] - | | |--EMBEDDED_EXPRESSION_END -> } [31:46] - | | `--STRING_TEMPLATE_END -> " [31:47] - | `--SEMI -> ; [31:48] - |--VARIABLE_DEF -> VARIABLE_DEF [34:1] - | |--MODIFIERS -> MODIFIERS [34:1] - | |--TYPE -> TYPE [34:1] - | | `--IDENT -> String [34:1] - | |--IDENT -> result7 [34:8] - | |--ASSIGN -> = [34:16] - | | `--EXPR -> EXPR [34:21] - | | `--DOT -> . [34:21] - | | |--IDENT -> STR [34:18] - | | `--STRING_TEMPLATE_BEGIN -> " [34:23] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [34:24] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [34:29] - | | | `--PLUS -> + [34:29] - | | | |--IDENT -> x [34:27] - | | | `--IDENT -> y [34:31] - | | |--EMBEDDED_EXPRESSION_END -> } [34:33] - | | `--STRING_TEMPLATE_END -> " [34:34] - | `--SEMI -> ; [34:35] - |--VARIABLE_DEF -> VARIABLE_DEF [37:1] - | |--MODIFIERS -> MODIFIERS [37:1] - | |--TYPE -> TYPE [37:1] - | | `--IDENT -> String [37:1] - | |--IDENT -> result8 [37:8] - | |--ASSIGN -> = [37:16] - | | `--EXPR -> EXPR [37:21] - | | `--DOT -> . [37:21] - | | |--IDENT -> STR [37:18] - | | `--STRING_TEMPLATE_BEGIN -> " [37:23] - | | |--STRING_TEMPLATE_CONTENT -> hey [37:24] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [37:28] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [37:41] - | | | `--PLUS -> + [37:41] - | | | |--METHOD_CALL -> ( [37:32] - | | | | |--IDENT -> y [37:31] - | | | | |--ELIST -> ELIST [37:34] - | | | | | `--EXPR -> EXPR [37:34] - | | | | | `--METHOD_CALL -> ( [37:34] - | | | | | |--IDENT -> y [37:33] - | | | | | |--ELIST -> ELIST [37:35] - | | | | | | `--EXPR -> EXPR [37:35] - | | | | | | `--STRING_LITERAL -> "y" [37:35] - | | | | | `--RPAREN -> ) [37:38] - | | | | `--RPAREN -> ) [37:39] - | | | `--METHOD_CALL -> ( [37:44] - | | | |--IDENT -> y [37:43] - | | | |--ELIST -> ELIST [37:46] - | | | | `--EXPR -> EXPR [37:46] - | | | | `--METHOD_CALL -> ( [37:46] - | | | | |--IDENT -> y [37:45] - | | | | |--ELIST -> ELIST [37:47] - | | | | | `--EXPR -> EXPR [37:47] - | | | | | `--STRING_LITERAL -> "y" [37:47] - | | | | `--RPAREN -> ) [37:50] - | | | `--RPAREN -> ) [37:51] - | | |--EMBEDDED_EXPRESSION_END -> } [37:53] - | | |--STRING_TEMPLATE_CONTENT -> there [37:54] - | | `--STRING_TEMPLATE_END -> " [37:60] - | `--SEMI -> ; [37:61] - |--VARIABLE_DEF -> VARIABLE_DEF [40:1] - | |--MODIFIERS -> MODIFIERS [40:1] - | |--TYPE -> TYPE [40:1] - | | `--IDENT -> String [40:1] - | |--IDENT -> result9 [40:8] - | |--ASSIGN -> = [40:16] - | | `--EXPR -> EXPR [40:21] - | | `--DOT -> . [40:21] - | | |--IDENT -> STR [40:18] - | | `--STRING_TEMPLATE_BEGIN -> " [40:23] - | | |--STRING_TEMPLATE_CONTENT -> hey [40:24] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [40:28] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [41:13] - | | | `--PLUS -> + [41:13] - | | | |--METHOD_CALL -> ( [41:4] - | | | | |--IDENT -> y [41:3] - | | | | |--ELIST -> ELIST [41:6] - | | | | | `--EXPR -> EXPR [41:6] - | | | | | `--METHOD_CALL -> ( [41:6] - | | | | | |--IDENT -> y [41:5] - | | | | | |--ELIST -> ELIST [41:7] - | | | | | | `--EXPR -> EXPR [41:7] - | | | | | | `--STRING_LITERAL -> "y" [41:7] - | | | | | `--RPAREN -> ) [41:10] - | | | | `--RPAREN -> ) [41:11] - | | | `--METHOD_CALL -> ( [41:16] - | | | |--IDENT -> y [41:15] - | | | |--ELIST -> ELIST [41:18] - | | | | `--EXPR -> EXPR [41:18] - | | | | `--METHOD_CALL -> ( [41:18] - | | | | |--IDENT -> y [41:17] - | | | | |--ELIST -> ELIST [41:19] - | | | | | `--EXPR -> EXPR [41:19] - | | | | | `--STRING_LITERAL -> "y" [41:19] - | | | | `--RPAREN -> ) [41:22] - | | | `--RPAREN -> ) [41:23] - | | |--EMBEDDED_EXPRESSION_END -> } [42:3] - | | |--STRING_TEMPLATE_CONTENT -> there [42:4] - | | `--STRING_TEMPLATE_END -> " [42:10] - | `--SEMI -> ; [42:11] - |--VARIABLE_DEF -> VARIABLE_DEF [45:1] - | |--MODIFIERS -> MODIFIERS [45:1] - | |--TYPE -> TYPE [45:1] - | | `--IDENT -> String [45:1] - | |--IDENT -> result10 [45:8] - | |--ASSIGN -> = [45:17] - | | `--EXPR -> EXPR [45:22] - | | `--DOT -> . [45:22] - | | |--IDENT -> STR [45:19] - | | `--STRING_TEMPLATE_BEGIN -> " [45:24] - | | |--STRING_TEMPLATE_CONTENT -> hey [45:25] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [45:29] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [46:13] - | | | `--PLUS -> + [46:13] - | | | |--METHOD_CALL -> ( [46:4] - | | | | |--IDENT -> y [46:3] - | | | | |--ELIST -> ELIST [46:6] - | | | | | `--EXPR -> EXPR [46:6] - | | | | | `--METHOD_CALL -> ( [46:6] - | | | | | |--IDENT -> y [46:5] - | | | | | |--ELIST -> ELIST [46:7] - | | | | | | `--EXPR -> EXPR [46:7] - | | | | | | `--STRING_LITERAL -> "y" [46:7] - | | | | | `--RPAREN -> ) [46:10] - | | | | `--RPAREN -> ) [46:11] - | | | `--METHOD_CALL -> ( [46:16] - | | | |--IDENT -> y [46:15] - | | | |--ELIST -> ELIST [46:18] - | | | | `--EXPR -> EXPR [46:18] - | | | | `--METHOD_CALL -> ( [46:18] - | | | | |--IDENT -> y [46:17] - | | | | |--ELIST -> ELIST [46:19] - | | | | | `--EXPR -> EXPR [46:19] - | | | | | `--STRING_LITERAL -> "y" [46:19] - | | | | `--RPAREN -> ) [46:22] - | | | `--RPAREN -> ) [46:23] - | | |--EMBEDDED_EXPRESSION_END -> } [47:3] - | | |--STRING_TEMPLATE_CONTENT -> there [47:4] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [47:11] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [49:3] - | | | `--PLUS -> + [49:3] - | | | |--PLUS -> + [48:13] - | | | | |--METHOD_CALL -> ( [48:4] - | | | | | |--IDENT -> y [48:3] - | | | | | |--ELIST -> ELIST [48:6] - | | | | | | `--EXPR -> EXPR [48:6] - | | | | | | `--METHOD_CALL -> ( [48:6] - | | | | | | |--IDENT -> y [48:5] - | | | | | | |--ELIST -> ELIST [48:7] - | | | | | | | `--EXPR -> EXPR [48:7] - | | | | | | | `--STRING_LITERAL -> "y" [48:7] - | | | | | | `--RPAREN -> ) [48:10] - | | | | | `--RPAREN -> ) [48:11] - | | | | `--METHOD_CALL -> ( [48:16] - | | | | |--IDENT -> y [48:15] - | | | | |--ELIST -> ELIST [48:18] - | | | | | `--EXPR -> EXPR [48:18] - | | | | | `--METHOD_CALL -> ( [48:18] - | | | | | |--IDENT -> y [48:17] - | | | | | |--ELIST -> ELIST [48:19] - | | | | | | `--EXPR -> EXPR [48:19] - | | | | | | `--STRING_LITERAL -> "y" [48:19] - | | | | | `--RPAREN -> ) [48:22] - | | | | `--RPAREN -> ) [48:23] - | | | `--DOT -> . [49:8] - | | | |--IDENT -> STR [49:5] - | | | `--STRING_TEMPLATE_BEGIN -> " [49:9] - | | | |--STRING_TEMPLATE_CONTENT -> x [49:10] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [49:11] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [49:14] - | | | | `--IDENT -> x [49:14] - | | | |--EMBEDDED_EXPRESSION_END -> } [49:16] - | | | |--STRING_TEMPLATE_CONTENT -> x [49:17] - | | | `--STRING_TEMPLATE_END -> " [49:18] - | | |--EMBEDDED_EXPRESSION_END -> } [50:3] - | | `--STRING_TEMPLATE_END -> " [50:4] - | `--SEMI -> ; [50:5] - |--VARIABLE_DEF -> VARIABLE_DEF [52:1] - | |--MODIFIERS -> MODIFIERS [52:1] - | |--TYPE -> TYPE [52:1] - | | `--IDENT -> String [52:1] - | |--IDENT -> name [52:8] - | |--ASSIGN -> = [52:13] - | | `--EXPR -> EXPR [52:15] - | | `--STRING_LITERAL -> "world" [52:15] - | `--SEMI -> ; [52:22] - |--VARIABLE_DEF -> VARIABLE_DEF [53:1] - | |--MODIFIERS -> MODIFIERS [53:1] - | |--TYPE -> TYPE [53:1] - | | `--IDENT -> String [53:1] - | |--IDENT -> s [53:8] - | |--ASSIGN -> = [53:10] - | | `--EXPR -> EXPR [53:15] - | | `--DOT -> . [53:15] - | | |--IDENT -> STR [53:12] - | | `--STRING_TEMPLATE_BEGIN -> " [53:16] - | | |--STRING_TEMPLATE_CONTENT -> Hello, [53:17] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [53:24] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [53:27] - | | | `--IDENT -> name [53:27] - | | |--EMBEDDED_EXPRESSION_END -> } [53:32] - | | |--STRING_TEMPLATE_CONTENT -> ! [53:33] - | | `--STRING_TEMPLATE_END -> " [53:34] - | `--SEMI -> ; [53:35] - |--METHOD_DEF -> METHOD_DEF [55:1] - | |--MODIFIERS -> MODIFIERS [55:1] - | | |--LITERAL_PRIVATE -> private [55:1] - | | `--LITERAL_STATIC -> static [55:9] - | |--TYPE -> TYPE [55:16] - | | `--IDENT -> String [55:16] - | |--IDENT -> y [55:23] - | |--LPAREN -> ( [55:24] - | |--PARAMETERS -> PARAMETERS [55:25] - | | `--PARAMETER_DEF -> PARAMETER_DEF [55:25] - | | |--MODIFIERS -> MODIFIERS [55:25] - | | |--TYPE -> TYPE [55:25] - | | | `--IDENT -> String [55:25] - | | `--IDENT -> y [55:32] - | |--RPAREN -> ) [55:33] - | `--SLIST -> { [55:35] - | |--LITERAL_RETURN -> return [56:2] - | | |--EXPR -> EXPR [56:9] - | | | `--STRING_LITERAL -> "y" [56:9] - | | `--SEMI -> ; [56:12] - | `--RCURLY -> } [57:1] - |--METHOD_DEF -> METHOD_DEF [60:1] - | |--MODIFIERS -> MODIFIERS [60:1] - | |--TYPE -> TYPE [60:1] - | | `--LITERAL_VOID -> void [60:1] - | |--IDENT -> x [60:6] - | |--LPAREN -> ( [60:7] - | |--PARAMETERS -> PARAMETERS [60:8] - | | `--PARAMETER_DEF -> PARAMETER_DEF [60:8] - | | |--MODIFIERS -> MODIFIERS [60:8] - | | |--TYPE -> TYPE [60:8] - | | | |--IDENT -> List [60:8] - | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [60:12] - | | | |--GENERIC_START -> < [60:12] - | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:13] - | | | | |--WILDCARD_TYPE -> ? [60:13] - | | | | `--TYPE_UPPER_BOUNDS -> extends [60:15] - | | | | `--DOT -> . [60:37] - | | | | |--IDENT -> StringTemplate [60:23] - | | | | |--IDENT -> Processor [60:38] - | | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [60:47] - | | | | |--GENERIC_START -> < [60:47] - | | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:48] - | | | | | `--IDENT -> String [60:48] - | | | | |--COMMA -> , [60:54] - | | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:56] - | | | | | `--IDENT -> RuntimeException [60:56] - | | | | `--GENERIC_END -> > [60:72] - | | | `--GENERIC_END -> > [60:73] - | | `--IDENT -> list [60:75] - | |--RPAREN -> ) [60:79] - | `--SLIST -> { [60:81] - | |--EXPR -> EXPR [61:13] - | | `--DOT -> . [61:13] - | | |--METHOD_CALL -> ( [61:10] - | | | |--DOT -> . [61:6] - | | | | |--IDENT -> list [61:2] - | | | | `--IDENT -> get [61:7] - | | | |--ELIST -> ELIST [61:11] - | | | | `--EXPR -> EXPR [61:11] - | | | | `--NUM_INT -> 0 [61:11] - | | | `--RPAREN -> ) [61:12] - | | `--STRING_TEMPLATE_BEGIN -> " [61:14] - | | |--STRING_TEMPLATE_CONTENT -> [61:15] - | | `--STRING_TEMPLATE_END -> " [61:15] - | |--SEMI -> ; [61:16] - | |--EXPR -> EXPR [62:13] - | | `--DOT -> . [62:13] - | | |--METHOD_CALL -> ( [62:10] - | | | |--DOT -> . [62:6] - | | | | |--IDENT -> list [62:2] - | | | | `--IDENT -> get [62:7] - | | | |--ELIST -> ELIST [62:11] - | | | | `--EXPR -> EXPR [62:11] - | | | | `--NUM_INT -> 0 [62:11] - | | | `--RPAREN -> ) [62:12] - | | `--STRING_TEMPLATE_BEGIN -> " [62:14] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [62:15] - | | |--EMBEDDED_EXPRESSION_END -> } [62:19] - | | `--STRING_TEMPLATE_END -> " [62:20] - | |--SEMI -> ; [62:21] - | |--EXPR -> EXPR [63:13] - | | `--DOT -> . [63:13] - | | |--METHOD_CALL -> ( [63:10] - | | | |--DOT -> . [63:6] - | | | | |--IDENT -> list [63:2] - | | | | `--IDENT -> get [63:7] - | | | |--ELIST -> ELIST [63:11] - | | | | `--EXPR -> EXPR [63:11] - | | | | `--NUM_INT -> 0 [63:11] - | | | `--RPAREN -> ) [63:12] - | | `--STRING_TEMPLATE_BEGIN -> " [63:15] - | | |--STRING_TEMPLATE_CONTENT -> x [63:16] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [63:17] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [63:20] - | | | `--IDENT -> x [63:20] - | | |--EMBEDDED_EXPRESSION_END -> } [63:22] - | | |--STRING_TEMPLATE_CONTENT -> x [63:23] - | | `--STRING_TEMPLATE_END -> " [63:24] - | |--SEMI -> ; [63:25] - | |--EXPR -> EXPR [64:13] - | | `--DOT -> . [64:13] - | | |--METHOD_CALL -> ( [64:10] - | | | |--DOT -> . [64:6] - | | | | |--IDENT -> list [64:2] - | | | | `--IDENT -> get [64:7] - | | | |--ELIST -> ELIST [64:11] - | | | | `--EXPR -> EXPR [64:11] - | | | | `--NUM_INT -> 0 [64:11] - | | | `--RPAREN -> ) [64:12] - | | `--STRING_TEMPLATE_BEGIN -> " [64:15] - | | |--STRING_TEMPLATE_CONTENT -> . [64:16] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:17] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:20] - | | | `--IDENT -> x [64:20] - | | |--EMBEDDED_EXPRESSION_END -> } [64:22] - | | |--STRING_TEMPLATE_CONTENT -> . [64:23] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:24] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:27] - | | | `--IDENT -> y [64:27] - | | |--EMBEDDED_EXPRESSION_END -> } [64:29] - | | |--STRING_TEMPLATE_CONTENT -> . [64:30] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:31] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:34] - | | | `--IDENT -> x [64:34] - | | |--EMBEDDED_EXPRESSION_END -> } [64:36] - | | |--STRING_TEMPLATE_CONTENT -> . [64:37] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:38] - | | |--EMBEDDED_EXPRESSION_END -> } [64:40] - | | |--STRING_TEMPLATE_CONTENT -> . [64:41] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:42] - | | |--EMBEDDED_EXPRESSION_END -> } [64:44] - | | `--STRING_TEMPLATE_END -> " [64:45] - | |--SEMI -> ; [64:46] - | `--RCURLY -> } [65:1] - `--RCURLY -> } [66:0] diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateMultiLineWithComments.txt b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateMultiLineWithComments.txt deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateMultiLineWithComments.txt +++ /dev/null @@ -1,628 +0,0 @@ -COMPILATION_UNIT -> COMPILATION_UNIT [2:0] -|--SINGLE_LINE_COMMENT -> // [1:0] -| `--COMMENT_CONTENT -> non-compiled with javac: Compilable with Java21\n [1:2] -|--PACKAGE_DEF -> package [2:0] -| |--ANNOTATIONS -> ANNOTATIONS [2:47] -| |--DOT -> . [2:47] -| | |--DOT -> . [2:39] -| | | |--DOT -> . [2:28] -| | | | |--DOT -> . [2:22] -| | | | | |--DOT -> . [2:11] -| | | | | | |--IDENT -> com [2:8] -| | | | | | `--IDENT -> puppycrawl [2:12] -| | | | | `--IDENT -> tools [2:23] -| | | | `--IDENT -> checkstyle [2:29] -| | | `--IDENT -> grammar [2:40] -| | `--IDENT -> java21 [2:48] -| `--SEMI -> ; [2:54] -|--IMPORT -> import [4:0] -| |--DOT -> . [4:16] -| | |--DOT -> . [4:11] -| | | |--IDENT -> java [4:7] -| | | `--IDENT -> util [4:12] -| | `--IDENT -> List [4:17] -| `--SEMI -> ; [4:21] -`--CLASS_DEF -> CLASS_DEF [6:0] - |--MODIFIERS -> MODIFIERS [6:0] - | `--LITERAL_PUBLIC -> public [6:0] - |--LITERAL_CLASS -> class [6:7] - |--IDENT -> InputStringTemplateMultiLineWithComments [6:13] - `--OBJBLOCK -> OBJBLOCK [6:54] - |--LCURLY -> { [6:54] - |--VARIABLE_DEF -> VARIABLE_DEF [7:4] - | |--MODIFIERS -> MODIFIERS [7:4] - | |--TYPE -> TYPE [7:4] - | | `--LITERAL_INT -> int [7:4] - | |--IDENT -> x [7:8] - | |--ASSIGN -> = [7:10] - | | `--EXPR -> EXPR [7:12] - | | `--NUM_INT -> 10 [7:12] - | `--SEMI -> ; [7:14] - |--VARIABLE_DEF -> VARIABLE_DEF [8:4] - | |--MODIFIERS -> MODIFIERS [8:4] - | |--TYPE -> TYPE [8:4] - | | `--LITERAL_INT -> int [8:4] - | |--IDENT -> y [8:8] - | |--ASSIGN -> = [8:10] - | | `--EXPR -> EXPR [8:12] - | | `--NUM_INT -> 20 [8:12] - | `--SEMI -> ; [8:14] - |--VARIABLE_DEF -> VARIABLE_DEF [11:4] - | |--MODIFIERS -> MODIFIERS [11:4] - | |--TYPE -> TYPE [11:4] - | | |--SINGLE_LINE_COMMENT -> // [10:4] - | | | `--COMMENT_CONTENT -> most basic example, empty string template expression\n [10:6] - | | `--IDENT -> String [11:4] - | |--IDENT -> result1 [11:11] - | |--ASSIGN -> = [11:19] - | | `--EXPR -> EXPR [11:24] - | | `--DOT -> . [11:24] - | | |--IDENT -> STR [11:21] - | | `--STRING_TEMPLATE_BEGIN -> " [11:25] - | | |--STRING_TEMPLATE_CONTENT -> [11:26] - | | `--STRING_TEMPLATE_END -> " [11:26] - | `--SEMI -> ; [11:27] - |--VARIABLE_DEF -> VARIABLE_DEF [13:4] - | |--MODIFIERS -> MODIFIERS [13:4] - | |--TYPE -> TYPE [13:4] - | | `--IDENT -> String [13:4] - | |--IDENT -> result1_1 [13:11] - | |--ASSIGN -> = [13:21] - | | `--EXPR -> EXPR [13:26] - | | `--DOT -> . [13:26] - | | |--IDENT -> STR [13:23] - | | `--STRING_TEMPLATE_BEGIN -> " [13:27] - | | |--STRING_TEMPLATE_CONTENT -> Hello world! [13:28] - | | `--STRING_TEMPLATE_END -> " [13:40] - | `--SEMI -> ; [13:41] - |--VARIABLE_DEF -> VARIABLE_DEF [16:4] - | |--MODIFIERS -> MODIFIERS [16:4] - | |--TYPE -> TYPE [16:4] - | | |--SINGLE_LINE_COMMENT -> // [15:4] - | | | `--COMMENT_CONTENT -> no content, no expression\n [15:6] - | | `--IDENT -> String [16:4] - | |--IDENT -> result1_2 [16:11] - | |--ASSIGN -> = [16:21] - | | `--EXPR -> EXPR [16:26] - | | `--DOT -> . [16:26] - | | |--IDENT -> STR [16:23] - | | `--STRING_TEMPLATE_BEGIN -> " [16:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [16:28] - | | |--EMBEDDED_EXPRESSION_END -> } [16:32] - | | `--STRING_TEMPLATE_END -> " [16:33] - | `--SEMI -> ; [16:34] - |--VARIABLE_DEF -> VARIABLE_DEF [19:4] - | |--MODIFIERS -> MODIFIERS [19:4] - | |--TYPE -> TYPE [19:4] - | | |--SINGLE_LINE_COMMENT -> // [18:4] - | | | `--COMMENT_CONTENT -> simple single value interpolation\n [18:6] - | | `--IDENT -> String [19:4] - | |--IDENT -> result2 [19:11] - | |--ASSIGN -> = [19:19] - | | `--EXPR -> EXPR [19:24] - | | `--DOT -> . [19:24] - | | |--IDENT -> STR [19:21] - | | `--STRING_TEMPLATE_BEGIN -> " [19:26] - | | |--STRING_TEMPLATE_CONTENT -> x [19:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [19:28] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [19:31] - | | | `--IDENT -> x [19:31] - | | |--EMBEDDED_EXPRESSION_END -> } [19:33] - | | |--STRING_TEMPLATE_CONTENT -> x [19:34] - | | `--STRING_TEMPLATE_END -> " [19:35] - | `--SEMI -> ; [19:36] - |--VARIABLE_DEF -> VARIABLE_DEF [22:4] - | |--MODIFIERS -> MODIFIERS [22:4] - | |--TYPE -> TYPE [22:4] - | | |--SINGLE_LINE_COMMENT -> // [19:38] - | | | `--COMMENT_CONTENT -> comment\n [19:40] - | | |--SINGLE_LINE_COMMENT -> // [21:4] - | | | `--COMMENT_CONTENT -> simple single value interpolation with a method call\n [21:6] - | | `--IDENT -> String [22:4] - | |--IDENT -> result3 [22:11] - | |--ASSIGN -> = [22:19] - | | `--EXPR -> EXPR [22:24] - | | `--DOT -> . [22:24] - | | |--IDENT -> STR [22:21] - | | `--STRING_TEMPLATE_BEGIN -> " [22:26] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [22:27] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [22:31] - | | | `--METHOD_CALL -> ( [22:31] - | | | |--IDENT -> y [22:30] - | | | |--ELIST -> ELIST [22:33] - | | | | `--EXPR -> EXPR [22:33] - | | | | `--METHOD_CALL -> ( [22:33] - | | | | |--IDENT -> y [22:32] - | | | | |--ELIST -> ELIST [22:34] - | | | | | `--EXPR -> EXPR [22:34] - | | | | | `--STRING_LITERAL -> "y" [22:34] - | | | | `--RPAREN -> ) [22:37] - | | | `--RPAREN -> ) [22:38] - | | |--EMBEDDED_EXPRESSION_END -> } [22:40] - | | `--STRING_TEMPLATE_END -> " [22:41] - | `--SEMI -> ; [22:42] - |--VARIABLE_DEF -> VARIABLE_DEF [25:4] - | |--MODIFIERS -> MODIFIERS [25:4] - | |--TYPE -> TYPE [25:4] - | | |--SINGLE_LINE_COMMENT -> // [24:4] - | | | `--COMMENT_CONTENT -> bit more complex example, multiple interpolations\n [24:6] - | | `--IDENT -> String [25:4] - | |--IDENT -> result4 [25:11] - | |--ASSIGN -> = [25:19] - | | `--EXPR -> EXPR [25:36] - | | `--PLUS -> + [25:36] - | | |--DOT -> . [25:24] - | | | |--IDENT -> STR [25:21] - | | | `--STRING_TEMPLATE_BEGIN -> " [25:26] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [25:27] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [25:30] - | | | | `--IDENT -> x [25:30] - | | | |--EMBEDDED_EXPRESSION_END -> } [25:32] - | | | `--STRING_TEMPLATE_END -> " [25:33] - | | `--DOT -> . [25:41] - | | |--IDENT -> STR [25:38] - | | `--STRING_TEMPLATE_BEGIN -> " [25:43] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [25:44] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [25:47] - | | | `--IDENT -> y [25:47] - | | |--EMBEDDED_EXPRESSION_END -> } [25:49] - | | `--STRING_TEMPLATE_END -> " [25:50] - | `--SEMI -> ; [25:51] - |--VARIABLE_DEF -> VARIABLE_DEF [28:4] - | |--MODIFIERS -> MODIFIERS [28:4] - | |--TYPE -> TYPE [28:4] - | | |--SINGLE_LINE_COMMENT -> // [27:4] - | | | `--COMMENT_CONTENT -> bit more complex example, multiple interpolations with method calls\n [27:6] - | | `--IDENT -> String [28:4] - | |--IDENT -> result5 [28:11] - | |--ASSIGN -> = [28:19] - | | `--EXPR -> EXPR [28:44] - | | `--PLUS -> + [28:44] - | | |--DOT -> . [28:24] - | | | |--IDENT -> STR [28:21] - | | | `--STRING_TEMPLATE_BEGIN -> " [28:26] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [28:27] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [28:31] - | | | | `--METHOD_CALL -> ( [28:31] - | | | | |--IDENT -> y [28:30] - | | | | |--ELIST -> ELIST [28:33] - | | | | | `--EXPR -> EXPR [28:33] - | | | | | `--METHOD_CALL -> ( [28:33] - | | | | | |--IDENT -> y [28:32] - | | | | | |--ELIST -> ELIST [28:34] - | | | | | | `--EXPR -> EXPR [28:34] - | | | | | | `--STRING_LITERAL -> "y" [28:34] - | | | | | `--RPAREN -> ) [28:37] - | | | | `--RPAREN -> ) [28:38] - | | | |--EMBEDDED_EXPRESSION_END -> } [28:40] - | | | `--STRING_TEMPLATE_END -> " [28:41] - | | `--DOT -> . [28:49] - | | |--IDENT -> STR [28:46] - | | `--STRING_TEMPLATE_BEGIN -> " [28:51] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [28:52] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [28:56] - | | | `--METHOD_CALL -> ( [28:56] - | | | |--IDENT -> y [28:55] - | | | |--ELIST -> ELIST [28:58] - | | | | `--EXPR -> EXPR [28:58] - | | | | `--METHOD_CALL -> ( [28:58] - | | | | |--IDENT -> y [28:57] - | | | | |--ELIST -> ELIST [28:59] - | | | | | `--EXPR -> EXPR [28:59] - | | | | | `--STRING_LITERAL -> "y" [28:59] - | | | | |--BLOCK_COMMENT_BEGIN -> /* [28:62] - | | | | | |--COMMENT_CONTENT -> yep, comment here, too [28:64] - | | | | | `--BLOCK_COMMENT_END -> */ [28:85] - | | | | `--RPAREN -> ) [28:88] - | | | `--RPAREN -> ) [28:89] - | | |--EMBEDDED_EXPRESSION_END -> } [28:91] - | | `--STRING_TEMPLATE_END -> " [28:92] - | `--SEMI -> ; [28:93] - |--VARIABLE_DEF -> VARIABLE_DEF [31:4] - | |--MODIFIERS -> MODIFIERS [31:4] - | |--TYPE -> TYPE [31:4] - | | |--SINGLE_LINE_COMMENT -> // [30:4] - | | | `--COMMENT_CONTENT -> string template concatenation\n [30:6] - | | `--IDENT -> String [31:4] - | |--IDENT -> result6 [31:11] - | |--ASSIGN -> = [31:19] - | | `--EXPR -> EXPR [31:36] - | | `--PLUS -> + [31:36] - | | |--DOT -> . [31:24] - | | | |--IDENT -> STR [31:21] - | | | `--STRING_TEMPLATE_BEGIN -> " [31:26] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [31:27] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [31:30] - | | | | `--IDENT -> x [31:30] - | | | |--EMBEDDED_EXPRESSION_END -> } [31:32] - | | | `--STRING_TEMPLATE_END -> " [31:33] - | | `--DOT -> . [31:58] - | | |--BLOCK_COMMENT_BEGIN -> /* [31:38] - | | | |--COMMENT_CONTENT -> comment here [31:40] - | | | `--BLOCK_COMMENT_END -> */ [31:51] - | | |--IDENT -> STR [31:55] - | | `--STRING_TEMPLATE_BEGIN -> " [31:60] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [31:61] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [31:64] - | | | `--IDENT -> y [31:64] - | | |--EMBEDDED_EXPRESSION_END -> } [31:66] - | | `--STRING_TEMPLATE_END -> " [31:67] - | `--SEMI -> ; [31:68] - |--VARIABLE_DEF -> VARIABLE_DEF [34:4] - | |--MODIFIERS -> MODIFIERS [34:4] - | |--TYPE -> TYPE [34:4] - | | |--SINGLE_LINE_COMMENT -> // [33:4] - | | | `--COMMENT_CONTENT -> concatentation in embedded expression\n [33:6] - | | `--IDENT -> String [34:4] - | |--IDENT -> result7 [34:11] - | |--ASSIGN -> = [34:19] - | | `--EXPR -> EXPR [34:24] - | | `--DOT -> . [34:24] - | | |--IDENT -> STR [34:21] - | | `--STRING_TEMPLATE_BEGIN -> " [34:26] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [34:27] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [34:32] - | | | `--PLUS -> + [34:32] - | | | |--IDENT -> x [34:30] - | | | `--IDENT -> y [34:34] - | | |--BLOCK_COMMENT_BEGIN -> /* [34:36] - | | | |--COMMENT_CONTENT -> comment here too [34:38] - | | | `--BLOCK_COMMENT_END -> */ [34:53] - | | |--EMBEDDED_EXPRESSION_END -> } [34:57] - | | `--STRING_TEMPLATE_END -> " [34:58] - | `--SEMI -> ; [34:59] - |--VARIABLE_DEF -> VARIABLE_DEF [37:4] - | |--MODIFIERS -> MODIFIERS [37:4] - | |--TYPE -> TYPE [37:4] - | | |--SINGLE_LINE_COMMENT -> // [36:4] - | | | `--COMMENT_CONTENT -> concatentation in embedded expression with method calls\n [36:6] - | | `--IDENT -> String [37:4] - | |--IDENT -> result8 [37:11] - | |--ASSIGN -> = [37:19] - | | `--EXPR -> EXPR [37:24] - | | `--DOT -> . [37:24] - | | |--IDENT -> STR [37:21] - | | |--BLOCK_COMMENT_BEGIN -> /* [37:25] - | | | |--COMMENT_CONTENT -> comment here [37:27] - | | | `--BLOCK_COMMENT_END -> */ [37:38] - | | `--STRING_TEMPLATE_BEGIN -> " [37:42] - | | |--STRING_TEMPLATE_CONTENT -> hey [37:43] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [37:47] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [37:60] - | | | `--PLUS -> + [37:60] - | | | |--METHOD_CALL -> ( [37:51] - | | | | |--IDENT -> y [37:50] - | | | | |--ELIST -> ELIST [37:53] - | | | | | `--EXPR -> EXPR [37:53] - | | | | | `--METHOD_CALL -> ( [37:53] - | | | | | |--IDENT -> y [37:52] - | | | | | |--ELIST -> ELIST [37:54] - | | | | | | `--EXPR -> EXPR [37:54] - | | | | | | `--STRING_LITERAL -> "y" [37:54] - | | | | | `--RPAREN -> ) [37:57] - | | | | `--RPAREN -> ) [37:58] - | | | `--METHOD_CALL -> ( [37:63] - | | | |--IDENT -> y [37:62] - | | | |--ELIST -> ELIST [37:65] - | | | | `--EXPR -> EXPR [37:65] - | | | | `--METHOD_CALL -> ( [37:65] - | | | | |--IDENT -> y [37:64] - | | | | |--ELIST -> ELIST [37:66] - | | | | | `--EXPR -> EXPR [37:66] - | | | | | `--STRING_LITERAL -> "y" [37:66] - | | | | `--RPAREN -> ) [37:69] - | | | `--RPAREN -> ) [37:70] - | | |--EMBEDDED_EXPRESSION_END -> } [37:72] - | | |--STRING_TEMPLATE_CONTENT -> there [37:73] - | | `--STRING_TEMPLATE_END -> " [37:79] - | `--SEMI -> ; [37:80] - |--VARIABLE_DEF -> VARIABLE_DEF [40:4] - | |--MODIFIERS -> MODIFIERS [40:4] - | |--TYPE -> TYPE [40:4] - | | |--SINGLE_LINE_COMMENT -> // [39:4] - | | | `--COMMENT_CONTENT -> multiple lines\n [39:6] - | | `--IDENT -> String [40:4] - | |--IDENT -> result9 [40:11] - | |--ASSIGN -> = [40:19] - | | `--EXPR -> EXPR [40:24] - | | `--DOT -> . [40:24] - | | |--IDENT -> STR [40:21] - | | `--STRING_TEMPLATE_BEGIN -> " [40:26] - | | |--STRING_TEMPLATE_CONTENT -> hey [40:27] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [40:31] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [41:22] - | | | `--PLUS -> + [41:22] - | | | |--METHOD_CALL -> ( [41:13] - | | | | |--SINGLE_LINE_COMMENT -> // [40:34] - | | | | | `--COMMENT_CONTENT -> comment here\n [40:36] - | | | | |--IDENT -> y [41:12] - | | | | |--ELIST -> ELIST [41:15] - | | | | | `--EXPR -> EXPR [41:15] - | | | | | `--METHOD_CALL -> ( [41:15] - | | | | | |--IDENT -> y [41:14] - | | | | | |--ELIST -> ELIST [41:16] - | | | | | | `--EXPR -> EXPR [41:16] - | | | | | | `--STRING_LITERAL -> "y" [41:16] - | | | | | `--RPAREN -> ) [41:19] - | | | | `--RPAREN -> ) [41:20] - | | | `--METHOD_CALL -> ( [41:25] - | | | |--IDENT -> y [41:24] - | | | |--ELIST -> ELIST [41:27] - | | | | `--EXPR -> EXPR [41:27] - | | | | `--METHOD_CALL -> ( [41:27] - | | | | |--IDENT -> y [41:26] - | | | | |--ELIST -> ELIST [41:28] - | | | | | `--EXPR -> EXPR [41:28] - | | | | | `--STRING_LITERAL -> "y" [41:28] - | | | | `--RPAREN -> ) [41:31] - | | | `--RPAREN -> ) [41:32] - | | |--EMBEDDED_EXPRESSION_END -> } [42:12] - | | |--STRING_TEMPLATE_CONTENT -> there [42:13] - | | `--STRING_TEMPLATE_END -> " [42:19] - | `--SEMI -> ; [42:20] - |--VARIABLE_DEF -> VARIABLE_DEF [45:4] - | |--MODIFIERS -> MODIFIERS [45:4] - | |--TYPE -> TYPE [45:4] - | | |--SINGLE_LINE_COMMENT -> // [44:4] - | | | `--COMMENT_CONTENT -> multiple lines with many expressions and comments\n [44:6] - | | `--IDENT -> String [45:4] - | |--IDENT -> result10 [45:11] - | |--ASSIGN -> = [45:20] - | | `--EXPR -> EXPR [45:25] - | | `--DOT -> . [45:25] - | | |--IDENT -> STR [45:22] - | | `--STRING_TEMPLATE_BEGIN -> " [45:27] - | | |--STRING_TEMPLATE_CONTENT -> hey [45:28] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [45:32] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [46:22] - | | | `--PLUS -> + [46:22] - | | | |--METHOD_CALL -> ( [46:13] - | | | | |--BLOCK_COMMENT_BEGIN -> /* [45:35] - | | | | | |--COMMENT_CONTENT -> ****comment here [45:37] - | | | | | `--BLOCK_COMMENT_END -> */ [45:52] - | | | | |--SINGLE_LINE_COMMENT -> // [45:56] - | | | | | `--COMMENT_CONTENT -> comment here\n [45:58] - | | | | |--IDENT -> y [46:12] - | | | | |--ELIST -> ELIST [46:15] - | | | | | `--EXPR -> EXPR [46:15] - | | | | | `--METHOD_CALL -> ( [46:15] - | | | | | |--IDENT -> y [46:14] - | | | | | |--ELIST -> ELIST [46:16] - | | | | | | `--EXPR -> EXPR [46:16] - | | | | | | `--STRING_LITERAL -> "y" [46:16] - | | | | | `--RPAREN -> ) [46:19] - | | | | `--RPAREN -> ) [46:20] - | | | `--METHOD_CALL -> ( [46:25] - | | | |--IDENT -> y [46:24] - | | | |--ELIST -> ELIST [46:27] - | | | | `--EXPR -> EXPR [46:27] - | | | | `--METHOD_CALL -> ( [46:27] - | | | | |--IDENT -> y [46:26] - | | | | |--ELIST -> ELIST [46:28] - | | | | | `--EXPR -> EXPR [46:28] - | | | | | `--STRING_LITERAL -> "y" [46:28] - | | | | `--RPAREN -> ) [46:31] - | | | `--RPAREN -> ) [46:32] - | | |--BLOCK_COMMENT_BEGIN -> /* [46:34] - | | | |--COMMENT_CONTENT -> comment here [46:36] - | | | `--BLOCK_COMMENT_END -> */ [46:49] - | | |--EMBEDDED_EXPRESSION_END -> } [47:12] - | | |--STRING_TEMPLATE_CONTENT -> there [47:13] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [47:20] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [49:12] - | | | |--SINGLE_LINE_COMMENT -> // [48:34] - | | | | `--COMMENT_CONTENT -> comment there\n [48:36] - | | | `--PLUS -> + [49:12] - | | | |--PLUS -> + [48:22] - | | | | |--METHOD_CALL -> ( [48:13] - | | | | | |--BLOCK_COMMENT_BEGIN -> /* [47:23] - | | | | | | |--COMMENT_CONTENT -> [47:25] - | | | | | | `--BLOCK_COMMENT_END -> */ [47:24] - | | | | | |--SINGLE_LINE_COMMENT -> // [47:28] - | | | | | | `--COMMENT_CONTENT -> comment here\n [47:30] - | | | | | |--IDENT -> y [48:12] - | | | | | |--ELIST -> ELIST [48:15] - | | | | | | `--EXPR -> EXPR [48:15] - | | | | | | `--METHOD_CALL -> ( [48:15] - | | | | | | |--IDENT -> y [48:14] - | | | | | | |--ELIST -> ELIST [48:16] - | | | | | | | `--EXPR -> EXPR [48:16] - | | | | | | | `--STRING_LITERAL -> "y" [48:16] - | | | | | | `--RPAREN -> ) [48:19] - | | | | | `--RPAREN -> ) [48:20] - | | | | `--METHOD_CALL -> ( [48:25] - | | | | |--IDENT -> y [48:24] - | | | | |--ELIST -> ELIST [48:27] - | | | | | `--EXPR -> EXPR [48:27] - | | | | | `--METHOD_CALL -> ( [48:27] - | | | | | |--IDENT -> y [48:26] - | | | | | |--ELIST -> ELIST [48:28] - | | | | | | `--EXPR -> EXPR [48:28] - | | | | | | `--STRING_LITERAL -> "y" [48:28] - | | | | | `--RPAREN -> ) [48:31] - | | | | `--RPAREN -> ) [48:32] - | | | `--DOT -> . [49:17] - | | | |--IDENT -> STR [49:14] - | | | `--STRING_TEMPLATE_BEGIN -> " [49:18] - | | | |--STRING_TEMPLATE_CONTENT -> x [49:19] - | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [49:20] - | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [49:23] - | | | | `--IDENT -> x [49:23] - | | | |--EMBEDDED_EXPRESSION_END -> } [49:25] - | | | |--STRING_TEMPLATE_CONTENT -> x [49:26] - | | | `--STRING_TEMPLATE_END -> " [49:27] - | | |--SINGLE_LINE_COMMENT -> // [49:29] - | | | `--COMMENT_CONTENT -> comment everywhere\n [49:31] - | | |--EMBEDDED_EXPRESSION_END -> } [50:12] - | | `--STRING_TEMPLATE_END -> " [50:13] - | `--SEMI -> ; [50:14] - |--VARIABLE_DEF -> VARIABLE_DEF [52:4] - | |--MODIFIERS -> MODIFIERS [52:4] - | |--TYPE -> TYPE [52:4] - | | `--IDENT -> String [52:4] - | |--IDENT -> name [52:11] - | |--ASSIGN -> = [52:16] - | | `--EXPR -> EXPR [52:18] - | | `--STRING_LITERAL -> "world" [52:18] - | `--SEMI -> ; [52:25] - |--VARIABLE_DEF -> VARIABLE_DEF [53:4] - | |--MODIFIERS -> MODIFIERS [53:4] - | |--TYPE -> TYPE [53:4] - | | `--IDENT -> String [53:4] - | |--IDENT -> s [53:11] - | |--ASSIGN -> = [53:13] - | | `--EXPR -> EXPR [53:18] - | | `--DOT -> . [53:18] - | | |--IDENT -> STR [53:15] - | | `--STRING_TEMPLATE_BEGIN -> " [53:19] - | | |--STRING_TEMPLATE_CONTENT -> Hello, [53:20] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [53:27] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [53:30] - | | | `--IDENT -> name [53:30] - | | |--EMBEDDED_EXPRESSION_END -> } [53:35] - | | |--STRING_TEMPLATE_CONTENT -> ! [53:36] - | | `--STRING_TEMPLATE_END -> " [53:37] - | `--SEMI -> ; [53:38] - |--METHOD_DEF -> METHOD_DEF [55:4] - | |--MODIFIERS -> MODIFIERS [55:4] - | | |--LITERAL_PRIVATE -> private [55:4] - | | `--LITERAL_STATIC -> static [55:12] - | |--TYPE -> TYPE [55:19] - | | `--IDENT -> String [55:19] - | |--IDENT -> y [55:26] - | |--LPAREN -> ( [55:27] - | |--PARAMETERS -> PARAMETERS [55:28] - | | `--PARAMETER_DEF -> PARAMETER_DEF [55:28] - | | |--MODIFIERS -> MODIFIERS [55:28] - | | |--TYPE -> TYPE [55:28] - | | | `--IDENT -> String [55:28] - | | `--IDENT -> y [55:35] - | |--RPAREN -> ) [55:36] - | `--SLIST -> { [55:38] - | |--LITERAL_RETURN -> return [56:8] - | | |--EXPR -> EXPR [56:15] - | | | `--STRING_LITERAL -> "y" [56:15] - | | `--SEMI -> ; [56:18] - | `--RCURLY -> } [57:4] - |--METHOD_DEF -> METHOD_DEF [60:4] - | |--MODIFIERS -> MODIFIERS [60:4] - | |--TYPE -> TYPE [60:4] - | | |--SINGLE_LINE_COMMENT -> // [59:4] - | | | `--COMMENT_CONTENT -> Verify proper behavior of TransType w.r.t. templated Strings\n [59:6] - | | `--LITERAL_VOID -> void [60:4] - | |--IDENT -> x [60:9] - | |--LPAREN -> ( [60:10] - | |--PARAMETERS -> PARAMETERS [60:11] - | | `--PARAMETER_DEF -> PARAMETER_DEF [60:11] - | | |--MODIFIERS -> MODIFIERS [60:11] - | | |--TYPE -> TYPE [60:11] - | | | |--IDENT -> List [60:11] - | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [60:15] - | | | |--GENERIC_START -> < [60:15] - | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:16] - | | | | |--WILDCARD_TYPE -> ? [60:16] - | | | | `--TYPE_UPPER_BOUNDS -> extends [60:18] - | | | | `--DOT -> . [60:40] - | | | | |--IDENT -> StringTemplate [60:26] - | | | | |--IDENT -> Processor [60:41] - | | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [60:50] - | | | | |--GENERIC_START -> < [60:50] - | | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:51] - | | | | | `--IDENT -> String [60:51] - | | | | |--COMMA -> , [60:57] - | | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [60:59] - | | | | | `--IDENT -> RuntimeException [60:59] - | | | | `--GENERIC_END -> > [60:75] - | | | `--GENERIC_END -> > [60:76] - | | `--IDENT -> list [60:78] - | |--RPAREN -> ) [60:82] - | `--SLIST -> { [60:84] - | |--EXPR -> EXPR [61:19] - | | `--DOT -> . [61:19] - | | |--METHOD_CALL -> ( [61:16] - | | | |--DOT -> . [61:12] - | | | | |--IDENT -> list [61:8] - | | | | `--IDENT -> get [61:13] - | | | |--ELIST -> ELIST [61:17] - | | | | `--EXPR -> EXPR [61:17] - | | | | `--NUM_INT -> 0 [61:17] - | | | `--RPAREN -> ) [61:18] - | | `--STRING_TEMPLATE_BEGIN -> " [61:20] - | | |--STRING_TEMPLATE_CONTENT -> [61:21] - | | `--STRING_TEMPLATE_END -> " [61:21] - | |--SEMI -> ; [61:22] - | |--EXPR -> EXPR [62:19] - | | `--DOT -> . [62:19] - | | |--METHOD_CALL -> ( [62:16] - | | | |--DOT -> . [62:12] - | | | | |--IDENT -> list [62:8] - | | | | `--IDENT -> get [62:13] - | | | |--ELIST -> ELIST [62:17] - | | | | `--EXPR -> EXPR [62:17] - | | | | `--NUM_INT -> 0 [62:17] - | | | `--RPAREN -> ) [62:18] - | | `--STRING_TEMPLATE_BEGIN -> " [62:20] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [62:21] - | | |--EMBEDDED_EXPRESSION_END -> } [62:25] - | | `--STRING_TEMPLATE_END -> " [62:26] - | |--SEMI -> ; [62:27] - | |--EXPR -> EXPR [63:19] - | | `--DOT -> . [63:19] - | | |--METHOD_CALL -> ( [63:16] - | | | |--DOT -> . [63:12] - | | | | |--IDENT -> list [63:8] - | | | | `--IDENT -> get [63:13] - | | | |--ELIST -> ELIST [63:17] - | | | | `--EXPR -> EXPR [63:17] - | | | | `--NUM_INT -> 0 [63:17] - | | | `--RPAREN -> ) [63:18] - | | `--STRING_TEMPLATE_BEGIN -> " [63:21] - | | |--STRING_TEMPLATE_CONTENT -> x [63:22] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [63:23] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [63:26] - | | | `--IDENT -> x [63:26] - | | |--EMBEDDED_EXPRESSION_END -> } [63:28] - | | |--STRING_TEMPLATE_CONTENT -> x [63:29] - | | `--STRING_TEMPLATE_END -> " [63:30] - | |--SEMI -> ; [63:31] - | |--EXPR -> EXPR [64:19] - | | `--DOT -> . [64:19] - | | |--METHOD_CALL -> ( [64:16] - | | | |--DOT -> . [64:12] - | | | | |--SINGLE_LINE_COMMENT -> // [63:33] - | | | | | `--COMMENT_CONTENT -> comments in here\n [63:35] - | | | | |--IDENT -> list [64:8] - | | | | `--IDENT -> get [64:13] - | | | |--ELIST -> ELIST [64:17] - | | | | `--EXPR -> EXPR [64:17] - | | | | `--NUM_INT -> 0 [64:17] - | | | `--RPAREN -> ) [64:18] - | | `--STRING_TEMPLATE_BEGIN -> " [64:21] - | | |--STRING_TEMPLATE_CONTENT -> . [64:22] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:23] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:26] - | | | `--IDENT -> x [64:26] - | | |--EMBEDDED_EXPRESSION_END -> } [64:28] - | | |--STRING_TEMPLATE_CONTENT -> . [64:29] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:30] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:33] - | | | `--IDENT -> y [64:33] - | | |--EMBEDDED_EXPRESSION_END -> } [64:35] - | | |--STRING_TEMPLATE_CONTENT -> . [64:36] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:37] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [64:40] - | | | `--IDENT -> x [64:40] - | | |--BLOCK_COMMENT_BEGIN -> /* [64:42] - | | | |--COMMENT_CONTENT -> comments in here, as well [64:44] - | | | `--BLOCK_COMMENT_END -> */ [64:68] - | | |--EMBEDDED_EXPRESSION_END -> } [64:72] - | | |--STRING_TEMPLATE_CONTENT -> . [64:73] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:74] - | | |--EMBEDDED_EXPRESSION_END -> } [64:76] - | | |--STRING_TEMPLATE_CONTENT -> . [64:77] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [64:78] - | | |--EMBEDDED_EXPRESSION_END -> } [64:80] - | | `--STRING_TEMPLATE_END -> " [64:81] - | |--SEMI -> ; [64:82] - | `--RCURLY -> } [65:4] - `--RCURLY -> } [66:0] diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateNested.txt b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateNested.txt deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/ExpectedStringTemplateNested.txt +++ /dev/null @@ -1,200 +0,0 @@ -COMPILATION_UNIT -> COMPILATION_UNIT [2:0] -|--PACKAGE_DEF -> package [2:0] -| |--ANNOTATIONS -> ANNOTATIONS [2:47] -| |--DOT -> . [2:47] -| | |--DOT -> . [2:39] -| | | |--DOT -> . [2:28] -| | | | |--DOT -> . [2:22] -| | | | | |--DOT -> . [2:11] -| | | | | | |--IDENT -> com [2:8] -| | | | | | `--IDENT -> puppycrawl [2:12] -| | | | | `--IDENT -> tools [2:23] -| | | | `--IDENT -> checkstyle [2:29] -| | | `--IDENT -> grammar [2:40] -| | `--IDENT -> java21 [2:48] -| `--SEMI -> ; [2:54] -|--IMPORT -> import [4:0] -| |--DOT -> . [4:25] -| | |--DOT -> . [4:16] -| | | |--DOT -> . [4:11] -| | | | |--IDENT -> java [4:7] -| | | | `--IDENT -> util [4:12] -| | | `--IDENT -> function [4:17] -| | `--IDENT -> Supplier [4:26] -| `--SEMI -> ; [4:34] -`--CLASS_DEF -> CLASS_DEF [6:0] - |--MODIFIERS -> MODIFIERS [6:0] - | `--LITERAL_PUBLIC -> public [6:0] - |--LITERAL_CLASS -> class [6:7] - |--IDENT -> InputStringTemplateNested [6:13] - `--OBJBLOCK -> OBJBLOCK [6:39] - |--LCURLY -> { [6:39] - |--VARIABLE_DEF -> VARIABLE_DEF [7:4] - | |--MODIFIERS -> MODIFIERS [7:4] - | |--TYPE -> TYPE [7:4] - | | `--LITERAL_INT -> int [7:4] - | |--IDENT -> x [7:8] - | |--ASSIGN -> = [7:10] - | | `--EXPR -> EXPR [7:12] - | | `--NUM_INT -> 2 [7:12] - | `--SEMI -> ; [7:13] - |--VARIABLE_DEF -> VARIABLE_DEF [8:4] - | |--MODIFIERS -> MODIFIERS [8:4] - | | `--FINAL -> final [8:4] - | |--TYPE -> TYPE [8:10] - | | `--IDENT -> String [8:10] - | |--IDENT -> s [8:17] - | |--ASSIGN -> = [8:19] - | | `--EXPR -> EXPR [9:15] - | | `--DOT -> . [9:15] - | | |--IDENT -> STR [9:12] - | | `--STRING_TEMPLATE_BEGIN -> " [9:16] - | | |--STRING_TEMPLATE_CONTENT -> x [9:17] - | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [9:18] - | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [9:23] - | | | `--METHOD_CALL -> ( [9:23] - | | | |--IDENT -> sp [9:21] - | | | |--ELIST -> ELIST [9:27] - | | | | `--LAMBDA -> -> [9:27] - | | | | |--LPAREN -> ( [9:24] - | | | | |--PARAMETERS -> PARAMETERS [9:25] - | | | | |--RPAREN -> ) [9:25] - | | | | `--SLIST -> { [9:30] - | | | | |--LITERAL_RETURN -> return [10:16] - | | | | | |--EXPR -> EXPR [10:26] - | | | | | | `--DOT -> . [10:26] - | | | | | | |--IDENT -> STR [10:23] - | | | | | | `--STRING_TEMPLATE_BEGIN -> " [10:27] - | | | | | | |--STRING_TEMPLATE_CONTENT -> x [10:28] - | | | | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [10:29] - | | | | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [10:34] - | | | | | | | `--METHOD_CALL -> ( [10:34] - | | | | | | | |--IDENT -> sp [10:32] - | | | | | | | |--ELIST -> ELIST [10:38] - | | | | | | | | `--LAMBDA -> -> [10:38] - | | | | | | | | |--LPAREN -> ( [10:35] - | | | | | | | | |--PARAMETERS -> PARAMETERS [10:36] - | | | | | | | | |--RPAREN -> ) [10:36] - | | | | | | | | `--SLIST -> { [10:41] - | | | | | | | | |--LITERAL_RETURN -> return [11:20] - | | | | | | | | | |--EXPR -> EXPR [17:38] - | | | | | | | | | | `--PLUS -> + [17:38] - | | | | | | | | | | |--PLUS -> + [17:32] - | | | | | | | | | | | |--DOT -> . [11:30] - | | | | | | | | | | | | |--IDENT -> STR [11:27] - | | | | | | | | | | | | `--STRING_TEMPLATE_BEGIN -> " [11:31] - | | | | | | | | | | | | |--STRING_TEMPLATE_CONTENT -> x [11:32] - | | | | | | | | | | | | |--EMBEDDED_EXPRESSION_BEGIN -> \{ [11:33] - | | | | | | | | | | | | |--EMBEDDED_EXPRESSION -> EMBEDDED_EXPRESSION [12:30] - | | | | | | | | | | | | | `--METHOD_CALL -> ( [12:30] - | | | | | | | | | | | | | |--IDENT -> sp [12:28] - | | | | | | | | | | | | | |--ELIST -> ELIST [12:34] - | | | | | | | | | | | | | | `--LAMBDA -> -> [12:34] - | | | | | | | | | | | | | | |--LPAREN -> ( [12:31] - | | | | | | | | | | | | | | |--PARAMETERS -> PARAMETERS [12:32] - | | | | | | | | | | | | | | |--RPAREN -> ) [12:32] - | | | | | | | | | | | | | | `--SLIST -> { [12:37] - | | | | | | | | | | | | | | |--LITERAL_RETURN -> return [13:8] - | | | | | | | | | | | | | | | |--EXPR -> EXPR [13:17] - | | | | | | | | | | | | | | | | `--METHOD_CALL -> ( [13:17] - | | | | | | | | | | | | | | | | |--IDENT -> sp [13:15] - | | | | | | | | | | | | | | | | |--ELIST -> ELIST [13:21] - | | | | | | | | | | | | | | | | | `--LAMBDA -> -> [13:21] - | | | | | | | | | | | | | | | | | |--LPAREN -> ( [13:18] - | | | | | | | | | | | | | | | | | |--PARAMETERS -> PARAMETERS [13:19] - | | | | | | | | | | | | | | | | | |--RPAREN -> ) [13:19] - | | | | | | | | | | | | | | | | | `--SLIST -> { [13:24] - | | | | | | | | | | | | | | | | | |--LITERAL_RETURN -> return [14:12] - | | | | | | | | | | | | | | | | | | |--EXPR -> EXPR [14:21] - | | | | | | | | | | | | | | | | | | | `--METHOD_CALL -> ( [14:21] - | | | | | | | | | | | | | | | | | | | |--IDENT -> sp [14:19] - | | | | | | | | | | | | | | | | | | | |--ELIST -> ELIST [14:25] - | | | | | | | | | | | | | | | | | | | | `--LAMBDA -> -> [14:25] - | | | | | | | | | | | | | | | | | | | | |--LPAREN -> ( [14:22] - | | | | | | | | | | | | | | | | | | | | |--PARAMETERS -> PARAMETERS [14:23] - | | | | | | | | | | | | | | | | | | | | |--RPAREN -> ) [14:23] - | | | | | | | | | | | | | | | | | | | | `--SLIST -> { [14:28] - | | | | | | | | | | | | | | | | | | | | |--LITERAL_RETURN -> return [15:16] - | | | | | | | | | | | | | | | | | | | | | |--EXPR -> EXPR [15:25] - | | | | | | | | | | | | | | | | | | | | | | `--METHOD_CALL -> ( [15:25] - | | | | | | | | | | | | | | | | | | | | | | |--IDENT -> sp [15:23] - | | | | | | | | | | | | | | | | | | | | | | |--ELIST -> ELIST [15:29] - | | | | | | | | | | | | | | | | | | | | | | | `--LAMBDA -> -> [15:29] - | | | | | | | | | | | | | | | | | | | | | | | |--LPAREN -> ( [15:26] - | | | | | | | | | | | | | | | | | | | | | | | |--PARAMETERS -> PARAMETERS [15:27] - | | | | | | | | | | | | | | | | | | | | | | | |--RPAREN -> ) [15:27] - | | | | | | | | | | | | | | | | | | | | | | | `--SLIST -> { [15:32] - | | | | | | | | | | | | | | | | | | | | | | | |--LITERAL_RETURN -> return [16:20] - | | | | | | | | | | | | | | | | | | | | | | | | |--EXPR -> EXPR [16:29] - | | | | | | | | | | | | | | | | | | | | | | | | | `--METHOD_CALL -> ( [16:29] - | | | | | | | | | | | | | | | | | | | | | | | | | |--IDENT -> sp [16:27] - | | | | | | | | | | | | | | | | | | | | | | | | | |--ELIST -> ELIST [16:33] - | | | | | | | | | | | | | | | | | | | | | | | | | | `--LAMBDA -> -> [16:33] - | | | | | | | | | | | | | | | | | | | | | | | | | | |--LPAREN -> ( [16:30] - | | | | | | | | | | | | | | | | | | | | | | | | | | |--PARAMETERS -> PARAMETERS [16:31] - | | | | | | | | | | | | | | | | | | | | | | | | | | |--RPAREN -> ) [16:31] - | | | | | | | | | | | | | | | | | | | | | | | | | | `--EXPR -> EXPR [16:36] - | | | | | | | | | | | | | | | | | | | | | | | | | | `--STRING_LITERAL -> "" [16:36] - | | | | | | | | | | | | | | | | | | | | | | | | | `--RPAREN -> ) [16:38] - | | | | | | | | | | | | | | | | | | | | | | | | `--SEMI -> ; [16:39] - | | | | | | | | | | | | | | | | | | | | | | | `--RCURLY -> } [16:40] - | | | | | | | | | | | | | | | | | | | | | | `--RPAREN -> ) [16:41] - | | | | | | | | | | | | | | | | | | | | | `--SEMI -> ; [16:42] - | | | | | | | | | | | | | | | | | | | | `--RCURLY -> } [16:43] - | | | | | | | | | | | | | | | | | | | `--RPAREN -> ) [16:44] - | | | | | | | | | | | | | | | | | | `--SEMI -> ; [16:45] - | | | | | | | | | | | | | | | | | `--RCURLY -> } [16:46] - | | | | | | | | | | | | | | | | `--RPAREN -> ) [16:47] - | | | | | | | | | | | | | | | `--SEMI -> ; [16:48] - | | | | | | | | | | | | | | `--RCURLY -> } [16:49] - | | | | | | | | | | | | | `--RPAREN -> ) [16:50] - | | | | | | | | | | | | |--EMBEDDED_EXPRESSION_END -> } [17:28] - | | | | | | | | | | | | |--STRING_TEMPLATE_CONTENT -> x [17:29] - | | | | | | | | | | | | `--STRING_TEMPLATE_END -> " [17:30] - | | | | | | | | | | | `--STRING_LITERAL -> "{" [17:34] - | | | | | | | | | | `--STRING_LITERAL -> "}}}" [17:40] - | | | | | | | | | `--SEMI -> ; [17:45] - | | | | | | | | `--RCURLY -> } [18:16] - | | | | | | | `--RPAREN -> ) [18:17] - | | | | | | |--EMBEDDED_EXPRESSION_END -> } [18:19] - | | | | | | |--STRING_TEMPLATE_CONTENT -> x [18:20] - | | | | | | `--STRING_TEMPLATE_END -> " [18:21] - | | | | | `--SEMI -> ; [18:22] - | | | | `--RCURLY -> } [19:12] - | | | `--RPAREN -> ) [19:13] - | | |--EMBEDDED_EXPRESSION_END -> } [19:14] - | | |--STRING_TEMPLATE_CONTENT -> x [19:15] - | | `--STRING_TEMPLATE_END -> " [19:16] - | `--SEMI -> ; [19:17] - |--METHOD_DEF -> METHOD_DEF [21:4] - | |--MODIFIERS -> MODIFIERS [21:4] - | | |--LITERAL_PRIVATE -> private [21:4] - | | `--LITERAL_STATIC -> static [21:12] - | |--TYPE -> TYPE [21:19] - | | `--IDENT -> String [21:19] - | |--IDENT -> sp [21:26] - | |--LPAREN -> ( [21:28] - | |--PARAMETERS -> PARAMETERS [21:29] - | | `--PARAMETER_DEF -> PARAMETER_DEF [21:29] - | | |--MODIFIERS -> MODIFIERS [21:29] - | | |--TYPE -> TYPE [21:29] - | | | |--IDENT -> Supplier [21:29] - | | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS [21:37] - | | | |--GENERIC_START -> < [21:37] - | | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT [21:38] - | | | | `--IDENT -> String [21:38] - | | | `--GENERIC_END -> > [21:44] - | | `--IDENT -> y [21:46] - | |--RPAREN -> ) [21:47] - | `--SLIST -> { [21:49] - | |--LITERAL_RETURN -> return [22:8] - | | |--EXPR -> EXPR [22:20] - | | | `--METHOD_CALL -> ( [22:20] - | | | |--DOT -> . [22:16] - | | | | |--IDENT -> y [22:15] - | | | | `--IDENT -> get [22:17] - | | | |--ELIST -> ELIST [22:21] - | | | `--RPAREN -> ) [22:21] - | | `--SEMI -> ; [22:22] - | `--RCURLY -> } [23:4] - `--RCURLY -> } [24:0] diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateBasic.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateBasic.java deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateBasic.java +++ /dev/null @@ -1,66 +0,0 @@ -//non-compiled with javac: Compilable with Java21 -package com.puppycrawl.tools.checkstyle.grammar.java21; - -import java.util.List; - -public class InputStringTemplateBasic { - int x = 10; - int y = 20; - - // most basic example, empty string template expression - String result1 = STR.""; - - String result1_1 = STR."Hello world!"; - - // no content, no expression - String result1_2 = STR."\{ }"; - - // simple single value interpolation - String result2 = STR. "x\{ x }x"; - - // simple single value interpolation with a method call - String result3 = STR. "\{ y(y("y")) }"; - - // bit more complex example, multiple interpolations - String result4 = STR. "\{ x }" + STR. "\{ y }"; - - // bit more complex example, multiple interpolations with method calls - String result5 = STR. "\{ y(y("y")) }" + STR. "\{ y(y("y")) }"; - - // string template concatenation - String result6 = STR. "\{ x }" + STR. "\{ y }"; - - // concatentation in embedded expression - String result7 = STR. "\{ x + y }"; - - // concatentation in embedded expression with method calls - String result8 = STR. "hey \{ y(y("y")) + y(y("y")) } there"; - - // multiple lines - String result9 = STR. "hey \{ - y(y("y")) + y(y("y")) - } there"; - - // multiple lines with many expressions - String result10 = STR. "hey \{ - y(y("y")) + y(y("y")) - } there \{ - y(y("y")) + y(y("y")) - + STR."x\{ x }x" - }"; - - String name = "world"; - String s = STR."Hello, \{ name }!"; - - private static String y(String y) { - return "y"; - } - - // Verify proper behavior of TransType w.r.t. templated Strings - void x(List<? extends StringTemplate.Processor<String, RuntimeException>> list) { - list.get(0).""; - list.get(0)."\{ }"; - list.get(0). "x\{ x }x"; - list.get(0). ".\{ x }.\{ y }.\{ x }.\{}.\{}"; - } -} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateBasicWithTabs.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateBasicWithTabs.java deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateBasicWithTabs.java +++ /dev/null @@ -1,66 +0,0 @@ -//non-compiled with javac: Compilable with Java21 -package com.puppycrawl.tools.checkstyle.grammar.java21; - -import java.util.List; - -public class InputStringTemplateBasicWithTabs { - int x = 10; - int y = 20; - - // most basic example, empty string template expression - String result1 = STR.""; - - String result1_1 = STR."Hello world!"; - - // no content, no expression - String result1_2 = STR."\{ }"; - - // simple single value interpolation - String result2 = STR. "x\{ x }x"; - - // simple single value interpolation with a method call - String result3 = STR. "\{ y(y("y")) }"; - - // bit more complex example, multiple interpolations - String result4 = STR. "\{ x }" + STR. "\{ y }"; - - // bit more complex example, multiple interpolations with method calls - String result5 = STR. "\{ y(y("y")) }" + STR. "\{ y(y("y")) }"; - - // string template concatenation - String result6 = STR. "\{ x }" + STR. "\{ y }"; - - // concatentation in embedded expression - String result7 = STR. "\{ x + y }"; - - // concatentation in embedded expression with method calls - String result8 = STR. "hey \{ y(y("y")) + y(y("y")) } there"; - - // multiple lines - String result9 = STR. "hey \{ - y(y("y")) + y(y("y")) - } there"; - - // multiple lines with many expressions - String result10 = STR. "hey \{ - y(y("y")) + y(y("y")) - } there \{ - y(y("y")) + y(y("y")) - + STR."x\{ x }x" - }"; - - String name = "world"; - String s = STR."Hello, \{ name }!"; - - private static String y(String y) { - return "y"; - } - - // Verify proper behavior of TransType w.r.t. templated Strings - void x(List<? extends StringTemplate.Processor<String, RuntimeException>> list) { - list.get(0).""; - list.get(0)."\{ }"; - list.get(0). "x\{ x }x"; - list.get(0). ".\{ x }.\{ y }.\{ x }.\{}.\{}"; - } -} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateMultiLineWithComments.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateMultiLineWithComments.java deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateMultiLineWithComments.java +++ /dev/null @@ -1,66 +0,0 @@ -//non-compiled with javac: Compilable with Java21 -package com.puppycrawl.tools.checkstyle.grammar.java21; - -import java.util.List; - -public class InputStringTemplateMultiLineWithComments { - int x = 10; - int y = 20; - - // most basic example, empty string template expression - String result1 = STR.""; - - String result1_1 = STR."Hello world!"; - - // no content, no expression - String result1_2 = STR."\{ }"; - - // simple single value interpolation - String result2 = STR. "x\{ x }x"; // comment - - // simple single value interpolation with a method call - String result3 = STR. "\{ y(y("y")) }"; - - // bit more complex example, multiple interpolations - String result4 = STR. "\{ x }" + STR. "\{ y }"; - - // bit more complex example, multiple interpolations with method calls - String result5 = STR. "\{ y(y("y")) }" + STR. "\{ y(y("y"/*yep, comment here, too*/)) }"; - - // string template concatenation - String result6 = STR. "\{ x }" + /*comment here*/ STR. "\{ y }"; - - // concatentation in embedded expression - String result7 = STR. "\{ x + y /*comment here too*/ }"; - - // concatentation in embedded expression with method calls - String result8 = STR./*comment here*/ "hey \{ y(y("y")) + y(y("y")) } there"; - - // multiple lines - String result9 = STR. "hey \{ // comment here - y(y("y")) + y(y("y")) - } there"; - - // multiple lines with many expressions and comments - String result10 = STR. "hey \{ /*****comment here*/ // comment here - y(y("y")) + y(y("y")) /* comment here */ - } there \{ /**/ // comment here - y(y("y")) + y(y("y")) // comment there - + STR."x\{ x }x" // comment everywhere - }"; - - String name = "world"; - String s = STR."Hello, \{ name }!"; - - private static String y(String y) { - return "y"; - } - - // Verify proper behavior of TransType w.r.t. templated Strings - void x(List<? extends StringTemplate.Processor<String, RuntimeException>> list) { - list.get(0).""; - list.get(0)."\{ }"; - list.get(0). "x\{ x }x"; // comments in here - list.get(0). ".\{ x }.\{ y }.\{ x /*comments in here, as well*/ }.\{}.\{}"; - } -} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateNested.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateNested.java deleted file mode 100644 --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammar/java21/InputStringTemplateNested.java +++ /dev/null @@ -1,24 +0,0 @@ -//non-compiled with javac: Compilable with Java21 -package com.puppycrawl.tools.checkstyle.grammar.java21; - -import java.util.function.Supplier; - -public class InputStringTemplateNested { - int x = 2; - final String s = - STR."x\{ sp(() -> { - return STR."x\{ sp(() -> { - return STR."x\{ - sp(() -> { - return sp(() -> { - return sp(() -> { - return sp(() -> { - return sp(() -> "");});});});}) - }x" + "{" + "}}}"; - }) }x"; - })}x"; - - private static String sp(Supplier<String> y) { - return y.get(); - } -}
Remove Support for String Template Syntax We always take a risk supporting preview features, and try to wait until second/third/final preview to add support for new syntax, to improve the chance that a given feature will become a part of the language permanently. Of course, this is also driven by user demand. Unfortunately, String Templates have been completely removed from JDK 23 (they are not even a preview feature). Since we have really only begun to implement them (text block templates are not supported, and no checks have really been updated), it is better to remove support completely now, than to end up supporting syntax that is not valid and updating a bunch of checks to only have to rewrite the grammar, build the AST, and update the checks all over again once the syntax is finalized. **Enabling us to start with a clear slate when the new syntax is revealed will help us to deliver support much faster.** It is doubtful that whatever the new (post JDK 23) String Template syntax will look the same, so we will have to break compatibility with the JDK 22 String Template syntax regardless. From https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html: >So, to be clear: there will be no string template feature, even with --enable-preview, in JDK 23.
2024-07-08T15:50:53Z
10.17
checkstyle/checkstyle
15,199
checkstyle__checkstyle-15199
[ "14985" ]
9a76f83d53021e01e2adb304a5d973ad4ec44117
diff --git a/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionWhenShouldBeUsedTest.java b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionWhenShouldBeUsedTest.java new file mode 100644 --- /dev/null +++ b/src/it/java/org/checkstyle/suppressionxpathfilter/XpathRegressionWhenShouldBeUsedTest.java @@ -0,0 +1,91 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package org.checkstyle.suppressionxpathfilter; + +import java.io.File; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.DefaultConfiguration; +import com.puppycrawl.tools.checkstyle.checks.coding.WhenShouldBeUsedCheck; + +public class XpathRegressionWhenShouldBeUsedTest + extends AbstractXpathTestSupport { + + @Override + protected String getCheckName() { + return WhenShouldBeUsedCheck.class.getSimpleName(); + } + + @Test + public void testSimple() throws Exception { + final File fileToProcess = + new File(getNonCompilablePath( + "InputXpathWhenShouldBeUsedSimple.java")); + + final DefaultConfiguration moduleConfig = + createModuleConfig(WhenShouldBeUsedCheck.class); + final String[] expectedViolation = { + "7:13: " + getCheckMessage(WhenShouldBeUsedCheck.class, + WhenShouldBeUsedCheck.MSG_KEY), + }; + + final List<String> expectedXpathQueries = Arrays.asList( + "/COMPILATION_UNIT/CLASS_DEF[./IDENT[@text='InputXpathWhenShouldBeUsedSimple']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/LITERAL_SWITCH/SWITCH_RULE" + + "[./LITERAL_CASE/PATTERN_VARIABLE_DEF/IDENT[@text='s']]", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT[@text='InputXpathWhenShouldBeUsedSimple']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/" + + "LITERAL_SWITCH/SWITCH_RULE/LITERAL_CASE" + ); + runVerifications(moduleConfig, fileToProcess, expectedViolation, expectedXpathQueries); + } + + @Test + public void testNested() throws Exception { + final File fileToProcess = + new File(getNonCompilablePath( + "InputXpathWhenShouldBeUsedNested.java")); + + final DefaultConfiguration moduleConfig = + createModuleConfig(WhenShouldBeUsedCheck.class); + final String[] expectedViolation = { + "10:21: " + getCheckMessage(WhenShouldBeUsedCheck.class, + WhenShouldBeUsedCheck.MSG_KEY), + }; + + final List<String> expectedXpathQueries = Arrays.asList( + "/COMPILATION_UNIT/CLASS_DEF[./IDENT[@text='InputXpathWhenShouldBeUsedNested']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/" + + "VARIABLE_DEF[./IDENT[@text='x']]/ASSIGN/EXPR/LITERAL_SWITCH" + + "/SWITCH_RULE/SLIST/" + + "LITERAL_SWITCH/SWITCH_RULE[./LITERAL_CASE/PATTERN_VARIABLE_DEF/" + + "IDENT[@text='_']]", + "/COMPILATION_UNIT/CLASS_DEF[./IDENT[@text='InputXpathWhenShouldBeUsedNested']]" + + "/OBJBLOCK/METHOD_DEF[./IDENT[@text='test']]/SLIST/VARIABLE_DEF" + + "[./IDENT[@text='x']]/ASSIGN/EXPR/LITERAL_SWITCH/" + + "SWITCH_RULE/SLIST/" + + "LITERAL_SWITCH/SWITCH_RULE/LITERAL_CASE" + ); + runVerifications(moduleConfig, fileToProcess, expectedViolation, expectedXpathQueries); + } +} diff --git a/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/whenshouldbeused/InputXpathWhenShouldBeUsedNested.java b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/whenshouldbeused/InputXpathWhenShouldBeUsedNested.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/whenshouldbeused/InputXpathWhenShouldBeUsedNested.java @@ -0,0 +1,22 @@ +//non-compiled with javac: Compilable with Java21 +package org.checkstyle.suppressionxpathfilter.whenshouldbeused; + +public class InputXpathWhenShouldBeUsedNested { + + void test(Object o, Object o2, int y) { + int x = switch (o) { + case String s -> { + switch (o2) { + case Integer _ -> { // warn + if (y == 0) { + System.out.println(0); + } + } + default -> {} + } + yield 3; + } + default -> 3; + }; + } +} diff --git a/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/whenshouldbeused/InputXpathWhenShouldBeUsedSimple.java b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/whenshouldbeused/InputXpathWhenShouldBeUsedSimple.java new file mode 100644 --- /dev/null +++ b/src/it/resources-noncompilable/org/checkstyle/suppressionxpathfilter/whenshouldbeused/InputXpathWhenShouldBeUsedSimple.java @@ -0,0 +1,15 @@ +//non-compiled with javac: Compilable with Java21 +package org.checkstyle.suppressionxpathfilter.whenshouldbeused; + +public class InputXpathWhenShouldBeUsedSimple { + void test(Object o) { + switch (o) { + case String s -> { // warn + if (s.isEmpty()) { + System.out.println("empty string"); + } + } + default -> {} + } + } + } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java @@ -591,6 +591,8 @@ private static void fillChecksFromCodingPackage() { BASE_PACKAGE + ".checks.coding.UnnecessarySemicolonInTryWithResourcesCheck"); NAME_TO_FULL_MODULE_NAME.put("VariableDeclarationUsageDistanceCheck", BASE_PACKAGE + ".checks.coding.VariableDeclarationUsageDistanceCheck"); + NAME_TO_FULL_MODULE_NAME.put("WhenShouldBeUsed", + BASE_PACKAGE + ".checks.coding.WhenShouldBeUsedCheck"); NAME_TO_FULL_MODULE_NAME.put("NoArrayTrailingCommaCheck", BASE_PACKAGE + ".checks.coding.NoArrayTrailingCommaCheck"); NAME_TO_FULL_MODULE_NAME.put("MatchXpathCheck", diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheck.java new file mode 100644 --- /dev/null +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheck.java @@ -0,0 +1,183 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.coding; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.puppycrawl.tools.checkstyle.StatelessCheck; +import com.puppycrawl.tools.checkstyle.api.AbstractCheck; +import com.puppycrawl.tools.checkstyle.api.DetailAST; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.utils.TokenUtil; + +/** + * <p> + * Ensures that {@code when} is used instead of a single {@code if} + * statement inside a case block. + * </p> + * <p> + * Rationale: Java 21 has introduced enhancements for switch statements and expressions + * that allow the use of patterns in case labels. The {@code when} keyword is used to specify + * condition for a case label, also called as guarded case labels. This syntax is more readable + * and concise than the single {@code if} statement inside the pattern match block. + * </p> + * <p> + * See the <a href="https://docs.oracle.com/javase/specs/jls/se22/html/jls-14.html#jls-Guard"> + * Java Language Specification</a> for more information about guarded case labels. + * </p> + * <p> + * See the <a href="https://docs.oracle.com/javase/specs/jls/se22/html/jls-14.html#jls-14.30"> + * Java Language Specification</a> for more information about patterns. + * </p> + * <p> + * Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} + * </p> + * <p> + * Violation Message Keys: + * </p> + * <ul> + * <li> + * {@code when.should.be.used} + * </li> + * </ul> + * + * @since 10.18.0 + */ + +@StatelessCheck +public class WhenShouldBeUsedCheck extends AbstractCheck { + + /** + * A key is pointing to the warning message text in "messages.properties" + * file. + */ + public static final String MSG_KEY = "when.should.be.used"; + + @Override + public int[] getDefaultTokens() { + return getRequiredTokens(); + } + + @Override + public int[] getAcceptableTokens() { + return getRequiredTokens(); + } + + @Override + public int[] getRequiredTokens() { + return new int[] {TokenTypes.LITERAL_CASE}; + } + + @Override + public void visitToken(DetailAST ast) { + final boolean hasPatternLabel = hasPatternLabel(ast); + final DetailAST statementList = getStatementList(ast); + // until https://github.com/checkstyle/checkstyle/issues/15270 + final boolean isInSwitchRule = ast.getParent().getType() == TokenTypes.SWITCH_RULE; + + if (hasPatternLabel && statementList != null && isInSwitchRule) { + final List<DetailAST> blockStatements = getBlockStatements(statementList); + + final boolean hasAcceptableStatementsOnly = blockStatements.stream() + .allMatch(WhenShouldBeUsedCheck::isAcceptableStatement); + + final boolean hasSingleIfWithNoElse = blockStatements.stream() + .filter(WhenShouldBeUsedCheck::isSingleIfWithNoElse) + .count() == 1; + + if (hasAcceptableStatementsOnly && hasSingleIfWithNoElse) { + log(ast, MSG_KEY); + } + } + } + + /** + * Get the statement list token of the case block. + * + * @param caseAST the AST node representing {@code LITERAL_CASE} + * @return the AST node representing {@code SLIST} of the current case + */ + private static DetailAST getStatementList(DetailAST caseAST) { + final DetailAST caseParent = caseAST.getParent(); + return caseParent.findFirstToken(TokenTypes.SLIST); + } + + /** + * Get all statements inside the case block. + * + * @param statementList the AST node representing {@code SLIST} of the current case + * @return statements inside the current case block + */ + private static List<DetailAST> getBlockStatements(DetailAST statementList) { + final List<DetailAST> blockStatements = new ArrayList<>(); + DetailAST ast = statementList.getFirstChild(); + while (ast != null) { + blockStatements.add(ast); + ast = ast.getNextSibling(); + } + return Collections.unmodifiableList(blockStatements); + } + + /** + * Check if the statement is an acceptable statement inside the case block. + * If these statements are the only ones in the case block, this case + * can be considered a violation. If at least one of the statements + * is not acceptable, this case can not be a violation. + * + * @param ast the AST node representing the statement + * @return true if the statement is an acceptable statement, false otherwise + */ + private static boolean isAcceptableStatement(DetailAST ast) { + final int[] acceptableChildrenOfSlist = { + TokenTypes.LITERAL_IF, + TokenTypes.LITERAL_BREAK, + TokenTypes.EMPTY_STAT, + TokenTypes.RCURLY, + }; + return TokenUtil.isOfType(ast, acceptableChildrenOfSlist); + } + + /** + * Check if the case block has a pattern variable definition + * or a record pattern definition. + * + * @param caseAST the AST node representing {@code LITERAL_CASE} + * @return true if the case block has a pattern label, false otherwise + */ + private static boolean hasPatternLabel(DetailAST caseAST) { + return caseAST.findFirstToken(TokenTypes.PATTERN_VARIABLE_DEF) != null + || caseAST.findFirstToken(TokenTypes.RECORD_PATTERN_DEF) != null + || caseAST.findFirstToken(TokenTypes.PATTERN_DEF) != null; + } + + /** + * Check if the case block statement is a single if statement with no else branch. + * + * @param statement statement to check inside the current case block + * @return true if the statement is a single if statement with no else branch, false otherwise + */ + private static boolean isSingleIfWithNoElse(DetailAST statement) { + return statement.getType() == TokenTypes.LITERAL_IF + && statement.findFirstToken(TokenTypes.LITERAL_ELSE) == null; + } + +} diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheckExamplesTest.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheckExamplesTest.java @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.coding; + +import static com.puppycrawl.tools.checkstyle.checks.coding.WhenShouldBeUsedCheck.MSG_KEY; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.AbstractExamplesModuleTestSupport; + +public class WhenShouldBeUsedCheckExamplesTest + extends AbstractExamplesModuleTestSupport { + @Override + protected String getPackageLocation() { + return "com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused"; + } + + @Test + public void testExample1() throws Exception { + final String[] expected = { + "18:7: " + getCheckMessage(MSG_KEY), + }; + + verifyWithInlineConfigParser( + getNonCompilablePath("Example1.java"), expected); + } +} diff --git a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/Example1.java b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/Example1.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/Example1.java @@ -0,0 +1,48 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="WhenShouldBeUsed"/> + </module> +</module> +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.whenshouldbeused; + +// xdoc section -- start +public class Example1 { + + void testNoGuard(Object o) { + switch (o) { + // violation below, ''when' expression should be used*.' + case String s -> { + if (s.isEmpty()) { + System.out.println("empty string"); + } + } + default -> {} + } + + switch (o) { + // this example is ok, not a single if statement inside the case block + case String s -> { + System.out.println("String"); + if (s.isEmpty()) { + System.out.println("but empty"); + } + } + default -> {} + } + } + + void testGuardedCaseLabel(Object o) { + switch (o) { + case String s when s.isEmpty() -> { + System.out.println("empty string"); + } + default -> {} + } + } + +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheckTest.java new file mode 100644 --- /dev/null +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/WhenShouldBeUsedCheckTest.java @@ -0,0 +1,93 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// checkstyle: Checks Java source code and other text files for adherence to a set of rules. +// Copyright (C) 2001-2024 the original author or authors. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.puppycrawl.tools.checkstyle.checks.coding; + +import static com.google.common.truth.Truth.assertWithMessage; +import static com.puppycrawl.tools.checkstyle.checks.coding.WhenShouldBeUsedCheck.MSG_KEY; + +import org.junit.jupiter.api.Test; + +import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.utils.CommonUtil; + +public class WhenShouldBeUsedCheckTest + extends AbstractModuleTestSupport { + + @Override + protected String getPackageLocation() { + return "com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused"; + } + + @Test + public void testTokensNotNull() { + final WhenShouldBeUsedCheck check = new WhenShouldBeUsedCheck(); + final int[] expected = {TokenTypes.LITERAL_CASE}; + + assertWithMessage("Acceptable tokens is not valid") + .that(check.getAcceptableTokens()) + .isEqualTo(expected); + assertWithMessage("Default tokens is not valid") + .that(check.getDefaultTokens()) + .isEqualTo(expected); + assertWithMessage("Required tokens is not valid") + .that(check.getRequiredTokens()) + .isEqualTo(expected); + } + + @Test + public void testSwitchStatements() throws Exception { + final String[] expected = CommonUtil.EMPTY_STRING_ARRAY; + verifyWithInlineConfigParser( + getNonCompilablePath("InputWhenShouldBeUsedSwitchStatements.java"), + expected); + } + + @Test + public void testSwitchRule() throws Exception { + final String[] expected = { + "13:13: " + getCheckMessage(MSG_KEY), + "18:13: " + getCheckMessage(MSG_KEY), + "82:13: " + getCheckMessage(MSG_KEY), + "96:13: " + getCheckMessage(MSG_KEY), + "105:13: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputWhenShouldBeUsedSwitchRule.java"), + expected); + + } + + @Test + public void testSwitchExpression() throws Exception { + final String[] expected = CommonUtil.EMPTY_STRING_ARRAY; + verifyWithInlineConfigParser( + getNonCompilablePath("InputWhenShouldBeUsedSwitchExpression.java"), + expected); + } + + @Test + public void testNonPatternsSwitch() throws Exception { + final String[] expected = CommonUtil.EMPTY_STRING_ARRAY; + verifyWithInlineConfigParser( + getNonCompilablePath("InputWhenShouldBeUsedNonPatternsSwitch.java"), + expected); + } +} diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaReaderTest.java @@ -40,20 +40,20 @@ protected String getPackageLocation() { @Test public void test() { - assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny()).hasSize(202); + assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny()).hasSize(203); } @Test public void testDuplicatePackage() { assertThat(XmlMetaReader .readAllModulesIncludingThirdPartyIfAny("com.puppycrawl.tools.checkstyle.meta")) - .hasSize(202); + .hasSize(203); } @Test public void testBadPackage() { assertThat(XmlMetaReader.readAllModulesIncludingThirdPartyIfAny("DOES.NOT.EXIST")) - .hasSize(202); + .hasSize(203); } @Test diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedNonPatternsSwitch.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedNonPatternsSwitch.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedNonPatternsSwitch.java @@ -0,0 +1,67 @@ +/* +WhenShouldBeUsed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.whenshouldbeused; + +public class InputWhenShouldBeUsedNonPatternsSwitch { + void test(char c, int x) { + switch (x) { + case 1 : // ok, guard is allowed after patterns only + if (x == 3) { + } + break; + case 4: {} + } + switch (x) { + case 1 : + if (x == 0) { + } + case 4: + } + + switch (c) { + case 'a' -> { + if (x == 0) {} + } + } + + E e = E.A; + switch (e) { + case A : { + if (x == 0) {} + } + case B : { + if (x == 2) {} + } + } + + switch (e) { + case A -> { + if (x == 0) {} + } + case B -> { + if (x == 5) {} + } + } + + String s = "mahfouz"; + switch (s) { + case "a" : + case "b": { + if (x == 0) {} + } + } + + switch (s) { + case "a" , "b" -> { + if (x == 0) {} + } + } + } + enum E { + A, B + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchExpression.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchExpression.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchExpression.java @@ -0,0 +1,107 @@ +/* +WhenShouldBeUsed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.whenshouldbeused; + +public class InputWhenShouldBeUsedSwitchExpression { + + void test(Object j, int x) { + int a = switch (j) { + case Point(int _, int y): + if (y == 0) { + yield 0; + } + case String _: {if (x == 0) yield 4;} + case Integer _: if (x == 0) yield 4; + default: { yield 3;} + }; + int b = switch (j) { + case Point(int _, int y): { + if (y == 0) { + yield 0; + } + } + case ColoredPoint(Point(_, _), String _) : { + if (x == 0) yield 4; + } + default: { yield 3;} + }; + int bb = switch (j) { + case Point(int _, int y) when y == 0: { + yield 0; + } + case ColoredPoint(Point(_, _), String _) when x == 0: { + yield 4; + } + default: { yield 3;} + }; + + int d = switch (j) { + case String s: // ok, not a single if + if (s.isEmpty()) { + System.out.println("empty String"); + yield 0; + } + if (!s.isEmpty()) + yield 1; + default: { yield 3;} + }; + + int f = switch (j) { + case Point(int _, int y) -> { + if (y == 0) { + yield 0; + } + yield 3; + } + case ColoredPoint(Point(int xx, int y), String color) -> { + if (y == 0 && xx == 0 && color.equals("red")) { + yield 1; + } + System.out.println("red point at origin"); + yield 4; + } + default -> 3; + }; + + int m = switch (j) { + case Point _: + case ColoredPoint _: + if (x == 0) { + System.out.println("Integer, String"); + yield 4; + } + default: {yield 3;} + }; + + int mm = switch (j) { + case Point _ when x == 0: + case ColoredPoint _ when x == 0: + System.out.println("Integer, String"); + yield 4; + default: {yield 3;} + }; + + int zz = switch (j) { + case Point _ , ColoredPoint _ when x == 0: + System.out.println("Integer, String"); + yield 4; + default: {yield 3;} + }; + + int z = switch (j) { + case Point _ , ColoredPoint _ -> { + if (x == 0) { + yield 4; + } + yield 0; + } + default -> 3; + }; + } + record ColoredPoint(Point p , String color){} + record Point(int x, int y) {} +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchRule.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchRule.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchRule.java @@ -0,0 +1,118 @@ +/* +WhenShouldBeUsed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.whenshouldbeused; + +public class InputWhenShouldBeUsedSwitchRule { + + void test(Object j, int x) { + switch (j) { + case String s -> { // violation, ''when' expression should be used*.' + if (s.isEmpty()) { + System.out.println("empty String"); + } + } + case Integer i -> { // violation, ''when' expression should be used*.' + if (x == 0) System.out.println("Integer"); + } + default -> {} + } + switch (j) { + case String s when s.isEmpty() -> { + System.out.println("empty String"); + } + case Integer i when x == 0 -> { + System.out.println("Integer"); + } + default -> {} + } + switch (j) { + case String s -> { + if (s.isEmpty()) { + System.out.println("empty String"); + } + if (!s.isEmpty()) + System.out.println("Non empty String"); + } + case Integer i -> {} + default -> {} + } + switch (j) { + case String s -> { // ok, not single if, there is else if + if (s.isEmpty()) { + System.out.println("empty String"); + } else if (!s.isEmpty()) + System.out.println("Non empty String"); + } + default -> {} + } + switch (j) { + case String s -> { + if (s.isEmpty()) { + System.out.println("empty String"); + } else + System.out.println("Non empty String"); + } + case Integer i -> {} + default -> {} + } + switch (j) { + case String s -> // ok, not a single if there is another statement + { + int y = get(); + if (s.isEmpty() && y == 0) { + System.out.println("empty String"); + } + } + default -> {} + } + switch (j) { + case String s -> {// ok, not a single if there is another statement + if (s.isEmpty()) { + System.out.println("empty String"); + } + System.out.println("A String"); + } + default -> {} + } + switch (j) { + case Integer _, String _ -> { + // violation above, ''when' expression should be used*.' + if (x == 0) { + System.out.println("Integer, String"); + } + } + default -> {} + } + switch (j) { + case Integer _, String _ when x == 0 -> + System.out.println("Integer, String"); + default -> {} + } + switch (j) { + case Point(int a,_) -> { // violation, ''when' expression should be used*.' + if (a == 0) {} + } + default -> {} + } + } + void testGuardedCases(Object obj, int x) { + switch (obj) { + // violation below, ''when' expression should be used*.' + case Integer i when i == 0 -> { + if (x == 0) System.out.println("Integer"); + } + default -> {} + } + switch (obj) { + case Integer i when i == 0 && x == 0 -> { + } + default -> {} + } + } + int get() { return 0; } + record Point(int x, int y) {} +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchStatements.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchStatements.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/InputWhenShouldBeUsedSwitchStatements.java @@ -0,0 +1,119 @@ +/* +WhenShouldBeUsed + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.whenshouldbeused; + +public class InputWhenShouldBeUsedSwitchStatements { + + void test(Object j, int x) { + switch (j) { + case String s: + if (s.isEmpty()) { + System.out.println("empty String"); + } + break; + case Integer i: if (x == 0) System.out.println("Integer"); break; + default: {} + } + switch (j) { + case String s: { + if (s.isEmpty()) { + System.out.println("empty String"); + } break; + } + case Integer i : { + if (x == 0) System.out.println("Integer"); break; + } + default: {} + } + switch (j) { + case String s when s.isEmpty(): + System.out.println("empty String"); + break; + case Integer i when x == 0: System.out.println("Integer"); break; + default: {} + } + + switch (j) { + case String s: // ok, not a single if + if (s.isEmpty()) { + System.out.println("empty String"); + } + if (!s.isEmpty()) + System.out.println("Non empty String"); + break; + case Integer i: break; + default: {} + } + switch (j) { + case String s: // ok, not single if, there is else if + if (s.isEmpty()) { + System.out.println("empty String"); + } + else if (!s.isEmpty()) + System.out.println("Non empty String"); + break; + case Integer i: break; + default: {} + } + switch (j) { + case String s: { + if (s.isEmpty()) { + System.out.println("empty String"); + } else + System.out.println("Non empty String"); + break; + } + case Integer i: break; + default: {} + } + switch (j) { + case String s: // ok, not a single if there is another statement + int y = get(); + if (s.isEmpty() && y == 0) { + System.out.println("empty String"); + } + break; + case Integer i: break; + default: {} + } + switch (j) { + case String s: // ok, not a single if there is another statement + if (s.isEmpty()) { + System.out.println("empty String"); + } + System.out.println("A String"); + break; + case Integer i: break; + default: {} + } + switch (j) { + case Integer _: + case String _: + if (x == 0) { + System.out.println("Integer, String"); + } + default: {} + } + switch (j) { + case Integer _: + case String _: { + if (x == 0) { + System.out.println("Integer, String"); + } + } + default: {} + } + switch (j) { + case Integer _ when x == 0: + case String _ when x == 0: { + System.out.println("Integer, String"); + } + default: {} + } + } + int get() { return 0; } +}
Add Check Support for Java 21 Pattern Matching for Switch Syntax: New Check WhenShouldBeUsed child of #14961: pattern matching for switch, allows more concise and readable code when dealing with various object types. This feature includes the `when` keyword to add conditions to case labels directly, improving readability. I propose to Introduce a new check to enforce the use of the `when` keyword in switch case patterns to replace single if statements, in the case body, enhancing code readability and consistency. --- **Config** ```XML $ cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="WhenShouldBeUsed"/> </module> </module> ``` --- **Example** ```Java void test(Object response) { switch (response) { case String s -> { if(s.length() > 80) { // violation System.out.println("This string is too long"); } } default -> System.out.println("Unknown type"); } switch (response) { case String s when s.length() > 80 -> { // ok System.out.println("This string is too long"); } default -> System.out.println("Unknown type"); } } ``` **Expected Output** ``` $ java -jar checkstyle-10.19.0-all.jar -c config.xml Test.java Starting audit... [ERROR] D:\Test.java:4:12: when can be used instead of single if statement. [WhenShouldBeUsed] Audit done. Checkstyle ends with 1 errors. ```
Examples don't show but what if there is an else to the if or things besides the if statement? Are we going to print no violation? Yes, no violation. IMO if we have more than one condition to check in the case body then a series of `if elif else` will be more readable than using `when` However I don't have a strong opinion on this so I am not sure. what do you think? please note that the sonarlint rule works when there is a single if inside the pattern body ```Java switch (response) { case String s -> { if (s.length() > 100) { System.out.println("This string is too long"); } else if (s.length() > 10) { System.out.println("This string is long"); } else if (s.length() > 5) { System.out.println("This string is meduim"); } else { System.out.println("This string is short"); } } default -> System.out.println("Unknown type"); } // after fix switch (response) { case String s when s.length() > 100 -> { System.out.println("This string is too long"); } case String s when s.length() > 10 -> { System.out.println("This string is long"); } case String s when s.length() > 5 -> System.out.println("This string is meduim"); case String s -> System.out.println("This string is short"); default -> System.out.println("Unknown type"); } ``` > if elif else will be more readable than using when However I don't have a strong opinion on this so I am not sure. what do you think? I say what till after this check is implemented before we think about this. I would just like issue descriptions for new checks to be more robust so there is no surprises in PR. We should be communicating what we will validate and what we won't validate. I am good with this check. I am approving for single `if` statement only. Let's keep the first implementation simple. Identified at https://github.com/checkstyle/checkstyle/pull/15113#discussion_r1663471696 , The bytecode when using `when` is nearly identical to just using an nested if statement inside the case. Edit: There does seem to be a performance impact in the current bytecode I was generating when you have multiple pattern cases with different whens. It has to cast the same variable multiple times to do the when check after previous whens failed. Maybe future JREs will improve this.
2024-07-04T23:09:44Z
10.17
checkstyle/checkstyle
15,127
checkstyle__checkstyle-15127
[ "15123" ]
0c13df61a826ad81668aab4c790a6342454de976
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java @@ -176,13 +176,13 @@ private static boolean isSwitchExpression(DetailAST ast) { /** * Checks if the case contains null label. * - * @param ast the switch statement we are checking + * @param detailAST the switch statement we are checking * @return returnValue the ast of null label */ - private static boolean hasNullCaseLabel(DetailAST ast) { - final DetailAST firstChild = ast.getFirstChild(); - return firstChild != null - && TokenUtil.isOfType(firstChild.getFirstChild(), TokenTypes.LITERAL_NULL); - + private static boolean hasNullCaseLabel(DetailAST detailAST) { + return TokenUtil.findFirstTokenByPredicate(detailAST.getParent(), ast -> { + final DetailAST expr = ast.findFirstToken(TokenTypes.EXPR); + return expr != null && expr.findFirstToken(TokenTypes.LITERAL_NULL) != null; + }).isPresent(); } }
diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/missingswitchdefault/InputMissingSwitchDefaultCheckNullCaseLabel.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/missingswitchdefault/InputMissingSwitchDefaultCheckNullCaseLabel.java --- a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/missingswitchdefault/InputMissingSwitchDefaultCheckNullCaseLabel.java +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/missingswitchdefault/InputMissingSwitchDefaultCheckNullCaseLabel.java @@ -15,6 +15,24 @@ public void switchWithNullLabelTest(SwitchInput i) { case SECOND: counter--; case null: counter=counter+2; } + switch (i) { + case FIRST: + case SECOND: + case null: + counter=counter+2; + } + switch (i) { + case FIRST: + case null: + case SECOND: + counter=counter+2; + } + switch (i) { + case null: + case FIRST: + case SECOND: + counter=counter+2; + } } enum SwitchInput { FIRST,
MissingSwitchDefault : False positive when `case null` in switch labeled statement group Check documentation : https://checkstyle.org/checks/coding/missingswitchdefault.html#MissingSwitchDefault --- ``` PS D:\CS\test> javac src/Test.java PS D:\CS\test> cat src/Test.java public class Test { void m(E i) { switch (i) { // violation case FIRST : case SECOND : case null : System.out.println("NULL first and second"); } } enum E { FIRST, SECOND } } PS D:\CS\test> cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="MissingSwitchDefault"/> </module> </module> PS D:\CS\test> java -jar checkstyle-10.17.0-all.jar -c config.xml src/Test.java Starting audit... [ERROR] D:\CS\test\src\Test.java:3:9: switch without "default" clause. [MissingSwitchDefault] Audit done. Checkstyle ends with 1 errors. PS D:\CS\test> ``` --- I expect no violation because there is a case null in the switch so exhaustiveness is being checked. the issue is that the check doesn't detect case null if it is in a labeled group.
2024-06-25T13:32:35Z
10.17
checkstyle/checkstyle
14,983
checkstyle__checkstyle-14983
[ "14981" ]
d5d90d1d5caa3febe095aad3d2f12a077b0b2148
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java @@ -53,6 +53,13 @@ * Default value is {@code false}. * </li> * <li> + * Property {@code validateUnnamedVariables} - Control whether to check + * <a href="https://docs.oracle.com/javase/specs/jls/se21/preview/specs/unnamed-jls.html"> + * unnamed variables</a>. + * Type is {@code boolean}. + * Default value is {@code false}. + * </li> + * <li> * Property {@code tokens} - tokens to check * Type is {@code java.lang.String[]}. * Validation type is {@code tokenSet}. @@ -129,6 +136,13 @@ public class FinalLocalVariableCheck extends AbstractCheck { */ private boolean validateEnhancedForLoopVariable; + /** + * Control whether to check + * <a href="https://docs.oracle.com/javase/specs/jls/se21/preview/specs/unnamed-jls.html"> + * unnamed variables</a>. + */ + private boolean validateUnnamedVariables; + /** * Setter to control whether to check * <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-14.14.2"> @@ -141,6 +155,18 @@ public final void setValidateEnhancedForLoopVariable(boolean validateEnhancedFor this.validateEnhancedForLoopVariable = validateEnhancedForLoopVariable; } + /** + * Setter to control whether to check + * <a href="https://docs.oracle.com/javase/specs/jls/se21/preview/specs/unnamed-jls.html"> + * unnamed variables</a>. + * + * @param validateUnnamedVariables whether to check unnamed variables + * @since 10.18.0 + */ + public final void setValidateUnnamedVariables(boolean validateUnnamedVariables) { + this.validateUnnamedVariables = validateUnnamedVariables; + } + @Override public int[] getRequiredTokens() { return new int[] { @@ -222,7 +248,8 @@ public void visitToken(DetailAST ast) { && ast.findFirstToken(TokenTypes.MODIFIERS) .findFirstToken(TokenTypes.FINAL) == null && !isVariableInForInit(ast) - && shouldCheckEnhancedForLoopVariable(ast)) { + && shouldCheckEnhancedForLoopVariable(ast) + && shouldCheckUnnamedVariable(ast)) { insertVariable(ast); } break; @@ -480,6 +507,17 @@ private boolean shouldCheckEnhancedForLoopVariable(DetailAST ast) { || ast.getParent().getType() != TokenTypes.FOR_EACH_CLAUSE; } + /** + * Determines whether unnamed variable should be checked or not. + * + * @param ast The ast to compare. + * @return true if unnamed variable should be checked. + */ + private boolean shouldCheckUnnamedVariable(DetailAST ast) { + return validateUnnamedVariables + || !"_".equals(ast.findFirstToken(TokenTypes.IDENT).getText()); + } + /** * Insert a parameter at the topmost scope stack. *
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java @@ -405,4 +405,34 @@ public void test() throws Exception { getPath("InputFinalLocalVariable3.java"), expected); } + + @Test + public void testValidateUnnamedVariablesTrue() throws Exception { + final String[] expected = { + "21:22: " + getCheckMessage(MSG_KEY, "i"), + "22:17: " + getCheckMessage(MSG_KEY, "_"), + "23:17: " + getCheckMessage(MSG_KEY, "__"), + "26:13: " + getCheckMessage(MSG_KEY, "_"), + "27:13: " + getCheckMessage(MSG_KEY, "_result"), + "32:18: " + getCheckMessage(MSG_KEY, "_"), + "44:18: " + getCheckMessage(MSG_KEY, "_"), + "50:18: " + getCheckMessage(MSG_KEY, "__"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputFinalLocalVariableValidateUnnamedVariablesTrue.java"), + expected); + } + + @Test + public void testValidateUnnamedVariablesFalse() throws Exception { + final String[] expected = { + "21:22: " + getCheckMessage(MSG_KEY, "i"), + "23:17: " + getCheckMessage(MSG_KEY, "__"), + "27:13: " + getCheckMessage(MSG_KEY, "_result"), + "50:18: " + getCheckMessage(MSG_KEY, "__"), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputFinalLocalVariableValidateUnnamedVariablesFalse.java"), + expected); + } } diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableValidateUnnamedVariablesFalse.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableValidateUnnamedVariablesFalse.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableValidateUnnamedVariablesFalse.java @@ -0,0 +1,58 @@ +/* +FinalLocalVariable +validateUnnamedVariables = (default)false +validateEnhancedForLoopVariable = true +tokens = (default)VARIABLE_DEF + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.finallocalvariable; + +import java.util.PriorityQueue; +import java.util.Queue; + +public class InputFinalLocalVariableValidateUnnamedVariablesFalse { + + public void testUnnamedVariables() { + final Queue<Integer> q = new PriorityQueue<>(); + q.add(1); + q.add(2); + for (Integer i : q) { // violation,'Variable 'i' should be declared final' + var _ = q.poll(); + var __ = q.poll(); // violation,'Variable '__' should be declared final' + } + final int _ = sideEffect(); + int _ = sideEffect(); + int _result = sideEffect(); // violation,'Variable '_result' should be declared final' + } + + static + { + Runnable _ = new Runnable() + { + public void run() + { + } + }; + } + + public void testInEnhancedFor() { + final int[] squares = {0, 1, 4, 9, 16, 25}; + for (final int i : squares) { + } + for (int _ : squares) { + + } + for (final int _ : squares) { + + } + for (int __ : squares) { // violation,'Variable '__' should be declared final' + + } + } + + public int sideEffect() { + return 0; + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableValidateUnnamedVariablesTrue.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableValidateUnnamedVariablesTrue.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableValidateUnnamedVariablesTrue.java @@ -0,0 +1,58 @@ +/* +FinalLocalVariable +validateUnnamedVariables = true +validateEnhancedForLoopVariable = true +tokens = (default)VARIABLE_DEF + +*/ + +//non-compiled with javac: Compilable with Java21 +package com.puppycrawl.tools.checkstyle.checks.coding.finallocalvariable; + +import java.util.PriorityQueue; +import java.util.Queue; + +public class InputFinalLocalVariableValidateUnnamedVariablesTrue { + + public void testUnnamedVariables() { + final Queue<Integer> q = new PriorityQueue<>(); + q.add(1); + q.add(2); + for (Integer i : q) { // violation,'Variable 'i' should be declared final' + var _ = q.poll(); // violation,'Variable '_' should be declared final' + var __ = q.poll(); // violation,'Variable '__' should be declared final' + } + final int _ = sideEffect(); + int _ = sideEffect(); // violation,'Variable '_' should be declared final' + int _result = sideEffect(); // violation,'Variable '_result' should be declared final' + } + + static + { + Runnable _ = new Runnable() // violation,'Variable '_' should be declared final' + { + public void run() + { + } + }; + } + + public void testInEnhancedFor() { + final int[] squares = {0, 1, 4, 9, 16, 25}; + for (final int i : squares) { + } + for (int _ : squares) { // violation,'Variable '_' should be declared final' + + } + for (final int _ : squares) { + + } + for (int __ : squares) { // violation,'Variable '__' should be declared final' + + } + } + + public int sideEffect() { + return 0; + } +}
False positive in FinalLocalVariable check on unnamed variables child #14942 I have read check documentation: https://checkstyle.org/checks/coding/finallocalvariable.html I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words ``` PS D:\CS\test> cat src/Test.java import java.util.PriorityQueue; import java.util.Queue; public class Test { public void testParenPad(Point p) { final Queue<Integer> q = new PriorityQueue<>(); q.add(1); q.add(2); for (Integer i : q) { var _ = q.poll(); // violation } } } PS D:\CS\test> cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="charset" value="UTF-8"/> <module name="TreeWalker"> <module name="FinalLocalVariable"/> </module> </module> PS D:\CS\test> java -jar checkstyle-10.17.0-all.jar -c config.xml src/Test.java Starting audit... [ERROR] D:\CS\test\src\Test.java:10:17: Variable '_' should be declared final. [FinalLocalVariable] Audit done. Checkstyle ends with 1 errors. ``` --- **Describe what you expect in detail.** no violation this is an unnamed variable that is effectively final ---
I am good to approve if we add a new property, `validateUnnamedVariables`. @rnveach please share your thoughts and approve if you agree. > validateUnnamedVariables [We have 6 "validate" properties. We have 46 "allow" properties. We have 22 "violate" properties. We have 48 "ignore" properties.](https://rveach.no-ip.org/checkstyle/propertyList.txt) I was going to suggest "allow", maybe "ignore", but I don't know if it really matters. I guess part of my reason is I like simpler words, but also this seems more like a allow/ignore situation (maybe more ignore). The statistics seemed fun to look at. I am good with what you decide. I went with `validate` since the other check property is `validateEnhancedForLoopVariable` to be consistent.
2024-06-13T14:25:44Z
10.17
checkstyle/checkstyle
14,882
checkstyle__checkstyle-14882
[ "14573" ]
36d991f54522e4ac4ac8142483590e0591b8a9a6
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java @@ -379,10 +379,9 @@ private List<JavadocTag> getJavadocTags(TextBlock textBlock) { final JavadocTags tags = JavadocUtil.getJavadocTags(textBlock, JavadocUtil.JavadocTagType.BLOCK); if (!allowUnknownTags) { - for (final InvalidJavadocTag tag : tags.getInvalidTags()) { - log(tag.getLine(), tag.getCol(), MSG_UNKNOWN_TAG, - tag.getName()); - } + tags.getInvalidTags().forEach(tag -> { + log(tag.getLine(), tag.getCol(), MSG_UNKNOWN_TAG, tag.getName()); + }); } return tags.getValidTags(); } @@ -481,11 +480,16 @@ private void checkUnusedParamTags( || recordComponentNames.contains(paramName); if (!found) { - final String actualParamName = - TYPE_NAME_IN_JAVADOC_TAG_SPLITTER.split(tag.getFirstArg())[0]; - log(tag.getLineNo(), tag.getColumnNo(), - MSG_UNUSED_TAG, - JavadocTagInfo.PARAM.getText(), actualParamName); + if (paramName.isEmpty()) { + log(tag.getLineNo(), tag.getColumnNo(), MSG_UNUSED_TAG_GENERAL); + } + else { + final String actualParamName = + TYPE_NAME_IN_JAVADOC_TAG_SPLITTER.split(tag.getFirstArg())[0]; + log(tag.getLineNo(), tag.getColumnNo(), + MSG_UNUSED_TAG, + JavadocTagInfo.PARAM.getText(), actualParamName); + } } } } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtil.java @@ -34,11 +34,11 @@ public final class BlockTagUtil { /** Block tag pattern for a first line. */ private static final Pattern BLOCK_TAG_PATTERN_FIRST_LINE = Pattern.compile( - "/\\*{2,}\\s*@(\\p{Alpha}+)\\s"); + "/\\*{2,}\\s*@(\\p{Alpha}+)(\\s|$)"); /** Block tag pattern. */ private static final Pattern BLOCK_TAG_PATTERN = Pattern.compile( - "^\\s*\\**\\s*@(\\p{Alpha}+)\\s"); + "^\\s*\\**\\s*@(\\p{Alpha}+)(\\s|$)"); /** Closing tag. */ private static final String JAVADOC_CLOSING_TAG = "*/";
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java @@ -24,6 +24,7 @@ import static com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck.MSG_TAG_FORMAT; import static com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck.MSG_UNKNOWN_TAG; import static com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck.MSG_UNUSED_TAG; +import static com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck.MSG_UNUSED_TAG_GENERAL; import org.junit.jupiter.api.Test; @@ -253,6 +254,7 @@ public void testTypeParameters() throws Exception { "59:8: " + getCheckMessage(MSG_UNUSED_TAG, "@param", "<C>"), "62:5: " + getCheckMessage(MSG_MISSING_TAG, "@param <B>"), "75:5: " + getCheckMessage(MSG_UNUSED_TAG, "@param", "x"), + "79:5: " + getCheckMessage(MSG_UNUSED_TAG_GENERAL, "@param"), }; verifyWithInlineConfigParser( getPath("InputJavadocTypeTypeParamsTags_1.java"), expected); @@ -274,6 +276,7 @@ public void testDontAllowUnusedParameterTag() throws Exception { final String[] expected = { "20:4: " + getCheckMessage(MSG_UNUSED_TAG, "@param", "BAD"), "21:4: " + getCheckMessage(MSG_UNUSED_TAG, "@param", "<BAD>"), + "23:4: " + getCheckMessage(MSG_UNUSED_TAG_GENERAL, "@param"), }; verifyWithInlineConfigParser( getPath("InputJavadocTypeUnusedParamInJavadocForClass.java"), @@ -284,6 +287,8 @@ public void testDontAllowUnusedParameterTag() throws Exception { public void testBadTag() throws Exception { final String[] expected = { "19:4: " + getCheckMessage(MSG_UNKNOWN_TAG, "mytag"), + "21:4: " + getCheckMessage(MSG_UNKNOWN_TAG, "mytag"), + "28:5: " + getCheckMessage(MSG_UNKNOWN_TAG, "mytag"), }; verifyWithInlineConfigParser( getPath("InputJavadocTypeBadTag.java"), diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtilTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtilTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtilTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/utils/BlockTagUtilTest.java @@ -43,13 +43,14 @@ public void testExtractBlockTags() { " * @bar def ", " @baz ghi ", " * @qux jkl", + " * @mytag", " */", }; final List<TagInfo> tags = BlockTagUtil.extractBlockTags(text); assertWithMessage("Invalid tags size") .that(tags) - .hasSize(4); + .hasSize(5); final TagInfo tag1 = tags.get(0); assertTagEquals(tag1, "foo", "abc", 1, 4); @@ -62,6 +63,25 @@ public void testExtractBlockTags() { final TagInfo tag4 = tags.get(3); assertTagEquals(tag4, "qux", "jkl", 4, 3); + + final TagInfo tag5 = tags.get(4); + assertTagEquals(tag5, "mytag", "", 5, 3); + } + + @Test + public void testExtractBlockTagFirstLine() { + final String[] text = { + "/** @foo", + " */", + }; + + final List<TagInfo> tags = BlockTagUtil.extractBlockTags(text); + assertWithMessage("Invalid tags size") + .that(tags) + .hasSize(1); + + final TagInfo tag1 = tags.get(0); + assertTagEquals(tag1, "foo", "", 1, 4); } @Test diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeBadTag.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeBadTag.java --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeBadTag.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeBadTag.java @@ -17,7 +17,14 @@ /** * The following is a bad tag. * @mytag Hello // violation 'Unknown tag 'mytag'.' + * // violation below 'Unknown tag 'mytag'' + * @mytag */ public class InputJavadocTypeBadTag { } + +// violation below 'Unknown tag 'mytag'' +/** @mytag + */ +class InputJavadocTypeBadTagFirstLine {} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeTypeParamsTags_1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeTypeParamsTags_1.java --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeTypeParamsTags_1.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeTypeParamsTags_1.java @@ -74,3 +74,8 @@ public <Z> void unclosedGenericParam() /** @param x */ // violation 'Unused @param tag for 'x'.' class Test_1 {} + +// violation below 'Unused Javadoc tag' +/** @param + * */ +class Test_2 {} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeUnusedParamInJavadocForClass.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeUnusedParamInJavadocForClass.java --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeUnusedParamInJavadocForClass.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/javadoctype/InputJavadocTypeUnusedParamInJavadocForClass.java @@ -19,6 +19,7 @@ * * @param BAD This is bad. // violation 'Unused @param tag for 'BAD'.' * @param <BAD> This doesn't exist. // violation 'Unused @param tag for '<BAD>'.' + * // violation below 'Unused Javadoc tag' * @param */ public class InputJavadocTypeUnusedParamInJavadocForClass {
JavadocType: False negative for unknown tag with no description ([Documentation](https://checkstyle.org/checks/javadoc/javadoctype.html)) **config.xml** ```xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="JavadocType"/> </module> </module> ``` <br> **Test.java** ```java /** * @val */ class Test {} ``` <br> **Current CLI:** ``` java -jar checkstyle-10.14.0-all.jar -c config.xml Test.java Starting audit... Audit done. ``` <br> **Expected:** ``` [ERROR] Test.java:2:4: Unknown tag 'val'. [JavadocType] ``` <hr> **Explanation:** - `val` is an unknown tag (allowUnknownTags by default is false), and hence should produce a violation. - Note that this false negative **_only occurs when_** the tag is not accompanied by any description, violation is produced as expected when the unknown tag is associated with description. **Attention note from maintainers:** https://github.com/checkstyle/checkstyle/blob/72cf172972605f79fa8e7ddeea4623529d30f730/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java#L149-L150 this Check is not AST based, so fix might be not trivial. We can accept fix only if it is simple and does not cause more regressions or false positives. Ideally we should reimplement this Check to be ast based, example: https://github.com/checkstyle/checkstyle/blob/72cf172972605f79fa8e7ddeea4623529d30f730/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AtclauseOrderCheck.java#L110
Example showing that violation is produced as expected if the unknown tag is with the description. (same config is used) **Test.java** ```java /** * @val well well well, how the turntables */ class Test {} ``` **CLI:** `[ERROR] Test.java:2:4: Unknown tag 'val'. [JavadocType]` Resolution on https://github.com/checkstyle/checkstyle/issues/14618 is required so that I can decide on how to proceed with this issue.
2024-05-17T19:07:30Z
10.2
checkstyle/checkstyle
14,804
checkstyle__checkstyle-14804
[ "13086" ]
a7ca081725c9a152dadea835a75632bbe998d4c2
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java @@ -101,6 +101,7 @@ public class InnerAssignmentCheck TokenTypes.RESOURCE_SPECIFICATION, }, {TokenTypes.EXPR, TokenTypes.LAMBDA}, + {TokenTypes.EXPR, TokenTypes.SWITCH_RULE, TokenTypes.LITERAL_SWITCH, TokenTypes.SLIST}, }; /** diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckExamplesTest.java --- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckExamplesTest.java +++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckExamplesTest.java @@ -45,4 +45,17 @@ public void testExample1() throws Exception { verifyWithInlineConfigParser(getPath("Example1.java"), expected); } + + @Test + public void testExample2() throws Exception { + final String[] expected = { + "18:19: " + getCheckMessage(MSG_KEY), + "20:17: " + getCheckMessage(MSG_KEY), + "22:20: " + getCheckMessage(MSG_KEY), + "39:15: " + getCheckMessage(MSG_KEY), + }; + + verifyWithInlineConfigParser( + getNonCompilablePath("Example2.java"), expected); + } } diff --git a/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/innerassignment/Example2.java b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/innerassignment/Example2.java new file mode 100644 --- /dev/null +++ b/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/innerassignment/Example2.java @@ -0,0 +1,47 @@ +/*xml +<module name="Checker"> + <module name="TreeWalker"> + <module name="InnerAssignment"/> + </module> +</module> +*/ + +//non-compiled with javac: Compilable with Java14 +package com.puppycrawl.tools.checkstyle.checks.coding.innerassignment; + + +// xdoc section -- start +public class Example2 { + public void test1(int mode) { + int x = 0; + x = switch (mode) { + case 1 -> x = 1; // violation + case 2 -> { + yield x = 2; // violation + } + default -> x = 0; // violation + }; + } + public void test2(int mode) { + int x = 0; + switch(mode) { + case 2 -> { + x = 2; + } + case 1 -> x = 1; + } + } + public void test3(int mode) { + int x = 0, y = 0; + switch(mode) { + case 1: + case 2: { + x = y = 2; // violation + } + case 4: + case 5: + x = 1; + } + } +} +// xdoc section -- end
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java @@ -109,4 +109,24 @@ public void testTokensNotNull() { .isNotNull(); } + @Test + public void testInnerAssignmentSwitchAndSwitchExpression() throws Exception { + final String[] expected = { + "28:23: " + getCheckMessage(MSG_KEY), + "38:25: " + getCheckMessage(MSG_KEY), + "40:25: " + getCheckMessage(MSG_KEY), + "41:26: " + getCheckMessage(MSG_KEY), + "49:25: " + getCheckMessage(MSG_KEY), + "51:31: " + getCheckMessage(MSG_KEY), + "52:26: " + getCheckMessage(MSG_KEY), + "59:42: " + getCheckMessage(MSG_KEY), + "61:34: " + getCheckMessage(MSG_KEY), + "94:25: " + getCheckMessage(MSG_KEY), + "96:26: " + getCheckMessage(MSG_KEY), + "98:27: " + getCheckMessage(MSG_KEY), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputInnerAssignmentSwitchAndSwitchExpression.java"), + expected); + } } diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/innerassignment/InputInnerAssignmentSwitchAndSwitchExpression.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/innerassignment/InputInnerAssignmentSwitchAndSwitchExpression.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/innerassignment/InputInnerAssignmentSwitchAndSwitchExpression.java @@ -0,0 +1,101 @@ +/* +InnerAssignment + +*/ + +//non-compiled with javac: Compilable with Java14 +package com.puppycrawl.tools.checkstyle.checks.coding.innerassignment; + +public class InputInnerAssignmentSwitchAndSwitchExpression { + + public void test1(int mode) { + int x = 0; + switch (mode) { + case 2 -> { + x = 2; + } + case 1 -> x = 1; + } + } + + public void test2(int mode) { + int x = 0, y = 0; + switch (mode) { + case 2, 4, 6 -> { + x = 2; + } + case 1, 3, 5 -> { + x = y = 1; // violation + } + case 0, 7, 8 -> x = 1; + } + } + + public void test3(int mode) { + int x = 0; + x = switch (mode) { + case 2 -> { + yield x = 2; // violation + } + case 1 -> x = 1; // violation + default -> x = 0; // violation + }; + } + + public void test4(int mode) { + int x = 0; + x = switch (mode) { + case 2, 4, 6 -> { + yield x = 2; // violation + } + case 1, 3, 5 -> x = 1; // violation + default -> x = 0; // violation + }; + } + + public void test5(String operation) { + boolean innerFlag, flag; + switch (operation) { + case "Y" -> flag = innerFlag = true; // violation + case "N" -> { + flag = innerFlag = false; // violation + } + } + } + + public void test6(int mode) { + int x = 0; + switch (mode) { + case 2: { + x = 2; + } + case 1: + x = 1; + } + } + + public void test7(int mode) { + int x = 0; + switch (mode) { + case 0: + case 1: + case 2: { + x = 2; + } + case 4: + case 5: + x = 1; + } + } + + public void test8(int mode) { + int x = 4; + System.out.println(switch (x) { + case 1 -> x = 1; // violation + case 2 -> { + yield x = 2; // violation + } + default -> x = 3; // violation + }); + } +}
InnerAssignmentCheck failed for one line code in Java 14 switch expression I have read check documentation: https://checkstyle.org/config_coding.html#InnerAssignment I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words ```bash /var/tmp $ javac TestInnerAssignmentCheck.java /var/tmp $ cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="InnerAssignment"/> </module> </module> /var/tmp $ cat TestInnerAssignmentCheck.java public class TestInnerAssignmentCheck { private boolean flag; void getOperation(final String operation) { switch (operation) { case "Y" -> flag = true; // violation case "N" -> { flag = false; } default -> throw new UnsupportedOperationException(); } } } /var/tmp $ RUN_LOCALE="-Duser.language=en -Duser.country=US" /var/tmp $ java $RUN_LOCALE -jar checkstyle-10.11.0-all.jar -c config.xml TestInnerAssignmentCheck.java Starting audit... [ERROR] /Users/hael/Code/Learn/Tools/checkstyle/TestInnerAssignmentCheck.java:6:30: Inner assignments should be avoided. [InnerAssignment] Audit done. Checkstyle ends with 1 errors. ``` --- **Describe what you expect in detail.** Checkstyle behaves differently between one line code and code block for Java 14's Switch Expression. In the given code above, checkstyle will complain about `case "Y" -> flag = true;` but not `case "N" -> {flag = false;}`. I'm afraid that it's because `flag = true;` is equivalent to `return flag = true;`? But the return value is not used here in the switch expression, we just want to do the value assignment. Expected: no violations on such code.
@romani @nrmancuso there is an open PR for this but no activity since jan.idk if it is abandoned.so can i take this or should we wait @mahfouz72 you can pick it up, I closed the PR
2024-04-16T22:09:06Z
10.16
checkstyle/checkstyle
14,623
checkstyle__checkstyle-14623
[ "14620" ]
85987c3797a588ee495d07e4f4e146a8ae55fe04
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Locale; +import java.util.Optional; import com.puppycrawl.tools.checkstyle.StatelessCheck; import com.puppycrawl.tools.checkstyle.api.AbstractCheck; @@ -32,8 +33,8 @@ /** * <p> * Checks the placement of right curly braces (<code>'}'</code>) for code blocks. This check - * supports if-else, try-catch-finally blocks, switch statements, while-loops, for-loops, - * method definitions, class definitions, constructor definitions, + * supports if-else, try-catch-finally blocks, switch statements, switch cases, while-loops, + * for-loops, method definitions, class definitions, constructor definitions, * instance, static initialization blocks, annotation definitions and enum definitions. * For right curly brace of expression blocks of arrays, lambdas and class instances * please follow issue @@ -155,6 +156,7 @@ public int[] getAcceptableTokens() { TokenTypes.RECORD_DEF, TokenTypes.COMPACT_CTOR_DEF, TokenTypes.LITERAL_SWITCH, + TokenTypes.LITERAL_CASE, }; } @@ -432,6 +434,9 @@ private static Details getDetails(DetailAST ast) { case TokenTypes.LITERAL_SWITCH: details = getDetailsForSwitch(ast); break; + case TokenTypes.LITERAL_CASE: + details = getDetailsForCase(ast); + break; default: details = getDetailsForOthers(ast); break; @@ -460,6 +465,38 @@ private static Details getDetailsForSwitch(DetailAST switchNode) { return new Details(lcurly, rcurly, nextToken, true); } + /** + * Collects details about case statements. + * + * @param caseNode case statement to gather details about + * @return new Details about given case statement + */ + private static Details getDetailsForCase(DetailAST caseNode) { + final DetailAST caseParent = caseNode.getParent(); + final int parentType = caseParent.getType(); + final Optional<DetailAST> lcurly; + final DetailAST statementList; + + if (parentType == TokenTypes.SWITCH_RULE) { + statementList = caseParent.findFirstToken(TokenTypes.SLIST); + lcurly = Optional.ofNullable(statementList); + } + else { + statementList = caseNode.getNextSibling(); + lcurly = Optional.ofNullable(statementList) + .map(DetailAST::getFirstChild) + .filter(node -> node.getType() == TokenTypes.SLIST); + } + final DetailAST rcurly = lcurly.map(DetailAST::getLastChild) + .filter(child -> !isSwitchExpression(caseParent)) + .orElse(null); + final Optional<DetailAST> nextToken = + Optional.ofNullable(lcurly.map(DetailAST::getNextSibling) + .orElseGet(() -> getNextToken(caseParent))); + + return new Details(lcurly.orElse(null), rcurly, nextToken.orElse(null), true); + } + /** * Check whether switch is expression or not. * diff --git a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckExamplesTest.java b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckExamplesTest.java --- a/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckExamplesTest.java +++ b/src/xdocs-examples/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckExamplesTest.java @@ -56,7 +56,8 @@ public void testExample2() throws Exception { @Test public void testExample3() throws Exception { final String[] expected = { - "35:16: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", "16"), + "24:22: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", "22"), + "38:16: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", "16"), }; verifyWithInlineConfigParser(getPath("Example3.java"), expected); @@ -74,7 +75,7 @@ public void testExample4() throws Exception { @Test public void testExample5() throws Exception { final String[] expected = { - "41:16: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", "16"), + "44:16: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", "16"), }; verifyWithInlineConfigParser(getPath("Example5.java"), expected); diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example3.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example3.java --- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example3.java +++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example3.java @@ -3,7 +3,7 @@ <module name="TreeWalker"> <module name="RightCurly"> <property name="option" value="alone"/> - <property name="tokens" value="LITERAL_SWITCH"/> + <property name="tokens" value="LITERAL_SWITCH, LITERAL_CASE"/> </module> </module> </module> @@ -16,10 +16,13 @@ class Example3 { public void method0() { int mode = 0; + int x; switch (mode) { case 1: - int x = 1; + int y = 1; break; + case 2: {x = 1;} // violation '}' at column 22 should be alone on a line' + case 3: int z = 0; {break;} // ok, the braces is not a first child of case default: x = 0; } // ok, RightCurly is alone @@ -35,6 +38,5 @@ public void method01() { x = 0; } // violation above, 'should be alone on a line.' } - } // xdoc section -- end diff --git a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example5.java b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example5.java --- a/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example5.java +++ b/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/Example5.java @@ -3,7 +3,7 @@ <module name="TreeWalker"> <module name="RightCurly"> <property name="option" value="alone_or_singleline"/> - <property name="tokens" value="LITERAL_SWITCH"/> + <property name="tokens" value="LITERAL_SWITCH, LITERAL_CASE"/> </module> </module> </module> @@ -16,10 +16,13 @@ class Example5 { public void method0() { int mode = 0; + int x; switch (mode) { case 1: - int x = 1; + int y = 1; break; + case 2: {x = 1;} // ok, RightCurly is in single line + case 3: int z = 0; {break;} // ok, the braces is not a first child of case default: x = 0; }
diff --git a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java --- a/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java +++ b/src/it/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/RightCurlyTest.java @@ -130,4 +130,19 @@ public void testRightCurlySwitch() throws Exception { final Integer[] warnList = getLinesWithWarn(filePath); verify(checkConfig, filePath, expected, warnList); } + + @Test + public void testRightCurlySwitchCases() throws Exception { + final String[] expected = { + "25:13: " + getCheckMessage(RightCurlyCheck.class, MSG_KEY_LINE_ALONE, "}", 13), + "34:28: " + getCheckMessage(RightCurlyCheck.class, MSG_KEY_LINE_ALONE, "}", 28), + "57:33: " + getCheckMessage(RightCurlyCheck.class, MSG_KEY_LINE_ALONE, "}", 33), + }; + + final Configuration checkConfig = createTreeWalkerConfig(getModuleConfigsByIds(MODULES)); + final String filePath = getPath("InputRightCurlySwitchCasesBlocks.java"); + + final Integer[] warnList = getLinesWithWarn(filePath); + verify(checkConfig, filePath, expected, warnList); + } } diff --git a/src/it/resources/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/InputRightCurlySwitchCasesBlocks.java b/src/it/resources/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/InputRightCurlySwitchCasesBlocks.java new file mode 100644 --- /dev/null +++ b/src/it/resources/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/InputRightCurlySwitchCasesBlocks.java @@ -0,0 +1,60 @@ +package com.google.checkstyle.test.chapter4formatting.rule412nonemptyblocks; + +public class InputRightCurlySwitchCasesBlocks { + + public static void test0() { + int mode = 0; + switch (mode) { + case 1: { + int x = 1; + break; + } + case 2: { + int x = 0; + break; + } + } + } + + public static void test() { + int mode = 0; + switch (mode) { + case 1:{ + int x = 1; + break; + } default : // warn + int x = 0; + } + } + + public static void test1() { + int k = 0; + switch (k) { + case 1:{ + int x = 1;} // warn + case 2: + int x = 2; + break; + } + } + + public static void test2() { + int mode = 0; + switch (mode) { + case 1: int x = 1; + case 2: { + break; + } + } + } + + public static void test3() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + } + case 2: { int x = 2;} // warn + } + } +} diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java @@ -827,4 +827,158 @@ public void testSwitchExpression7() throws Exception { verifyWithInlineConfigParser( getNonCompilablePath("InputRightCurlyTestSwitchExpression7.java"), expected); } + + @Test + public void testCaseBlocksInSwitchStatementAlone() throws Exception { + final String[] expected = { + "33:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "44:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "73:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "78:44: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 44), + "90:39: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 39), + "97:42: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 42), + "107:35: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 35), + }; + verifyWithInlineConfigParser( + getPath("InputRightCurlyCaseBlocksInSwitchStatementAlone.java"), expected); + } + + @Test + public void testCaseBlocksInSwitchStatementAlone2() throws Exception { + final String[] expected = { + "17:15: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 15), + "26:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "38:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "41:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "49:24: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 24), + "49:45: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 45), + "57:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "68:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "68:26: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 26), + "75:34: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 34), + "75:47: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 47), + "82:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), + "102:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + }; + verifyWithInlineConfigParser( + getPath("InputRightCurlyCaseBlocksInSwitchStatementAlone2.java"), expected); + } + + @Test + public void testCaseBlocksInSwitchStatementAloneOrSingleLine() throws Exception { + final String[] expected = { + "33:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "44:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "73:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "78:51: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 51), + }; + verifyWithInlineConfigParser( + getPath("InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline.java"), + expected); + } + + @Test + public void testCaseBlocksInSwitchStatementAloneOrSingle2() throws Exception { + final String[] expected = { + "18:15: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 15), + "27:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "39:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "42:15: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 15), + "50:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), + "71:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "80:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), + "100:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + }; + verifyWithInlineConfigParser( + getPath("InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline2.java"), + expected); + } + + @Test + public void testCaseBlocksInSwitchStatementSame() throws Exception { + final String[] expected = { + "33:16: " + getCheckMessage(MSG_KEY_LINE_BREAK_BEFORE, "}", 16), + "44:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "73:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "78:51: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 51), + "106:23: " + getCheckMessage(MSG_KEY_LINE_BREAK_BEFORE, "}", 23), + }; + verifyWithInlineConfigParser( + getPath("InputRightCurlyCaseBlocksInSwitchStatementSame.java"), expected); + } + + @Test + public void testCaseBlocksInSwitchStatementSame2() throws Exception { + final String[] expected = { + "18:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "27:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "39:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "42:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "50:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "70:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "77:34: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 34), + "77:47: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 47), + "85:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), + "103:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + }; + verifyWithInlineConfigParser( + getPath("InputRightCurlyCaseBlocksInSwitchStatementSame2.java"), expected); + } + + @Test + public void testCaseBlocksWithSwitchRuleAlone() throws Exception { + final String[] expected = { + "32:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "44:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "45:27: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 27), + "56:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "69:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "74:46: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 46), + "83:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "83:36: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 36), + "93:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), + "94:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), + }; + verifyWithInlineConfigParser( + getNonCompilablePath("InputRightCurlyCaseBlocksWithSwitchRuleAlone.java"), + expected); + } + + @Test + public void testCaseBlocksWithSwitchRuleAloneOrSingleLine() throws Exception { + + final String[] expected = { + "27:19: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 19), + "41:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "53:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), + "54:27: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 27), + "64:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "77:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "82:46: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 46), + "91:13: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 13), + "102:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), + }; + final String fileName = "InputRightCurlyCaseBlocksWithSwitchRuleAloneOrSingleline.java"; + verifyWithInlineConfigParser(getNonCompilablePath(fileName), expected); + } + + @Test + public void testCaseBlocksWithSwitchExpressionAlone() throws Exception { + final String[] expected = { + "63:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), + "86:42: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 42), + }; + final String fileName = "InputRightCurlyCaseBlocksWithSwitchExpressionAlone.java"; + verifyWithInlineConfigParser(getNonCompilablePath(fileName), expected); + } + + @Test + public void testCaseBlocksWithSwitchExpressionAloneOrSingleLine() throws Exception { + final String[] expected = { + "63:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), + }; + final String fileName = + "InputRightCurlyCaseBlocksWithSwitchExpressionAloneOrSingleline.java"; + verifyWithInlineConfigParser(getNonCompilablePath(fileName), expected); + } } diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchExpressionAlone.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchExpressionAlone.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchExpressionAlone.java @@ -0,0 +1,92 @@ +/* +RightCurly +option = ALONE +tokens = LITERAL_CASE, LITERAL_IF + +*/ + +//non-compiled with javac: Compilable with Java14 +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksWithSwitchExpressionAlone { + + int foo(int yield) { + return switch (yield) { + case 1 -> 2; + case 2 -> 3; + case 3 -> 4; + default -> 5; + }; + } + + void test() { + int x = 1; + String s = switch (x) { + case 1 -> { + + yield "and that's it"; + } case 2 -> "x is 2"; + default -> "x is neither 1 nor 2"; + }; + } + + void test2() { + int x = 1; + String s = switch (x) { + case 1 -> { + + yield "and that's it"; + } case 2 -> { yield "x is 2";} + default -> "x is neither 1 nor 2"; + }; + } + + void test3() { + int x = 1; + String s = switch (x) { + case 1 -> { + + String s1 = "and that's it"; + yield s1; + } case 2 -> { yield "x is 2";} + default -> "x is neither 1 nor 2"; + }; + } + + void test4() throws Exception { + int a = 0; + int b = switch (a) { + case 0 -> { + int x = 5; + int y = 6; + if (a == 2) { + y = 7;} // violation '}' at column 31 should be alone on a line' + throw new Exception(); + } default -> 2; + }; + } + + void test5() throws Exception { + int a = 0; + int b = switch (a) { + case 0 -> {throw new Exception();} + default -> 2; + }; + } + + void test6() throws Exception { + int y = 0; + int x = 0; + final boolean a = switch (y) { + case 1 -> {x = 1; yield true;} + case 2 -> { + x = 1; + yield true;} case 3 -> { + x = 1; + if (x == 1) {yield true;} // violation '}' at column 42 should be alone on a line' + yield false;} + default -> throw new RuntimeException(); + }; + } + +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchExpressionAloneOrSingleline.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchExpressionAloneOrSingleline.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchExpressionAloneOrSingleline.java @@ -0,0 +1,93 @@ +/* +RightCurly +option = ALONE_OR_SINGLELINE +tokens = LITERAL_CASE, LITERAL_IF + +*/ + +//non-compiled with javac: Compilable with Java14 +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksWithSwitchExpressionAloneOrSingleline { + + int foo(int yield) { + return switch (yield) { + case 1 -> 2; + case 2 -> 3; + case 3 -> 4; + default -> 5; + }; + } + + void test() { + int x = 1; + String s = switch (x) { + case 1 -> { + + yield "and that's it"; + } case 2 -> "x is 2"; + default -> "x is neither 1 nor 2"; + }; + } + + void test2() { + int x = 1; + String s = switch (x) { + case 1 -> { + + yield "and that's it"; + } case 2 -> { yield "x is 2";} + default -> "x is neither 1 nor 2"; + }; + } + + void test3() { + int x = 1; + String s = switch (x) { + case 1 -> { + + String s1 = "and that's it"; + yield s1; + } case 2 -> { yield "x is 2";} + default -> "x is neither 1 nor 2"; + }; + } + + void test4() throws Exception { + int a = 0; + int b = switch (a) { + case 0 -> { + int x = 5; + int y = 6; + if (a == 2) { + y = 7;} // violation '}' at column 31 should be alone on a line' + throw new Exception(); + } default -> 2; + }; + } + + void test5() throws Exception { + int a = 0; + int b = switch (a) { + case 0 -> {throw new Exception();} + default -> 2; + }; + } + + void test6() { + int y = 0; + int x = 0; + final boolean a = switch (y) { + case 1 -> {x = 1; yield true; + }case 2 -> { + x = 1; + yield true;} case 3 -> { + x = 1; + if (x == 1) {yield true;} // ok single line + yield false; + } + default -> throw new RuntimeException(); + }; + } + +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchRuleAlone.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchRuleAlone.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchRuleAlone.java @@ -0,0 +1,96 @@ +/* +RightCurly +option = ALONE +tokens = LITERAL_CASE + +*/ + +//non-compiled with javac: Compilable with Java14 +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksWithSwitchRuleAlone { + + public static void test0() { + int mode = 0; + switch (mode) { + case 1 -> { + int x = 1; + } + case 2 -> { + int x = 0; + } + case 3 -> System.out.println("x is 3"); + } + } + + public static void test() { + int mode = 0; + switch (mode) { + case 1 -> { + int x = 1; + + } default -> { // violation '}' at column 13 should be alone on a line' + int x = 0; + } + } + } + + public static void test1() { + int k = 0; + switch (k) { + case 1 -> { + int x = 1; + + } case 2 -> { // violation '}' at column 13 should be alone on a line' + int x = 2;} // violation '}' at column 27 should be alone on a line' + + } + } + + public static void test2() { + int k = 0; + switch (k) { + case 1 -> { + int x = 1; + + }case 2 -> throw new RuntimeException(); + // violation above '}' at column 13 should be alone on a line' + } + } + + public static void test3() { + int k = 0; + switch (k) { + case 1 -> { + int x = 1; + } + case 2 -> { + int x = 2; + } } // violation '}' at column 13 should be alone on a line' + } + + public static void test4() { + int mode = 0; + switch (mode) { case 0 -> {int x = 1;} } + // violation above '}' at column 46 should be alone on a line' + } + + public static void test5() { + int mode = 0; + switch (mode) { + case 0 -> { + int x = 1; + } case 1 -> {int x = 2;} // 2 violations + } + } + + public static void test8() { + int mode = 0; + int x = 0; + switch (mode) { + case 0 -> throw new RuntimeException(); + case 1 -> x = 1; + case 2 -> {x = 1; } // violation '}' at column 31 should be alone on a line' + case 3 -> {x = 5; } } // violation '}' at column 31 should be alone on a line' + } +} diff --git a/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchRuleAloneOrSingleline.java b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchRuleAloneOrSingleline.java new file mode 100644 --- /dev/null +++ b/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksWithSwitchRuleAloneOrSingleline.java @@ -0,0 +1,104 @@ +/* +RightCurly +option = ALONE_OR_SINGLELINE +tokens = LITERAL_CASE + +*/ + +//non-compiled with javac: Compilable with Java14 +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksWithSwitchRuleAloneOrSingleline { + + public void testt0() { + int mode = 0; + switch (mode) { + case 1 -> {int x = 1;} // ok, single line + case 2 -> {int x = 0;} + case 3 -> System.out.println("x is 3"); + } + } + + public static void test0() { + int mode = 0; + switch (mode) { + case 1 -> { + int + x = 1;} // violation '}' at column 19 should be alone on a line' + case 2 -> { + int x = 0; + } + case 3 -> System.out.println("x is 3"); + } + } + + public static void test() { + int mode = 0; + switch (mode) { + case 1 -> { + int x = 1; + + } default -> { // violation '}' at column 13 should be alone on a line' + int x = 0; + } + } + } + + public static void test1() { + int k = 0; + switch (k) { + case 1 -> { + + + int x = 1; } case 2 -> { // violation '}' at column 23 should be alone on a line' + int x = 2;} // violation '}' at column 27 should be alone on a line' + + } + } + + public static void test2() { + int k = 0; + switch (k) { + case 1 -> {int x = 1; + + }case 2 -> throw new RuntimeException(); + // violation above '}' at column 13 should be alone on a line' + } + } + + public static void test3() { + int k = 0; + switch (k) { + case 1 -> { + int x = 1; + } + case 2 -> { + int x = 2; + } } // violation '}' at column 13 should be alone on a line' + } + + public static void test4() { + int mode = 0; + switch (mode) { case 0 -> {int x = 1;} default -> {int x = 0;} } + // violation above '}' at column 46 should be alone on a line' + } + + public static void test5() { + int mode = 0; + switch (mode) { + case 0 -> { + int x = 1; + } case 1 -> {int x = 2;} // violation '}' at column 13 should be alone on a line' + } + } + + public static void test8() { + int mode = 0; + int x = 0; + switch (mode) { + case 0 -> throw new RuntimeException(); + case 1 -> x = 1; + case 2 -> {x = 1; } // ok, single line + case 3 -> {x = 5; } } // violation '}' at column 31 should be alone on a line' + } +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAlone.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAlone.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAlone.java @@ -0,0 +1,111 @@ +/* +RightCurly +option = ALONE +tokens = LITERAL_CASE + +*/ +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksInSwitchStatementAlone { + public static void test0() { + int mode = 0; + switch (mode) { + case 1: { + int x = 1; + break; + } + case 2: + default: { + int x = 0; + }break; + case 3: { + int x = 3; + } + } + } + + public static void test() { + int mode = 0; + switch (mode) { + case 1:{ + int x = 1; + break; + } default : // violation '}' at column 13 should be alone on a line' + int x = 0; + } + } + + public static void test1() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } case 2: // violation '}' at column 13 should be alone on a line' + int x = 2; + break; + } + } + + public static void test2() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } + case 2: + int x = 2; + break; + } + } + + public static void test3() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } + case 2:{ + int x = 2; + break; + } } // violation '}' at column 13 should be alone on a line' + } + + public static void test4() { + int mode = 0; + switch (mode) { case 0: {int x = 1;} break; default : int x = 5; } + // violation above '}' at column 44 should be alone on a line' + } + + public static void test5() { + int mode = 0; + switch (mode) { case 0: } + } + + public static void test6() { + int mode = 0; + switch (mode) { + case 0: {int x = 1; break;} // violation '}' at column 39 should be alone on a line' + default : break; + } + } + + public static void test7() { + int mode = 0; + switch (mode) {case 0:{int x = 1;} // violation '}' at column 42 should be alone on a line' + break; default : break; } + } + + public static void test8() { + int mode = 0; + int x = 0; + switch (mode) { + case 0: + case 1: x = 1; break; + case 2: {x = 1; break;} // violation '}' at column 35 should be alone on a line' + default : x = 5; + } + } +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAlone2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAlone2.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAlone2.java @@ -0,0 +1,120 @@ +/* +RightCurly +option = ALONE +tokens = LITERAL_CASE + +*/ +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksInSwitchStatementAlone2 { + public static void test9() { + int mode = 0; + switch (mode) { + case 0: int x = 1; + case 1: x = 1; break; + case 2: { + x = + 1;} default : x = 5; // violation '}' at column 15 should be alone on a line' + } + } + + public static void test10() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: int x = 1; break; // violation '}' at column 13 should be alone on a line' + case 2: { + + } + default : x = 5; + } + } + public static void test11() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: int x = 1; break; // violation '}' at column 13 should be alone on a line' + case 2: { + + } default : x = 5; // violation '}' at column 13 should be alone on a line' + } + } + public static void test12() { + int mode = 0; + switch (mode) { + case 0: { + + int x = 1; } case 1: {int x = 1;} break; // 2 violations + } + } + public static void test13() { + int mode = 0; + switch (mode) { + case 0: { int x = 1; + + } case 1: { // violation '}' at column 13 should be alone on a line' + + } + default : break; + } + } + public static void test14() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: { } // 2 violations + default : {break;} + } + } + + public static void test15() { + int mode = 0; + switch (mode) {case 0: { } case 1: { } } // 2 violations + } + + public static void test16() { + int mode = 0; + switch (mode) { + case 0: int x = 1; { } break; // ok, the braces is not a first child of case + case 1: { } int y = 1; break; + // violation above '}' at column 23 should be alone on a line' + case 2: int t = 1; { }; + } + } + + public static void test17() { + int mode = 0; + switch (mode) { + case 0: + int x = 1; + { } // ok, the braces is not a first child of case + case 1: + mode++; + { + + } int y; // ok, the braces is not a first child of case + case 3: + { + + } int z = 1; // violation '}' at column 13 should be alone on a line' + } + } + + public static void test18() { + int mode = 0; + switch (mode) { + case 0: { + } + int x; + case 1: + int z; + { + + }break; default: break; // ok, the braces is not a first child of case + } + } +} + diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline.java @@ -0,0 +1,111 @@ +/* +RightCurly +option = ALONE_OR_SINGLELINE +tokens = LITERAL_CASE + +*/ +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline { + public static void test0() { + int mode = 0; + switch (mode) { + case 1: { + int x = 1; + break; + } + case 2: { + int x = 0; + break; + } + case 3: { + break; + } + } + } + + public static void test() { + int mode = 0; + switch (mode) { + case 1:{ + int x = 1; + break; + } default : // violation '}' at column 13 should be alone on a line' + int x = 0; + } + } + + public static void test1() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } case 2: // violation '}' at column 13 should be alone on a line' + int x = 2; + break; + } + } + + public static void test2() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } + case 2: + int x = 2; + break; + } + } + + public static void test3() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } + case 2:{ + int x = 2; + break; + } } // violation '}' at column 13 should be alone on a line' + } + + public static void test4() { + int mode = 0; + switch (mode) { case 0: {int x = 1; break;} default : int x = 5; } + // violation above '}' at column 51 should be alone on a line' + } + + public static void test5() { + int mode = 0; + switch (mode) { case 0: int x = 1; } + } + + public static void test6() { + int mode = 0; + switch (mode) { + case 0: {int x = 1; break;} // ok , single line + default : break; + } + } + + public static void test7() { + int mode = 0; + switch (mode) { case 0: {int x = 1;} // ok, single line + break; default : break; } + } + + public static void test8() { + int mode = 0; + switch (mode) { + case 0: int x = 1; + case 1: x = 1; break; + case 2: {x = 1; break;} // ok, single line + default : x = 5; + } + } + +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline2.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline2.java @@ -0,0 +1,117 @@ +/* +RightCurly +option = ALONE_OR_SINGLELINE +tokens = LITERAL_CASE + +*/ +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksInSwitchStatementAloneOrSingleline2 { + + public static void test9() { + int mode = 0; + switch (mode) { + case 0: int x = 1; + case 1: x = 1; break; + case 2: { + x = + 1;} default : x = 5; // violation '}' at column 15 should be alone on a line' + } + } + + public static void test10() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: int x = 1; break; // violation '}' at column 13 should be alone on a line' + case 2: { + + } + default : x = 5; + } + } + public static void test11() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: int x = 1; break; // violation '}' at column 13 should be alone on a line' + case 2: { + int + y;} default : x = 5; // violation '}' at column 15 should be alone on a line' + } + } + public static void test12() { + int mode = 0; + switch (mode) { + case 0: { + + int x = 1;} case 1: {int x = 1; break;} + // violation above '}' at column 23 should be alone on a line' + } + } + public static void test13() { + int mode = 0; + switch (mode) { + case 0: { + + } + case 1: { + + } + default : break; + } + } + public static void test14() { + int mode = 0; + switch (mode) { + case 0: { int x = 1; + + } case 1: { } // violation '}' at column 13 should be alone on a line' + default : {break;} + } + } + + public static void test15() { + int mode = 0; + switch (mode) { + case 0: int x = 1; { } break; + case 1: { } int y = 1; break; // violation '}' at column 23 should be alone on a line' + + case 2: int t = 1; { }; + } + } + + public static void test17() { + int mode = 0; + switch (mode) { + case 0: + int x = 1; + { } + case 1: + mode++; + { + + } int y; // ok, the braces is not a first child of case + case 3: + { + + } int z = 1; // violation '}' at column 13 should be alone on a line' + } + } + + public static void test18() { + int mode = 0; + switch (mode) { + case 0: { + + } + case 1: + int z; + { + + } break; default: break; // ok, the braces is not a first child of case + } + } +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementSame.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementSame.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementSame.java @@ -0,0 +1,114 @@ +/* +RightCurly +option = SAME +tokens = LITERAL_CASE + +*/ +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksInSwitchStatementSame { + public static void test0() { + int mode = 0; + switch (mode) { + case 1: { + int x = 1; + break; + } + case 2: { + int x = 0; + break; + } + default: { + break; + } + } + } + + public static void test() { + int mode = 0; + switch (mode) { + case 1:{ + int x + + =1;} default : // violation '}' at column 16 should have line break before' + int x = 0; + } + } + + public static void test1() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } case 2: // violation '}' at column 13 should be alone on a line' + int x = 2; + break; + } + } + + public static void test2() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } + case 2: + int x = 2; + break; + } + } + + public static void test3() { + int k = 0; + switch (k) { + case 1:{ + int x = 1; + break; + } + case 2:{ + int x = 2; + break; + } } // violation '}' at column 13 should be alone on a line' + } + + public static void test4() { + int mode = 0; + switch (mode) { case 0: {int x = 1; break;} default : int x = 5; } + // violation above '}' at column 51 should be alone on a line' + } + + public static void test5() { + int mode = 0; + switch (mode) { case 0: int x = 1;} + } + + public static void test6() { + int mode = 0; + switch (mode) { + case 0: {int x = 1; break;} // ok , single line + default : break; + } + } + + public static void test7() { + int mode = 0; + switch (mode) { case 0: {int x = 1;} // ok, single line + break; default : break; } + } + + public static void test8() { + int mode = 0; + int x = 0; + switch (mode) { + case 0:{ + int y = 1;} // violation '}' at column 23 should have line break before' + case 1: {x = 1; + } + case 2: {x = 1; break;} // ok, single line + default : x = 5; + } + } + +} diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementSame2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementSame2.java new file mode 100644 --- /dev/null +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/blocks/rightcurly/InputRightCurlyCaseBlocksInSwitchStatementSame2.java @@ -0,0 +1,119 @@ +/* +RightCurly +option = SAME +tokens = LITERAL_CASE + +*/ +package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly; + +public class InputRightCurlyCaseBlocksInSwitchStatementSame2 { + + public static void test9() { + int mode = 0; + switch (mode) { + case 0: int x = 1; + case 1: x = 1; break; + case 2: { + x = 1; break; + } default : x = 5; // violation '}' at column 13 should be alone on a line' + } + } + + public static void test10() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: int x = 1; break; // violation '}' at column 13 should be alone on a line' + case 2: { + + } + default : x = 5; + } + } + public static void test11() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: int x = 1; break; // violation '}' at column 13 should be alone on a line' + case 2: { + + } default : x = 5; // violation '}' at column 13 should be alone on a line' + } + } + public static void test12() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: {int x = 1; break;} // violation '}' at column 13 should be alone on a line' + } + } + public static void test13() { + int mode = 0; + switch (mode) { + case 0: { + + } + case 1: { + + } + default : break; + } + } + public static void test14() { + int mode = 0; + switch (mode) { + case 0: { + + } case 1: { } // violation '}' at column 13 should be alone on a line' + default : {break;} + } + } + + public static void test15() { + int mode = 0; + switch (mode) {case 0: { } case 1: { } } // 2 violations + + } + + public static void test16() { + int mode = 0; + switch (mode) { + case 0: int x = 1; { } break; + case 1: { } int y = 1; break; // violation '}' at column 23 should be alone on a line' + + case 2: int t = 1; { }; + } + } + public static void test17() { + int mode = 0; + switch (mode) { + case 0: + int x = 1; + { } + case 1: + mode++; + { + } int y; // ok, the braces is not a first child of case + case 3: + { + + } int z = 1; // violation '}' at column 13 should be alone on a line' + } + } + public static void test18() { + int mode = 0; + switch (mode) { + case 0: { + } + int x; + case 1: + int z; + { + + } break; default: break; // ok, the braces is not a first child of case + } + } +}
LITERAL_CASE token support in RightCurlyCheck Currently [RightCurlyCheck](https://checkstyle.org/checks/blocks/rightcurly.html#RightCurly) accepts a less tokens than [LeftCurlyCheck](https://checkstyle.org/checks/blocks/leftcurly.html#LeftCurly) (19 tokens) This issue aims to add support for `LITERAL_CASE` token in RightCurlyCheck this issue is a child issue for https://github.com/checkstyle/checkstyle/issues/3547 For LeftCurlyCheck: ``` PS D:\test> cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="charset" value="UTF-8"/> <module name="TreeWalker"> <module name="LeftCurly"> <property name="tokens" value="LITERAL_CASE "/> <property name="option" value="eol"/> </module> </module> </module> PS D:\test> cat src/Test.java class Test{ void test(){ int x = 1; switch(x){ case 1: { // violation System.out.println("x is 1"); break; } case 2: { // violation System.out.println("x is 2"); break; } default: System.out.println("x is neither 1 nor 2"); } } } PS D:\test> java -jar checkstyle-10.13.0-all.jar -c config.xml src/Test.java Starting audit... [ERROR] D:\test\src\Test.java:7:13: '{' at column 13 should be on the previous line. [LeftCurly] [ERROR] D:\test\src\Test.java:12:13: '{' at column 13 should be on the previous line. [LeftCurly] Audit done. Checkstyle ends with 2 errors. ``` for RightCurlyCheck: ``` PS D:\test> cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="charset" value="UTF-8"/> <module name="TreeWalker"> <module name="RightCurly"> <property name="tokens" value="LITERAL_CASE"/> <property name="option" value="alone"/> </module> </module> </module> PS D:\test> cat src/Test.java class Test{ void test(){ int x = 1; switch(x){ case 1: { System.out.println("x is 1"); break; } case 2: // expected violation '}' should be alone in the line { System.out.println("x is 2"); break; } default: // expected violation '}' should be alone in the line System.out.println("x is neither 1 nor 2"); } } } ``` Expected:- Violation for the right curly brace for `LITERAL_CASE `
@mahfouz72 thanks for your report, issue is approved. Tests for this need to include: - Different inputs with all [RightCurlyOption](https://checkstyle.org/property_types.html#RightCurlyOption)s - switch statements, expressions - switch rules and block statements I am on it > switch statements, expressions @nrmancuso but I found in the check code that the check is handling statements only not expressions so do you mean to add tests to show that it isn't getting checked? > > switch statements, expressions > > @nrmancuso but I found in the check code that the check is handling statements only not expressions so do you mean to add tests to show that it isn't getting checked? @mahfouz72 i like to think about issues vs PRs (generally) like this: in issues, we talk about *behavior*, and in PRs, we talk about *code*. As far as behavior goes, I would expect braces for the `SLIST` of any `LITERAL_CASE` to be checked, regardless of where this token appears. If RightCurlyCheck doesn’t check the closing right curly brace of a switch expression, this sounds like a different (but valid) issue.
2024-03-07T16:03:45Z
10.15