├── .bowerrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── stale.yml ├── .gitignore ├── .jshintrc ├── .travis.yml ├── CONTRIBUTING.md ├── HISTORY.md ├── LICENSE ├── OSS_Notice.pdf ├── README.md ├── _objects.buttons.scss ├── bower.json ├── css └── px-buttons-design-demo-styles.html ├── demo └── px-buttons-design-demo.html ├── deploy.enc ├── favicon.ico ├── gulpfile.js ├── index.html ├── monogram-wdmk.png ├── package-lock.json ├── package.json ├── sass └── px-buttons-design-demo.scss ├── sassdoc.json ├── scripts └── ghp.sh └── yarn.lock /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "./bower_components" 3 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Submit an Issue 2 | 3 | Hi, 4 | 5 | Thanks for helping us improve the Predix UI platform by submitting an issue. 6 | 7 | Before you begin, please check the list of existing issues to avoid submitting a duplicate issue. 8 | 9 | To help us solve this issue as fast as possible, please fill out the following sections: 10 | 11 | ## Expected behavior and actual behavior: 12 | 13 | ## Steps to reproduce the problem: 14 | 15 | ## Environment (_component version number, Browser (including version), operating system, hardware, etc_): 16 | 17 | ## Screenshots (_optional, but very helpful_): 18 | 19 | ## Code examples help us better understand the issue - follow the appropriate codepen for the component by going to https://predix-ui.com, finding the component in question, and clicking on the pencil icon under the demo. 20 | Once you've created your code example, you can save it under a new url. 21 | Please note that you should NOT use the same methods for production as the ones used in codepen - these methods are not production ready. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Pull Request 2 | 3 | Hi, 4 | 5 | Thanks for helping us improve the Predix UI platform by submitting a Pull Request. 6 | 7 | To help us merge your Pull Request as fast as possible, please fill out the following sections: 8 | 9 | * ## A description of the changes proposed in the pull request: 10 | 11 | * ## A reference to a related issue (if applicable): 12 | 13 | * ## @mentions of the person or team responsible for reviewing proposed changes: 14 | 15 | * ## working tests: 16 | #### The tests need to be functional and/or unit tests, written for the wct framework, and placed in the test folder, following our testing guidelines. -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Issues/PRs with no activity for a year will be marked as stale 2 | daysUntilStale: 365 3 | 4 | # If no one has replied inside a week after an issue is marked stale, close it. 5 | daysUntilClose: 7 6 | 7 | staleLabel: wontfix 8 | markComment: > 9 | This issue or PR has been automatically marked as stale because there has been 10 | no activity in over a year. It will be closed in 1 week if no further activity occurs. 11 | Thanks for your contribution, and please don't hesitate to comment if this issue/PR 12 | is still relevant. 13 | exemptLabels: 14 | - pinned 15 | - security 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | temp 4 | bower_components 5 | .idea 6 | reports 7 | css/noprefix 8 | .yo-rc.json 9 | 10 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esversion": 6, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "immed": true, 6 | "latedef": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "boss": true, 11 | "eqnull": true, 12 | "node": true, 13 | "browser": true, 14 | "expr": true, 15 | "globals": { 16 | "it": false, 17 | "xit": false, 18 | "describe": false, 19 | "xdescribe": false, 20 | "before": false, 21 | "after": false, 22 | "beforeEach": false, 23 | "afterEach": false, 24 | "expect": false, 25 | "spyOn": false, 26 | "alert": false, 27 | "require": false, 28 | "requirejs": false, 29 | "Card": true, 30 | "iOS": false, 31 | "$": true, 32 | "define": false, 33 | "angular": false, 34 | "Polymer": false, 35 | "suite": false, 36 | "test": false, 37 | "assert": false 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | language: node_js 4 | node_js: 5 | - stable 6 | branches: 7 | except: 8 | - gh-pages 9 | addons: 10 | firefox: latest 11 | apt: 12 | sources: 13 | - google-chrome 14 | packages: 15 | - google-chrome-stable 16 | before_script: 17 | - npm install bower 18 | - export PATH=$PWD/node_modules/.bin:$PATH 19 | - bower install 20 | script: 21 | - echo "This design module has no tests" 22 | after_success: 23 | - bash <(curl -s https://copilot.blackducksoftware.com/ci/travis/scripts/upload) 24 | - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then openssl aes-256-cbc -k "$DEPLOYSECRET" 25 | -in deploy.enc -out deploy_key -d; fi 26 | - cd $TRAVIS_BUILD_DIR/scripts 27 | - chmod 755 ghp.sh 28 | - "./ghp.sh" 29 | env: 30 | global: 31 | - secure: ltgcy0uCrp1KmTRFA/oEWns9RziddFmr3qfAFo+s/16PhAIrXjxgz6c4V2W1MuVK9gXvZJyu9PmkVIAR9/ElbmHAkka+Ye3Ktxx6S3mxsv8qcs9WApb7CT9Tf5kR7GHC7b5/e30GQjME9E5KW7horCNK3mfdn5rRgoB4DAG6BoeJsCOfSonuejFTD68JezpXBjRvw30eTtvKpYZY6V+cuFdLgZSIxj2UmDmHB0jPlRhEg3Ke1MOHsk8bEwaaqjRM8h3SCW6RRmo6c+1gCsjR1wJdHCySyed3BCC4Eo51Q0bFMIpAyzlrLtQFJ4ZDupZH/kgBS6WyZ+aAmkmQOmw6rlC3XcPc4b+Iibcq32flsakI3lFa+JRI0c/9lqvtimfg7ziQw+nlUGQ4UWI6DqzLxrn8SpQVC8vorXt9P30i6ODVkB453T3EjezwqYSM7cmfHfhC4PLl/4oThBFVI5nScZNikNDaTIMaLwYa7FrWTbM1vJnmLJu/qNK1RU9XITakYehAbTontKiyt3yboKfFanQb75ftFpxH6ILxXUAeBpZLze6OoAd+dT92y33XwwvzNiKp8hI3E6ENI6ZGF7Ft9c2zm9y/qOGujGhLm+zQSqpuEUlMeN+jLPhNFV/8yROSMbmUTt0FRJn/Ri98pmZr3Q6lTyv6YC+QkcdKASsnu0c= 32 | - secure: S6mb2lI/AtbogSR//POb05ha0O3q5uezY0yt7ywIA8iGbEethA2gq1n6BZ1whg5J6a+AfIshvpYatXAaxj7FhMPKFo4niUdJIhbYYn1dGGwy2xZEKssOJTwbm0+NkgBuS2KGpKj1CTRlDNPy2FLOANB1hF67pCma51/uaJfU4oILnXz+PKtIqU/r64SHWccCdMQycwlZpBIiebsmpn9BYlFQaBdhei4pOiZZ6k/wnZQZUGFmiRnSJXUmmF47xO98DxlbypX1EQmEnh7JOhXV7uTtNY8x1t7Kl5F2y51eFqWOFbYtenjnJ1U4N8ZU0Ufc8JLI4a6UDM+tlOOzlX4nziJihkCtBD/vup9PH5inIBlEZat/viwwku5h2d4ezeHjTwTWlVy8LbtqnNtStjRmAjJk27/3ySG6yr/GSQId6cS1pdw89WFjcai7V4cY5H/jKz3X7ROeX1cHUHEQqfxmIFt+k2b84NEHOzNtjqmUxcJIq9i8qq77PaK2WQkzIin8Q9K1tJ+siTKSlhvDTYsZnWDQ2YZ1fj+V0IYxHkF8bMp96I9gRaPAiNFBtKTHIxLISwbIf2+wFpVrRYVwzwyjkF8hDPJ0M2s7urnONacicYfbh7PZKiFbuQtrWpFVkpsjAP1CKevsSaggwHwC0bO2RKdLAa3wjG5g93RphNelsMs= 33 | - secure: Ge4ddV3rXomW4cx5HTcVVX/G6cymyB2Ua2lhrehuewVS9oUq++kxTdOy5VLN7b+xV1vGgSZL9vV0pQ15jMjlE6WXc/UaG76Jz/0quZ87NRe+XkYp0ezuxEziiPTBWZG6c1oh8DJUS3RKsWeiVfwAmsCYcpPtiP/lS+/rjCtJF/u5KAw8PzQGxJ0slmhxiXMh7g2GDMgNlxJj/bZn1zG/cQDc+qpdTZ8l2dUuYVa4tjH2iZYUb/2HeDE6LIB+Co2YQD5xbYFTMvPuVOBRVDig2KuCS026Fe11/5EX+bOcqRCWOTt5LD006P24YHG1x8d1z3dLsA5otu1U7K4tIc1gGYbpd7p3+faEZs1zq0eMGZ9dlSdownfjGfOAM0NCOHDPXdHy391nYd8uhk16KgqpStwpRRJbJHsn+z28XEhhPZt/WqEZt4zlSxWbo1nl3sdde2jfsoYGL8HFXX3iNEwUGH5T1U7hWdilQkj08rW4ZsCTi4HWPbEUaaeVqEyAZwp5sGlpbpqbRR+m/r8+qJGHG50QAqUN+rLw7TvPBysRsLUO773sW2I8zRPiQCYYFSCIuM490MRAjmfb3PiiTgRJqpXfr0AfDPejV0+tiogHeL6GHHO4c/5KBnBXd+yNuwstxWuJn2YxEYJW487o/B3hq/sZ6Pq9JixcDGjb+y548ZY= 34 | - secure: QxN6tZQDeRco5u/sGfKRMDcrcxoEs3se24n4j2cvgHxhSnZeWDxDi9tfDyhiuvCTxEfhGmEd6j7xGHX9YQ/gr3lWZWUuSHzivPGdQ3Rq04RwSRjmlLpb2j+UOyxbk2WCcaha87HAgr5V+E69OTu3tx8OMReAyRSUZzdIQt/yIpu8dm63FPVLtc/clFN+dZIcbTaf9z9quaPHnKcB8RdcrjJcJ/v5T67ibs1wCQKQlQph5KmpDX17uEGhGmg4YiAHHRQGzq0zfF4nZiuh4JhEYVdPB+4lPbsuOOc6P/QjKrcFOGwSi6p4MUeYccHPJm6jEKzUQE2A1xVy8qI1V45G75x4eo6o0CLuw8kiYN8PP252XhUIs+yWucadsLfWOnjIrH7NY6WWXf4mEJg+jAFq9h4nFfXkTNHmJy6kHtzju0seZ7am45wnxqBlo8N/QBgeZe4L5sxEtWNXHtCqvvnF87D4/exm85aO7Z9+Ma8CuQTZp/rQR/YrfLRSnYh2qIOOPZj40BLiclUvWBbeV4E1FvAhKMYdzWh2GoF89CzWNITHiSAMD1Zvryw9IGniEXssIrmM0DexPvBv81MvCLuwusnmgF81d6Fctak5pBuK1l02Sn2K8njbTzfWsGt1/WQYiqaHBjBi2+8Xg8A12SwveKIxj6wLzAPyjsHlzWFSfCQ= 35 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Predix UI Hi, Want to contribute your suggestions to Predix UI? **Here's how you can help.** Please follow the below steps carefully, so your suggestions will be clear and developers can make effective fixes. ## Using the GitHub issue tracker The GitHub issue tracker is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests), so please respect the following restrictions: * Please **do not** use the GitHub issue tracker for personal support requests. Stack Overflow ([`predix ui`](https://stackoverflow.com/questions/tagged/predix-ui) tag), or [Predix.io](https://predix.io) are better places to get help. * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others. * Please **do not** post vague comments like "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). We reserve the right to delete comments. ## Issues and labels Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them: - `browser bug` - Issues that are reported to us, but are actually the result of a browser-specific bug. These issues are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker. - `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in a Predix UI component. - `css` - Issues stemming from our compiled CSS or source Sass files. - `docs` - Issues for improving or updating our documentation. - `examples` - Issues involving the example templates included in our docs. - `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v3.0.0` to `v3.1.0`). - `gulp` - Issues with our included JavaScript-based gulpfile, which is used to run all our tests, concatenate and compile source files, and more. 2 | - `help wanted` - Issues that we need or would like the community to help us resolve. - `js` - Issues stemming from our compiled or source JavaScript files. - `meta` - Issues with the project itself or our GitHub repository. ## Bug reports A bug is a _demonstrable problem_ caused by the code in the repository. Good bug reports are extremely helpful. Guidelines for bug reports: 0. **Validate and lint your code**; [validate your HTML](http://html5.validator.nu) and [lint your HTML](http://www.dirtymarkup.com/) to ensure your problem isn't caused by a simple error in your own code. 1. **Use the GitHub issue search**; check if the issue has already been reported. 2. **Check if the issue has been fixed**; try to reproduce the issue by using the latest `master` or development branch in the repository. 3. **Isolate the problem**; ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example using [CodePen](http://codepen.io/mdwragg/pen/LNwmpB) or [jsfiddle](https://jsfiddle.net/Lqmcwhw0/3/). A good bug report shouldn't require others to get more information. Please be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect for the outcome? Such details will help people fix potential bugs. Example: > Short and descriptive example bug report title > > A summary of the issue and the browser/OS environment in which it occurs. If > suitable, include the steps required to reproduce the bug. > > 1. This is the first step > 2. This is the second step > 3. Further steps, etc. > > `` - a link to the reduced test case > > Any other information relevant to the bug report. This might include the lines of code that you have identified as > causing the bug, and potential solutions (and your opinions on their > merits). ## Feature Requests Feature requests are welcome, but before opening one, determine if your idea suits the scope and aims of Predix UI. *You* need to make a strong case and convince the Predix UI team to adopt your feature. Please provide as much detail and context as possible. ## Pull Requests Your pull requests�patches, improvements, and new features�are a big help. The requests should be focused and avoid unrelated commits. **Please ask** before making a significant pull request (e.g., implementing features, refactoring code, or porting to a different language) that Predix UI developers might not merge into the component. Please follow the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). **Do not edit any of the CSS files directly!** The files are automatically generated. You should edit the source files in [`sass/`] instead. **Do not edit the `gh-pages` branch.** That branch is generated from the documentation source files and is managed separately by the Predix UI team. Please use the following process to have your work considered for the project: 1. [Fork](https://help.github.com/fork-a-repo/) the component. 2. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: ``` bash git checkout -b ``` 3. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely to be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. 4. Locally merge (or rebase) the latest commits into your branch: ``` bash git pull [--rebase] origin master ``` 5. Push your topic branch up to your fork: ``` bash git push origin ``` 6. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `master` branch. ## Code guidelines ### HTML [Adhere to the Code Guide.](http://codeguide.co/#html) - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags). - Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility. ### CSS [Adhere to the Code Guide.](http://codeguide.co/#css) - When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast). - Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details. ### JS - 2 spaces (no tabs) - "Attractive" - no errors / warnings -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | v2.0.8 2 | ================== 3 | * remove background from tertiary buttons 4 | 5 | v2.0.7 6 | ================== 7 | * fix spacing in demo 8 | 9 | v2.0.6 10 | ================== 11 | * Upgrade docs to use Polymer 2.x, bump px-demo and px-sass-doc dependencies 12 | 13 | v2.0.5 14 | ================== 15 | * add min width (#10) 16 | 17 | v2.0.4 18 | ================== 19 | * runtime theming for demo 20 | 21 | v2.0.3 22 | ================== 23 | * update demo to use unique name 24 | 25 | v2.0.2 26 | ================== 27 | * design feedback on icon size 28 | 29 | v2.0.1 30 | ================== 31 | * Insist on no border-radius for .btn class. Canary added a 4px radius. 32 | 33 | v2.0.0 34 | ================== 35 | * Bump other deps 36 | * Implementation of redesign of all button styles 37 | 38 | v1.1.8 39 | ================== 40 | * fixed demo issue 41 | 42 | v1.1.7 43 | ================== 44 | * added example of text & icon (#9) 45 | 46 | v1.1.6 47 | ================== 48 | * Updated to new demo using px-demo 49 | 50 | v1.1.5 51 | ================== 52 | * rebuilt sass with new colors 53 | 54 | v1.1.4 55 | ================== 56 | * changing ghp.sh to account for Alpha releases 57 | 58 | v1.1.3 59 | ================== 60 | * updated px-colors-design version number 61 | 62 | v1.1.2 63 | ================== 64 | * Add px-iconography-design dependency 65 | 66 | v1.1.1 67 | ================== 68 | * Update missed design depndencies 69 | 70 | v1.1.0 71 | ================== 72 | * Updated dependencies 73 | 74 | v1.0.3 75 | ================== 76 | * Add service worker for gh_pages. 77 | 78 | v1.0.2 79 | ================== 80 | * Gulp fixes & style module naming changes. 81 | 82 | v1.0.1 83 | ================== 84 | * Move demo page to use style module. Clean out dead code. 85 | 86 | v1.0.0 87 | ================== 88 | * Reintroduce CSS style variables 89 | 90 | v0.4.40 91 | ================== 92 | * remove CSS style variables from 0.4.X release track 93 | 94 | v0.4.39 95 | ================== 96 | * added pointer-events:none to disabled buttons 97 | 98 | v0.4.38 99 | ================== 100 | * Adding css variables for button colour styles. 101 | 102 | v0.4.37 103 | ================== 104 | * bumping sassdoc to propogate clipboard changes 105 | 106 | v0.4.36 107 | ================== 108 | * bumping all version of px-sass-doc to get px-clipboard update 109 | 110 | v0.4.35 111 | ================== 112 | * patch test 113 | 114 | v0.4.34 115 | ============================== 116 | * updating to fix safari demo height bug 117 | 118 | v0.4.33 119 | ============================== 120 | * updated to px-sass-doc#0.2.8 121 | 122 | v0.4.32 123 | ============================== 124 | * Updated dependencies 125 | * Updated boilerplate files 126 | 127 | v0.4.31 128 | ============================== 129 | * added minor fixes to demo 130 | 131 | v0.4.30 132 | ============================== 133 | * fixed typo in demo 134 | 135 | v0.4.29 136 | ============================== 137 | * updated demo 138 | 139 | v0.4.28 140 | ============================== 141 | * fixed bower.json 142 | ç 143 | v0.4.27 144 | ============================== 145 | * added new demo and auto-ghp 146 | 147 | v0.4.26 148 | ============================== 149 | * updated bare bones button styles 150 | 151 | v0.4.25 152 | ============================== 153 | * fix sass bug for btn--small line height 154 | 155 | v0.4.24 156 | ============================== 157 | * updated oss notice and readme, pointing to the gh-pages 158 | 159 | v0.4.23 160 | ============================== 161 | * Added OSS notice and changed the repo to be public in bower. 162 | 163 | v0.4.22 164 | ========================== 165 | * Updated License 166 | 167 | v0.4.21 168 | ========================== 169 | * Fixed sass line height calc bug. 170 | 171 | v0.4.20 172 | ========================== 173 | * Turned button height and firefox line-height into variables. 174 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /OSS_Notice.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/predixdesignsystem/px-buttons-design/80d151cc4892d26eaf3dd9869606597e20d24b0f/OSS_Notice.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # px-buttons-design 2 | 3 | The Predix UI Buttons module is a simple, robust, extensible baseline for building entire suites of buttons. This module is a fork of the [inuitcss Buttons module](https://github.com/inuitcss/objects.buttons). 4 | 5 | ## Dependencies 6 | 7 | The `px-buttons-design` module depends on two other Px modules: 8 | 9 | * [px-colors-design](https://github.com/PredixDev/px-colors-design) 10 | * [px-defaults-design](https://github.com/PredixDev/px-defaults-design) 11 | 12 | ## Upstream dependencies 13 | 14 | The `px-buttons-design` module is also an upstream dependency in this meta kit: 15 | 16 | * [px-meta-buttons-design](https://github.com/PredixDev/px-meta-buttons-design) 17 | 18 | ## Installation 19 | 20 | Install this module and its dependencies using bower: 21 | 22 | bower install --save px-buttons-design 23 | 24 | Once installed, `@import` into your project's Sass file in its Objects layer: 25 | 26 | @import "px-buttons-design/_objects.buttons.scss"; 27 | 28 | ## Usage 29 | 30 | These flags are available and, if needed, should be set to `true` prior to importing the module: 31 | 32 | $inuit-enable-btn--small 33 | $inuit-enable-btn--large 34 | $inuit-enable-btn--huge 35 | $inuit-enable-btn--full 36 | $inuit-enable-btn--primary 37 | $inuit-enable-btn--tertiary 38 | $inuit-enable-btn--disabled 39 | $inuit-enable-btn--bare 40 | $inuit-enable-btn--icon 41 | 42 | The following variables are available for use in the module: 43 | 44 | $inuit-btn-color 45 | $inuit-btn-background 46 | $inuit-btn-background--hover 47 | $inuit-btn-background--pressed 48 | $inuit-btn-border-color 49 | $inuit-btn-border-color--hover 50 | $inuit-btn-border-color--pressed 51 | $inuit-btn-shadow 52 | $inuit-btn-shadow--light 53 | $inuit-btn-primary-color 54 | $inuit-btn-primary-background 55 | $inuit-btn-primary-background--hover 56 | $inuit-btn-primary-background--pressed 57 | $inuit-btn-primary-border-color 58 | $inuit-btn-tertiary-color 59 | $inuit-btn-tertiary-background 60 | $inuit-btn-tertiary-background--hover 61 | $inuit-btn-tertiary-background--pressed 62 | $inuit-btn-disabled-color 63 | $inuit-btn-disabled-background 64 | $inuit-btn-disabled-border-color 65 | 66 | ## Options 67 | 68 | These classes are available if the variable flags listed above are set to `true`: 69 | 70 | * `btn--[small|large|huge]`: Small, large or huge buttons 71 | * `btn--[primary|tertiary|disabled]`: Primary, tertiary, or disabled buttons 72 | * `btn--full`: Full width buttons 73 | * `btn--icon`: Circular button for icons 74 | 75 | View the full API [here](http://predixdev.github.io/px-buttons-design/) 76 | -------------------------------------------------------------------------------- /_objects.buttons.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, General Electric 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | //// 18 | /// PX-BUTTONS-DESIGN 19 | /// Defines simple button objects 20 | /// @group px-buttons-design 21 | //// 22 | 23 | @import "px-defaults-design/_settings.defaults.scss"; 24 | @import "px-colors-design/_settings.colors.scss"; 25 | 26 | /// Prepend value for all generated classes 27 | /// @group px-buttons-design:variables:style 28 | /// @type String [default] 29 | /// @todo N/A 30 | $inuit-btn-namespace : $inuit-namespace !default; 31 | 32 | /// Default button font color 33 | /// @group px-buttons-design:variables:style 34 | /// @type Color [default] 35 | /// @todo --px-btn-color 36 | $inuit-btn-color : var(--px-btn-color, $gray15) !default; 37 | 38 | /// Default button background color 39 | /// @group px-buttons-design:variables:style 40 | /// @type Color [default] 41 | /// @todo --px-btn-background 42 | $inuit-btn-background : var(--px-btn-background, $gray3) !default; 43 | 44 | /// Default button hover background color 45 | /// @group px-buttons-design:variables:style 46 | /// @type Color [default] 47 | /// @todo --px-btn-background--hover 48 | $inuit-btn-background--hover : var(--px-btn-background--hover, $gray6) !default; 49 | 50 | /// Default button pressed background color 51 | /// @group px-buttons-design:variables:style 52 | /// @type Color [default] 53 | /// @todo --px-btn-background--pressed 54 | $inuit-btn-background--pressed : var(--px-btn-background--pressed, $gray8) !default; 55 | 56 | /// Default button border color 57 | /// @group px-buttons-design:variables:style 58 | /// @type Color [default] 59 | /// @todo --px-btn-border-color 60 | $inuit-btn-border-color : var(--px-btn-border-color, transparent) !default; 61 | 62 | /// Default button hover border color 63 | /// @group px-buttons-design:variables:style 64 | /// @type Color [default] 65 | /// @todo --px-btn-border-color--hover 66 | $inuit-btn-border-color--hover : var(--px-btn-border-color--hover, transparent) !default; 67 | 68 | /// Default button pressed border color 69 | /// @group px-buttons-design:variables:style 70 | /// @type Color [default] 71 | /// @todo --px-btn-border-color--pressed 72 | $inuit-btn-border-color--pressed : var(--px-btn-border-color--pressed, transparent) !default; 73 | 74 | /// Default button border size and style 75 | /// @group px-buttons-design:variables:style 76 | /// @type Width & Style [default] 77 | /// @todo N/A 78 | $inuit-btn-border : 1px solid !default; 79 | 80 | /// Shadow 81 | /// @group px-buttons-design:variables:style 82 | /// @type Color | String [default] 83 | /// @todo --px-btn-shadow 84 | $inuit-btn-shadow : var(--px-btn-shadow, none); 85 | 86 | /// Small shadow 87 | /// @group px-buttons-design:variables:style 88 | /// @type Color | String [default] 89 | /// @todo --px-btn-shadow--light 90 | $inuit-btn-shadow--light : var(--px-btn-shadow--light, none); 91 | 92 | /// Button height 93 | /// @group px-buttons-design:variables:style 94 | /// @type Height | String [default] 95 | /// @todo --px-btn-height 96 | $inuit-btn-height : var(--px-btn-height, 2em) !default; 97 | 98 | /// Button minimum width 99 | /// @group px-buttons-design:variables:style 100 | /// @type Width | String [default] 101 | /// @todo --px-btn-min-width 102 | $inuit-btn-min-width : var(--px-btn-min-width, 4.6666666667em) !default; 103 | 104 | /// Button line height for Firefox 105 | /// @group px-buttons-design:variables:style 106 | /// @type Line Height | String [default] 107 | /// @todo N/A 108 | $inuit-btn-line-height--firefox : 1.8em !default; 109 | 110 | /// Small button height 111 | /// @group px-buttons-design:variables:style 112 | /// @type Height | String [default] 113 | /// @todo N/A 114 | $inuit-btn-height--small : 1.6666666667em !default; 115 | 116 | /// Small button line height for Firefox 117 | /// @group px-buttons-design:variables:style 118 | /// @type Line Height | String [default] 119 | /// @todo N/A 120 | $inuit-btn-line-height--small--firefox : 1.4em !default; 121 | 122 | /// Primary button font color 123 | /// @group px-buttons-design:variables:style 124 | /// @type Color [default] 125 | /// @todo --px-btn-primary-color 126 | $inuit-btn-primary-color : var(--px-btn-primary-color, $white) !default; 127 | 128 | /// Primary button background color 129 | /// @group px-buttons-design:variables:style 130 | /// @type Color [default] 131 | /// @todo --px-btn-primary-background 132 | $inuit-btn-primary-background : var(--px-btn-primary-background, $gray14) !default; 133 | 134 | /// Primary button hover background color 135 | /// @group px-buttons-design:variables:style 136 | /// @type Color - [default] 137 | /// @todo --px-btn-primary-background--hover 138 | $inuit-btn-primary-background--hover : var(--px-btn-primary-background--hover, $gray16) !default; 139 | 140 | /// Primary button pressed background color 141 | /// @group px-buttons-design:variables:style 142 | /// @type Color - [default] 143 | /// @todo --px-btn-primary-background--pressed 144 | $inuit-btn-primary-background--pressed : var(--px-btn-primary-background--pressed, $gray18) !default; 145 | 146 | /// Primary button border color 147 | /// @group px-buttons-design:variables:style 148 | /// @type Color [default] 149 | /// @todo --px-btn-primary-border-color 150 | $inuit-btn-primary-border-color : var(--px-btn-primary-border-color, transparent) !default; 151 | 152 | /// Tertiary button font color 153 | /// @group px-buttons-design:variables:style 154 | /// @type Color [default] 155 | /// @todo --px-btn-tertiary-color 156 | $inuit-btn-tertiary-color : var(--px-btn-tertiary-color, $primary-default) !default; 157 | 158 | /// Tertiary button border size and style 159 | /// @group px-buttons-design:variables:style 160 | /// @type Color [default] 161 | /// @todo N/A 162 | $inuit-btn-tertiary-border : 1px solid !default; 163 | 164 | /// Tertiary button hover font color 165 | /// @group px-buttons-design:variables:style 166 | /// @type Color [default] 167 | /// @todo --px-btn-tertiary-color--hover 168 | $inuit-btn-tertiary-color--hover : var(--px-btn-tertiary-color--hover, $primary-hover) !default; 169 | 170 | /// Tertiary button pressed font color 171 | /// @group px-buttons-design:variables:style 172 | /// @type Color [default] 173 | /// @todo --px-btn-tertiary-color--pressed 174 | $inuit-btn-tertiary-color--pressed : var(--px-btn-tertiary-color--pressed, $primary-pressed) !default; 175 | 176 | /// Tertiary button background color 177 | /// @group px-buttons-design:variables:style 178 | /// @type Color [default] 179 | /// @todo --px-btn-tertiary-background 180 | $inuit-btn-tertiary-background : var(--px-btn-tertiary-background, transparent) !default; 181 | 182 | /// Tertiary button hover background color 183 | /// @group px-buttons-design:variables:style 184 | /// @type Color - [default] 185 | /// @todo --px-btn-tertiary-background--hover 186 | $inuit-btn-tertiary-background--hover : var(--px-btn-tertiary-background--hover, $gray4) !default; 187 | 188 | /// Tertiary button pressed background color 189 | /// @group px-buttons-design:variables:style 190 | /// @type Color - [default] 191 | /// @todo --px-btn-tertiary-background--pressed 192 | $inuit-btn-tertiary-background--pressed : var(--px-btn-tertiary-background--pressed, $gray7) !default; 193 | 194 | /// Tertiary button border color 195 | /// @group px-buttons-design:variables:style 196 | /// @type Color [default] 197 | /// @todo --px-btn-tertiary-border-color 198 | $inuit-btn-tertiary-border-color : var(--px-btn-tertiary-border-color, $gray8) !default; 199 | 200 | /// Disabled button font color 201 | /// @group px-buttons-design:variables:style 202 | /// @type Color [default] 203 | /// @todo --px-btn-disabled-color 204 | $inuit-btn-disabled-color : var(--px-btn-disabled-color, rgba($black,.2)) !default; 205 | 206 | /// Disabled button border size and style 207 | /// @group px-buttons-design:variables:style 208 | /// @type Color [default] 209 | /// @todo N/A 210 | $inuit-btn-disabled-border : 1px solid !default; 211 | 212 | /// Disabled button background color 213 | /// @group px-buttons-design:variables:style 214 | /// @type Color [default] 215 | /// @todo --px-btn-disabled-background 216 | $inuit-btn-disabled-background : var(--px-btn-disabled-background, transparent) !default; 217 | 218 | /// Disabled button border color 219 | /// @group px-buttons-design:variables:style 220 | /// @type Color [default] 221 | /// @todo --px-btn-disabled-border-color 222 | $inuit-btn-disabled-border-color : var(--px-btn-disabled-border-color, rgba($black,.2)) !default; 223 | 224 | /// Call to action button font color 225 | /// @group px-buttons-design:variables:style 226 | /// @type Color [default] 227 | /// @todo --px-btn-call-to-action-color 228 | $inuit-btn-call-to-action-color : var(--px-btn-call-to-action-color, $white) !default; 229 | 230 | /// Call to action button border color 231 | /// @group px-buttons-design:variables:style 232 | /// @type Color [default] 233 | /// @todo --px-btn-call-to-action-border-color 234 | $inuit-btn-call-to-action-border-color : var(--px-btn-call-to-action-border-color, transparent) !default; 235 | 236 | /// Call to action button background color 237 | /// @group px-buttons-design:variables:style 238 | /// @type Color [default] 239 | /// @todo --px-btn-call-to-action-background 240 | $inuit-btn-call-to-action-background : var(--px-btn-call-to-action-background, $primary-default) !default; 241 | 242 | /// Call to action button hover background color 243 | /// @group px-buttons-design:variables:style 244 | /// @type Color - [default] 245 | /// @todo --px-btn-call-to-action-background--hover 246 | $inuit-btn-call-to-action-background--hover : var(--px-btn-call-to-action-background--hover, $primary-hover) !default; 247 | 248 | /// Call to action button pressed background color 249 | /// @group px-buttons-design:variables:style 250 | /// @type Color - [default] 251 | /// @todo --px-btn-call-to-action-background--pressed 252 | $inuit-btn-call-to-action-background--pressed : var(--px-btn-call-to-action-background--pressed, $primary-pressed) !default; 253 | 254 | /// Icon button background color 255 | /// @group px-buttons-design:variables:style 256 | /// @type Color [default] 257 | /// @todo --px-btn-icon-background 258 | $inuit-btn-icon-background : var(--px-btn-icon-background, transparent) !default; 259 | 260 | /// Icon button border size and style 261 | /// @group px-buttons-design:variables:style 262 | /// @type Color [default] 263 | /// @todo --px-btn-icon-border 264 | $inuit-btn-icon-border : var(--px-btn-icon-border, 0px solid) !default; 265 | 266 | /// Bare button text color 267 | /// @group px-buttons-design:variables:style 268 | /// @type Color [default] 269 | /// @todo --px-btn-bare-color 270 | $inuit-btn-bare-color : var(--px-btn-bare-color, $gray15) !default; 271 | 272 | /// Bare button hover text color 273 | /// @group px-buttons-design:variables:style 274 | /// @type Color [default] 275 | /// @todo --px-btn-bare-color--hover 276 | $inuit-btn-bare-color--hover : var(--px-btn-bare-color--hover, $primary-default) !default; 277 | 278 | /// Bare button pressed text color 279 | /// @group px-buttons-design:variables:style 280 | /// @type Color [default] 281 | /// @todo --px-btn-bare-color--pressed 282 | $inuit-btn-bare-color--pressed : var(--px-btn-bare-color--pressed, $primary-pressed) !default; 283 | 284 | /// Primary bare button text color 285 | /// @group px-buttons-design:variables:style 286 | /// @type Color [default] 287 | /// @todo --px-btn-primary-bare-color--visited 288 | $inuit-primary-bare-color--visited : var(--px-btn-primary-bare-color--visited, $primary-default) !default; 289 | 290 | /// Primary bare button hover text color 291 | /// @group px-buttons-design:variables:style 292 | /// @type Color [default] 293 | /// @todo --px-btn-primary-bare-color--hover 294 | $inuit-primary-bare-color--hover : var(--px-btn-primary-bare-color--hover, $primary-hover) !default; 295 | 296 | /// Primary bare button pressed text color 297 | /// @group px-buttons-design:variables:style 298 | /// @type Color [default] 299 | /// @todo --px-btn-primary-bare-color--pressed 300 | $inuit-primary-bare-color--pressed : var(--px-btn-primary-bare-color--pressed, $primary-pressed) !default; 301 | 302 | 303 | /// Produce CSS for primary buttons 304 | /// @group px-buttons-design:variables:flag 305 | /// @type Boolean [default] 306 | $inuit-enable-btn--primary : false !default; 307 | 308 | /// Produce CSS for tertiary buttons 309 | /// @group px-buttons-design:variables:flag 310 | /// @type Boolean [default] 311 | $inuit-enable-btn--tertiary : false !default; 312 | 313 | /// Produce CSS for call to action buttons 314 | /// @group px-buttons-design:variables:flag 315 | /// @type Boolean [default] 316 | $inuit-enable-btn--call-to-action : false !default; 317 | 318 | /// Produce CSS for small buttons 319 | /// @group px-buttons-design:variables:flag 320 | /// @type Boolean [default] 321 | $inuit-enable-btn--small : false !default; 322 | 323 | /// Produce CSS for large buttons 324 | /// @group px-buttons-design:variables:flag 325 | /// @type Boolean [default] 326 | $inuit-enable-btn--large : false !default; 327 | 328 | /// Produce CSS for huge buttons 329 | /// @group px-buttons-design:variables:flag 330 | /// @type Boolean [default] 331 | $inuit-enable-btn--huge : false !default; 332 | 333 | /// Produce CSS for full buttons 334 | /// @group px-buttons-design:variables:flag 335 | /// @type Boolean [default] 336 | $inuit-enable-btn--full : false !default; 337 | 338 | /// Produce CSS for icon buttons 339 | /// @group px-buttons-design:variables:flag 340 | /// @type Boolean [default] 341 | $inuit-enable-btn--icon : false !default; 342 | 343 | /// Produce CSS for bare buttons 344 | /// @group px-buttons-design:variables:flag 345 | /// @type Boolean [default] 346 | $inuit-enable-btn--bare : false !default; 347 | 348 | /// Produce CSS for bare--primary buttons 349 | /// @group px-buttons-design:variables:flag 350 | /// @type Boolean [default] 351 | $inuit-enable-btn--bare--primary : false !default; 352 | 353 | /// Produce CSS for disabled buttons 354 | /// @group px-buttons-design:variables:flag 355 | /// @type Boolean [default] 356 | $inuit-enable-btn--disabled : false !default; 357 | 358 | /// Assume `box-sizing : border-box;` 359 | /// @group px-buttons-design:variables:style 360 | /// @type Boolean [default] 361 | /// @todo N/A 362 | $inuit-global-border-box : false !default; 363 | 364 | /// Default buttons 365 | .#{$inuit-btn-namespace}btn, 366 | %#{$inuit-btn-namespace}btn { 367 | display: inline-block; 368 | overflow: visible; 369 | height: $inuit-btn-height; 370 | min-width: $inuit-btn-min-width; 371 | margin: 0; 372 | border: $inuit-btn-border $inuit-btn-border-color; 373 | border-radius: 0 !important; 374 | padding: 0 calc(#{$inuit-btn-height} / 2); 375 | box-shadow: $inuit-btn-shadow--light; 376 | font: inherit; 377 | line-height: calc(#{$inuit-btn-height} - 2px); 378 | -webkit-font-smoothing: antialiased; 379 | cursor: pointer; 380 | text-align: center; 381 | text-decoration: none; 382 | text-transform: none; 383 | white-space: nowrap; 384 | background-color: $inuit-btn-background; 385 | transition: background .4s, border-color .4s, color .4s; 386 | &, 387 | &:link, 388 | &:visited, 389 | &:hover, 390 | &:active { 391 | color: $inuit-btn-color; 392 | } 393 | &:hover, 394 | &:focus { 395 | border-color: $inuit-btn-border-color--hover; 396 | box-shadow: $inuit-btn-shadow; 397 | background-color: $inuit-btn-background--hover; 398 | } 399 | &:active { 400 | border-color: $inuit-btn-border-color--pressed; 401 | box-shadow: none; 402 | background-color: $inuit-btn-background--pressed; 403 | } 404 | &:active { 405 | outline: none; 406 | } 407 | } 408 | 409 | /// Workaround for FF since it does not support calc(). 410 | /// Other buttons appear ok with the height declaration, but non-button elements do not. 411 | @-moz-document url-prefix() { 412 | .#{$inuit-btn-namespace}btn:not(button), 413 | %#{$inuit-btn-namespace}btn:not(button) { 414 | line-height:$inuit-btn-line-height--firefox; 415 | } 416 | } 417 | 418 | /// All buttons 419 | button.#{$inuit-btn-namespace}btn { 420 | -webkit-appearance: button; 421 | } 422 | 423 | /// Establish default space between adjacent buttons 424 | .#{$inuit-btn-namespace}btn + .#{$inuit-btn-namespace}btn { 425 | margin-left: $inuit-base-spacing-unit--small; 426 | } 427 | 428 | /// Buttons with no styles (good a11y practice to use