-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add @tailwindcss/browser package
#15558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
780f140
Add `@tailwindcss/cdn` package
thecrypticace 6882955
Run CDN tests after UI tests
thecrypticace 8cebf4f
Update lockfile
thecrypticace c8ff6ee
Rename to `@tailwindcss/browser`
thecrypticace ca586f0
Update packages/@tailwindcss-browser/src/index.ts
thecrypticace 3707505
Hoist `loadStylesheet` and `loadModule`
thecrypticace 8fd7748
`pnpm run format`
RobinMalfait fdd0ed0
Update changelog
thecrypticace afd8921
Update CHANGELOG.md
thecrypticace 1ed8af6
Update CHANGELOG.md
thecrypticace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <p align="center"> | ||
| <a href="https://tailwindcss.com" target="_blank"> | ||
| <picture> | ||
| <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg"> | ||
| <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg"> | ||
| <img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-width: 100%;"> | ||
| </picture> | ||
| </a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| A utility-first CSS framework for rapidly building custom user interfaces. | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=next" alt="Build Status"></a> | ||
| <a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a> | ||
| <a href="https://github.com/tailwindcss/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a> | ||
| <a href="https://github.com/tailwindcss/tailwindcss/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a> | ||
| </p> | ||
|
|
||
| --- | ||
|
|
||
| ## Documentation | ||
|
|
||
| For full documentation, visit [tailwindcss.com](https://tailwindcss.com). | ||
|
|
||
| ## Community | ||
|
|
||
| For help, discussion about best practices, or any other conversation that would benefit from being searchable: | ||
|
|
||
| [Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) | ||
|
|
||
| For chatting with others using the framework: | ||
|
|
||
| [Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) | ||
|
|
||
| ## Contributing | ||
|
|
||
| If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "name": "@tailwindcss/browser", | ||
| "version": "4.0.0-beta.8", | ||
| "description": "A utility-first CSS framework for rapidly building custom user interfaces.", | ||
| "license": "MIT", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/tailwindlabs/tailwindcss.git", | ||
| "directory": "packages/@tailwindcss-browser" | ||
| }, | ||
| "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", | ||
| "homepage": "https://tailwindcss.com", | ||
| "scripts": { | ||
| "lint": "tsc --noEmit", | ||
| "build": "tsup-node", | ||
| "dev": "pnpm run build -- --watch", | ||
| "test:ui": "playwright test" | ||
| }, | ||
| "exports": { | ||
| ".": "./dist/index.mjs", | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "publishConfig": { | ||
| "provenance": true, | ||
| "access": "public" | ||
| }, | ||
| "devDependencies": { | ||
| "h3": "^1.13.0", | ||
| "listhen": "^1.9.0", | ||
| "tailwindcss": "workspace:*" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import { defineConfig, devices } from '@playwright/test' | ||
|
|
||
| /** | ||
| * See https://playwright.dev/docs/test-configuration. | ||
| */ | ||
| export default defineConfig({ | ||
| testDir: './tests', | ||
| /* Run tests in files in parallel */ | ||
| fullyParallel: true, | ||
| /* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
| forbidOnly: !!process.env.CI, | ||
| /* Retry on CI only */ | ||
| retries: process.env.CI ? 2 : 0, | ||
| /* Opt out of parallel tests on CI. */ | ||
| workers: process.env.CI ? 1 : undefined, | ||
| /* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
| reporter: 'html', | ||
| /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
| use: { | ||
| /* Base URL to use in actions like `await page.goto('/')`. */ | ||
| // baseURL: 'http://127.0.0.1:3000', | ||
|
|
||
| /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
| trace: 'on-first-retry', | ||
| }, | ||
|
|
||
| /* Configure projects for major browsers */ | ||
| projects: [ | ||
| { | ||
| name: 'chromium', | ||
| use: { ...devices['Desktop Chrome'] }, | ||
| }, | ||
| { | ||
| name: 'webkit', | ||
| use: { ...devices['Desktop Safari'] }, | ||
| }, | ||
| { | ||
| name: 'firefox', | ||
| use: { | ||
| ...devices['Desktop Firefox'], | ||
| // https://playwright.dev/docs/test-use-options#more-browser-and-context-options | ||
| launchOptions: { | ||
| // https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-firefox-user-prefs | ||
| firefoxUserPrefs: { | ||
| // By default, headless Firefox runs as though no pointers | ||
| // capabilities are available. | ||
| // https://github.com/microsoft/playwright/issues/7769#issuecomment-966098074 | ||
| // | ||
| // This impacts our `hover` variant implementation which uses an | ||
| // '(hover: hover)' media query to determine if hover is available. | ||
| // | ||
| // Available values for pointer capabilities: | ||
| // NO_POINTER = 0x00; | ||
| // COARSE_POINTER = 0x01; | ||
| // FINE_POINTER = 0x02; | ||
| // HOVER_CAPABLE_POINTER = 0x04; | ||
| // | ||
| // Setting to 0x02 | 0x04 says the system supports a mouse | ||
| 'ui.primaryPointerCapabilities': 0x02 | 0x04, | ||
| 'ui.allPointerCapabilities': 0x02 | 0x04, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import index from 'tailwindcss/index.css' | ||
| import preflight from 'tailwindcss/preflight.css' | ||
| import theme from 'tailwindcss/theme.css' | ||
| import utilities from 'tailwindcss/utilities.css' | ||
|
|
||
| export const css = { | ||
| index, | ||
| preflight, | ||
| theme, | ||
| utilities, | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can/should we merge these? I think we can use
--filtertwice 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do that it does some super super weird stuff to the console output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried it, that is … interesting 😂