Code Monkey home page Code Monkey logo

spectre's Introduction

Spectre.css

Reviewed by Hound

Spectre.css is a lightweight, responsive and modern CSS framework.

  • Lightweight (~10KB gzipped) starting point for your projects
  • Flexbox-based, responsive and mobile-friendly layout
  • Elegantly designed and developed elements and components

Spectre is a side project based on years of CSS development work on a large web service project. Spectre only includes modern base styles, responsive layout system, CSS components and utilities, and it can be modified for your project with Sass/Scss compiler.

Spectre.css is completely free to use. If you enjoy it, please consider donating via Paypal or via Patreon for the further development. ♥

Getting started

There are 5 ways to get started with Spectre CSS framework in your projects. You can either manually install or use NPM, Yarn and Bower.

Install manually

Download the compiled and minified Spectre CSS files. And include spectre.css located in /docs/dist in your website or Web app <head> part.

<link rel="stylesheet" href="spectre.min.css">

Install from CDN

Alternatively, you can use the unpkg or cdnjs CDN to load compiled Spectre.css.

<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css">

Install with NPM

$ npm install spectre.css --save

Install with Yarn

$ yarn add spectre.css

Install with Bower

$ bower install spectre.css --save

Compiling custom version

You can compile your custom version of Spectre.css. Read the documentation.

Documentation and examples

Elements

Layout

Components

Utilities

  • Utilities - colors, display, divider, loading, position, shapes and text utilities

Experimentals

Browser support

Spectre uses Autoprefixer to make most styles compatible with earlier browsers and Normalize.css for CSS resets. Spectre is designed for modern browsers. For best compatibility, these browsers are recommended:

  • Chrome (LAST 4)
  • Microsoft Edge (LAST 4)
  • Firefox (EXTENDED SUPPORT RELEASE)
  • Safari (LAST 4)
  • Opera (LAST 4)
  • Internet Explorer 10+

Spectre supports Internet Explorer 10+, but some HTML5 and CSS3 features are not perfectly supported by Internet Explorer.

Designed and built with ♥ by Yan Zhu. Feel free to submit a pull request. Help is always appreciated.

spectre's People

Contributors

ajm113 avatar bricss avatar chrissy-dev avatar codebling avatar devmount avatar hugmanrique avatar iuhoay avatar jakubrpawlowski avatar jkochis avatar jsarasin avatar kadevland avatar kandebonfim avatar marcobiedermann avatar mechaphysis avatar mzyy94 avatar natecox avatar neilpanchal avatar picturepan2 avatar rabbitears avatar raymonf avatar renegat59 avatar ruden avatar salbertson avatar sandebert avatar sebastiantroc avatar viliamkopecky avatar willcurry 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  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

spectre's Issues

Difference between Spectre and Bootstrap?

Hi,

Considering how very much Spectre looks like Bootstrap, both from a visual perspective and also naming convention, it would be good to have some info on what the actual difference is between them.

I understand Spectre is smaller, but what else? My thinking is that Bootstrap is bigger for a reason, but why..? Do they support older browsers, or what's the reason?

Javascript Library and other suggestions

First off, love the framework! Really great, clean design, implements many common components flawlessly, yet is incredibly tiny. (filesize-wise)

Do you have any plans for writing a JS library for interactions with various components, eg .menu, .modal, and .toast? If you haven't or have but have not implemented it yet, I have a few files for said components that could provide a jumping-off point for writing these JS interactions; they're simple, curt, and use vanilla JS.

Other suggestions:

  • Include Sass port (this may be able to be done by simply changing all @variable instances to $variable, but I may be mistaken)
  • I resized my window after happily sketching a site in Spectre for a few hours, and I noticed that it's not very responsive relative to the numerical value of column sizes. (ie column widths do not scale consistently with screen size adjustments) This image shows that the .col-8 class, along with apparently all other .col-x classes simply default to 50% between 481px and 840px. There may have been a reason for this, but I am not picking up on it.
  • Design an adorable/menacing spectre logo for the framework!

I am more than willing to help with any of the above, and will likely be throwing some PRs your way.

active/focused state seggestion

Can you please think about deleting or replace this behavior to another class this states of many elements. Many elements such tabs or buttons on click must only do what they need to do, but they after clicking stayed focused. On tabs this behavior reminds active tab and user will be confused. Buttons confusing because they looks like they lagged or something like that

Sorry for my bad english

Form controls size

Would be great if form controls (inputs, selects, switches and input groups) could have size classes like buttons has.

Need bigger switch/checkbox/radio buttons

