Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap-hacks

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-hacks

Tweaks (with a security and accessibility focus) to the Bootstrap framework.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

Bootstrap Hacks Build Status

Tweaks (with a security and accessibility focus) to the Bootstrap framework.

Included Hacks

Accessible variables

Bootstrap's default placeholder color (#999) doesn't meet WCAG 2.0 AA's color contrast requirement. Include accessible-variables.less to override @input-color-placeholder with a darker shade of gray (#767676).

Progress bar

Enables use of Bootstrap's progress bar component without requiring inline styles, in turn allowing CSP headers to exclude the 'unsafe-inline' style-src.

Usage

  1. Include progressbar.less (or progressbar.css) in your project however you like.

  2. Remove the inline style attribute from your progress bars; progressbar.less will style them appropriately.

    Before:

    <div class="progress">
      <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
        <span class="sr-only">60% Complete</span>
      </div>
    </div>
    

    After:

    <div class="progress">
      <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
        <span class="sr-only">60% Complete</span>
      </div>
    </div>
    

Caveats

  • Only works for integral values of aria-valuenow (e.g. aria-valuenow="60" will work, aria-valuenow="60.1" won't).
  • Only works when the progress bar displays values between 0 and 100 (i.e. aria-valuemin="0" and aria-valuemax="100").

Keywords

FAQs

Package last updated on 17 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc