![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
CSS pre-processor written in Python with limited set of features: nesting, mixins, bundling and nothing more. It's simple and fast.
CSS pre-processor written in Python with limited set of features. It's simple and fast.
The key point is to use as much of native CSS as possible and create as less complexity overhead as possible without compromising productivity.
CSS already supports variables, imports and nesting. What CSS really missing is mixins and bundling - these are provided by LCSS.
LCSS also provides SCSS-like nesting in case if native nesting doesn't meet your needs.
Native CSS variables - https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties .
:root {
--font-mod: 10px;
--font-size-main: calc(var(--font-mod) + 6px); /* 16px */
}
details {
font-size: var(--font-size-main);
}
Native CSS imports - https://developer.mozilla.org/en-US/docs/Web/CSS/@import .
mybtn.lcss:
.mybtn {
cursor: pointer;
}
main.lcss:
@import 'mybtn';
body {
font-size: 16px;
}
CSS supports nesting - https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_selector . However it's not 100% equals to SCSS-like nesting we are used to.
Native nesting example:
.parent {
font-size: 22px;
a {
font-size: 16px;
&:hover {
font-weight: 900;
}
}
}
This code is equals to:
.parent {
font-size: 22px;
}
.parent a {
font-size: 16px;
}
.parent a:hover {
font-weight: 900;
}
Non-native nesting example:
style.lcss:
.parent {
&__inner {
font-size: 22px;
&:hover {
font-weight: 900;
}
}
}
This will be transpiled to:
.parent__inner {
font-size: 22px;
}
.parent__inner:hover {
font-weight: 900;
}
The main difference is that with native nesting you're not able to use &
to concatenate selectors as strings.
You can choose preferred nesting method with NATIVE_NESTING (True/False)
config parameter.
Mixins in LCSS are simple python functions.
mixins.py:
def bg(path):
return f'''\
background-image: url({path});
background-position: center;
background-repeat: no-repeat;
background-size: contain;'''
style.lcss:
.box {
.card {
padding: 10px;
@mixin bg('bg.webp');
}
}
The result will be the following::
.box .card {
padding: 10px;
background-image: url(bg.webp);
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
To make mixins file available, import it in lcss_config.py (see config example below).
LCSS automatically replaces all imports with the content.
pip install lcss
You can use lcss without config file:
lcss style.lcss > style.css
lcss style.lcss mixins_dir > style.css
mixins_dir
- directory containing mixins.py
file.\
To use lcss with config file you should create lcss_config.py
(default one is created automatically by calling lcss
) in current working directory and then call lcss
without arguments.
Example lcss_config.py:
import os
# Mixins in lcss are just a python functions.
# Store mixins in mixins.py file and import it here:
import mixins
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# Specify source and output files.
FILES = [
{
'in': os.path.join(BASE_DIR, 'style.lcss'),
'out': os.path.join(BASE_DIR, 'style.css'),
},
]
# If native nesting is disabled, SCSS-like one will be used instead.
NATIVE_NESTING = False
You can find some examples in tests
directory - https://github.com/SergeiMinaev/lcss/tree/dev/tests:
pip install lcss
git clone git@github.com:SergeiMinaev/lcss.git
cd lcss
lcss tests/nesting_1.lcss
lcss tests/mixins_1.lcss ./tests
FAQs
CSS pre-processor written in Python with limited set of features: nesting, mixins, bundling and nothing more. It's simple and fast.
We found that lcss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.