v3.0.0-rc.5 (2 October 2022) Testing #679
Replies: 38 comments 82 replies
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
'content' attribute issue
I've tried to migrate to the third major versions of I've ran into an issue with
My twin code uses the deprecated syntax, e.g.
But even if I changed the syntax of |
Beta Was this translation helpful? Give feedback.
-
tailwindcss": "^3.1.5",
twin.macro": "^3.0.0-rc.4.2" Past related issues |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi Ben, I've been using twin with styled components for several months and pinning my projects to the latest rc of late. However, I just updated to rc5 (from rc3) and suddenly my styling is broken. I'm using the nested square bracket syntax as documented here e.g.
Up until now this has been working just fine, but with the update to rc5 for some reason everything from the .logo styles onwards is being ignored. I've tried removing line breaks, referencing the elements directly instead of using classnames, and various other things to see if I can spot any obvious cause but to no avail. Has something changed in the way tw style blocks are parsed that is causing this, and is it something that can be addressed in twin itself or will I need to update my syntax? (I have a LOT of components with a lot of styling written in this way!!) EDIT: I just checked and it's broken with rc4 as well, so it must be something that changed between rc3 and rc4. |
Beta Was this translation helpful? Give feedback.
-
BUG:
|
Beta Was this translation helpful? Give feedback.
-
Hi! Thank you for the great job you have done! I'm not sure if it's related to the updated code or it's just me making a wrong thing. import tw from 'twin.macro'
import Buttom from 'ourlibrary'
const ActionButton = tw(Button)`rounded-none bg-white text-black text-opacity-80 !px-4 ` and it's triggered this error: Is there a way to apply |
Beta Was this translation helpful? Give feedback.
-
There is also a problem with the <Button
css={[tw`bg-green-400`, approved(record.status) && tw`bg-opacity-50`]}
//^^^^ - error
title={t('Approve')}
size="s"
>
<CheckOutlined />
</Button> triggers an error:
|
Beta Was this translation helpful? Give feedback.
-
@ben-rogerson Wanted to let you know that Lightyen has officially released v3 of his VS Code plugin, but that he says he is going to stop maintaining it now as he no longer uses twin. lightyen/vscode-tailwindcss-twin#30 (comment) When you set We're now using rc.5 with Emotion and the new short-CSS syntax and it's working perfectly for us -- no issues to report so far! 🎉 |
Beta Was this translation helpful? Give feedback.
-
Awesome work with Tailwind CSS v3! Just found what I think is a bug when using the With the following Tailwind configuration:
If using it correctly (?) (not adding const customStyles = {
body: {
"background-color": theme("colors.black"),
// output: 'background-color': { DEFAULT: '#171717', pure: '#000000' }
// expected: 'background-color': '#171717'
},
};
export const initStyles = () => {
globalCss(globalStyles as any)();
globalCss(customStyles)();
}; Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey Ben, Thank you for your hard work. I am currently trying to move to RC.5 from 2.8, and hit a bit of a blocker on using arbitrary variants to select class names. When trying to style child classes like this, using styled-components: [.re-select__menu-list]:(
flex flex-col gap-2
p-2
) The arbitrary selector translates all This was seemingly working before the upgrade. The workaround is to convert to a standard styled component with .re-select__menu-list {
${tw`flex flex-col gap-2 p-2`}
} Is this change documented anywhere, I was not able to find it. |
Beta Was this translation helpful? Give feedback.
-
I am using stitches and I have a component which conditionally renders something different. I see that the elements get classes, but there is no style tag where the class is resolved... I am using nextjs + stitches + twin.macro@rc5, I tried to replicate it in codesandbox but I am unable too - any idea what could cause this? Do I need to change something in the _document for rc5? |
Beta Was this translation helpful? Give feedback.
-
(note that A minimal example with twin.macro@rc and typescript-eslint doesn't seem to recreate the error though, so I guess it has something else to do with the specific combination I have here (from zaxutic/vite-react-ts-twin-stitches): "dependencies": {
"@stitches/react": "^1.2.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"@vitejs/plugin-react": "^2.2.0",
"autoprefixer": "^10.4.13",
"babel-plugin-macros": "^3.1.0",
"eslint": "^8.26.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.7.1",
"tailwindcss": "^3.2.1",
"twin.macro": "^3.0.0-rc.5",
"typescript": "^4.8.4",
"vite": "^3.2.2",
"vite-tsconfig-paths": "^3.5.2"
} Disabling the typescript-eslint plugin (or going back to |
Beta Was this translation helpful? Give feedback.
-
npm i twin.macro@latest Thank you so so much to everyone who helped out with the bug testing 👋 |
Beta Was this translation helpful? Give feedback.
-
Some of you may want to try https://github.com/eskns/styledwindcss which allows you to use any version of tailwindcss with any version of @emotion/styled. In particular, I have tested it with: It is a simple-minded approach relying only on tagged template literals. |
Beta Was this translation helpful? Give feedback.
-
That is wonderful!
…On Mon, Dec 5, 2022, 1:44 PM Ben Rogerson ***@***.***> wrote:
Unlike their approach (twin.macro), this package allows you to use the
latest version of tailwindcss with the latest version of @emotion/styled
without any waiting time. In fact, you need to install (whatever versions
of) those packages independently in addition to styledwindcss.
Twin does this too now - since v3!
—
Reply to this email directly, view it on GitHub
<#679 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADL6IMH5XGCCUOSXZ7C42OLWLZA3XANCNFSM5U5EH6EA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The release candidate is ready to install - Found a bug/issue? Let us know below!
Try out the latest
rc
:More info in the github release notes
Beta Was this translation helpful? Give feedback.
All reactions