:handbag: A beautiful CSS library to kickstart your projects

Related tags

CSS picnic
Overview

Picnic CSS

Unpack your meal and get coding. An invasive CSS library to get your style started.

Getting started

There are many ways of using Picnic CSS in your projects. Here a brief introduction of the recommended two methods:

CDN - just give me the file

Use Picnic CSS in the CDN jsDelivr for linking to the static file.

Bower - to personalize Picnic

To install Picnic with bower just write this in your terminal (you'll need bower installed):

bower install picnic

Then, to use it within your scss development cycle, just do:

// Here go any variables you want to overwrite
$picnic-primary: #faa;

// Now import picnic and a couple of plugins
@import 'BOWER_PATH/picnic/src/picnic';
@import 'BOWER_PATH/picnic/plugins/nav/plugin';
@import 'BOWER_PATH/picnic/plugins/modal/plugin';

NPM

Just do

npm install picnic --save

To add it to your repository. Then you can include it straight from your css like:

@import "../node_modules/picnic/picnic.min.css";

Thanks to chadoh for helping me in publishing it in NPM and for the instructions.

Other ways

You can always download the latest minimized version from github, clone the repository or download it. Or clone it: git clone https://github.com/franciscop/picnic.git

Wait, invasive?

Many libraries rely upon adding classes to your already existing HTML elements, resulting in bloated code like <button class="btn btn-primary">Hey</button>. It would be easier if the buttons knew they are, well, buttons. Crazy eh?

This setup works neatly for newly created projects or for pages that you have to build quick from scratch. It also allows for a much more intuitive extension of base elements.

Browser support IE11+

Bug reports and fixes only for IE11+. With IE8- usage dropping fast and with IE9 and IE10 usage even below their older mate, it is time to start thinking about not supporting them anymore. For others, up to 2 previous versions are expected to be working, and everything that is not is definitely a bug.

Example usage

After including the stylesheet as indicated in the Getting started:

<form>
  What's your favourite Picnic CSS feature?

  <label>
    <select name="feature">
      <option value="semantic">    Semantic HTML5 </option>
      <option value="lightweight"> Lightweight    </option>
      <option value="css3">        Only CSS3      </option>
      <option value="responsive">  Responsive     </option>
    </select>
  </label>

  <input type="email" placeholder="Email to receive updates">

  <button class="primary"> Subscribe! </button>
</form>

If you don't see anything that seems picnic.css exclusive, that's because there's nothing, that's the main purpose of Picnic CSS. However, try it out and you'll see a decent example in your browser.

Advantages

  • Only CSS3 is needed and your HTML5 stays highly semantic*.

  • Under 10kb when minimized and gzipped with all plugins.

  • Normalize.css is used as a base, achieving a solid foundation.

  • Support: IE 9+ and others. No fancy CSS3 on IE 8.

  • Responsive: The nav and the grids are responsive.

* Except for the grids :(

Disadvantages

  • Difficult to drop in an already created project. This is what I meant by invasive. This is not within the new scope of the project.

Alternatives and why I still created Picnic CSS

Milligram: A minimalist CSS framework

PureCSS: Lightweight, nice package. The thing I would be using if I didn't build Picnic CSS and where I took the inspiration. However, no nice <select> out of the box and the non-responsive grid from the CDN feels like a stab on the back.

Bootstrap: Really comprehensive, but too many files and too heavy for most of the websites. It also relies too much on javascript. Still cannot get the <select> right out of the box.

Min: a tiny, basic css framework. It has great browser support. No <select> right, and it's too inexpressive.

Contributing

You are encouraged to contribute to Picnic CSS. To write a new plugin, just copy one of the existing ones (specially recommend "button") and modify the files. The code must be linted with scss-lint, except the PropertySortOrder which is ignored for a better code structure.

Authors

Created by Francisco Presencia. SASS from Jordan Wallwork. Significant fixes from Alex Galushka. Tons of help in several parts of the project from Emilio Coppola.

Some love

  • Clrs the new nice web palette (from HN) used for Picnic CSS.

  • Fontello an icon library that plays really nice with others.

  • Normalize the foundation of Picnic CSS

Comments
  • Fix modal positioning in Safari

    Fix modal positioning in Safari

    Fixes https://github.com/picnicss/picnic/issues/40.

    I believe this does the trick, though I figured out this fix just by editing in Safari's inspector and don't have the time or dev setup to compile the scss myself.

    opened by JacobEvelyn 10
  • Dark Mode

    Dark Mode

    Building off of my changes to the scss, I implemented base16-tomorrow as a dark mode. Theming can probably easily evolve from here.

    I'm not sure how best to document this for new users or make it usable for them. I'm currently making use of this with my own branch that I'm using as an npm module.

    opened by kinostl 7
  • Gulp autoprefixer task

    Gulp autoprefixer task

    re #20

    • Supporting the last 2 browser versions
    • Removed relevant vendor prefixes from sass component

    Tested in IE11, IE10, IE9, Chrome, Firefox, Opera, Safari.

    If @FranciscoP could give this a once over, that would be great :)

    opened by ttbarnes 6
  • An interesting project.

    An interesting project.

    An interesting project. The only documented way to contribute is to create a plugin. There is no Help facility, no bug reporting facility, and no GitHub Issues section. I have a basic question about using this library, but no way to get it answered.

    opened by David263 4
  • Fix styling for select[multiple]

    Fix styling for select[multiple]

    For multi-select dropdowns, we need to remove the arrow.svg and let it grow vertically to fit the list of items. Also, removing padding brings the option element text in alignment with regular select elements and inputs.

    opened by kensnyder 3
  • Use sass for development and add build system

    Use sass for development and add build system

    I've added a build system for auto transpilation / minification of the library. I decided to port the library to sass because it should help to ease future development, allow a cleaner code base and also allow additional functionality in the future ie. implementing mixins for the parts of the library that aren't semantic (grids / nav) for users who care strongly about eliminating non-semantic dom elements. It can also make it more easily customizable by simply tweaking variables (much as bootstrap does).

    I've done very little work on the actual scss source itself other than chopping it up, but as a start I've added variables to allow adjusting the responsive breakpoints

    opened by jordanwallwork 3
  • Removed slash division and replaced with math.div

    Removed slash division and replaced with math.div

    Hi,

    Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0. More information can be found at here.

    I have replaced all slash division with math.div() and imported loaded the math module.

    Thank you!

    opened by bxdavies 2
  • Removing arbitrary color codes in plugins

    Removing arbitrary color codes in plugins

    I wanted to make a dark mode and noticed there was a lot of arbitrary hex values. I changed them to the most similar $picnic-* options in default/_theme.scss and didn't notice any perceivable difference. This fixed a lot of small bugs that would happen when you tried to play with the colors.

    opened by kinostl 2
  • Updated CDN

    Updated CDN

    jsDelivr is using a new /npm/ endpoint to automatically support all npm projects. So I updated the links to make sure they show the latest versions. (the site will be updated soon)

    More info https://github.com/jsdelivr/jsdelivr#usage

    opened by jimaek 2
  • Allow any node version

    Allow any node version

    Since npm is sloppy, it allows installing packages that say to only use node 4.0.0, even if you're using a different version of node.

    Yarn is not so sloppy.

    I want to switch to yarn, but picnic is causing problems.

    I don't know if the version of node actually matters for picnic. If it does, then a range of node versions can be specified. I doubt it matters, though!

    opened by chadoh 2
  • Add textarea styling. Allow to set border for all input types

    Add textarea styling. Allow to set border for all input types

    1. Allow users to overwrite border for all inputs by overwriting border variables.
    2. Add styles for textarea

    Before

    before

    After set the $picnic-border-weight: 3px and $picnic-border-color: orange

    after

    opened by galulex 2
Owner
Francisco Presencia
Twitter: @fpresencia
Francisco Presencia
The fastest way to build beautiful Electron apps using simple HTML and CSS

Photon UI toolkit for building desktop apps with Electron. Getting started Clone the repo with git clone https://github.com/connors/photon.git Read th

Connor Sears 9.9k Dec 29, 2022
A package of small but beautiful React components from the planet, Pluto. 🔵 Get minimal components for your React based applications 😍

React Pluto Component Design System + UI Kit A package of small but beautiful React components from the planet Pluto. To install the latest version, r

Yash Sehgal 17 Aug 8, 2022
Reseter.css - A Futuristic CSS Reset / CSS Normalizer

Reseter.css A CSS Reset/Normalizer Reseter.css is an awesome CSS reset for a website. It is a great tool for any web designer. Reseter.css resets all

Krish Dev DB 1.1k Jan 2, 2023
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Bootstrap Sleek, intuitive, and powerful front-end framework for faster and easier web development. Explore Bootstrap docs » Report bug · Request feat

Bootstrap 161k Jan 1, 2023
Low-level CSS Toolkit – the original Functional/Utility/Atomic CSS library

Basscss Low-level CSS toolkit – the original Functional CSS library https://basscss.com Lightning-Fast Modular CSS with No Side Effects Basscss is a l

Basscss 5.8k Dec 31, 2022
Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - Cool tooltips Cool customisable tooltips made from pure CSS Lightweight • Accessible • Customisable • Simple Cooltipz.css is a pure CSS

Jack Domleo 110 Dec 24, 2022
micro-library for CSS Flexbox and CSS Grid

SpeedGrid micro-library for CSS Flexbox and CSS Grid Overview SpeedGrid dynamically generates inline CSS by specifying the class name. Easy maintenanc

Toshihide Miyake 7 Mar 26, 2022
A beautiful vue.js homepage template, very useful

Vue Nice HomePage DEMO is here About particles-bg-vue library This project uses the react particle background component library https://github.com/lin

Nordic Giant 38 Dec 24, 2022
Beautiful theme for Obsidian, Base on Minimal theme

?? obsidian_orange 是什么? obsidian_orange 是一款基于 minimal theme 定制的主题。 ✨ obsidian_orange 实现了什么功能? 多样式“提示块” 图片并列显示 高亮块 & 文本多颜色高亮 徽章(Badge):在标题或文本的右上角添加状态信息

echoxu 84 Jan 6, 2023
A Simple and beautiful template for blog or portfolio using Next js.

Next js Blog Configuration Update your name in theme.config.js or change the footer. Update your name and site URL for the RSS feed in scripts/gen-rss

pritu 6 Apr 20, 2022
A pure html and css library for dark mode in your website.

Dark Mode A pure html and css library for dark mode in your website. Features It has a smooth setting and also it changes via system settings aswell.

null 1 Jan 6, 2022
Spectre.css - A Lightweight, Responsive and Modern CSS Framework

Spectre.css Spectre.css is a lightweight, responsive and modern CSS framework. Lightweight (~10KB gzipped) starting point for your projects Flexbox-ba

Yan Zhu 11.1k Jan 8, 2023
Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

Aphrodite Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation. Support for colocating y

Khan Academy 5.3k Jan 1, 2023
CSS Boilerplate / Starter Kit: Collection of best-practice CSS selectors

Natural Selection Natural Selection is a CSS framework without any styling at all. It is just a collection of selectors that can be used to define glo

FrontAid CMS 104 Dec 8, 2022
Source code for Chrome/Edge/Firefox/Opera extension Magic CSS (Live editor for CSS, Less & Sass)

Live editor for CSS, Less & Sass (Magic CSS) Extension Live editor for CSS, Less & Sass (Magic CSS) for Google Chrome, Microsoft Edge, Mozilla Firefox

null 210 Dec 13, 2022
Easily create css variables without the need for a css file!

Tailwind CSS Variables This plugin allows you to configure CSS variables in the tailwind.config.js Similar to the tailwindcss configurations you are u

Mert Aşan 111 Dec 22, 2022
Data-tip.css - Wow, such tooltip, with pure css!

Notice: hint.css has been much better since I complained about it months ago, so try out its new features instead of this one! data-tip.css Wow, such

EGOIST 117 May 26, 2021
Tiny CSS framework with almost no classes and some pure CSS effects

no.css INTERACTIVE DEMO I am tired of adding classes to style my HTML. I just want to include a .css file and I expect it to style the HTML for me. no

null 96 Dec 10, 2022
Extensible, scalable, Sass-based, OOCSS framework for large and long-lasting UI projects.

Extensible, scalable, Sass-based, OOCSS framework for large and long-lasting UI projects. inuitcss is a framework in its truest sense: it does not pro

inuitcss 1.8k Dec 30, 2022