Giter Club home page Giter Club logo

rams's Introduction

Class-Less CSS Design System Framework


rams logo

Table of Contents

About

Rams is a class-less css design system framework that utilizes the power of data attributes for styling components.

Getting Started

  1. Start by downloading the repository or by cloning Rams

    git clone https://github.com/jacobxperez/rams.git
  2. Install dependencies on your machine with npm

    npm install

Build

Edit the variables, add custom modules and linked them to index.css for compiling.

note: When starting a project with Rams we recommend not to edit the core files unless you are contributing code back to Rams. Any custom modules should go in the custom folder, this will help you separate your code from Rams.

Compile

On your terminal run these scripts to compile

  • npm run docs (locally runs documentation)
  • npm run dev (serve current development build)
  • npm run build (makes current build and sets url to "/" can be changed on package.json)

Features

Rams uses data attributes instead of class to style components.

Grid System

A two column grid with responsive columns:

<article data-grid="main">
  <aside data-column="large-3 medium-3 small-4">
    <!-- add content -->
  </aside>
  <section data-column="large-9 medium-9 small-4">
    <!-- add content -->
  </section>
</article>

Navigation

A simple navigation with flex-box:

<ul data-flex>
  <li><a data-anchor data-state="active" href="">Active</a></li>
  <li><a data-anchor href="">Anchor</a></li>
  <li><a data-anchor href="">Anchor</a></li>
  <li><a data-anchor href="">Anchor</a></li>
</ul>

A navbar with home link and three tabs:

<nav data-navbar="top">
  <ul data-flex>
    <li><a data-anchor="navbar" href="">Home</a></li>
    <li data-item="grow"></li>
    <li><a data-anchor="navbar" href="">Anchor</a></li>
    <li><a data-anchor="navbar" href="">Anchor</a></li>
    <li><a data-anchor="navbar" href="">Anchor</a></li> 
  </ul>
</nav>

Dropdown

A dropdown navigation menu:

<ul data-flex>
  <li data-position="relative">
    <a data-toggle="pop" data-anchor href="">
      Dropdown 
      <span data-icon="&#xe043;"></span>
    </a>
    <ul data-dropbox="menu" data-position="left">
      <li><a data-anchor="menu" href="">Anchor</a></li>
      <li><a data-anchor="menu" href="">Anchor</a></li>
      <li><a data-anchor="menu" href="">Anchor</a></li>
    </ul>
  </li>
</ul>

Tooltip for displaying additional context on hover or on click:

<span data-toggle="tooltip">
  Tooltip!
  <span data-dropbox="tooltip">
    <!-- add content -->
  </span>
</span>

Reveal extra page content like an accordion:

<ul data-box="border leading">
  <li data-box="border-bottom"> 
    <a data-toggle data-anchor data-flex>
      <strong data-item="grow">Content</strong> <span data-icon="&#xe045;"></span>
    </a>
    <div data-dropbox data-box="padding-x padding-bottom">
      <!-- add content -->
    </div>
  </li>
</ul>

Buttons

Includes several button styles:

 <button data-button="primary">button</button>
 <button data-button="outline">button</button>
 <button data-button="primary outline">button</button>
 <button data-button="link">button</button> 

Examples

These examples incorporate Rams with custom modules.

note: These examples may contain an older version of Rams.

Contributing

If you are interested in contributing to this project, please start by reading our contributing guidelines.

LICENSE

Copyright (C) 2024 Jacob Perez

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

rams's People

Contributors

dependabot[bot] avatar jacobxperez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rams's Issues

Documentation

Updating the docs

To update the documentation, install all dependencies on your machine and run the command npm run docs. You can find the source files for the documentation under the "src/docs" folder. After updating the documentation, run npm run rams to update the root folder docs. This will automatically update the website on a pull request.

Documentation checklist

We need to add documentation highlighting each one of Rams features:

  • Layout
    • Container
    • Grid System
    • Flex Box
    • Breakpoints
  • Navigation
    • Anchor
    • Breadcrumb
    • Tabs
    • Navbar
  • Dropdown
    • Menu
    • Tooltip
    • Accordion
  • Buttons
  • Icons
  • JavaScript
    • data-attributes manipulation

Remove Middle Man from breakpoint variables

We should remove "middle man" from this variables

// small screen
@breakpoint-small-max: unit((@breakpoint-small-max-width / @root-font-size), em);

// medium screen
@breakpoint-medium-min: unit((@breakpoint-medium-min-width / @root-font-size), em);
@breakpoint-medium-max: unit(((@breakpoint-medium-max-width ) / @root-font-size), em);

// large screen
@breakpoint-large-min: unit((@breakpoint-large-min-width / @root-font-size), em);

and only leave these

// small screen
@breakpoint-small-max-width: (640px + (@wrapper-gap * 2));

// medium screen: starts after small-max and end before large-min
@breakpoint-medium-min-width: (@breakpoint-small-max-width + 1 / @base-font-size);
@breakpoint-medium-max-width: (@breakpoint-large-min-width - 1 / @base-font-size);

// large screens
@breakpoint-large-min-width: (@wrapper-max-width);

Remove Middle Man from wrapper variables

Remove Middle Man from wrapper variables

we should refactor this code:
@wrapper-min-width-output: (@wrapper-min-width + (@wrapper-gap * 2));
@wrapper-max-width-output: (@wrapper-max-width + (@wrapper-gap * 2));

remove the middle man.

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.