Category: html

  • Use Variable for Import Parameter in less

    If you need to parameterize urls that will be used in the @import directive and imported into your .css files use the following. @googlefonturl: “//fonts.googleapis.com/css?family=Roboto”; @import (css) url(“@{googlefonturl}”); Which will generate the following at the top of your css output @import url(“//fonts.googleapis.com/css?family=Roboto”); The double quotes aren’t necessary but less adds them. If you wanted to […]

  • Pass Multiple Variables to lessc Command Line Arguments

    In order to pass more than one argument to the lessc compiler you need to use the option argument for each variable, for example lessc –modify-var=”bgColor=purple” –modify-var=”bodyColor=aqua” custom.less test.css Notice the “–modify-var” option being passed twice, this is because there is no separator https://github.com/less/less.js/issues/731#issuecomment-28477515  

  • jQuery .On Pass Sender Information to Handler Function

    I needed to display a modal box that would pass information back to the link (sender) that was clicked. In my experience this has been handled in the past by either: 1) Creating an individual modal box for each element that would need to one, and display it when the link is clicked 2) Using […]

  • Simple jQuery Color Selector

    I needed a lightweight color picker that was reusable, lightweight, dead simple to implement, and could be attached to any html element. Here’s what I came up with: DEMO