{"id":13489959,"url":"https://github.com/patternfly/patternfly-sass","last_synced_at":"2025-10-22T17:40:13.644Z","repository":{"id":19847829,"uuid":"23109839","full_name":"patternfly/patternfly-sass","owner":"patternfly","description":"A port of Patternfly from Less to Sass","archived":true,"fork":false,"pushed_at":"2017-12-08T09:51:01.000Z","size":11418,"stargazers_count":40,"open_issues_count":3,"forks_count":30,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-13T07:02:22.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.patternfly.org","language":"HTML","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patternfly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-19T12:48:56.000Z","updated_at":"2023-01-28T21:15:59.000Z","dependencies_parsed_at":"2022-08-25T23:21:10.643Z","dependency_job_id":null,"html_url":"https://github.com/patternfly/patternfly-sass","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-sass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-sass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-sass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-sass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patternfly","download_url":"https://codeload.github.com/patternfly/patternfly-sass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978200,"owners_count":20703675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:00:38.504Z","updated_at":"2025-10-22T17:40:12.662Z","avatar_url":"https://github.com/patternfly.png","language":"HTML","readme":"#patternfly-sass\n\n### The project is no longer maintained as the original [patternfly](https://github.com/patternfly/patternfly) now natively supports sass!\n#### For compatibility the rubygem's name is not changing and it will be still released as [`patternfly-sass`](https://rubygems.org/gems/patternfly-sass).\n\n[![Gem Version](https://badge.fury.io/rb/patternfly-sass.svg)](http://badge.fury.io/rb/patternfly-sass)\n[![Dependency Status](https://gemnasium.com/patternfly/patternfly-sass.svg)](https://gemnasium.com/patternfly/patternfly-sass)\n[![Build Status](https://travis-ci.org/patternfly/patternfly-sass.svg)](https://travis-ci.org/patternfly/patternfly-sass)\n[![Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/patternfly/patternfly-sass?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n`patternfly-sass` is a Sass-powered version of [PatternFly](http://github.com/patternfly/patternfly), ready to drop right into your Sass powered applications.\n\n## Installation\n\nPlease see the appropriate guide for your environment of choice:\n\n* [Ruby on Rails](#a-ruby-on-rails).\n\n### a. Ruby on Rails\n\n`patternfly-sass` is easy to drop into Rails with the asset pipeline.\n\nIn your Gemfile you need to add the `patternfly-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.\n\n```ruby\ngem 'patternfly-sass', '~\u003e 3.0.0'\ngem 'sass-rails', '\u003e= 3.2'\n```\n\n`bundle install` and restart your server to make the files available through the pipeline.\n\nImport Bootstrap styles in `app/assets/stylesheets/application.scss`:\n\n```scss\n// \"patternfly-sprockets\" must be imported before \"patternfly\" and \"patternfly/variables\"\n@import \"patternfly-sprockets\";\n@import \"patternfly\";\n```\n\n`patternfly-sprockets` must be imported before `patternfly` for the icon fonts to work.\n\nMake sure the file has `.scss` extension (or `.sass` for Sass syntax). If you have just generated a new Rails app,\nit may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so rename it:\n\n```console\n$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss\n```\n\nThen, remove all the `//= require` and `//= require_tree` statements from the file. Instead, use `@import` to import Sass files.\n\nDo not use `//= require` in Sass or your other stylesheets will not be [able to access][antirequire] the PatternFly mixins or variables.\n\nRequire PatternFly Javascripts in `app/assets/javascripts/application.js`:\n\n```js\n//= require jquery\n//= require bootstrap\n//= require patternfly\n```\n\n#### Rails 4.x\n\nPlease make sure `sprockets-rails` is at least v2.1.4.\n\n#### Rails 3.2.x\n\npatternfly-sass is no longer compatible with Rails 3.\n\n### Configuration\n\n#### Sass\n\nBy default all of PatternFly is imported.\n\nYou can also import components explicitly. To start with a full list of modules copy\n[`_patternfly.scss`](assets/stylesheets/_patternfly.scss) file into your assets as `_patternfly-custom.scss`.\nThen comment out components you do not want from `_patternfly-custom`.\nIn the application Sass file, replace `@import 'patternfly'` with:\n\n```scss\n@import 'patternfly-custom';\n```\n\n#### Sass: Number Precision\n\npatternfly-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][patternfly-precision] of 8 (default is 5).\n\nPrecision is set for Rails automatically.\nWhen using ruby Sass compiler standalone you can set it with:\n\n```ruby\n::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max\n```\n\n#### Sass: Autoprefixer\n\nPatternFly requires the use of [Autoprefixer][autoprefixer].\n[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).\n\n#### JavaScript\n\n[`assets/javascripts/patternfly.js`](/assets/javascripts/patternfly.js) contains all of PatternFly JavaScript,\nconcatenated in the correct order.\n\n#### Fonts\n\nThe fonts are referenced as:\n\n```scss\n\"#{$icon-font-path}#{$icon-font-name}.eot\"\n```\n\n`$icon-font-path` defaults to `patternfly/` if asset path helpers are used, and `../fonts/patternfly/` otherwise.\n\nWhen using patternfly-sass with Sprockets, you **must** import the relevant path helpers before PatternFly itself, for example:\n\n```scss\n@import \"patternfly-sprockets\";\n@import \"patternfly\";\n```\n\n## Usage\n\n### Sass\n\nImport PatternFly into a Sass file (for example, application.scss) to get all of PatternFly's styles, mixins and variables!\n\n```scss\n@import \"patternfly\";\n```\n\nThe full list of patternfly variables can be found [here](/assets/stylesheets/patternfly/_variables.scss). You can override these by simply redefining the variable before the `@import` directive, e.g.:\n\n```scss\n$navbar-default-bg: #312312;\n$light-orange: #ff8c00;\n$navbar-default-color: $light-orange;\n\n@import \"patternfly\";\n```\n\n## Version\n\nPatternFly for Sass version may differ from the upstream version in the last number, known as\n[MINOR](http://semver.org/spec/v2.0.0.html). The minor version may be ahead of the corresponding upstream minor.\nThis happens when we need to release Sass-specific changes.\n\nAlways refer to [CHANGELOG.md](/CHANGELOG.md) when upgrading.\n\n---\n\n## Development and Contributing\n\nIf you'd like to help with the development of patternfly-sass itself, read this section.\n\n### Upstream Converter\n\nKeeping patternfly-sass in sync with upstream changes from PatternFly used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this.\n\n**Note: if you're just looking to *use* PatternFly, see the [installation](#installation) section above.**\n\nUpstream changes to the PatternFly project can now be pulled in using the `convert` rake task.\n\nHere's an example run that would pull down the master branch from the main [patternfly/patternfly](https://github.com/patternfly/patternfly) repo:\n\n    rake convert\n\nThis will convert the latest LESS to Sass and update to the latest JS.\nTo convert a specific branch or version, pass the branch name or the commit hash as the first task argument:\n\n    rake convert[tags/v1.2.1]\n\nThe latest converter script is located [here][converter] and does the following:\n\n* Converts upstream patternfly LESS files to its matching SCSS file.\n* Copies all upstream JavaScript into `assets/javascripts/patternfly`, a Sprockets concatenation at `assets/javascripts/patternfly.js`.\n* Copies all upstream font files into `assets/fonts/patternfly`.\n* Sets `Patternfly::PATTERNFLY_SHA` in [version.rb][version] to the branch sha.\n\nThis converter fully converts original LESS to SCSS. Conversion is automatic but requires instructions for certain transformations (see converter output).\nPlease submit GitHub issues tagged with `conversion`.\n\n## Credits\n\npatternfly-sass's converter is a fork of [bootstrap-sass](https://github.com/twbs/bootstrap-sass). The modifications and all other code is made by:\n\n\u003c!-- feel free to make these link wherever you wish --\u003e\n* [Alex Wood](https://github.com/awood)\n* [Dávid Halász](https://github.com/skateman)\n\n[converter]: https://github.com/patternfly/patternfly-sass/blob/master/tasks/converter.rb\n[version]: https://github.com/patternfly/patternfly-sass/blob/master/lib/patternfly-sass/version.rb\n[contrib]: https://github.com/patternfly/patternfly-sass/graphs/contributors\n[antirequire]: https://github.com/bootstrap/bootstrap-sass/issues/79#issuecomment-4428595\n[autoprefixer]: https://github.com/ai/autoprefixer\n","funding_links":[],"categories":["Official Resources"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternfly%2Fpatternfly-sass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatternfly%2Fpatternfly-sass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternfly%2Fpatternfly-sass/lists"}