Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8402091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:57:38+00:00 2026-06-09T21:57:38+00:00

I’m finally delving in to CSS Preprocessing, and trying to figure out the best

  • 0

I’m finally delving in to CSS Preprocessing, and trying to figure out the best route to go. My primary questions are:

  1. What is the value of using SASS or LESS over Php?
  2. If I were to use SASS or LESS, what’s the best way to integrate values from the database?

Obviously using php to print styles in the header is a pretty bad idea. I was using php to create a stylesheet, and importing it as ‘Content-Type: text/css’. It would then create the stylesheet that would be served as such and cached properly. I could use values from the database and work with the language I’m already adept with.

What advantages do SASS and LESS have over Php for creating/working with the stylesheets, and if I were using them, what is the best way to use values from the database? Would I need to use Php to grab the values from the database, basically continuing my methods above, only for that use, then using SASS, LESS, or another to work with the rest of the stylesheet?

Thank you very, very much for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:57:39+00:00Added an answer on June 9, 2026 at 9:57 pm

    CSS preprocessors like SASS and LESS give you much more than just serving a PHP (or any other server side language) file with dynamic code, served with a content-type:text/css

    They give you:

    • Mixins – Classes for classes.
    • Parametric mixins – Classes to which you can pass parameters, like functions.
    • Nested Rules – Classes within classes, which cut down on repetitive code.
    • Operations – Math within CSS.
    • Color functions – Edit your colors.
    • Namespaces – Groups of styles that can be called by references.
    • Scope – Make local changes to styles.
    • JavaScript evaluation – JavaScript expressions evaluated in CSS.

    To do all that in PHP by yourself would be a fair effort!

    Regarding getting data from a database and using it in your SASS / LESS, it’s not something that preprocessors would allow you to do out of the box. You could write your own PHP code that would read from a database, collect the information and values you need, and then write a SASS or LESS file to the filesystem using these values. You could just write a normal CSS file too if you don’t need the features above that preprocessors give you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.