Git Product home page Git Product logo

Comments (3)

endigo9740 avatar endigo9740 commented on May 18, 2024

This is now ready to test on branch feat/theme-css. Use the GitHub CLI to pull and test via:

gh pr checkout 137

This does the following:

  • Moves /src/themes -> /lib/styles/themes
  • Divides our global CSS into smaller "stylesheet add-ons" in /lib/styles/{core|typography|forms}.css
  • Updated all documentation pages relevant to this change.
  • Declutters the Styles guide a bit, now "Presets" and the "Theme Generator" are folded under a radio group

NOTE: all instructions are specific to the selected framework.

If you would like to test these instructions in a new Skeleton project, you'll need to create a local package to install. To do this, follow the instructions below:

  1. Pull down the branch and run the following in the root npm run package
  2. Move into the package directory via cd package
  3. Create a local tarball (like a zip) via: npm pack
  4. Cut and paste the .tgz file into the root of your new Skeleton project
  5. Finally run npm install {tarballFile}.tgz to install locally
  6. Follow all instructions in the documentation provided.

Screen Shot 2022-08-20 at 4 42 33 PM

Screen Shot 2022-08-20 at 4 46 01 PM

from skeleton.

endigo9740 avatar endigo9740 commented on May 18, 2024

After thinking about it, the way we import the stylesheet add-ons may need to change slightly. The concept is right, but order of imports is wrong. Should be:

- @tailwind directives
- (these add-ons)
- Any custom global styles or overrides

The reason for this is the add-ons need to come -after- the directives, or they will not work as expected. They must also come before the custom styles otherwise you cannot override them (ex: override the default form background color)

Will need to move the import from the layout file to the global stylesheet itself.

This should not interfere with general testing, just note this gotcha if you're writing your own styles.

from skeleton.

endigo9740 avatar endigo9740 commented on May 18, 2024

I've pushed a change that resolves this. It seems Vite doesn't allow you to handle imports from node_modules within your global stylesheets. So instead I've implemented an additional import that handles the @tailwind directives. The preferred order of import from top to bottom is:

tailwind.css
core.css
typography.css
forms.css -> only if you use the TW forms plugin
(global stylesheet here)

Here's how that's presented:

Screen Shot 2022-08-21 at 1 53 26 PM

from skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.