Questions tagged [sass]

Sass is a CSS preprocessor which enables advanced features not available in normal CSS.

Filter by
Sorted by
Tagged with
12
votes
1answer
279 views

Comments on SASS from CSS for a SASS beginner

I've leaped into SASS and am loving it. I'm asking for comments here on whether my SASS is well-formatted. Here's the original CSS based on Zurb's Foundation Pagination styles, but adapted for use ...
8
votes
1answer
212 views

Improve mixin that outputs page-specific CSS

As part of this answer, I created a mixin to generate some page-specific CSS for me. I need to style an element based on a class I assign to the html-element. I do ...
8
votes
2answers
414 views

Improve page-specific CSS for different color schemes

For a website with four pages (blog, portfolio, profil and impressum) I have four different color schemes (for links, headings, code, etc.). This results in bloated CSS which I want to reduce. Here ...
8
votes
1answer
684 views

Google material ripple button effect

I have "translated" this example built with jQuery in vanilla JavaScript, but I'd like to know if there are better ways to do it. The jQuery version uses offset() ...
8
votes
1answer
401 views

Lightweight Angular tooltip component

I made a small Popup component to show different error/success...etc. messages. Template: ...
7
votes
1answer
865 views

Photo gallery layout

I'm working on a photo website, the markup looks like this: ...
6
votes
3answers
249 views

Toggle menu under specified screen width

I've created a simple toggle menu in jQuery, which is capable of specifying a breakpoint, but I'm afraid my code is too complicated. How can I make it simpler? I also have a question about ...
6
votes
1answer
75 views

