Code Monkey home page Code Monkey logo

tailwind-material-colors's People

Contributors

javierm42 avatar sinskiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tailwind-material-colors's Issues

Allow to darken / lighten result in config

Hiya

First of all thanks for the package.

I wanted to ask if it is already possible or if one could extend the package, so that it allows for a config, where one could fine grain the output by passing in a darkener / lightener to generate the results.

Here's an example of the output I am trying to achieve:

Default
image

Darker
image

I saw that there is a Scheme.dark function which leads to material-color-utilities being called, but that can't be extended. So in my opinion the colors would have to be changed after they are generated.

DarkMode selector doesn't seem to be working

Whatever i try the plugin seems to be only default to @media (prefers-color-scheme: dark)

const config = {
  darkMode: ["selector", "[data-theme=\"dark\"]"],

module.exports = withMaterialColors(
  config,
  {
    primary: "#00491e"
  },
  {
    scheme: "content"
  }
);

Stuck in "dark mode" as that's my local preference, can see in the variable outputs all the dark mode srtuff is being put under
@media (prefers-color-scheme: dark) :root { and not my preferred selector. From what i can see of the source, looks like if it's not "class" it doesn't respect the selector.

Maybe this is using an older version of the tailwind-mode-aware-colors? seems to be pinned to v1 and looks like you've updarted to v2, perhaps fixing this there?

(ps. thanks for the plugin, does look like it's going to be immensely helpful!)

Losing intellisense and removing existing Tailwind colors

Hi Javier,

This is exactly what i was looking for, but I'm having some trouble implementing.
Here's my new tailwind.config.js with the changes applied:

const { withMaterialColors } = require('tailwind-material-colors');

/** @type {import('tailwindcss').Config} */
export default withMaterialColors(
    {
        content: ['./src/**/*.{html,js,svelte,ts}'],
        darkMode: 'class',
        theme: {
            extend: {}
        },
        plugins: []
    },
    {
        // Here, your base colors as HEX values
        // primary is required
        primary: '#ff0000',
        // secondary and/or tertiary are optional, if not set they will be derived from the primary color
        secondary: '#ffff00',
        tertiary: '#0000ff',
        // extra named colors may also be included
        green: '#00ff00',
        blue: '#0000ff'
    }
);

The problem is I'm losing all Intellisense (VScode) support for the theme structure, and postcss complains about dark:bg-gray-500 class does not exist (so I'm thinking it broke everything).

Any ideas?

Typescript

Can it be rewrited to typescript or support types?

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.