NodeJS is being restricted to be installed and we received a web work with a SASS file that I would like to continue working in that way. So I was hoping there could be other way to compile into CSS with all the same functionalities that Gulp has preferably.
Yes, you can compile SASS without NodeJS.
First you have to install Ruby then have you use Sublime.? install SASS builder Plugin
then you can compile SASS to css.! with using cntrl + B for build
Below youtube link will explain clearly https://youtu.be/ZDuQwzPgeMA
Yes, we can compile SCSS/SASS to CSS without using any Node Command.
With just one click you can compile SCSS/CSS to CSS.
Follow these steps in Visual Studio Code Editor
Click on the Extensions button on left side.
Then search "Live Sass Compiler" and install it.
Create a .scss file.
Then Press Watch Sass button at the bottom of the Editor,
This Learnopidia article will explain it in more details:
This is an example using sass.js
everything in a single file.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Embedded SCSS</title>
<style id="style-id" type="text/x-scss">
.year-month-input {
display: flex;
gap: 1rem;
flex-wrap: wrap;
.input-group {
display: flex;
flex-direction: column;
align-items: center;
}
label {
font-size: 0.8rem;
margin-top: 0.2rem;
}
input {
width: 10ch;
text-align: right;
appearance: textfield;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sass.js/0.11.1/sass.sync.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
const styleElement = document.getElementById("style-id");
Sass.compile(styleElement.innerHTML, (result) => {
styleElement.innerHTML = result.text;
styleElement.type = "text/css";
})
});
</script>
</head>
<body>
<table>
<tr>
<th><label for="year">Limit</label></th>
<td class="year-month-input">
<div class="input-group">
<input id="year" type="number" min="0" name="year">
<label for="year">years</label>
</div>
<div class="input-group">
<input id="month" type="number" min="0" name="month">
<label for="month">months</label>
</div>
</td>
</tr>
</table>
</body>
</html>
© 2022 - 2024 — McMap. All rights reserved.