Git Product home page Git Product logo

primitive's Introduction

Primitive UI

License: MIT primitive-ui on NPM

A front-end design toolkit built with Sass for developing responsive web apps. Primitive also provides helpful, browser-consistent styling for default HTML elements - buttons, forms, tables, lists, and typography.

Installation

CSS quick start (easy)

<link rel="stylesheet" href="https://unpkg.com/primitive-ui/dist/css/main.css" />

It's all set to go and your HTML elements will be given sensible default styling.

Sass integration (recommended)

The beauty of Primitive is the ease with which you can create unique designs in a beautiful, simple system.

# Clone the repo
git clone https://github.com/taniarascia/primitive.git

# Watch for file changes
npm run sass:watch

# Build a minified production build
npm run sass:build

Now you can begin modifying variables in variables.scss. This file will define your colors, typography, sizes, breakpoints, buttons, borders, and more. Define all your variables here to keep your project organized.

You can view dist/test.html or docs/template.html to see some example elements as you make changes.

Gulp usage

If you use would prefer to use Gulp for compiling, the option is available.

  • Watch modifications and recompile: yarn gulp-watch / npm run gulp-watch
  • Build CSS: yarn gulp-css / npm run gulp-css

Acknowledgements

  • Dave Gamache for building Skeleton CSS, the original inspiration for building Primitive and understanding responsive CSS.

Contributing

Please feel free to fork, comment, critique, or submit a pull request.

Author

License

This project is open source and available under the MIT License.

primitive's People

Contributors

davidb137 avatar hunzaboy avatar naxvog avatar nplayfair avatar spl avatar taniarascia avatar vdeville 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

primitive's Issues

Select box issue ibn IE11

Tania,
How are you? I am really happy to evaluate your framework: it looks really clean and light. I noticed that the select boxes display a little tick next to the drop down arrow if you use IE11.
Any idfeas?
Thanks,
Everardo
ps. I could send you a picture.

Also, would you mind if I try to add the following components to your framnework?
tabs, accordions, modals, and date and time pickers.

Remove gulp

Hello,
Why you remove gulp ?
If you want, I can again integrate Gulpfile.js with the newest version of gulp (4.0).
I use primitive with my custom gulp scripts.
Tell me if you are interest.
Thanks

Triangle select background not transparent

Currently if you alter the background color of a select element you will see that the used triangle background has itself a white background. It would be nice to have a transparent background image instead.

Tinkered a bit and I am currently using this:

select {
   background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAJCAYAAAA/33wPAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAjklEQVQoz5XPMQrCQBBG4W8TBLHXowiewHt4HDvtbDxD7LSy0yvYClZia7CKNlssATfJD8vMMG8fuwF7LORzxSoHFFijyTBNZHSJbqgyTBWZbEKsM5wwbu0/WOLZJSpjfWOEeWu/w1mPhKSf4IhpnF/xNXUfUZH0NbbJvOkr+ffVQzzl0ItpvnjggvsQ0Q+efRi5Tqrz0wAAAABJRU5ErkJggg==);
}

button and form default variables

Would you be willing to add the !default option to lines 145 & 146 in your variables setup? $buttons and $forms both required additional setup, and I found them to not follow the SCSS standard for overriding with a fallback.

https://github.com/taniarascia/primitive/blob/master/src/scss/base/_variables.scss

My current workaround required me to modify your code after the package was installed. Concern that I'll forget when I'm no longer working remote and pull a refresh from my package.json.

Thanks overall. Cheers.

Question

Hi,

Just curious, why are you declaring the same class selectors twice in the css file, for example:

/**
 * Grid
 */
.flex-small,
.flex-large {
  padding-left: 1rem;
  padding-right: 1rem;
}

.flex-row {
  margin-left: -1rem;
  margin-right: -1rem;
}

.flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.flex-small,
.flex-large {
  flex-basis: 100%;
  margin-bottom: 1rem;
}

They have different properties but the selectors are same what's the use case for this?

Cannot override SCSS variables reliably

Hi there,

I installed primitive-ui via npm and included it in my main.scss file. I try to override the primary color variable and expect the link color to change automatically since it's based on the primary color. But it does not.

Example

Here's how I use primitive in my own files:

// my own main.scss
@import "primitive-ui/src/scss/main";

@import "variables";
// my own variables.scss
$primary-color: red;

In the above example, the primary color has been set to red, and I would expect the link color to change to red as well, but it's still the default primary color supplied with primitive.

The Fix

I've tested it and it can be fixed by adding !default values to the primitive variables. A similar approach is used in Bootstrap

Please note that once you add !default values, the order of importing will change as well:

// my own main.scss
@import "variables";

@import "primitive-ui/src/scss/main";

If you'd like to read more about this approach, check this article on Thoughtbot.

Finally, let me know what you think and I'll create a PR for it!

Tagging releases

I was wondering if you would mind using git tags for versions and doing releases on GitHub. My reasons for this are:

  1. Notifications only for releases: This is an admittedly selfish wish to reduce the amount of email I receive (e.g. by “watching” the repository) but still learn when updates are made.
  2. Easily identifying the release commits and viewing the differences between them

Primitive in react

Hi Tania,
thanks for creating primitive!
When I try to integrate it with react, I encounter a strange problem.
The spacing between buttons are missing and I can't figure out the problem.
Is that the problem of react?

in html:

    <div class="container">
       <button>Submit</button>      
       <button>Reset</button>    
    </div>
    <div id="root"></div>

in js:

class App extends Component {
  render() {
    return (
      <div className="container">
       <button>Submit</button>      
       <button>Reset</button>            
      </div>
    );
  }
}

ReactDOM.render(<App/>, document.getElementById('root'));

screen shot 2018-06-28 at 5 39 57 pm

HTML 5 Elements Test link is broken

That link was working just a few days ago, and I loved that HTML 5 Test page so much. It was really illuminating to see all the frameworks compared!

After poking around a bit, it appears to me that you either deleted or made private the repo that used to be at https://github.com/taniarascia/html5-test. I was able to find a cached copy here: https://webcache.googleusercontent.com/search?q=cache:OaPkN3VjtHEJ:https://taniarascia.github.io/html5-test/&hl=en&gl=us&strip=0&vwsrc=1

P.S. Thanks for writing this excellent library!

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.