Git Product home page Git Product logo

canonical / vanilla-framework Goto Github PK

View Code? Open in Web Editor NEW
781.0 40.0 160.0 11.22 MB

From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.

Home Page: https://vanillaframework.io

License: GNU Lesser General Public License v3.0

JavaScript 6.00% Shell 1.58% Dockerfile 0.12% Python 0.60% HTML 58.03% SCSS 32.03% CSS 1.65%
sass css-framework css html vanilla-framework npm-package npm package web-and-design hack

vanilla-framework's Introduction

vanilla Vanilla Framework

CircleCI build status npm version Downloads devDependency Status Chat in #vanilla-framework on Freenode This project is using Percy.io for visual regression testing.

Vanilla Framework is an extensible CSS framework, built using Sass and is designed to be used either directly or by using themes to extend or supplement its patterns.

Documentation | Join the mailing list

Table of contents

Using Vanilla

Hotlinking

You can link to the latest build to add directly into your markup like so, by replacing the x values with the version number you wish to link.

<link rel="stylesheet" href="https://assets.ubuntu.com/v1/vanilla-framework-version-x.x.x.min.css" />

Including Vanilla in your project via NPM or yarn

To get set up with Sass, add the sass and vanilla-framework packages to your project dependencies:

yarn add sass vanilla-framework

In the script that builds the CSS in your package.json, you should include the path to node_modules when looking for @imports. In this example, we have called the build script "build-css":

"build-css": "sass -w --load-path=node_modules src:dist --style=compressed"

Make a folder src/, create a file inside called style.scss and import Vanilla:

// Import the theme
@import 'vanilla-framework';
@include vanilla;

// Optionally override some settings
$color-brand: #ffffff;

// Add theme if applicable

If you don't want the whole framework, you can just @include specific parts - e.g. @include vf-b-forms.

Now run yarn build-css, which will convert any Sass files in the src/ folder to CSS in the dist/ folder.

To watch for changes in your Sass files, add the following script to your package.json

"watch-css":  "yarn build-css && sass --load-path=node_modules -w src:dist --style=compressed"

Developing Vanilla

If you're looking to contribute to the Vanilla project itself, start here.

Community

Keep up to date with all new developments and upcoming changes with Vanilla.

Code licensed LGPLv3 by Canonical Ltd

With ♥ from Canonical

vanilla-framework's People

Contributors

0atman avatar abhigyanghosh30 avatar andesol avatar anthonydillon avatar barrymcgee avatar bartaz avatar bethcollins92 avatar britneywwc avatar caleb-ellis avatar chillkang avatar clementchaumel avatar codeempress1 avatar deadlight avatar dependabot[bot] avatar grahambancroft avatar ilayda21 avatar jkfran avatar lyubomir-popov avatar mtruj013 avatar nottrobin avatar petermakowski avatar petesfrench avatar pmahnke avatar renovate-bot avatar renovate[bot] avatar richmccartney avatar sowasred2012 avatar steverydz avatar willmoggridge avatar yaili avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vanilla-framework's Issues

Resource box category tag

The resource box's content-cat has padding-left: 20px and straight after is overridden with padding: 0. This padding: 0 needs to be removed.

font-size in px's should be em

Some elements have px font-size's applied. Forexample:

p, li, code, pre {
font-size: 16px
...
}

These should use em's and only the body should have a px value.

Remove navigation bevel

Remove the bevel colour styles for the header navigation and look more to a Cloud style for inspiration.

Video container doesn't exist

When building a new page for maas.u.com I noticed we don't have the video container CSS. We should have this as a part of vanilla.

Uses relative urls for assets/images

Relative urls for assets might be a problem if users are self hosting, so you'd either need to move those assets into this project or use absolute urls to a cdn?

Equal heights issue on Safari

Looking at the equal heights block I get this issue of it not working. I have uploaded a screenshot as reference. Safari version 8.0.6.

equal-heights

global setting var for font-family

It is likely an external site would like to change the font family from Ubuntu. Be creating an override-able setting this will to easier to do.

Style input type search

The form <input type="search"> does not fall in line with the vanilla styles of inputs. We should apply them and also make sure that areas where there are more custom styles for this element do not get effected.

screen shot 2015-04-28 at 10 39 43

Table styling

There are some rules for table styling in the Google doc:

  • Table header
    • h4. 1.250 / 1.3
  • Row titles
    • p. 1.000 / 1.5
    • Colour #888888
  • Title hr
    • 1px solid hr
    • Colour #cdcdcd
  • row hr
    • 1px dotted hr
    • Colour #cdcdcd
  • row hover
    • Colour #F7F7F7

Images overlap columns

So currently if you were to place an image with a greater width inside of a column it will overlap like so, this doesn't look great and we should incorporate what we had from ubuntu guidelines into vanilla.

screen shot 2015-04-15 at 17 09 48

Input fields with error, success and info status

An status event on a field gets a outline with the same colour as the label. so… 

  • Status success (green): #38b44a
  • Status warning (yellow): #eca918
  • Status error (red): #df382c
  • Status information (blue): #19b6ee

No install instructions

