Skip to content

Conversation

@Turito
Copy link
Contributor

@Turito Turito commented Dec 19, 2025

Pull request template

Describe the purpose of the change, the specific changes done in detail, and the issue you have fixed.

Motivation and context

  • Dependencies. If any, specify:
  • Open issue. If applicable, link:

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@Turito Turito marked this pull request as ready for review December 19, 2025 09:36
@Turito Turito requested a review from a team as a code owner December 19, 2025 09:36
<span class="text-accent-50 font-bold">{{ resultsLength }}</span>
<span>of</span>
<span class="x-text-accent-50">{{ totalResults }}</span>
<span class="text-accent-50">{{ totalResults }}</span>
Copy link
Contributor

@victorcg88 victorcg88 Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text-accent is from the x-tailwindcss should keep be with x-, right? same for x-font-bold etc etc

Copy link
Contributor Author

@Turito Turito Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but not. Both classes are generated from x-tailwindcss but they are from tailwind.
font-bold: https://tailwindcss.com/docs/font-weight
text-{color}-{tone}: https://tailwindcss.com/docs/color

Copy link
Contributor

@victorcg88 victorcg88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job Fran!!!

color: shadeColor,
})),
{ prefix: '&-' },
return mapColorsFlat((color, colorName) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return mapColorsFlat((color, colorName) => {
return mapColors((color, colorName) => {

)
}

export function mapColorsFlat<T extends CssStyleOptions>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function mapColorsFlat<T extends CssStyleOptions>(
export function mapColors<T extends CssStyleOptions>(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to know why two different functions mapColors and mapColorsFlat are needed for the migration

Comment on lines +22 to +24
export interface CSSRuleObject {
[selector: string]: CSSRuleValue | string | number | undefined
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export interface CSSRuleObject {
[selector: string]: CSSRuleValue | string | number | undefined
}

This should be in the type.ts right?

@config './tailwind.config.ts';

@plugin "@empathyco/x-tailwindcss/plugin";
@plugin "@empathyco/x-tailwindcss/old-ds-plugin";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should get rid of this:

Suggested change
@plugin "@empathyco/x-tailwindcss/old-ds-plugin";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove this? If something is needed (Variables or whatever), move it where necessary. x-components or x-tailwind-plugin.

@Turito Turito force-pushed the feat/migrate-tailwind branch from 1c5747f to 07a1e4c Compare January 12, 2026 17:19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't change the CHANGELOG to know what we have in the past

"moduleResolution": "node",
"types": ["tailwindcss"],
"paths": {
"tailwindcss/plugin": ["./node_modules/tailwindcss/dist/plugin.d.mts"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we explain this change ?

"@rollup/plugin-commonjs": "29.0.0",
"@tailwindcss/postcss": "4.1.17",
"@tailwindcss/vite": "4.1.17",
"@types/tailwindcss": "^3.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@types/tailwindcss": "^3.1.0",
"@types/tailwindcss": "3.1.0",

vueDocsPlugin,
Inspector(),
tailwindcss({
config: resolve(__dirname, './tailwind.config.ts'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was moved to src/tailwind/tailwind.config.ts right?

@@ -0,0 +1,4 @@
@import 'tailwindcss';
Copy link
Contributor

@victorcg88 victorcg88 Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@import 'tailwindcss';
@import 'tailwindcss' prefix(xds);

This tailwind demo is not only for showcase. It is also a development tool for setups. Usually, a developer runs this project, chooses a styling to apply, and copies the whole bunch of classes. There is a feature to copy styles from the demo.

With this prefix change, this feature becomes useless, as we would need to add the prefix manually again, which will be the case for 99.9999% of the cases.

@config './tailwind.config.ts';

@plugin "@empathyco/x-tailwindcss/plugin";
@plugin "@empathyco/x-tailwindcss/old-ds-plugin";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove this? If something is needed (Variables or whatever), move it where necessary. x-components or x-tailwind-plugin.

...badgeBright(helpers),
},
{
prefix: '.x-badge-',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
prefix: '.x-badge-',
prefix: '.badge-',

Shouldn't be like that?

},
{
prefix: '&-',
prefix: '&.input-',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
prefix: '&.input-',
prefix: '.input-',

Right?

{
...textSizes(helpers),
},
{ prefix: '&.text1-' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct?

{
...textSizes(helpers),
},
{ prefix: '&.text2-' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct?

{ prefix: '&-' },
{ prefix: '.layout-' },
),
...minMargin(helpers),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why minMargin and maxWidth now are out of rename?

)
}

export function mapColorsFlat<T extends CssStyleOptions>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to know why two different functions mapColors and mapColorsFlat are needed for the migration

},
)

const xTailwindPlugin: unknown = _xTailwindPlugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why export something unknown?

"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the export process now have to be done this way?

@@ -0,0 +1,4 @@
@import 'tailwindcss';

@plugin "../../../src/x-tailwind-plugin/plugin";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remains tailwind.config.ts in the demo root with plugins: [xTailwindCss],. Are both needed?

<BaseEventButton
:events="events"
class="x-events-modal-close-button x-button"
class="x-events-modal-close-button xds:button"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using both prefix x and xds is something that drives me crazy 😅
I know the reason behind but I don't like the result mix


<!-- Facets -->
<Facets class="x-gap-24">
<Facets class="gap-24">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be xds: prefixed?

@@ -0,0 +1,4 @@
@import 'tailwindcss';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefix the demo too to make it more realistic since supposedly it will to be the way we will use the XDS in consumers

* @public
* The helpers provided internally by our Tailwind plugin.
* Tailwind CSS 4 no longer exposes `PluginAPI`,
* so we recreate the pieces we need.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment explains very well that we're giving Tailwind 3 a facelift to make it look like Tailwind 4. From my point of view, it's not really a migration.

# Conflicts:
#	packages/x-components/package.json
#	packages/x-tailwindcss/package.json
#	pnpm-lock.yaml
@AdrianArenal AdrianArenal force-pushed the feat/migrate-tailwind branch from 438933c to dd29ddb Compare January 13, 2026 15:39
@AdrianArenal AdrianArenal force-pushed the feat/migrate-tailwind branch from dd29ddb to 4fb3dbe Compare January 13, 2026 15:42
@joseacabaneros joseacabaneros marked this pull request as draft January 14, 2026 13:38
@joseacabaneros joseacabaneros changed the title feat: migrate to tailwind 4 Temporary Tailwind4 migration for MotiveMarket Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants