Code Monkey home page Code Monkey logo

patternfly-1's Introduction

PatternFly 4

Install

When you install PatternFly 4, the package includes:

  • a single file for the entire compiled library: node_modules/@patternfly/patternfly/patternfly.css
  • individual files with each component compiled separately: node_modules/@patternfly/patternfly/<ComponentName>/styles.css
  • a single file for the entire library's source (SASS): node_modules/@patternfly/patternfly/patternfly.scss
  • individual files for each component's source (SASS): node_modules/@patternfly/patternfly/<ComponentName>/styles.scss

Any of the files above are meant for use in consuming the library. The recommended consumption approach will vary from project to project.

Development

PatternFly 4 Development requires Node v8.0.0 or greater

To setup the PatternFly 4 development environment:

  • clone the project
  • run npm install from the project root
  • run npm run build-patternfly
  • run npm run cli:setup (only needed if doing development)
  • run npm start
  • open your browser to http://localhost:8000

After working on your contribution, check for accessibility violations.

Set PatternFly 4 IP address

If Gatsby needs to run on local IP for testing on other machines or devices use npm run dev:expose which sets host to 0.0.0.0. If you want to set host to a specific IP address for example 172.17.12.1 run npm run dev -H 172.17.12.1.

Create a new component

  • run pf generate component <name>

To view visit http://localhost:8000/components/

Create a new layout

  • run pf generate layout <name>

To view visit http://localhost:8000/layout/

Create a new utility

  • run pf generate utility <name>

To view visit http://localhost:8000/utilities/

Create a new demo

  • run pf generate demo <name>

To view visit http://localhost:8000/demos/

Guidelines for CSS development

  • For issues created in Core that will affect a component in PF-React, a follow up issue must be created in PF-React once the Pull Request is merged. The issue should include the Core PR #, the Core Release, a link to the component in https://pf4.patternfly.org, and information detailing the change.
  • If global variables are modified in Core, a React issue should be opened to address this.
  • CSS developers should ensure that animation is well documented and communicated to the respective React developer.
  • Once the component/enhancement is complete it should receive sign off from a visual designer who can then update the master sketch file with any changes.

Beta components

When creating a brand new component, it should be released as beta in order to get feedback.

Testing for accessibility

PatternFly uses aXe: The Accessibility Engine to check for accessibility violations. Our goal is to meet WCAG 2.0 AA requirements, as noted in our Accessibility guide.

How to perform an accessibility audit with aXe

aXe is available as either a browser extension or npm script.

To run the a11y audit locally:

  • install the latest chromedriver and ensure its available on your system $PATH
    • macOS users can simply brew cask install chromedriver
  • run npm run dev
  • run npm run a11y (in another console)

The tool is configured to return WCAG 2.0 AA violations for the full page renderings of all components, layouts, utilities, and demos. The tool will provide feedback about what the violation is and a link to documentation about how to address the violation.

The same tool is also available as a browser extension for Chrome and Firefox.

Fixing violations

Ignore the violations that aren’t related to your contribution.

Fix violations related to your contribution.

If there are violations that are not obvious how to fix, then create an issue with information about the violation that was found. For example, some violations might require further discussion before they can be addressed. And some violations may not be valid and require changes to the workspace or tooling to stop flagging the violation.

If you have any suggestions about ways that we can improve how we use this tool, please let us know by opening an issue.

FAQ

CSS Variables

How do I use CSS variables to customize the library?

Browser support

PatternFly 4 is supported on the latest two major versions of the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

patternfly-1's People

Contributors

adamj avatar amarie401 avatar andresgalante avatar andybraren avatar boaz0 avatar christiemolloy avatar cliffpyles avatar ddonahue007 avatar dgutride avatar dlabrecq avatar dmiller9911 avatar evwilkin avatar guillaumevincent avatar ibolton336 avatar jameslau avatar jenny-s51 avatar jgiardino avatar jschuler avatar karelhala avatar lareplog avatar matthewcarleton avatar mattnolting avatar mcarrano avatar mcoker avatar olets avatar rachael-phillips avatar redallen avatar seanforyou23 avatar spytec avatar srambach avatar

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.