Comments (4)
I'm a fan of this repo, so I made a fork that has support for TW2.0 dark mode. The way it is put together isn't very friendly to someone who might want to use this in real life, maybe? The tailblocks.css in /public is the one you want to use, it's only 25k pre-gzipped.
I wrote a buuuunch of scripts that will merge the current light & dark .js files into one merged .js file. I also added support for theme through css variables. Take a look:
https://github.com/kenotron/tailblocks
If there's interest from @mertJF, I can make a PR, but the change is extensive:
- added acorn / acorn-walk & family to get dark-mode class names merging working
- replaced
${props.theme}
with a CSS variable based one - added a tailwind.css.js, postcss, cssnano + a
yarn css
script that will generate a custom css that includes dark mode + css vars - run
yarn css
to regenerate the tailblocks.css
from tailblocks.
This is an example: https://github.com/kenotron/tailblocks/blob/3370b6b3f3ed248139bd94557e068c52f9c61c05/src/blocks/contact/merged/a.js#L39
You can see how I have dark:
prefix, replacement of ${props.theme}
into class names like dark:focus:ring-theme-900
. I changed a bit of logic in App.js to make it so that the theme and dark mode switches mostly affect classes in the frame
from tailblocks.
Okay created #64 to illustrate what I mean via PR view for easy peeking. It's Draft because I made so many changed without discussing with @mertJF ahead of time
from tailblocks.
I've no plan to support a dark mode feature with adding a lot of classes. The tailblocks work with TailwindCSS defaults so if I add the feature some potential users couldn't use the blocks. On the other hand, I want to thank you for your effort.
from tailblocks.
Related Issues (20)
- Request: File Upload Template/Layout
- Ugly mobile Google Ads HOT 1
- Request : Add some form Components HOT 5
- upgrade and update this package HOT 1
- layout pages HOT 1
- Deployed link not working HOT 1
- Landing page not scrollable due to Ads HOT 1
- Request: Dark mode
- CSS is quite heavy HOT 1
- AKDSÖC
- CMS Suggestions HOT 3
- The function of the textarea tag is in APP JS。
- Add messge list block and post list block HOT 1
- CSS Doesn't function HOT 3
- Is this project still maintained?
- Background of color palette remains same
- Adding tooltip when user hover any color on color palette
- Representation of Stickers is Missing in the icons of Hero D, Hero E & Hero F Template
- Blockquote is not present in Testimonial-C template
- Footer is not stuck to the bottom HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailblocks.