I suggest you ...

SASS and {LESS}

It would be a great feature to implement SASS and {LESS} stylesheets so we could have more flexibility to change themes on the fly and use math to calculate different versions of a colors.

118 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • sso
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Eric NewburyEric Newbury shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    13 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • sso
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Chad PierceChad Pierce commented  ·   ·  Flag as inappropriate

        No. What I mean is that you can use includes in hunk CSS and JavaScript files. They will then compile to one file. Only local files will work. Example: {% include "hubspot/styles/patches/recommended.css" %}

      • Elmo AllénElmo Allén commented  ·   ·  Flag as inappropriate

        Yeah, you could always use CSS @import, but it would create a separate http request for each file. Better to compile to a single CSS file.

      • Elmo AllénElmo Allén commented  ·   ·  Flag as inappropriate

        And I would go with SCSS and perhaps even leave Sass out completely. It's probably much easier to implement that all the current CSS would be immediately SCSS compatible. You could just click that now this CSS file would be SCSS, and then start editing it using SCSS.

      • Elmo AllénElmo Allén commented  ·   ·  Flag as inappropriate

        HubL can do calculations, but writing nested CSS would be great. Even greated if the UI had some tree navigation with it, or at least with the top-level declarations. Navigating in thousands of lines of CSS just with some intermediate comments is pain-in-the-rear. Alternatively, with SCSS it would be easy to implement a tree-like structure using multiple source files, compiling to just one. Each CSS file could be a "project" on its own, consisting of multiple SCSS files, each consisting distinct sections of the code.

      • Jonathan RawlinsJonathan Rawlins commented  ·   ·  Flag as inappropriate

        Not that I have used it much, but I think you can use HubL code within CSS in HubSpot which does some of the same things.

      • jphoganjphogan commented  ·   ·  Flag as inappropriate

        I can't believe this is the only request for this one here. There should definitely be a preprocessor option built-in. Currently, I'm writing my SASS locally, then pasting the CSS into the Hubspot stylesheet, but that makes it exceedingly difficult to keep in sync.

      Feedback and Knowledge Base