npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ovh-common-style

v5.0.0

Published

Managers common style

Downloads

10,663

Readme

Managers common style

OVH component deprecated

deprecated Build Status

NPM

Managers common style.



Usage

Font size

OVH common style provides some classes for override font-size on a tag.

This example applies font-size to 16px :

<span class="fs16"></span>

You can do the same thing for line-height, default prefix is lh.

<span class="fs16 lh16"></span>

You can change default values by override less properties :

  • @font-size-values

  • @font-size-class

  • @line-height-values

  • @line-height-class

By default, font size class is : @font-size-class + @font-size-value. Same logic for line-height.

Helpers

Data exemple helper (helpers.less)

  • Text center
    <p class="text-center">this text is center</p>
  • Text opacity
    <p class="opacity4">this text has 0.4 opacity</p>
  • No style button
    <button class="no-style">This button has not style</button>
  • Space (4, 8, 16, 20) (px)
    <div class="space-m20">margin : 20px</div>
    <div class="top-space-m16">margin-top : 16px</div>
    <div class="bottom-space-m8">margin-bottom : 8px</div>

    <div class="left-space-p8">padding-left : 8px</div>
    <div class="right-space-p4">padding-right : 4px</div>
  • responsive space (4, 8, 16, 20) (px) (xs, sm, md, lg like bootstrap 3)
    <div class="space-lg-m20">margin : 20px for media min-width: 1200px </div>
    <div class="top-space-md-m16">margin-top : 16px for media min-width: 992px </div>
    <div class="bottom-space-sm-m8">margin-bottom : 8px for media min-width: 801px </div>

    <div class="right-space-xs-p4">padding-right : 4px for media min-width: 480px </div>
  • disable text selection (noselect)
    <div class="noselect">This can't be selected with the mouse.</div>

Data exemple table (table.less) - work this Bootstrap 3

  • Responsive table
    <div class="table-responsive-vertical shadow-z-1">
        <table class="table table-pretty table-hover table-striped">
            <thead>
                <tr>
                    <th>
                        <span>column title</span>
                        <span class="table-pretty-filter">
                            <i data-ng-show="order.by !== 'minDisk'" class="fa fa-sort"></i>
                            <i data-ng-show="order.by === 'minDisk' && order.reverse" class="fa fa-sort-desc"></i>
                            <i data-ng-show="order.by === 'minDisk' && !order.reverse" class="fa fa-sort-asc"></i>
                        </span>
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-title="column title"></td>
                </tr>

Data exemple animation (animation.less) - work this animate.css

You can use all animation of animate.css

You can speed up animation with .animated-300 or infinite .animated-infinite

  • simple animate (without 'animate' prefix)
    <div class="opacity2-enter">this div animates opacity from 0.2 to 1</div>

    <div class="animated bounce">this div is animated by bounce of animate.css (!! animated class is important)</div>
  • angular animate (work with angular-animate) (with 'animate' prefix)
    <div data-ng-if="open" class="animate-opacity4-enter animate-opacity5-leave">
        this div animates opacity from 0.4 to 1 when it shows and animates opacity from 1 to 0.5 when hidden
    </div>
  • angular animate (work with angular-animate and animate.css)
    <div class="animate-fadeInLeft-enter animate-fadeOutRight-leave"><
        this div animates opacity and moves right to left when it shows and animates opacity and moves left to right when hidden
    </div>

Datepicker style .datepicker-ui-pretty (datepicker-ui.less) - datepicker

<div class="input-group">
    <div class="input-group-addon"><i class="fa fa-calendar"></i></div>

    <input type="text" class="form-control datepicker-ui-pretty"
        id="searchDate"
        name="searchDate"
        placeholder="{{ 'search_date' | translate}}"
        datepicker-popup="shortDate"
        is-open="openedSearchDate"
        ng-click="openedSearchDate = true"
        ng-model="search.date">

    <div class="input-group-addon" data-ng-show="search.date">
        <button class="no-style" data-ng-click="search.date = null">
            <i class="fa fa-times"></i>
        </button>
    </div>
</div>

Data exemple rotate animation

<button class="no-style" data-ng-click="open = !open">
    <span>open</span>
    <i class="fa fa-caret-down rotate" data-ng-class="{'rotate180': open}"></i>
</button>

Installation

Bower

bower install ovh-common-style --save

NPM

npm install ovh-common-style --save

Configuration

LESS style

@import 'ovh-common-style/less/helpers.less';
@import 'ovh-common-style/less/animation.less';
@import 'ovh-common-style/less/table.less';
@import 'ovh-common-style/less/datepicker-ui.less';
@import 'ovh-common-style/less/spinner/spinner.less';

Fonts

@import 'ovh-common-style/less/fonts/open-sans.less';

Get the sources

    git clone https://github.com/ovh-ux/ovh-common-style.git
    cd ovh-common-style
    npm install
    bower install

You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !

Have a look in CONTRIBUTING.md

Run the tests

npm test

Related links

  • Contribute: https://github.com/ovh-ux/ovh-common-style
  • Report bugs: https://github.com/ovh-ux/ovh-common-style/issues
  • Get latest version: https://github.com/ovh-ux/ovh-common-style

License

See https://github.com/ovh-ux/ovh-common-style/blob/master/LICENSE