Is there a way to compile SASS to CSS without NodeJS? [closed]
Asked Answered
F

3

0

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.

Foretell answered 10/7, 2019 at 17:45 Comment(1)
if you are trying to converting manually, sassmeister.com would be helpfulLoren
F
1

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

Feat answered 10/7, 2019 at 17:54 Comment(3)
I am going to check this. Meanwhile, can Ruby be a replacement of Node also for compiling JS, like using Babel, minify, etc?Foretell
Could you please modify your answer and provide more information on how to use Ruby to compile into CSS?Foretell
I modified my answer. U can check it,!Feat
P
0

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

  1. Click on the Extensions button on left side.

  2. Then search "Live Sass Compiler" and install it.

  3. Create a .scss file.

  4. Then Press Watch Sass button at the bottom of the Editor,

This Learnopidia article will explain it in more details:

Piscator answered 3/6, 2020 at 7:15 Comment(0)
C
0

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>
Cosmetic answered 18/7 at 11:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.