It'll be helpful to anyone who needs to install ruby/sass/etc to fix a bug or build/rebuild as part of a deploy process if there are detailed install instructions in either README or INSTALL

Dropdown button styling

Can we make the padding etc the same as on Maas (@richmccartney) and use the chevron?

Understand that when you click the drop-down the styling will be dictated by the browser / OS

Probably unwanted behavior of the search box

While using Web Style Guide for the Ubuntu-it website, I noticed that on Chromium a strange "x" appears on the search input when a value is provided.

After some investingations, I found that Chrome/Chromium and probably IE (I don't want to start it) appends a very ugly "x" in the right edge of all <input type="search" ...>, which is used to clear the input.
It doesn't happen on Firefox, or other browsers.

If you want to fix that, here is the css snippet for webkit:
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }

And this (untested) for IE:
input[type=text]::-ms-clear { display: none; width : 0; height: 0; }
input[type=text]::-ms-reveal { display: none; width : 0; height: 0; }

Automatically update latest release and description on project homepage

Because the project homepage is on Github Pages, everything is run through the Jekyll parser. This means we can add includes into the homepage. This could be leveraged to add dynamic content areas.

We should update the jenkins build to ask for a description for each new release, and then add the latest version number and the description to includes within the gh-pages branch, which can then be shown on the homepage.

I've created a little example of what I mean.

This would mean that to create a new release can be done entirely from Jenkins, and the publishing of the new version and the docs will happen automatically.

Update autoprefixer

Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([autoprefixer]).process() instead

"gulp sasslint" fails

$ node_modules/gulp/bin/gulp.js sasslint
[13:42:38] Using gulpfile ~/projects/web-style-guide/gulpfile.js
[13:42:38] Starting 'sasslint'...
[13:42:41] 1 issues found in /home/robin/projects/web-style-guide/scss/_core-grid-desktop.scss
[13:42:41] /home/robin/projects/web-style-guide/scss/_core-grid-desktop.scss:501 [W] Avoid using id selectors
[13:42:41] 'sasslint' errored after 2.35 s
[13:42:41] Error in plugin 'gulp-scss-lint'
Message:
    ScssLint failed for: _core-grid-desktop.scss

The Travis build won't succeed until this is passing.

The length of vertical dividers

Is is possible to have the length of the vertical dividers match the tallest column in the row?

For instance, if a column of text has less text in it than the others, the vertical divider that is associated with it is shorter (and looks odd).

Are we able to apply the same rules we use in "Equal Heights" to the vertical dividers?

No variables to change url path to images

MAAS needs to be able to work in an offline environment. This means that the paths embeded in the scss should easily be changed, using variables would make this a lot easier then having to find and replace all urls.

Read only textarea active issue

With all <textarea>'s if set to readonly they shouldn't be allowed to have an active state when clicked. Can we amend this please.

screen shot 2015-04-28 at 10 40 10

Remove secondary button shadow

When looking at the button components the 2nd button style using a <button> element has an inset box shadow.

This should be removed and kept in line with the <a> styling of a secondary button.

screen shot 2015-04-28 at 10 33 04

Remove Ubuntu colours from Vanilla

Looking at the vanilla theme its still very ubuntu we should look at the styles Jamie & Spencer created and start to pull out the orange and make it far more of a blank slate.

Space between number and units

In SASS, if you use an operation to calculate a value, you then have to concatenate the unit. If you just append the unit, the resulting compiled CSS has a space between number and unit.

Ex.
font-size: ($size / $base)em;
Compiles into:
font-size:2 em;

This is an error in CSS, because 2 em is not an accepted property value. So, you need to concatenate the number and the unit, like this:

font-size:($size / $base)+em;
Compiles into:
font-size:2em;

DETAILS

Files:
core-mixins.scss lines 8-9-60-62-64
core.scss lines 212-218-222-228-283-286-457

UPDATE 2014-05-21

Concatenating number and unit turns the value into a string. In order to just convert a unit-less number to one with a unit, just multiply it for one desired unit.

E.g.
$size: 2;
$base: 1;
($size / $base)em compiles into 2 em (not accepted property value)
($size / $base) + em compiles into 2em (string - accepted by CSS, but may cause problems in SASS)
($size / $base) * 1em compiles into 2em (number, em value - good both for CSS and SASS)

Some wrong colours starting to appear in the CSS

I've had a quick look at the CSS file whilst I was trying to find some colours and I noticed that there's a #cdcdcd colour in there for the outline of fields. It's so close to #d2d2d2 that you'd never noticed the difference. I think we specified #d2d2d2 so can you make sure that #cdcdcd doesn't appear.

Core.js from Assets causes console warning regarding ReferenceError

It really is a minor thing, but in core.js from assets.ubuntu.com, under the core.svgFallback function (like 179), rather than saying if (typeof Modernizr !== "undefined") you directly state if (Modernizr). Changing it to do a comparison between typeof Modernizr and undefined should stop the ReferenceError from showing up in the console.

Improve CSS in header.scss

Looking through the header.scss file feel like it needs a little love, especially in the medium break point area. A bit of a prune and a clear up would totally benefit it. When looking at the cloud styles with vanilla there were a few annoyances we could clear up.

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.