Tailwindcss JIT mode and alpine.js x-bind:class - tailwind-css

For my project, let's say static html using alpine.js and tailwindcss v3 (JIT mode), I notice that some TW classes set only using AlpineJS x-bind:class directives are not added in the css file generated automatically using the TW watch mode.
Is this a known "issue" or, is it "normal", or did I miss anything in the setup ? I don't use npm, I use the Tailwindcss CLI alone.
Many thanks for any feedback or guidance !

Related

How to use Sass in blazor?

I found MS DOC about Css in razor. But it isn't work with Scss file.
I resolve this problem by creating two files: css and scss. And use sass --watch. But I need write this every time, when creating new component.
Unfortunately SASS is not supported for CSS Isolation feature of Blazor. At least, not at this moment.
In our project, we use CSS Isolation for the CSS component isolation feature, but we use SASS files to manage our theme, for style we want accros the application.
That being said, if you really need some SASS for an unique component, you totally can, by adding for example a wrapper with a specified id, and use this id in your scss file, with a dedicated name for it, for example MyComponent.scss.
In addition, I've found this article, but I preferred to not use it because it is a bit heavy to setup, but up to you: https://joren-thijs.medium.com/how-to-add-scss-support-to-blazor-cd2a62995441
You can use AspNetCore.SassCompiler which supports both normal and isolated scss. I believe it has a watch mode when using Blazor Server, WASM is not supported yet.
It can also do minification with source mapping.

Material-ui - The style in local and production is different

I have had a big problem for some time now.
I'm working on ReactJS with Material-UI, I have a library (which I build with webpack) and then use it on my projects.
The problem is that in local or on StoryBook, the style renders perfectly well. But when the library is built and added to my project via my package.json my style does not apply.
I override the style directly on my css file and I don't go through withStyle/useStyle/makeStyle. I know this is the right way to do it but unfortunately the project was already like that when I got it back
On StoryBook:
And prod:
If anyone has a solution or has seen this somewhere?
Thanks

Customizing Bootstrap 4 css

I am following this link:
Docs
Specifically:
Customize Bootstrap 4 with our built-in custom variables file and easily toggle global CSS preferences with new $enable-* Sass variables. Override a variable’s value and recompile with the included Gruntfile as needed.
I have never used Gruntfile before. Can I use other tools to compile scss into css? Also, what the outcome of such compilation is going to be? A _custom.css that must be placed in the same folder where original bootstrap.css is?
Thanks for help.
While there is not an "official" Bootstrap 4 customizer like there was in 3.x, there are several tools that can do this. These all convert from SASS to CSS, and some provide a UI if you're not familiar with SASS.
Themestr.app Customizer
Bootply Customizer
Also see this answer for details on how to customize with CSS overrides or SASS.
You actually do not need to know too much about Grunt. Bootstrap 4 provides doc on how to setup build tools which can be found at,
https://v4-alpha.getbootstrap.com/getting-started/build-tools/#tooling-setup
Run grunt (or a specific set of Grunt tasks) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
My suggestion is to clone the Bootstrap Beta 4 from Github change the variable and rebuild using the reconfigure gruntfile.
https://github.com/twbs/bootstrap#running-documentation-locally

Remove Bootstrap from Meteor app

I want to remove Bootstrap entirely from my meteor app because I use Thoughtbot's Neat and Bourbon as a responsive css framework. So I made sure I have no Bootstrap packages installed, but when I start the application and check the CSS, I see Bootstrap styles in the CSS file.
So I assume Bootstrap is enabled and loaded by default by Meteor?
Is it possible to remove it?
If you've removed all the bootstrap packages, meaning you can't see any when you do this
meteor list --using
That means you don't have any external bootstrap files included in your project. You can have them however from other sources like your own CSS files or anything you have put in yourself.
Meteor doesn't include bootstrap in projects by default.

CSS in vaadin plugin for grails

I am using the vaadin plugin for grails, and am trying to define some custom styles. Where within my grails appliction should I put the .css? My Vaadin application is in /vaadin/ I have tried creating a /vaadin/themes/mytheme/ folder and then putting my styles.css file in there, but still had no luck. Any help would be greatly appreciated. New to grails and new to vaadin, and am pulling my hair out over small stuff like this and can't get any of the actual legwork done until I can figure these things out..
Any way of doing inline styling would be fine with me too, at this point. I really just need some way to write explicit style..
Thanks
You need to put it into /web-app/VAADIN/themes/mytheme
You can have a look at the completed addressbook tutorial (with added Gorm and Spring Security Core support)
With the latest version of the plugin:
The name of the file must be styles.css (or styles.scss, which will then be compiled to styles.css by the command grails prod war)
The file must be located in /web-app/VAADIN/themes/mytheme , where the last part is the name of your style
In your UI file, use the #Theme annotation, for example
#Theme("mytheme")
#VaadinUI(path = '/')
class MyUI extends UI {
// ...
In VaadinConfig.groovy, specify the styles used by the application:
themes = ['mytheme']

Resources