Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSScaffold - A CSS Framework

Featured Replies

Hi guys, CSScaffold is a CSS framework by a developer named Anthony Short (http://anthonyshort.com.au/scaffold/'>http://anthonyshort.com.au/scaffold/).

 

I've been using it for a couple weeks and now and I must say I am completely hooked. It really increases your CSS productivity by allowing for things such as mixins (functions for CSS), nested CSS, constants and much more. You can even perform iterations and calculations!

 

An example of nested css would be as follows:

 

		
div#about_us_wrap
{
margin-top: 20px;
border-top: 1px solid #bdbdbd;

div#about_us_text
{
	float: left;
	width: 500px;
	padding: 12px;
	background: #f1f1f1;

	p
	{
		font-size: 11px;
		line-height: 15px;
		color: #2b2b2b;
	}

	p.header
	{
		font-size: 16px;
		margin: 20px 0;
	}
}
}

 

It's just so logical looking and it's fantastic.

 

The mixins are equally impressive - here's one I use alot for setting opacity across all the browsers:

 

The function - placed inside the CSS file anywhere. So opac is the name of the function (don't call it opacity else it won't work, must be a conflict with the css property and !opacity is the variable we pass into it.

 

=opac(!opacity)
{
opacity: .!opacity; 
filter: alpha(opacity=!opacity); 
-ms-filter: "alpha(opacity=!opacity)";
-khtml-opacity: .!opacity; 
-moz-opacity: .!opacity; 
}

 

Usage -

 

h1.tour_title
{
+opac(84);			
}

 

So now, instead of having to write 5 different lines for crossbrowser opacity, I simply call the opac function and pass in the desired opacity... and that's only one use, the possibilities are endless!

 

There are even built in mixins such as clearfixing etc.

 

Another useful feature is the include statement... so I only have one stylesheet referenced in my HTML, and in that style sheet, I have this:

 

@include 'reset.css';
@include 'typography.css';

 

It's extremely simple to install... and get this, upon compiling your CSS, it even compresses it for you, making your CSS files more lightweight.

 

These are just a couple examples from a project I'm working on now, but you can see by them the time it can potentially save.

 

The full documentation is here - http://anthonyshort.com.au/scaffold/

GitHub - http://github.com/anthonyshort/csscaffold

 

Some videos-

 

Hopefully you guys find this useful :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.