A plugin for Tailwind CSS v3.2+ that provides utilities for container queries.
by tailwindlabsLast 12 weeks ยท 0 commits
2 of 6 standards met
This PR adds support for on container queries. It does this by introducing new variants... is retained for backwards compatibility and defaults to width ~~ is an alias of ~~ is used to set a container query This is just a proposed approach and I'm totally open to a different one. I have added some tests as well. This is my first PR to Tailwind so let me know if you have any feedback or would like me to change anything. Thanks!
Repository: tailwindlabs/tailwindcss-container-queries. Description: A plugin for Tailwind CSS v3.2+ that provides utilities for container queries. Stars: 1440, Forks: 46. Primary language: TypeScript. Languages: TypeScript (60.1%), JavaScript (39.9%). License: MIT. Latest release: v0.1.1 (2y ago). Open PRs: 0, open issues: 0. Last activity: 1y ago. Community health: 37%. Top contributors: RobinMalfait, adamwathan, basarozcan, reinink, sarimarton, Just-Moh-it, raulrpearson, smebberson, saibotk, ti777777.
TypeScript
What version of @tailwindcss/container-queries are you using? v0.1.1 What version of Node.js are you using? v20.18.1 What browser are you using? N/A What operating system are you using? macOS Reproduction repository N/A Describe your issue Is there a way to name containers from within the config file? The documentation's examples show how it's possible through the markup, but I'm in need of being able to establish it from the config. Otherwise, if the results are nameless container queries produced in the output, then those queries run the risk of running into/responding to container queries established in other code where the project consumes multiple codebases (my use case). By establishing a container name, I can isolate the container that my utilities are targeting. For context, I don't use Tailwind to watch my HTML and then spit out the utilities that are used. Instead, I let Tailwind build out a library of utilities that are consumable by the project's CMS. I'm not exactly looking to be able to name multiple containers, as I only need 1 named container in our project. Although, if it were possible, I'm sure it could absolutely be found useful for use cases like mine but you need to be able to name a few containers. Current config: Current output: Desired config: Desired output: