Empty values for variables
See original GitHub issueTailwind version: 3.0.15
Hi. I installed a fresh project on Laravel 8 and after configuring it, I noticed that it is full of empty values. Everything else works as expected.
generated CSS:
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
...
My config:
postcss.config.js
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss/nesting'),
require('tailwindcss'),
require('autoprefixer'),
]
}
tailwind.config.js
module.exports = {
content: [
'./storage/framework/views/*.php',
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
],
darkMode: 'media', // or 'media' or 'class'
theme: {
fontFamily: {
sans: ['Verdana', 'Arial', 'Helvetica', 'sans-serif'],
serif: ['serif'],
},
extend: {},
},
variants: {
extend: {},
},
plugins: [],
corePlugins: {
preflight: true,
},
}
webpack.mix.js
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css')
.options({
processCssUrls: false,
});
app.css
@tailwind base;
@tailwind components;
@tailwind utilities;
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to Define Empty Variables and Data Structures in Python
Defining empty variables in Python is straightforward. If you wish to define a placeholder for a missing value that will not be used...
Read more >empty - Manual - PHP
Determine whether a variable is considered to be empty. A variable is considered empty if it does not exist or if its value...
Read more >what is the purpose of setting variables to empty (" ") after ...
It means to initiate all the variables to empty value. So when you try to access those variables you don't get undefined variable...
Read more >The Null Variable - Using IDL - L3HarrisGeospatial.com
The system variable !NULL is a special variable of type Undefined. Unlike a variable that is truly undefined, the value !NULL can be...
Read more >Variables with null value - Nintex help documentation
A variable with null value is empty and has no value. When a connector supports null values, you may need to set the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep, it was
var(--tw-empty,/*!*/ /*!*/);
before because minifiers incorrectly minifiedvar(--tw-empty, )
asvar(--tw-empty,)
(notice the space) which makes it invalid. So we applied this hack to make as many minifiers as possible empty. What you will notice is that there is still a space between the two/*!*/
. The reason we have a!
in there is because normal comments are removed by minifiers.Long story short,
--tw-blur: var(--tw-empty,/*!*/ /*!*/);
is a fancy/over-complex version of--tw-blur: ;
Hey! Thank you for your question! Much appreciated! 🙏
This is by design and not a bug. It is a bug in your IDE for incorrectly thinking that it is a bug.
These empty values are defaults and we use them in different places. If we don’t have them and you use one of those variables then the variable is “undefined” and the css would be broken.
We have some utilities that override these values so that they actually do something. For example try to use “rotate-45” and look at the generated css.
If you build your css then you should see that everything should work as expected.