Member list reveals member information on click (#2)

Not a follow-up, but related to Member list reveals member information on click (#1). I now want my CSS reviewed. What I'm doing? The content in a list of members is revealed by jQuery (see review #...
6
votes
1answer
810 views

Grid column size calculation

I have a one function to calculate all the possible widths plus the margins for the gutters. In this same function, the grid ...
5
votes
2answers
670 views

Good practice using SCSS [closed]

I saw a sassy CSS for a rails app like this: ...
5
votes
1answer
476 views

Adding flair to PHP page with Sassy (SCSS)

This is what I've done so far: ...
5
votes
2answers
163 views

Start of a responsive website for a legal firm

Please have a look at the HTML/CSS/JS (there is very little JS at the moment) and give me some feedback as to how my code looks to you, what level of skills it looks like I have and how I can improve. ...
5
votes
1answer
636 views

Sass code for displaying two simple search forms

Sass code for creating a basic search box. Resulting CSS used for two that are different widths. The goals is to define sass that generates CSS that is easily re-usable as well as concise and ...
5
votes
1answer
124 views

SASS grid system improvements

I've got this own made grid system made in SASS: ...
4
votes
3answers
1k views

Mixin, @extend or (silent) class?

I am struggling with the basic concepts of SASS. I have a page that has multiple section, all of them are sharing properties like width, ...
4
votes
1answer
77 views

Innefficient scss selectors being generated

Im using Foundation by Zurb as a front-end framework. Below is the SCSS used to generate the basic layout of the homepage using the Semantic Grid Mixins Foundation supplies (http://foundation.zurb.com/...
4
votes
1answer
332 views

SASS based semantic fluid grid

I am looking for opinions on this code. I have been experimenting with SASS the last few days and have come up with the following code. The idea was to enable the creation of a fluid grid without ...
4
votes
1answer
137 views

Render SVG background with Gradient

I'm new to and still fairly confounded by SVGs. I'm feeling pretty happy with the following hobbled together SCSS code demonstrated here: ...
4
votes
0answers
291 views

SaSSified version of Skeleton CSS

Recently I have been developing a SASSified version of Dave Gamache's Skeleton CSS front-end framework. I have publicly posted the code on github as well as a live demo. What I am looking for is ...
3
votes
2answers
5k views

Tooltip-overlay following the mouse pointer

The purpose is to attach a tooltip-element to arbitrary HTML-elements. The tooltip appears when the user hovers an element. Follows the mouse-pointer while moving over the element. ...
3
votes
3answers
2k views

Animated SVG pie chart with custom properties

I've made a small js/css/html module which purpose is to fill a pie chart up to a given percentage. Basically it could be used for instance as a filling pie chart that keep tracks of the amount of ...
3
votes
1answer
168 views

SASS Code Structure / Readability

I'm trying out a new approach to SASS stylesheets, which I'm hoping will make them more organizined, maintainable, and readable. I often feel like there is a thin line between code that is well ...
3
votes
1answer
123 views

SASS 960 fluid grid

I'm currently converting a CSS 960 fluid grid to SASS. How can I improve my current implementation? My column classes .two.columns are getting a bit unruly. Is ...
3
votes
1answer
868 views

Simple modals in vanilla JS

Recently I was looking for some really simple modal/popup solution in vanilla JS, but nothing popped. So I wrote mine component. It works great so far, have all the options I need, but I don't know if ...
3
votes
1answer
532 views

More elegant Sass @mixin to create pseudo-element shapes

I picked up Sass last week, and I'm already diving into expressions. I have a @mixin that creates a CSS border triangle using the following call: ...
3
votes
1answer
516 views

Susy basic fixed grid

I'm new to Susy and I'm loving it. I've been learning and trying a simple example - a simple grid that contains two columns at a fixed resolution of 320 pixels. One test would be to have two side by ...
3
votes
1answer
36 views

Sass styling with React components

I have put together a piece of what can be a much larger frontend in Reactjs. I just put together the component that renders to the user a list of airports and hotels as well as a header component. ...
3
votes
0answers
47 views

SASS script to generate Pygments / Rogue stylesheet output

I've written some SASS code to generate a Pygments syntax highlighter style sheet (which are, by extension, compatible with Rouge). Such a stylesheet is normally generated by the ...
3
votes
0answers
121 views

CSS animation of ravens flying in a circle

I just made a little experiment on codepen with this animation. But I get some performance issues: sometimes it's not as smooth as it should be. Does someone know some practice I could use to ...
3
votes
0answers
46 views

Polyfill for a legacy system: Attach “labels” to their corresponding checkboxes

I had to do some maintenance programming on a legacy software recently. Most of the system's logic is done with Java and PL SQL. The Java creates some special kind of XML. These XML is then ...
3
votes
0answers
405 views

Gulp file for Jade, SASS, Optimize-html, jekyll and more

I have the following gulpfile which I use for development. It used to be a simple gulpfile with just jade compiling, sass, jekyll-rebuild, etc. but then I decided to add HTML Optimization my gulpfile ...
3
votes
0answers
38 views

A 'top 100' app that displays list of users ordered in two different ways

I built a small app that gets data from a remote json file and displays it in a list of users. In each list item, an image of the user, their name, and their points tallies are shown. The list is ...
2
votes
1answer
65 views

Checking screen sizes for responsive site

I wrote this piece of code to make any breakpoint to the users choice: ...
2
votes
1answer
462 views

Simple recipes web app with Redux

I have completed a coding challenge from Free Code Camp. The challenge's user stories are as follows: I can create recipes that have names and ingredients. I can see an index view where the ...
2
votes
1answer
74 views

First website written with SASS/SCSS

I figured this morning that I wanted to learn how to use SASS, so I decided to rewrite an existing project's CSS using SASS. The project itself isn't complete so this is just a rough draft of the ...
2
votes
1answer
36 views

Different color classes that control the same stuff

I have this code... ...
2
votes
2answers
115 views

Quickly fixing unmaintainable SCSS code in Rails

I've been working on a website and Rails and am fairly proud of my HTML semantics. However, my CSS code has become enormous in size, which is largely unnecessary for such a small website. How could I ...
2
votes
1answer
69 views

React board game app

I was told to code a board game app using React for a job interview. They told me they chose other candidates to move forward with, so I was wondering on what I could improve. The full code can be ...
2
votes
1answer
38 views

Rendering three vertical dots using SCSS

I have a pretty simple question but I can't seem to find a solution for it. I have the following SCSS code (can be found below) which works fine, but I think it could be simplified to get rid of the ...
2
votes
2answers
306 views

SASS mixin for a font-awesome before/after usage

In my SASS I use font-awesome declarations all over the place. I'm in love with it. I've created a SASS mixin for the usage: I started with the following: ...
2
votes
1answer
221 views

SASS/SCSS mixin for button states

I have created several mixins for a button to attempt to reduce duplication and contribute to the overall improvement of performance. I am looking for guidance on how to tighten this up so it is as ...
2
votes
1answer
9k views

React beginner exercise: Build a base arithmetic calculator

Exercise assignment: Build a calculator with React which can add, subtract, multiply and divide. See image below for reference Give it whatever design and colors you want Each text ...
2
votes
0answers
156 views

Compiles SCSS Code to CSS in the browser

First of all, thanks for reviewing my code. I am half-way done through a GitHub Project I call ScriptSass, that parses SCSS Code using Javascript into regular CSS. Now, I have reluctantly added an ...
2
votes
0answers
50 views

jQuery Mobile Menu plugin

I would like some opinions on this Mobile Menu plugin I wrote for work. We develop custom WordPress themes, nothing too advanced or anything. I would like if anyone could just take a look and provide ...
2
votes
0answers
38 views

Styling different icon positions in boxes with Sass

I've been learning Sass recently and I've made a small project to master key concepts. I've tried to use placeholder to make different styles of boxes. I have a few questions: is the project ...
2
votes
0answers
133 views

Animation with JavaScript and Sass : Neon light banner

After reading a bit about CSS3-text-shadows and seeing a few advanced examples I had the idea for a "neon light"-banner. Next idea was to animate it. Finally it has become a mixture between a Sass-...
2
votes
1answer
37 views

SASS mixin to define modifier classes for various screen sizes

I wish to make a mixin to produce the following result of modifier classes: ...
2
votes
0answers
130 views

Modification of the headline line-height in the Compass vertical rhythm module

One thing nagged me about the compass vertical rhythm module; in the case the headline is too long and it occupies more than one line the line-height between the two lines looks way too massive and ...