Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Fix tailwind parser to capture more css files and optimize package.json #9241

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

DanielBelmes
Copy link
Contributor

@DanielBelmes DanielBelmes commented Nov 9, 2023

Summary

Found a way to easily use the postcss generated <style> tags within shadow doms. However, we need to configure tailwind in order to see the classes used so it can generate them

Bonus: Fixed some bad npm package installs

References

#8135

How to use after merge

// @ts-ignore
import base from '@etherealengine/client/src/themes/base.css?inline'
// @ts-ignore
import components from '@etherealengine/client/src/themes/components.css?inline'
// @ts-ignore
import utilities from '@etherealengine/client/src/themes/utilities.css?inline'
import React from 'react'

const GalleryUI: React.FC = () => {
  return (
    <>
      <style type="text/css">{base.toString()}</style>
      <style type="text/css">{components.toString()}</style>
      <style type="text/css">{utilities.toString()}</style>
      <div className="flex w-56 h-56 text-9xl text-white">Hello World</div>
    </>
  )
}
export default GalleryUI```

@DanielBelmes DanielBelmes linked an issue Nov 9, 2023 that may be closed by this pull request
@speigg speigg added this pull request to the merge queue Nov 10, 2023
Merged via the queue into dev with commit 5382f8f Nov 10, 2023
13 checks passed
@speigg speigg deleted the 8135-story-tailwind-works-in-xrui-shadow-dom branch November 10, 2023 17:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Story] Tailwind works in XRUI Shadow DOM
2 participants