Giter Club home page Giter Club logo

bones's Introduction

A fragile engine for rendering wireframes and components

This is a very basic rails engine which mounts a couple of routes;

  • /wireframes generates an index of everything in app/views/wireframes
  • /wireframes/xxx will render page app/views/wireframes/xxx.html.erb in the context of app/views/layouts/application.html.erb
  • /compontents will render app/views/components/index.html.erb and is intended to be a very simple styleguide of components in the app.

This is quite old stuff and dates back ot when OO CSS was just getting born and BEM was a twinkle in somebody's eye.

Getting into Object Oriented CSS

http://www.youtube.com/watch?v=ZpFdyfs03Ug http://oocss.org http://smacss.com http://csslint.net http://www.vanseodesign.com/css/object-oriented-css/ http://www.vanseodesign.com/css/smacss-introduction/ http://www.vanseodesign.com/css/block-element-modifier/ http://www.vanseodesign.com/css/scalable-maintainable/

Block - Element - Modifier

http://bem.info/method/definitions/

Base

global resets and normalisation

Grid

.g_gridName

.g_gridName__xxx

.g_gridName__xxx--yy

global layout details

Components

.c_componentName

.c_componentName__xxx

.c_componentName__xxx--yy

defines a general item that can be reused over different pages. e.g a button, display panel etc

Modules

.m_pageName__moduleName

.m_pageName__moduleName--yy

One off designs. Applicable to only this page/partial (eg header / footer )

Text

  • defaults.scss (fixed to element names eg A) set base text style for the site per element

  • sizes.scss .size-## Small number of font sizes to be dropped in to elements

  • styles.scss **.style-**xxxx Any groups of font style (font, colour, weight etc) that are not size

Naming & file name conventions

.a-cccc__xxx--yy

.a(-bbbb)__cccc__xxx--yy

.a

the first letter of the sass group

-bbbb

For modules, the page name.

file: /modules/bbbb.scss

-cccc

the oject name

file: /sass_group/cccc.scss

__xxx

a child of the object. e.g. if the object is 'list' a child could be 'item'.

<div class="c-form" >
	<form action="submit.php" >
		First name: <input type="text" class="c-form__textBox" >
		<input type="submit" style="c-form__button" >
	</form>
</div>

--yy

Modifies the object. so c-button--red would colour the button red. The html would look like:

<button class="c-button c-button--red">

Naming conventions

https://gist.github.com/necolas/1309546

Influences

https://github.com/csswizardry/inuit.css

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.