Hi,

Currently you can change input sizes with .input-sm/.input-lg, but there is no equivalent for switch/checkbox/radio buttons.
These elements should be able to be resized.

Nice job by the way and thanks for the framework.

Setup build process

Currently there is are no instructions how to transpile Less to CSS.
I suggest using a build task runner like NPM, Gulp or Grunt.

If done so, it might be helpful, to add some information to readme.md

input type file

Hi,

is there a plan to change 'input type file' look? It's a bit delicate problem, heck I can't make it properly, but defaults are just soooo ugly.

Thank you

Input group fail alignment with Empty state

I tried using a Input group inside a Empty state, but the button loses alignment with the input.

<div class="empty">
    <p class="empty-title">You have no new messages</p>
    <p class="empty-meta">Click the button to start a conversation.</p>
    <div class="input-group">
        <span class="input-group-addon">slack.com/</span>
        <input type="text" class="form-input" placeholder="site name" />
        <button class="btn btn-primary input-group-btn">Submit</button>
    </div>
</div>

Thanks in advance, good mini-framework!

P.D. View image for a better idea.

Menu item disabled state

Hi Yan Zhu, firstly, thanks for your great work on this CSS framework! 👍

I noticed that there is no formal method adopted yet to show menu-item state as disabled. Are there any plans to add support for this?

tooltip not works when button is disabled

It's a feature or bug?

If I'd like to display the tooltip on a disabled button, how to do?
Thank you.
<button class="btn tooltip" data-tooltip="Lorem ipsum dolor sit amet" disabled>top tooltip</button>

input has it's own font-size, select does not

Hi There,

Is there a reason why a form-select does not have a font-size and form-input does? This way when you set a font-size in the body {} through CSS, the select font-size changes to the one defined in the body and the input element doesn't.

Thanks.

Branches?

Could you explain which branch is what and where we should checkin out contributions?

I assume master is the latest, but some stuff is missing e.g. navbar.

Badges on tabs

On tabs badges looks awful :
image

I know that badges on tab isn't good idea, but it will be nice if you add that feature, becouse its very beautiful way to show user new content in tab

Blockquote markup

Replace blockquote-source class with cite tag.

before:

<blockquote>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
    <span class="blockquote-source">- Source</span>
</blockquote>

after:

<blockquote>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
    <cite>- Source</cite>
</blockquote>

You could also replace - in cite tag with:

cite::before {
  content: '-';
}

In my opinion it is more of a stylistic symbol than content.

Problem in mobile safari (iOS8 WeChat)

Modal is hidden, even it has an 'active' className.
Force show it by using jQuery show.It displays, but not have the same style in iOS9.

Does spectre test the compatible in iOS8 mobile safari?

Col size small, medium, large

Hi,

can I choose col- depending on screen size like in Bootstrap or Foundation ?

I don't want the same % of width on mobile and desktop.

Disabled Button Skin

At the moment, there seems to be no support for a disabled button.
All the button skins currently have a hover/click effect even if disabled, so it's impossible to get a pseudo-disabled skin with what's available.

Move to separate org?

Congrats on the attention today! Easily one of the most robust CSS frameworks I've seen. Perhaps it's a good idea to create a GitHub organization for it?

display: none used on input fields makes them innaccessible for screen reader users

https://github.com/picturepan2/spectre/blob/master/src/forms.less#L113

// Form element: Checkbox and radio
.form-checkbox,
.form-radio,
.form-switch {
  input {
    display: none;
  }
}

Setting display: none on input fields is an accessibility bad practice. Anybody who uses your framework will automatically be excluding a group of disabled users from using their site effectively. As framework developers, you need to get this right.

Columns margins

.columns {
    display: -webkit-box;
    display: flex;
    display: -ms-flexbox;
    display: -webkit-flex;
    -ms-flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: -1rem;
    margin-right: -1rem;
}

Shouldn't it be .column .columns for those negative margins ?

Negative margins got me an undesired horizontal scroll :/

icons do not show at all

Tried these in chrome and firefox browsers

<i class="icon icon-menu"></i> <span class="icon icon-favorite_border"></span>

Tooltips delay?

Is in possible to setup tooltip appearing delay? Say 3sec?

Tooltip Enhancement

Instead of adding position classes, I think we can control the tooltip position using CSS only.

data-pos="left"
data-pos="right"
data-pos="bottom"

<button class="btn tooltip" data-tooltip="Lorem ipsum dolor sit amet" data-pos="bottom">top tooltip</button>

tooltip.txt

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.