Repository: pure-css/pure Branch: main Commit: d35fb6fcbcd8 Files: 94 Total size: 411.3 KB Directory structure: gitextract_j5euxoq_/ ├── .csslintrc ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── dependabot.yml │ ├── stale.yml │ └── workflows/ │ ├── deploy.yml │ └── test.yml ├── .gitignore ├── .npmrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CREDITS.md ├── Gruntfile.js ├── HISTORY.md ├── LICENSE ├── README.md ├── RELEASE.md ├── composer.json ├── eslint.config.mjs ├── index.js ├── package.json ├── site/ │ ├── .gitignore │ ├── README.md │ ├── components/ │ │ ├── CodeBlock.js │ │ ├── Example.js │ │ ├── Footer.js │ │ ├── Header.js │ │ ├── Menu.js │ │ └── SectionHeader.js │ ├── docusaurus.config.js │ ├── lib/ │ │ ├── pure.js │ │ └── utils.js │ ├── package.json │ ├── src/ │ │ ├── index.js │ │ ├── pages/ │ │ │ ├── base/ │ │ │ │ └── index.js │ │ │ ├── buttons/ │ │ │ │ └── index.js │ │ │ ├── customize/ │ │ │ │ └── index.js │ │ │ ├── extend/ │ │ │ │ └── index.js │ │ │ ├── forms/ │ │ │ │ └── index.js │ │ │ ├── grids/ │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── index.js │ │ │ ├── layouts/ │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── menus/ │ │ │ │ └── index.js │ │ │ ├── start/ │ │ │ │ ├── index.js │ │ │ │ └── styles.css │ │ │ ├── styles.css │ │ │ ├── tables/ │ │ │ │ └── index.js │ │ │ └── tools/ │ │ │ └── index.js │ │ └── theme/ │ │ └── Layout.js │ └── static/ │ ├── .nojekyll │ ├── css/ │ │ └── main.css │ ├── js/ │ │ ├── grids.js │ │ ├── menus.js │ │ ├── track-downloads.js │ │ └── ui.js │ └── layouts/ │ ├── blog/ │ │ ├── index.html │ │ └── styles.css │ ├── email/ │ │ ├── index.html │ │ └── styles.css │ ├── gallery/ │ │ ├── index.html │ │ └── styles.css │ ├── marketing/ │ │ ├── index.html │ │ └── styles.css │ ├── pricing/ │ │ ├── index.html │ │ └── styles.css │ ├── side-menu/ │ │ ├── index.html │ │ └── styles.css │ ├── tucked-menu/ │ │ └── index.html │ └── tucked-menu-vertical/ │ └── index.html ├── src/ │ ├── base/ │ │ └── css/ │ │ └── base.css │ ├── buttons/ │ │ ├── css/ │ │ │ ├── buttons-core.css │ │ │ └── buttons.css │ │ └── tests/ │ │ └── manual/ │ │ └── button.html │ ├── forms/ │ │ ├── css/ │ │ │ ├── forms-r.css │ │ │ └── forms.css │ │ └── tests/ │ │ └── manual/ │ │ └── forms.html │ ├── grids/ │ │ ├── README.md │ │ ├── css/ │ │ │ └── grids-core.css │ │ └── tests/ │ │ └── manual/ │ │ └── responsive.html │ ├── menus/ │ │ ├── css/ │ │ │ ├── menus-core.css │ │ │ ├── menus-dropdown.css │ │ │ ├── menus-horizontal.css │ │ │ ├── menus-scrollable.css │ │ │ └── menus-skin.css │ │ └── tests/ │ │ └── manual/ │ │ └── menus.html │ └── tables/ │ ├── css/ │ │ └── tables.css │ └── tests/ │ └── manual/ │ └── tables.html ├── tasks/ │ ├── license.js │ └── suppress.js └── test/ └── index.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .csslintrc ================================================ { "adjoining-classes" : false, "box-sizing" : false, "display-property-grouping": false, "fallback-colors" : false, "order-alphabetical" : false, "star-property-hack" : false, "unqualified-attributes" : false } ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** - Pure Version: [e.g. 2.0.0] Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ Please consider the following before submitting a pull request: Guidelines for contributing: https://github.com/pure-css/pure/blob/main/CONTRIBUTING.md Example of changes on an interactive website such as the following: - http://jsbin.com/ - http://jsfiddle.net/ - http://codepen.io/pen/ --- I confirm that this contribution is made under a BSD license and that I have the authority necessary to make this contribution on behalf of its copyright owner. ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: # repository root - package-ecosystem: npm directory: "/" schedule: interval: daily open-pull-requests-limit: 10 ignore: - dependency-name: autoprefixer versions: - 10.x # purecss.io site - package-ecosystem: npm directory: "/site" schedule: interval: daily open-pull-requests-limit: 10 groups: docusaurus: patterns: - '@docusaurus/*' ================================================ FILE: .github/stale.yml ================================================ # Configuration for probot-stale - https://github.com/probot/stale # Number of days of inactivity before an Issue or Pull Request becomes stale daysUntilStale: 60 # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. daysUntilClose: 7 # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) onlyLabels: [] # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - pinned - security - "[Status] Maybe Later" - enhancement # Set to true to ignore issues in a project (defaults to false) exemptProjects: false # Set to true to ignore issues in a milestone (defaults to false) exemptMilestones: false # Set to true to ignore issues with an assignee (defaults to false) exemptAssignees: false # Label to use when marking as stale staleLabel: wontfix # Comment to post when marking as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when removing the stale label. # unmarkComment: > # Your comment here. # Comment to post when closing a stale Issue or Pull Request. closeComment: > Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. # Limit the number of actions per hour, from 1-30. Default is 30 limitPerRun: 30 # Limit to only `issues` or `pulls` # only: issues # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': # pulls: # daysUntilStale: 30 # markComment: > # This pull request has been automatically marked as stale because it has not had # recent activity. It will be closed if no further activity occurs. Thank you # for your contributions. # issues: # exemptLabels: # - confirmed ================================================ FILE: .github/workflows/deploy.yml ================================================ name: Deploy on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v2 with: node-version: 20.x - uses: webfactory/ssh-agent@v0.5.0 with: ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} - name: Release to GitHub Pages env: DEPLOYMENT_BRANCH: main GH_EMAIL: ${{ secrets.GH_EMAIL }} GH_NAME: ${{ secrets.GH_NAME }} GIT_USER: ${{ secrets.GH_NAME }} USE_SSH: true run: | npm ci git config --global user.name "${GH_NAME}" git config --global user.email "${GH_EMAIL}" cd site npm install npm run deploy ================================================ FILE: .github/workflows/test.yml ================================================ name: Testing on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v2 with: node-version: 20.x - run: npm ci - run: npm run lint - run: npm test ================================================ FILE: .gitignore ================================================ .DS_Store .nyc_output/ artifacts/ build/ coverage/ node_modules/ release/ ================================================ FILE: .npmrc ================================================ ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at . All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: CONTRIBUTING.md ================================================ # How to Contribute to Pure Feel free to [open issues][] and send pull requests on GitHub! When sending a pull request, please create a new topic/feature branch, and send your pull request from that branch. Please do _not_ send pull requests from your `main` branch because this tends to lead to merge conflicts. In order for us to to merge your pull requests, we need you to review and sign our [Contributor License Agreement][]. The CLA protects you and your contributions along with all other developers who use Pure. [contributor license agreement]: #contributor-license-agreement [open issues]: https://github.com/pure-css/pure/issues ## Docs and Website [Pure's website][pure] is located in the `site` directory. Please feel free to open issues or questions in the Issue tab. [pure]: http://purecss.io/ [pure-site]: https://github.com/pure-css/pure/tree/main/site ## Building and Testing Pure Pure uses [Grunt][], a JavaScript task runner that runs on [Node.js][], for building and testing. You'll need Node.js and Grunt installed to work on Pure. Once installed, clone the `pure` repo (either the main repo or your fork) and install Pure's gruntplugins via npm: ```shell $ git clone git://github.com/pure-css/pure.git $ cd pure/ $ npm install ``` Building Pure is easy, run `grunt`: ```shell $ grunt ``` Pure uses [CSSLint][] for basic testing to make sure we're shipping valid CSS which complies with standard best practices. To run Pure's tests, run `grunt test`: ```shell $ grunt test ``` **Note:** To save your fingers from The Developer Konami Code: ⌘⇥ ↑ ⏎ run the `grunt watch` task with will continuously test and build Pure anytime a CSS file changes: ```shell $ grunt watch ``` ### Browser Support and Testing Pure is tested and works in: - Latest Stable: Edge, Firefox, Chrome, Safari - iOS 6+ - Android 4.x Before sending pull requests, please ensure that you open the test HTML files in these environments. If you don't have access to all these environments, list the ones that you have tested in on the pull request description. That way, we know what's missing, and can help you out. [grunt]: http://gruntjs.com/ [node.js]: http://nodejs.org/ [csslint]: https://github.com/stubbornella/csslint ## Coding Standards and Style Guide Pure has adopted the [SMACSS][] conventions for writing CSS. If you are new to SMACSS, you should give it a read, especially the section on [module rules][]. The [Extend][] section of the Pure website more info about the style guide and naming conventions, along with examples of how to extend the library. [smacss]: http://smacss.com/ [module rules]: http://smacss.com/book/type-module [extend]: http://purecss.io/extend/ ## Contributor License Agreement Please [sign the Yahoo CLA][cla] after sending pull requests. We can't merge your pull requests unless you have a signed CLA. The CLA ensures that everyone who submits a work of authorship to Pure is contributing work that is their own or for which they can authoritatively speak. This protects the all of of developers who use Pure in their daily work, all of whom rely on Pure's BSD license to appropriately cover their use of the library. The CLA does **not** transfer title or copyright of your contributed work to Yahoo!. It merely guarantees that you approve the use of your work within Pure and by those who use the library under the terms of its license. If you want to make contributions (software, documentation or other material) to the Pure Project and such contributions could be covered under intellectual property laws, you must submit a Contributor License Agreement (CLA) prior to making your contribution: 1. Review Pure's BSD license. All of Pure's code is issued under this license, and contributions you make to the library will be subject to this license. **Note:** that the BSD license is very liberal; it allows for reuse and adaptation in commercial projects. 2. [Sign the Yahoo CLA][cla] online. If you have questions about the CLA, you can address them to opensource-cla@yahoo-inc.com. [cla]: https://yahoocla.herokuapp.com/ ================================================ FILE: CREDITS.md ================================================ Normalize.css License ===================== Copyright (c) Nicolas Gallagher and Jonathan Neal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Gruntfile.js ================================================ module.exports = function (grunt) { // -- Config ------------------------------------------------------------------- grunt.initConfig({ nick : 'pure', pkg : grunt.file.readJSON('package.json'), // -- Clean Config --------------------------------------------------------- clean: { build : ['build/'], build_res: ['build/*-r.css'], release : ['release/<%= pkg.version %>/'] }, // -- Copy Config ---------------------------------------------------------- copy: { build: { src : 'src/**/css/*.css', dest : 'build/', expand : true, flatten: true }, release: { src : '{LICENSE,README.md,HISTORY.md}', dest: 'build/' } }, // -- Concat Config -------------------------------------------------------- concat: { build: { files: [ {'build/base.css': [ 'node_modules/normalize.css/normalize.css', 'build/base.css' ]}, {'build/buttons.css': [ 'build/buttons-core.css', 'build/buttons.css' ]}, {'build/forms-nr.css': [ 'build/forms.css' ]}, {'build/forms.css': [ 'build/forms-nr.css', 'build/forms-r.css' ]}, {'build/grids.css': [ 'build/grids-core.css', 'build/grids-units.css' ]}, {'build/menus.css': [ 'build/menus-core.css', 'build/menus-horizontal.css', 'build/menus-dropdown.css', 'build/menus-scrollable.css', 'build/menus-skin.css', ]}, // Rollups {'build/<%= nick %>.css': [ 'build/base.css', 'build/grids.css', 'build/buttons.css', 'build/forms.css', 'build/menus.css', 'build/tables.css' ]}, {'build/<%= nick %>-nr.css': [ 'build/base.css', 'build/grids.css', 'build/buttons.css', 'build/forms-nr.css', 'build/menus.css', 'build/tables.css' ]} ] } }, // -- PostCSS Config -------------------------------------------------------- postcss: { options: { processors: [ require('autoprefixer')() ] }, dist: { src: 'build/*.css' } }, // -- CSSLint Config ------------------------------------------------------- csslint: { options: { csslintrc: '.csslintrc' }, base : ['src/base/css/*.css'], buttons: ['src/buttons/css/*.css'], forms : ['src/forms/css/*.css'], grids : ['src/grids/css/*.css'], menus : ['src/menus/css/*.css'], tables : ['src/tables/css/*.css'] }, // -- CSSMin Config -------------------------------------------------------- cssmin: { options: { noAdvanced: true }, files: { expand: true, src : 'build/*.css', ext : '-min.css' } }, // -- Compress Config ------------------------------------------------------ compress: { release: { options: { archive: 'release/<%= pkg.version %>/<%= nick %>-<%= pkg.version %>.tar.gz' }, expand : true, flatten: true, src : 'build/*', dest : '<%= nick %>/<%= pkg.version %>/' } }, // -- License Config ------------------------------------------------------- license: { normalize: { options: { banner: [ '/*!', 'normalize.css v<%= pkg.devDependencies["normalize-css"] %> | MIT License | https://necolas.github.io/normalize.css/', 'Copyright (c) Nicolas Gallagher and Jonathan Neal', '*/\n' ].join('\n') }, expand: true, cwd : 'build/', src : ['base*.css', '<%= nick %>*.css'] }, yahoo: { options: { banner: [ '/*!', 'Pure v<%= pkg.version %>', 'Copyright 2013 Yahoo!', 'Licensed under the BSD License.', 'https://github.com/pure-css/pure/blob/main/LICENSE', '*/\n' ].join('\n') }, expand: true, src : ['build/*.css'] } }, // -- Pure Grids Units Config ---------------------------------------------- pure_grids: { default_units: { dest: 'build/grids-units.css', options: { units: [5, 24] } }, responsive: { dest: 'build/grids-responsive.css', options: { mediaQueries: { sm: 'screen and (min-width: 35.5em)', // 568px md: 'screen and (min-width: 48em)', // 768px lg: 'screen and (min-width: 64em)', // 1024px xl: 'screen and (min-width: 80em)', // 1280px xxl: 'screen and (min-width: 120em)', // 1920px xxxl: 'screen and (min-width: 160em)', // 2560px x4k: 'screen and (min-width: 240em)' // 3840px } } } }, // -- CSS Selectors Config ------------------------------------------------- css_selectors: { base: { src : 'build/base.css', dest: 'build/base-context.css', options: { mutations: [{prefix: '.pure'}] } } }, // -- Watch/Observe Config ------------------------------------------------- observe: { src: { files: 'src/**/css/*.css', tasks: ['test', 'suppress', 'build'], options: { interrupt: true } } } }); // -- Main Tasks --------------------------------------------------------------- // npm tasks. grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-csslint'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-css-selectors'); grunt.loadNpmTasks('@lodder/grunt-postcss'); grunt.loadNpmTasks('grunt-pure-grids'); // Local tasks. grunt.loadTasks('tasks/'); grunt.registerTask('default', ['test', 'build']); grunt.registerTask('test', ['csslint']); grunt.registerTask('build', [ 'clean:build', 'copy:build', 'pure_grids', 'concat:build', 'clean:build_res', 'css_selectors:base', 'postcss', 'cssmin', 'license' ]); // Makes the `watch` task run a build first. grunt.renameTask('watch', 'observe'); grunt.registerTask('watch', ['default', 'observe']); grunt.registerTask('release', [ 'default', 'clean:release', 'copy:release', 'compress:release' ]); }; ================================================ FILE: HISTORY.md ================================================ # Pure Change History ## 3.0.0 (2022-10-26) This is a major version bump that has the following changes: - Removed the `font-family` hack from Grids (#1074) - IE is no longer supported and all code and documentation references have been removed - The browserslist configuration has been updated to "> 1%" browser usage. You can use the [browserslist tool](https://browserslist.dev/?q=PiAxJQ%3D%3D) to see which browsers this now covers. ### Migration This major version should not include too many breaking changes for your app, but please check the following: - Since the list of supported browsers has now changed, please check that your site is still functioning in any browsers that you continue to support. - Verify your grids are still functioning correctly with the `font-family` hack still removed. This should not affect you as it was a hack for older browsers. 2.2.0 (2022-10-19) --- - feat: added media queries for 2.5K and 4K screens (#1065) 2.1.0 (2022-03-14) --- - feat: support xxl (1920px) media query 2.0.6 (2021-04-28) --- - chore: update to cssmin@4 2.0.5 (2021-01-20) --- - fix #824: cursor style for disabled menu link 2.0.4 (2021-01-19) --- - chore: update license path 2.0.3 (2020-05-11) --- - fix: update browser list for all environments 2.0.2 (2020-05-11) --- - refactor: Remove button CSS for IE 6-8 2.0.1 (2020-05-05) --- - refactor: remove usage of deprecated webkit-overflow-scrolling 2.0.0 (2020-05-05) --- This is a major version bump that has the following changes: - Reduced overall size of Pure to 3.6kb (gzipped/min) - Updated Normalize to v8. - Removed bower - Removed old IE 8 hacks - Removed deprecated `pure-help-inline` form class ### Migration This major version should not include too many breaking changes for your app, but please check the following: - Normalize Upgraded from v3 to v8. [Many things have changed](https://github.com/necolas/normalize.css/blob/main/CHANGELOG.md), be sure to verify your site properly. - Normalize removed the default `font-family`, but we have added to the `base.css` for consistency and due to the fact that the grids system leverages the `font-family` for `letter-spacing`. ### New Browser support - Chrome - Edge - Firefox - Internet Explorer 10+ - Safari 8+ - Opera > Deprecated support for < IE 10 ## 1.0.1 (2019-07-10) - Fix "selected" menu item labels in nested menus (#708) - Fix bug in pure-button active state's border color. (#729) - Fix horizontal scrollbars not appearing in IE11 and Chrome (#740) - Fix pure-table-bordered issues (#718) 1.0.0 (2017-06-05) --- The community has battle-tested Pure and provided valuable feedback. We are now at a place where we can guarantee backwards compatibility through all subsequent 1.x releases. We hope you have found Pure to be useful and unobtrusive.. To provide feedback, please comment on this GitHub issue, or file a new issue to have it tracked as a separate thread. ## 0.6.2 (2017-01-05) - Added proper module API for node users [#619] ### Buttons - Added Button Groups to Pure [#621] ### Menus - Reset style for horizontal dropdown separator [#620] 0.6.1 (2016-10-12) --- - Migrate to PostCSS for browser prefixes [#617] - Remove duplicate Firefox inner focus border [#457] - Fix grid inside table in IE 10/11 [#504] - Fix CSSLint issues [#609] - Upgraded grunt dependencies to 1.x [#609] 0.6.0 (2015-02-07) --- - Upgraded Normalize.css to 3.0.2. - Dropped IE7 support. - Refactored Menus. - Numerous minor bug fixes. ### Menus - Implemented flatter, low-specificity selectors, not attached to HTML elements, for easier customization. - Removed pure-menu-open class. - Added pure-menu-scrollable capability, to allow for scrollable menus when restricted by width or height. - Added pure-menu-allow-hover to reveal dropdowns on hover. - Removed various default styling properties, making menus a bit more bare-bones, a bit less opinionated, a bit easier to customize on top. - Broke Menu up into files for core, horizontal, dropdowns, scrollable, and skin, again for improved optimization and ease of customization: take only what you need. - Removed Paginator. - While not part of the Pure repo itself, the accompanying Pure website now features additional menu examples and an example script for enabling dropdowns and improved accessiblity. 0.5.0 (2014-05-27) --- ### Base - Added the `.pure-img` class name for make images scale with the viewport in fluid layouts. ### Grids - **[!]** Removed `.pure-g-r` from core, in favor of a mobile-first responsive grid system. ([#24][], [#267][]) To use the mobile-first grid system, you need to pull in `pure.css`, along with `grids-responsive.css`. We also have `grids-responsive-old-ie.css` that you can serve to IE < 9 users so that they can view a desktop-version of your website: ```html ``` Find out more about the new grid system at . ### Tables - Switched cell padding in Tables from `px` to `em` units, and also increased the amount of padding to `padding: 0.5em 1em`. [#24]: https://github.com/pure-css/pure/issues/24 [#267]: https://github.com/pure-css/pure/pull/267 ## 0.4.2 (2014-02-13) - Added `main` to Pure's `bower.json` file to allow easier integration with build processes and tooling. ([#286][] @stevenvachon) ### Forms - Improved how `` elements look in Chrome by fixing paddings. ([#283][] @jpetto) - Removed `font-size` rules from ``, ``, and `
` elements within `.pure-form`. Font sizes are now inherited from the application's CSS file. ([#265][]) - Invalid `` elements within a Pure Form no longer explicitly set a `border-width`. ([#295][] @kwando) [#265]: https://github.com/pure-css/pure/issues/265 [#283]: https://github.com/pure-css/pure/issues/283 [#286]: https://github.com/pure-css/pure/issues/286 [#295]: https://github.com/pure-css/pure/issues/295 ## 0.4.1 (2014-02-06) ### Base - Elements that have Pure classnames which set a `display` declaration _and_ use the `hidden` HTML attribute will now properly be hidden. With these changes, the following button will be hidden from view: ```html ``` A new rule for the `[hidden]` selector has been added with the declaration: `display: none !important;`. This is a time where it's appropriate for a project like Pure to use `!important`. ([#177][]) ### Buttons - Removed all the occurrences of `-ms-linear-gradient()` from Buttons since it has never been in the final version of IE 10. ([#200][]: @AurelioDeRosa) - `` Buttons now have the same height as non-input buttons. `font-family: inherit;` has been added to the `.pure-button` selector to normalize the difference in height. ([#221][] @narcis-radu) - Buttons now have visually uniform default `padding` on all four sides. The left/right padding is 2x the top/bottom padding. ([#191][] @achalv) ### Forms - Added `vertical-align: top;` to `

Input elements have fluid width sizes in a syntax that is similar to Pure Grids. You can apply a pure-input-* class to these elements.






You can control input sizing even further by wrapping them in grid containers. In the example below, the <input> elements have a pure-input-1 class, but are wrapped in a <div> with a specific grid class.

To mark a form control as required, add the required attribute.

To disable a form control, add the disabled attribute.

To make a form input read-only, add the readonly attribute. The difference between disabled and readonly is read-only inputs are still focusable. This allows people to interact with the input and select its text, whereas disabled controls are not interactive.

To display a form control with rounded corners, add the pure-input-rounded classname.

To normalize and align checkboxes and radio inputs, add the pure-checkbox or pure-radio classname.

); } export default Forms; ================================================ FILE: site/src/pages/grids/index.js ================================================ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import React from 'react'; import Layout from '../../theme/Layout'; import Header from '../../../components/Header'; import CodeBlock from '../../../components/CodeBlock'; import SectionHeader from '../../../components/SectionHeader'; import { stripIndent } from 'common-tags'; import './styles.css'; const title = 'Grids'; const description = 'Fully customizable and responsive CSS grids.'; function Grids() { const context = useDocusaurusContext(); const {siteConfig = {}} = context; const { customFields: { pureVersion } } = siteConfig; return (

Pure Grids are easy to work with, and very powerful. There are a few simple concepts to keep in mind:

Grid classes vs. unit classes
Pure Grids consist of two types of classes: the grid class (pure-g) and unit classes (pure-u or pure-u-*)
The widths of the units are fractions
Units have various class names that represent their widths. For example, pure-u-1-2 has a width of 50%, whereas pure-u-1-5 would have a width of 20%.
All child elements of a grid must be units
Child elements contained within an element with a pure-g classname must be a grid unit with a pure-u or pure-u-* classname.
Content goes inside grid units
All content which is visible to people needs to be contained inside a grid unit. This ensures that the content will be rendered properly.

Let's start with a simple example. Here's a grid with three columns:

{stripIndent`

Thirds

Thirds

Thirds

`}

Pure ships with both a 5ths and 24ths based grid. Depicted below are the available units that can be appended to the pure-u-* classname where * is one of the unit fractions listed below. For example the unit classname for 50% width is: pure-u-1-2.

5ths-Based Units

1-5
2-5
3-5
4-5
1
1-1
5-5

24ths-Based Units

1-24
1-12
2-24
3-24
1-8
4-24
1-6
5-24
1-4
6-24
7-24
1-3
8-24
3-8
9-24
5-12
10-24
11-24
1-2
12-24
13-24
7-12
14-24
5-8
15-24
2-3
16-24
17-24
3-4
18-24
19-24
5-6
20-24
7-8
21-24
11-12
22-24
23-24
1
1-1
24-24

Custom Unit Sizes

We are working on building tools to allow people to customize Pure Grids. The first low-level tools, the Pure Grids Rework Plugin, is available to use today—we use this tool to generate Pure's built-in unit sizes.

Pure has a mobile-first responsive grid system that can be used declaratively through CSS class names. It's a robust and flexible grid that builds on top of the default grid.

Including on Your Page

Since media queries cannot be over-written, we do not include the grid system as part of pure.css. You'll have to pull it in as a separate CSS file. You can do this by adding the following <link> tag to your page.

{``}

Pure's Regular Grid vs. Responsive Grid

The best way to understand the difference between Pure's regular grid and a responsive grid is through an example.The snippet below shows how regular Pure Grids are written. These grids are unresponsive. They'll always be width: 33.33%, irrespective of the width of the screen.

{stripIndent`
...
...
...
`}

Next, let's look at a responsive grid. Elements within this grid will be width: 100% on small screens, but will shrink to become width: 33.33% on medium-sized screens and above.

{stripIndent`
...
...
...
`}

Default Media Queries

When using Responsive Grids, you can control how the grid behaves at specific breakpoints by adding class names. Pure's default responsive grids comes with the following class names and media query breakpoints.

Key CSS Media Query Applies Classname
None None Always .pure-u-*
sm @media screen and (min-width: 35.5em) 568px .pure-u-sm-*
md @media screen and (min-width: 48em) 768px .pure-u-md-*
lg @media screen and (min-width: 64em) 1024px .pure-u-lg-*
xl @media screen and (min-width: 80em) 1280px .pure-u-xl-*
xxl @media screen and (min-width: 120em) 1920px .pure-u-xxl-*
xxxl @media screen and (min-width: 160em) 2560px .pure-u-xxxl-*
x4k @media screen and (min-width: 240em) 3840px .pure-u-x4k-*
{/* */}

Using Relative Units for Widths

You may have noticed that we use em for our default CSS Media Query widths instead of px. This was a conscious decision since it allows the Media Queries to respond appropriately when people zoom the webpage. Check out this article by Brad Frost for some background information on using relative units within Media Queries.

If you do want to use units other than em, you can always modify the default Media Queries on the Get Started page. Converting from em to px is pretty simple:

{'1em == 16px *'}

* The em to px conversion is based on the browser's default font size, which is generally 16px, but can be overridden by a user in their browser settings.

An Example of Pure Responsive Grids

The example below leverages Pure's Responsive Grid to create a row with four columns. The columns stack on small screens, take up width: 50% on medium-sized screens, and width: 25% on large screens.

This is done by adding the .pure-u-1 class for small screens, .pure-u-md-1-2 for medium-sized screens, and .pure-u-lg-1-4 for large screens. Resize the page to see the grid respond to the screen size.

Lorem Ipsum

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.

Dolor Sit Amet

Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.

Proident laborum

In culpa qui officia deserunt mollit anim id est laborum. incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.

Praesent consectetur

Integer vitae lectus accumsan, egestas dui eget, ullamcorper urn. In feugiat tortor at turpis rhoncus tincidunt. Duis sed porttitor ante, eget venenatis lectus.

By Sylwia Bartyzel from unsplash.com

Two-Fifth Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum dui turpis.

Three-Fifth Column

Quisque ac magna eget est porta varius ut eget quam. Curabitur tincidunt gravida nisl.

Fusce accumsan, sem vitae tempus tempor, nulla lectus interdum felis, eget molestie urna mauris vel elit. Curabitur vel ipsum nulla.

Pure's default grid system is mobile-first. If you want to have a grid on small screens, just use the pure-u-* classnames on your elements.

Thirds

This cell will be 1/3 width all the time.

Thirds

This cell will be 1/3 width all the time.

Thirds

This cell will be 1/3 width all the time.

When using Responsive Grids, you'll want your images to be fluid as well so they grow and shrink with the content, while maintaining the correct ratio. To do this, just add the .pure-img class on them. Check out the example below.

Peyto Lake
Train
T-Shirt Store
Mountain
Miami
BCE Place, Toronto
Banff
Boston North Point Park

To add borders and padding to Pure Grids, you have two options. The first option is to nest a <div> inside each Grid unit and style the child container:

{stripIndent` ...
...
...
`}

The second option is to add borders and padding directly to a grid unit. This would ordinarily risk breaking the layout, but you can easily avoid this problem by augmenting the behavior of the grid itself with a box-sizing: border-box rule:

{stripIndent` ...
...
...
`}

Using box-sizing: border-box keeps your markup cleaner, but has one minor drawback. Setting this property on all grid units makes it harder to override or unset the value later on. As an unopinionated library, Pure lets box-sizing remain at the default value of content-box and leaves the choice up to you.

Grids is part of the Pure CSS file. However, if you just want Grids and not the other modules, you can pull it down separately. Just include these <link> elements in your <head>.

{stripIndent` `} {/* */}
); } export default Grids; ================================================ FILE: site/src/pages/grids/styles.css ================================================ .grids-unit { margin: 0.25em 0; padding-left: 4.5em; } .grids-unit-width { width: 4em; margin-left: -4.5em; padding-right: 0.5em; line-height: 2em; text-align: right; vertical-align: baseline; } .grids-unit .grids-unit-width { font-family: Consolas, 'Liberation Mono', Courier, monospace; } .grids-unit-details { position: relative; background: #fafafa } .grids-unit-classnames { position: absolute; left: 0.5em; } .grids-unit-classname { margin-right: 1em; } .grids-unit-classname code { background: none; padding: 0; margin: 0; } .grids-unit-bar { height: 2em; background: #eee; } /* hack - start.css is being pulled in, overwrite for now */ .grids .grids-example [class *= "pure-u"] { padding: 0; border-width: 1px 0 0; text-align: left; font-family: Helvetica, Arial, sans-serif; } ================================================ FILE: site/src/pages/index.js ================================================ import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useBaseUrl from '@docusaurus/useBaseUrl'; import React from 'react'; import Layout from '@theme/Layout'; import CodeBlock from '../../components/CodeBlock'; import { filePercent, fileSize } from '../../lib/utils'; import './styles.css'; const renderModuleSize = (filesizes) => { const modules = ['base', 'grids', 'forms', 'buttons', 'tables', 'menus']; return modules.map((module, idx) => (
{module} {fileSize({ module, filesizes })}
)); }; function Home() { const context = useDocusaurusContext(); const {siteConfig = {}} = context; const { customFields: { moduleSizes, PURE_DOWNLOAD_SNIPPET, repoName, }, organizationName, } = siteConfig; const renderSize = renderModuleSize(moduleSizes); return (
Pure

A set of small, responsive CSS modules that you can use in every web project.

{PURE_DOWNLOAD_SNIPPET}

Get Started View on GitHub

{renderSize}

CSS with a minimal footprint.

Pure is ridiculously tiny. The entire set of modules clocks in at {fileSize({ module: 'pure', filesizes: moduleSizes })}* minified and gzipped. Crafted with mobile devices in mind, it was important to us to keep our file sizes small, and every line of CSS was carefully considered. If you decide to only use a subset of these modules, you'll save even more bytes.

* We can add correctly :) the numbers above are individual module sizes; when grouped together they compress (gzip) even more.

Your CSS foundation.

Pure builds on Normalize.css and provides layout and styling for native HTML elements, plus the most common UI components. It's what you need, without the cruft.

Made with mobile in mind.

Pure is responsive out of the box, so elements look great on all screen sizes.

Stays out of your way.

Pure has minimal styles and encourages you to write your application styles on top of it. It's designed to get out of your way and makes it easy to override styles.

Diagram of a sample layout.

Create responsive layouts.

By using Grids, Menus, and more, it's easy to create beautiful responsive layouts for all screen sizes. We've made it easy for you to get started. Take a look at a few different layouts and start your next web project with a rock-solid foundation.

View Layouts

Create your own look and feel.

Unlike other frameworks, Pure's design is unopinionated, minimal and flat. We believe that it's much easier to add new CSS rules than to overwrite existing rules. By adding a few lines of CSS, you can customize Pure's appearance to work with your web project.

Extend Pure

); } export default Home; ================================================ FILE: site/src/pages/layouts/README.md ================================================ Pure CSS Layout Examples ======================== Layout examples using [Pure CSS][pure] compiled from the [pure-site][] project. [pure]: http://purecss.io/ [pure-site]: https://github.com/pure-css/pure-site License ------- This software is free to use under the zLib license. See the [zLib][] license for more information. [zLib]: http://www.zlib.net/zlib_license.html ================================================ FILE: site/src/pages/layouts/index.js ================================================ import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import React from 'react'; import Layout from '@theme/Layout'; import Header from '../../../components/Header'; import SectionHeader from '../../../components/SectionHeader'; import './styles.css'; const title = 'Layouts'; const description = 'Quickstart your next web project with these example layouts.'; const layouts = [ { type: 'blog', title: 'Blog', summary: 'A layout example that shows off a blog page with a list of posts.', modules: ['base', 'grids', 'buttons', 'menus'] }, { type: 'email', title: 'Email', summary: 'A layout example that shows off a responsive email layout.', modules: ['base', 'grids', 'buttons', 'menus'] }, { type: 'gallery', title: 'Photo Gallery', summary: 'A layout example that shows off a responsive photo gallery.', modules: ['base', 'grids', 'forms', 'buttons', 'menus'] }, { type: 'marketing', title: 'Landing Page', summary: 'A layout example that shows off a responsive product landing page.', modules: ['base', 'grids', 'forms', 'buttons', 'menus'] }, { type: 'pricing', title: 'Pricing Table', summary: 'A layout example that shows off a responsive pricing table.', modules: ['base', 'grids', 'buttons', 'menus'] }, { type: 'side-menu', title: 'Responsive Side Menu', summary: 'A layout example with a side menu that hides on mobile, just like the Pure website.', modules: ['base', 'grids', 'menus'] }, { type: 'tucked-menu-vertical', title: 'Responsive Horizontal-to-Vertical Menu', summary: 'A set of horizontal menus that switch to vertical and which hide at small window widths.', modules: ['base', 'grids', 'menus'] }, { type: 'tucked-menu', title: 'Responsive Horizontal-to-Scrollable Menu', summary: 'Showcases a horizontal menu that hides at small window widths, and which scrolls when revealed.', modules: ['base', 'menus'] } ]; const renderLayouts = (layout, idx) => (

{layout.title}

{layout.summary}

    {layout.modules.map((m, idx) => (
  • {m}
  • ))}

View Source

); function Layouts() { const layoutMarkup = layouts.map(renderLayouts); return (

Pure was crafted with the goal that it can be used in every web project. To showcase this, we've made some common layouts that leverage Pure. These layouts are responsive and don't require JavaScript (except for certain menu interactions).

{layoutMarkup}
); } export default Layouts; ================================================ FILE: site/src/pages/layouts/styles.css ================================================ .layout-item { margin-top: 2em; padding-top: 2em; border-top: 1px solid #eee; } .layout-item-screenshot { text-align: center; } .layout-item-head { margin-top: 0; /* so that the .layout-item-head lines up with the image */ } .layout-item-modules { padding: 0; } .layout-item-module { margin-right: 0.5714em; font-size: 0.875em; } .layout-item-module-base a { border-left: 3px solid rgb(14, 144, 210); } .layout-item-module-grids a { border-left: 3px solid rgb(128, 88, 165); } .layout-item-module-forms a { border-left: 3px solid rgb(94, 185, 94); } .layout-item-module-buttons a { border-left: 3px solid rgb(221, 81, 76); } .layout-item-module-tables a { border-left: 3px solid rgb(243, 123, 29); } .layout-item-module-menus a { border-left: 3px solid rgb(250, 210, 50); } .layout-item-module a:link, .layout-item-module a:visited { text-transform: capitalize; color: rgb(75, 75, 75); padding: 0 0.5714em; line-height: 1.75; display: block; } .layout-item-content .pure-button { margin-right: 5px; } ================================================ FILE: site/src/pages/menus/index.js ================================================ import Link from '@docusaurus/Link'; import React, { useEffect } from 'react'; import Layout from '../../theme/Layout'; import Header from '../../../components/Header'; import Example from '../../../components/Example'; import SectionHeader from '../../../components/SectionHeader'; import { handleClick } from '../../../lib/utils'; const title = 'Menus'; const description = 'Simple CSS for menus.'; let menuLoaded = false; function Menus() { // load external menu js dynamically useEffect(() => { if (!menuLoaded) { const script = document.createElement('script'); script.type = 'text/javascript'; script.src = '/js/menus.js'; document.head.appendChild(script); menuLoaded = true; } }); return (

Menus are vertical by default. Minimal default styling and low-specificity selectors make them easy to customize. By default, menu items take up 100% of the width of their container, so you may want to limit the menu width or set the menu to display:inline-block.

Responsive Horizontal-to-Scrollable Menu

This example shows how you can build upon Pure menu classes such as pure-menu-horizontal and pure-menu-scrollable. At wide window-widths we display a horizontal menu. At smaller window-widths, we switch to a scrollable horizontal menu with a toggle control. Remember that the JavaScript provided is plain vanilla JS so it won't work in some browsers; you'll need to polyfill or adapt the code to your library of choice.

Code reproduced below:

<style>
      .custom-menu-wrapper {
          background-color: #808080;
          margin-bottom: 2.5em;
          white-space: nowrap;
          position: relative;
      }

      .custom-menu {
          display: inline-block;
          width: auto;
          vertical-align: middle;
          -webkit-font-smoothing: antialiased;
      }

      .custom-menu .pure-menu-link,
      .custom-menu .pure-menu-heading {
          color: white;
      }

      .custom-menu .pure-menu-link:hover,
      .custom-menu .pure-menu-heading:hover {
          background-color: transparent;
      }

      .custom-menu-top {
          position: relative;
          padding-top: .5em;
          padding-bottom: .5em;
      }

      .custom-menu-brand {
          display: block;
          text-align: center;
          position: relative;
      }

      .custom-menu-toggle {
          width: 44px;
          height: 44px;
          display: block;
          position: absolute;
          top: 3px;
          right: 0;
          display: none;
      }

      .custom-menu-toggle .bar {
          background-color: white;
          display: block;
          width: 20px;
          height: 2px;
          border-radius: 100px;
          position: absolute;
          top: 22px;
          right: 12px;
          -webkit-transition: all 0.5s;
          -moz-transition: all 0.5s;
          -ms-transition: all 0.5s;
          transition: all 0.5s;
      }

      .custom-menu-toggle .bar:first-child {
          -webkit-transform: translateY(-6px);
          -moz-transform: translateY(-6px);
          -ms-transform: translateY(-6px);
          transform: translateY(-6px);
      }

      .custom-menu-toggle.x .bar {
          -webkit-transform: rotate(45deg);
          -moz-transform: rotate(45deg);
          -ms-transform: rotate(45deg);
          transform: rotate(45deg);
      }

      .custom-menu-toggle.x .bar:first-child {
          -webkit-transform: rotate(-45deg);
          -moz-transform: rotate(-45deg);
          -ms-transform: rotate(-45deg);
          transform: rotate(-45deg);
      }

      .custom-menu-screen {
          background-color: rgba(0, 0, 0, 0.5);
          -webkit-transition: all 0.5s;
          -moz-transition: all 0.5s;
          -ms-transition: all 0.5s;
          transition: all 0.5s;
          height: 3em;
          width: 70em;
          position: absolute;
          top: 0;
          z-index: -1;
      }

      .custom-menu-tucked .custom-menu-screen {
          -webkit-transform: translateY(-44px);
          -moz-transform: translateY(-44px);
          -ms-transform: translateY(-44px);
          transform: translateY(-44px);
      }

      @media (max-width: 62em) {

          .custom-menu {
              display: block;
          }

          .custom-menu-toggle {
              display: block;
              display: none\9;
          }

          .custom-menu-bottom {
              position: absolute;
              width: 100%;
              border-top: 1px solid #eee;
              background-color: #808080\9;
              z-index: 100;
          }

          .custom-menu-bottom .pure-menu-link {
              opacity: 1;
              -webkit-transform: translateX(0);
              -moz-transform: translateX(0);
              -ms-transform: translateX(0);
              transform: translateX(0);
              -webkit-transition: all 0.5s;
              -moz-transition: all 0.5s;
              -ms-transition: all 0.5s;
              transition: all 0.5s;
          }

          .custom-menu-bottom.custom-menu-tucked .pure-menu-link {
              -webkit-transform: translateX(-140px);
              -moz-transform: translateX(-140px);
              -ms-transform: translateX(-140px);
              transform: translateX(-140px);
              opacity: 0;
              opacity: 1\9;
          }

          .pure-menu-horizontal.custom-menu-tucked {
              z-index: -1;
              top: 45px;
              position: absolute;
              overflow: hidden;
          }

      }
      </style>
      <div class="custom-menu-wrapper">
          <div class="pure-menu custom-menu custom-menu-top">
              <a href="#" class="pure-menu-heading custom-menu-brand">Brand</a>
              <a href="#" class="custom-menu-toggle" id="toggle"><s class="bar"></s><s class="bar"></s></a>
          </div>
          <div class="pure-menu pure-menu-horizontal pure-menu-scrollable custom-menu custom-menu-bottom custom-menu-tucked" id="tuckedMenu">
              <div class="custom-menu-screen"></div>
              <ul class="pure-menu-list">
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Home</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">About</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Contact</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Blog</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">GitHub</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Twitter</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Apple</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Google</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Wang</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">Yahoo</a></li>
                  <li class="pure-menu-item"><a href="#" class="pure-menu-link">W3C</a></li>
              </ul>
          </div>
      </div>
      <script>
      (function (window, document) {
      document.getElementById('toggle').addEventListener('click', function (e) {
          document.getElementById('tuckedMenu').classList.toggle('custom-menu-tucked');
          document.getElementById('toggle').classList.toggle('x');
      });
      })(this, this.document);
      </script>
================================================ FILE: site/static/layouts/tucked-menu-vertical/index.html ================================================ Responsive Horizontal-to-Vertical Menu – Layout Examples – Pure

Responsive Horizontal-to-Vertical Menu

This example shows how you can build upon Pure Menu and Grid classes. At wide window-widths we display a horizontal menu. At smaller window-widths, we switch to a vertical menu with a toggle control. Grids are used to arrange the menus. Code reproduced below:


      <link rel="stylesheet" href="/css/pure/grids-responsive-min.css">

      <style>
      .custom-wrapper {
          background-color: #ffd390;
          margin-bottom: 1em;
          -webkit-font-smoothing: antialiased;
          height: 2.1em;
          overflow: hidden;
          -webkit-transition: height 0.5s;
          -moz-transition: height 0.5s;
          -ms-transition: height 0.5s;
          transition: height 0.5s;
      }

      .custom-wrapper.open {
          height: 14em;
      }

      .custom-menu-3 {
          text-align: right;
      }

      .custom-toggle {
          width: 34px;
          height: 34px;
          position: absolute;
          top: 0;
          right: 0;
          display: none;
      }

      .custom-toggle .bar {
          background-color: #777;
          display: block;
          width: 20px;
          height: 2px;
          border-radius: 100px;
          position: absolute;
          top: 18px;
          right: 7px;
          -webkit-transition: all 0.5s;
          -moz-transition: all 0.5s;
          -ms-transition: all 0.5s;
          transition: all 0.5s;
      }

      .custom-toggle .bar:first-child {
          -webkit-transform: translateY(-6px);
          -moz-transform: translateY(-6px);
          -ms-transform: translateY(-6px);
          transform: translateY(-6px);
      }

      .custom-toggle.x .bar {
          -webkit-transform: rotate(45deg);
          -moz-transform: rotate(45deg);
          -ms-transform: rotate(45deg);
          transform: rotate(45deg);
      }

      .custom-toggle.x .bar:first-child {
          -webkit-transform: rotate(-45deg);
          -moz-transform: rotate(-45deg);
          -ms-transform: rotate(-45deg);
          transform: rotate(-45deg);
      }

      @media (max-width: 47.999em) {

          .custom-menu-3 {
              text-align: left;
          }

          .custom-toggle {
              display: block;
          }

      }
      </style>
      <div class="custom-wrapper pure-g" id="menu">
          <div class="pure-u-1 pure-u-md-1-3">
              <div class="pure-menu">
                  <a href="#" class="pure-menu-heading custom-brand">Brand</a>
                  <a href="#" class="custom-toggle" id="toggle"><s class="bar"></s><s class="bar"></s></a>
              </div>
          </div>
          <div class="pure-u-1 pure-u-md-1-3">
              <div class="pure-menu pure-menu-horizontal custom-can-transform">
                  <ul class="pure-menu-list">
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">Home</a></li>
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">About</a></li>
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">Contact</a></li>
                  </ul>
              </div>
          </div>
          <div class="pure-u-1 pure-u-md-1-3">
              <div class="pure-menu pure-menu-horizontal custom-menu-3 custom-can-transform">
                  <ul class="pure-menu-list">
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">Yahoo</a></li>
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">W3C</a></li>
                  </ul>
              </div>
          </div>
      </div>
      <script>
      (function (window, document) {
      var menu = document.getElementById('menu'),
          rollBack,
          WINDOW_CHANGE_EVENT = ('onorientationchange' in window) ? 'orientationchange':'resize';

      function toggleHorizontal() {
          menu.classList.remove('closing');
          [].forEach.call(
              document.getElementById('menu').querySelectorAll('.custom-can-transform'),
              function(el){
                  el.classList.toggle('pure-menu-horizontal');
              }
          );
      };

      function toggleMenu() {
          // set timeout so that the panel has a chance to roll up
          // before the menu switches states
          if (menu.classList.contains('open')) {
              menu.classList.add('closing');
              rollBack = setTimeout(toggleHorizontal, 500);
          }
          else {
              if (menu.classList.contains('closing')) {
                  clearTimeout(rollBack);
              } else {
                  toggleHorizontal();
              }
          }
          menu.classList.toggle('open');
          document.getElementById('toggle').classList.toggle('x');
      };

      function closeMenu() {
          if (menu.classList.contains('open')) {
              toggleMenu();
          }
      }

      document.getElementById('toggle').addEventListener('click', function (e) {
          toggleMenu();
          e.preventDefault();
      });

      window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu);
      })(this, this.document);

      </script>
================================================ FILE: src/base/css/base.css ================================================ /*csslint important:false*/ /* ========================================================================== Pure Base Extras ========================================================================== */ /** * Extra rules that Pure adds on top of Normalize.css */ html { font-family: sans-serif; } /** * Always hide an element when it has the `hidden` HTML attribute. */ .hidden, [hidden] { display: none !important; } /** * Add this class to an image to make it fit within its fluid parent wrapper while maintaining * aspect ratio. */ .pure-img { max-width: 100%; height: auto; display: block; } ================================================ FILE: src/buttons/css/buttons-core.css ================================================ .pure-button { /* Structure */ display: inline-block; line-height: normal; white-space: nowrap; vertical-align: middle; text-align: center; cursor: pointer; -webkit-user-drag: none; user-select: none; box-sizing: border-box; } /* Firefox: Get rid of the inner focus border */ .pure-button::-moz-focus-inner { padding: 0; border: 0; } /* Inherit .pure-g styles */ .pure-button-group { letter-spacing: -0.31em; /* Webkit: collapse white-space between units */ text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */ } .opera-only :-o-prefocus, .pure-button-group { word-spacing: -0.43em; } .pure-button-group .pure-button { letter-spacing: normal; word-spacing: normal; vertical-align: top; text-rendering: auto; } ================================================ FILE: src/buttons/css/buttons.css ================================================ /*csslint outline-none:false*/ .pure-button { font-family: inherit; font-size: 100%; padding: 0.5em 1em; color: rgba(0, 0, 0, 0.80); border: none rgba(0, 0, 0, 0); background-color: #E6E6E6; text-decoration: none; border-radius: 2px; } .pure-button-hover, .pure-button:hover, .pure-button:focus { background-image: linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10)); } .pure-button:focus { outline: 0; } .pure-button-active, .pure-button:active { box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset; border-color: #000; } .pure-button[disabled], .pure-button-disabled, .pure-button-disabled:hover, .pure-button-disabled:focus, .pure-button-disabled:active { border: none; background-image: none; opacity: 0.40; cursor: not-allowed; box-shadow: none; pointer-events: none; } .pure-button-hidden { display: none; } .pure-button-primary, .pure-button-selected, a.pure-button-primary, a.pure-button-selected { background-color: rgb(0, 120, 231); color: #fff; } /* Button Groups */ .pure-button-group .pure-button { margin: 0; border-radius: 0; border-right: 1px solid rgba(0, 0, 0, 0.2); } .pure-button-group .pure-button:first-child { border-top-left-radius: 2px; border-bottom-left-radius: 2px; } .pure-button-group .pure-button:last-child { border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-right: none; } ================================================ FILE: src/buttons/tests/manual/button.html ================================================ Buttons Tests

Buttons Tests

Regular Buttons

An anchor Button

Disabled Buttons

An anchor Button

Active Buttons

An anchor Button

Primary/Selected Buttons

An anchor Button

Customizing Buttons

An anchor Button

Custom Button

Custom Button

Start Playing Movie

Primary Form Buttons

Anchor

Primary Form Buttons (Custom Fonts)

Anchor

Button Groups

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

================================================ FILE: src/forms/css/forms-r.css ================================================ @media only screen and (max-width : 480px) { .pure-form button[type="submit"] { margin: 0.7em 0 0; } .pure-form input:not([type]), .pure-form input[type="text"], .pure-form input[type="password"], .pure-form input[type="email"], .pure-form input[type="url"], .pure-form input[type="date"], .pure-form input[type="month"], .pure-form input[type="time"], .pure-form input[type="datetime"], .pure-form input[type="datetime-local"], .pure-form input[type="week"], .pure-form input[type="number"], .pure-form input[type="search"], .pure-form input[type="tel"], .pure-form input[type="color"], .pure-form label { margin-bottom: 0.3em; display: block; } .pure-group input:not([type]), .pure-group input[type="text"], .pure-group input[type="password"], .pure-group input[type="email"], .pure-group input[type="url"], .pure-group input[type="date"], .pure-group input[type="month"], .pure-group input[type="time"], .pure-group input[type="datetime"], .pure-group input[type="datetime-local"], .pure-group input[type="week"], .pure-group input[type="number"], .pure-group input[type="search"], .pure-group input[type="tel"], .pure-group input[type="color"] { margin-bottom: 0; } .pure-form-aligned .pure-control-group label { margin-bottom: 0.3em; text-align: left; display: block; width: 100%; } .pure-form-aligned .pure-controls { margin: 1.5em 0 0 0; } .pure-form-message-inline, .pure-form-message { display: block; font-size: 0.75em; /* Increased bottom padding to make it group with its related input element. */ padding: 0.2em 0 0.8em; } } ================================================ FILE: src/forms/css/forms.css ================================================ /*csslint box-model:false*/ /* Box-model set to false because we're setting a height on select elements, which also have border and padding. This is done because some browsers don't render the padding. We explicitly set the box-model for select elements to border-box, so we can ignore the csslint warning. */ .pure-form input[type="text"], .pure-form input[type="password"], .pure-form input[type="email"], .pure-form input[type="url"], .pure-form input[type="date"], .pure-form input[type="month"], .pure-form input[type="time"], .pure-form input[type="datetime"], .pure-form input[type="datetime-local"], .pure-form input[type="week"], .pure-form input[type="number"], .pure-form input[type="search"], .pure-form input[type="tel"], .pure-form input[type="color"], .pure-form select, .pure-form textarea { padding: 0.5em 0.6em; display: inline-block; border: 1px solid #ccc; box-shadow: inset 0 1px 3px #ddd; border-radius: 4px; vertical-align: middle; box-sizing: border-box; } /* Need to separate out the :not() selector from the rest of the CSS 2.1 selectors since IE8 won't execute CSS that contains a CSS3 selector. */ .pure-form input:not([type]) { padding: 0.5em 0.6em; display: inline-block; border: 1px solid #ccc; box-shadow: inset 0 1px 3px #ddd; border-radius: 4px; box-sizing: border-box; } /* Chrome (as of v.32/34 on OS X) needs additional room for color to display. */ /* May be able to remove this tweak as color inputs become more standardized across browsers. */ .pure-form input[type="color"] { padding: 0.2em 0.5em; } .pure-form input[type="text"]:focus, .pure-form input[type="password"]:focus, .pure-form input[type="email"]:focus, .pure-form input[type="url"]:focus, .pure-form input[type="date"]:focus, .pure-form input[type="month"]:focus, .pure-form input[type="time"]:focus, .pure-form input[type="datetime"]:focus, .pure-form input[type="datetime-local"]:focus, .pure-form input[type="week"]:focus, .pure-form input[type="number"]:focus, .pure-form input[type="search"]:focus, .pure-form input[type="tel"]:focus, .pure-form input[type="color"]:focus, .pure-form select:focus, .pure-form textarea:focus { outline: 0; border-color: #129FEA; } /* Need to separate out the :not() selector from the rest of the CSS 2.1 selectors since IE8 won't execute CSS that contains a CSS3 selector. */ .pure-form input:not([type]):focus { outline: 0; border-color: #129FEA; } .pure-form input[type="file"]:focus, .pure-form input[type="radio"]:focus, .pure-form input[type="checkbox"]:focus { outline: thin solid #129FEA; outline: 1px auto #129FEA; } .pure-form .pure-checkbox, .pure-form .pure-radio { margin: 0.5em 0; display: block; } .pure-form input[type="text"][disabled], .pure-form input[type="password"][disabled], .pure-form input[type="email"][disabled], .pure-form input[type="url"][disabled], .pure-form input[type="date"][disabled], .pure-form input[type="month"][disabled], .pure-form input[type="time"][disabled], .pure-form input[type="datetime"][disabled], .pure-form input[type="datetime-local"][disabled], .pure-form input[type="week"][disabled], .pure-form input[type="number"][disabled], .pure-form input[type="search"][disabled], .pure-form input[type="tel"][disabled], .pure-form input[type="color"][disabled], .pure-form select[disabled], .pure-form textarea[disabled] { cursor: not-allowed; background-color: #eaeded; color: #cad2d3; } /* Need to separate out the :not() selector from the rest of the CSS 2.1 selectors since IE8 won't execute CSS that contains a CSS3 selector. */ .pure-form input:not([type])[disabled] { cursor: not-allowed; background-color: #eaeded; color: #cad2d3; } .pure-form input[readonly], .pure-form select[readonly], .pure-form textarea[readonly] { background-color: #eee; /* menu hover bg color */ color: #777; /* menu text color */ border-color: #ccc; } .pure-form input:focus:invalid, .pure-form textarea:focus:invalid, .pure-form select:focus:invalid { color: #b94a48; border-color: #e9322d; } .pure-form input[type="file"]:focus:invalid:focus, .pure-form input[type="radio"]:focus:invalid:focus, .pure-form input[type="checkbox"]:focus:invalid:focus { outline-color: #e9322d; } .pure-form select { /* Normalizes the height; padding is not sufficient. */ height: 2.25em; border: 1px solid #ccc; background-color: white; } .pure-form select[multiple] { height: auto; } .pure-form label { margin: 0.5em 0 0.2em; } .pure-form fieldset { margin: 0; padding: 0.35em 0 0.75em; border: 0; } .pure-form legend { display: block; width: 100%; padding: 0.3em 0; margin-bottom: 0.3em; color: #333; border-bottom: 1px solid #e5e5e5; } .pure-form-stacked input[type="text"], .pure-form-stacked input[type="password"], .pure-form-stacked input[type="email"], .pure-form-stacked input[type="url"], .pure-form-stacked input[type="date"], .pure-form-stacked input[type="month"], .pure-form-stacked input[type="time"], .pure-form-stacked input[type="datetime"], .pure-form-stacked input[type="datetime-local"], .pure-form-stacked input[type="week"], .pure-form-stacked input[type="number"], .pure-form-stacked input[type="search"], .pure-form-stacked input[type="tel"], .pure-form-stacked input[type="color"], .pure-form-stacked input[type="file"], .pure-form-stacked select, .pure-form-stacked label, .pure-form-stacked textarea { display: block; margin: 0.25em 0; } /* Need to separate out the :not() selector from the rest of the CSS 2.1 selectors since IE8 won't execute CSS that contains a CSS3 selector. */ .pure-form-stacked input:not([type]) { display: block; margin: 0.25em 0; } .pure-form-aligned input, .pure-form-aligned textarea, .pure-form-aligned select, .pure-form-message-inline { display: inline-block; vertical-align: middle; } .pure-form-aligned textarea { vertical-align: top; } /* Aligned Forms */ .pure-form-aligned .pure-control-group { margin-bottom: 0.5em; } .pure-form-aligned .pure-control-group label { text-align: right; display: inline-block; vertical-align: middle; width: 10em; margin: 0 1em 0 0; } .pure-form-aligned .pure-controls { margin: 1.5em 0 0 11em; } /* Rounded Inputs */ .pure-form input.pure-input-rounded, .pure-form .pure-input-rounded { border-radius: 2em; padding: 0.5em 1em; } /* Grouped Inputs */ .pure-form .pure-group fieldset { margin-bottom: 10px; } .pure-form .pure-group input, .pure-form .pure-group textarea { display: block; padding: 10px; margin: 0 0 -1px; border-radius: 0; position: relative; top: -1px; } .pure-form .pure-group input:focus, .pure-form .pure-group textarea:focus { z-index: 3; } .pure-form .pure-group input:first-child, .pure-form .pure-group textarea:first-child { top: 1px; border-radius: 4px 4px 0 0; margin: 0; } .pure-form .pure-group input:first-child:last-child, .pure-form .pure-group textarea:first-child:last-child { top: 1px; border-radius: 4px; margin: 0; } .pure-form .pure-group input:last-child, .pure-form .pure-group textarea:last-child { top: -2px; border-radius: 0 0 4px 4px; margin: 0; } .pure-form .pure-group button { margin: 0.35em 0; } .pure-form .pure-input-1 { width: 100%; } .pure-form .pure-input-3-4 { width: 75%; } .pure-form .pure-input-2-3 { width: 66%; } .pure-form .pure-input-1-2 { width: 50%; } .pure-form .pure-input-1-3 { width: 33%; } .pure-form .pure-input-1-4 { width: 25%; } /* Inline help for forms */ .pure-form-message-inline { display: inline-block; padding-left: 0.3em; color: #666; vertical-align: middle; font-size: 0.875em; } /* Block help for forms */ .pure-form-message { display: block; color: #666; font-size: 0.875em; } ================================================ FILE: src/forms/tests/manual/forms.html ================================================ Forms Tests

Forms Tests

Input normalization

An inline form. Check for alignment and input/select sizing.

Default Form

A default inline form.

Multi-Column Form with Grids

Legend

Stacked Form

Legend

Aligned Form

Grouped Inputs

Dynamic Grouped Inputs

Input Sizing







Invalid Inputs

Disabled Inputs

Readonly Inputs

Rounded Form

Selects

Checkboxes and Radios

Help text

Buttons

Anchor
================================================ FILE: src/grids/README.md ================================================ Pure Grids ========== Pure Grids ship with build-in 5ths- and 24ths-based units styles. The unit style rules are generated via Pure's [`rework-pure-grids`][rework-pure-grids] [Rework][] plugin. The tooling used by Pure to generate its built-in Grids can also be used to create custom Grids that use any nth-unit base. [rework-pure-grids]: https://github.com/ericf/rework-pure-grids [Rework]: https://github.com/visionmedia/rework ================================================ FILE: src/grids/css/grids-core.css ================================================ /*csslint regex-selectors:false, known-properties:false, duplicate-properties:false*/ .pure-g { display: flex; flex-flow: row wrap; /* Prevents distributing space between rows */ align-content: flex-start; } .pure-u { display: inline-block; vertical-align: top; } ================================================ FILE: src/grids/tests/manual/responsive.html ================================================ Responsive Grids Tests

Grids Tests

Base Grid

1/2
1/2
1/4
1/4
1/4
1/4
3/4
1/4
1/3
1/3
1/3
1/3
2/3
1/5
2/5
2/5
3/5
2/5
1/6
1/6
1/6
1/6
1/6
1/6
1/6
5/6
1/8
3/8
3/8
1/8
3/8
5/8
7/8
1/8
1/4
1/2
1/4
1/8
1/2
1/8
1/4
1/12
5/12
1/12
5/12
7/12
5/12
1/12
11/12
1/24
5/24
7/24
11/24
17/24
7/24
19/24
5/24
1/24
23/24

Custom Font and Grids

Grids with a serif font stack.

Nested 1/2
Nested 1/2
r1/4
r1/4
r1/4
r1/4

Grids with a monospace font stack.

Nested 1/2
Nested 1/2
r1/4
r1/4
r1/4
r1/4

Wrapping Grids

Wrapping 1/2
Wrapping 1/2
Wrapping 1/3

Responsive Grids

1 -> 1/2 -> 1/4
1 -> 1/2 -> 1/4
1 -> 1/2 -> 1/4
1 -> 1/2 -> 1/4

Nested Responsive Grids

1 -> 1/2
1 -> 1/2
1/4 -> 1/8
1/4 -> 1/8
1/4 -> 3/8
1/4 -> 3/8

.pure-img Images

Grid Inside Table

1/2 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pharetra eros et mattis venenatis.
1/2 Nam neque sapien, lacinia non lectus non, accumsan suscipit ipsum.
================================================ FILE: src/menus/css/menus-core.css ================================================ /*csslint adjoining-classes: false, box-model:false*/ .pure-menu { box-sizing: border-box; } .pure-menu-fixed { position: fixed; left: 0; top: 0; z-index: 3; } .pure-menu-list, .pure-menu-item { position: relative; } .pure-menu-list { list-style: none; margin: 0; padding: 0; } .pure-menu-item { padding: 0; margin: 0; height: 100%; } .pure-menu-link, .pure-menu-heading { display: block; text-decoration: none; white-space: nowrap; } ================================================ FILE: src/menus/css/menus-dropdown.css ================================================ /* Submenus should still be display: block; */ .pure-menu-item .pure-menu-item { display: block; } .pure-menu-children { display: none; position: absolute; left: 100%; top: 0; margin: 0; padding: 0; z-index: 3; } .pure-menu-horizontal .pure-menu-children { left: 0; top: auto; width: inherit; } .pure-menu-allow-hover:hover > .pure-menu-children, .pure-menu-active > .pure-menu-children { display: block; position: absolute; } /* Vertical Menus - show the dropdown arrow */ .pure-menu-has-children > .pure-menu-link:after { padding-left: 0.5em; content: "\25B8"; font-size: small; } /* Horizontal Menus - show the dropdown arrow */ .pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after { content: "\25BE"; } ================================================ FILE: src/menus/css/menus-horizontal.css ================================================ /* HORIZONTAL MENU */ .pure-menu-horizontal { width: 100%; white-space: nowrap; } .pure-menu-horizontal .pure-menu-list { display: inline-block; } /* Initial menus should be inline-block so that they are horizontal */ .pure-menu-horizontal .pure-menu-item, .pure-menu-horizontal .pure-menu-heading, .pure-menu-horizontal .pure-menu-separator { display: inline-block; vertical-align: middle; } ================================================ FILE: src/menus/css/menus-scrollable.css ================================================ /* scrollable menus */ .pure-menu-scrollable { overflow-y: scroll; overflow-x: hidden; } .pure-menu-scrollable .pure-menu-list { display: block; } .pure-menu-horizontal.pure-menu-scrollable .pure-menu-list { display: inline-block; } .pure-menu-horizontal.pure-menu-scrollable { white-space: nowrap; overflow-y: hidden; overflow-x: auto; /* a little extra padding for this style to allow for scrollbars */ padding: .5em 0; } ================================================ FILE: src/menus/css/menus-skin.css ================================================ /* misc default styling */ .pure-menu-separator, .pure-menu-horizontal .pure-menu-children .pure-menu-separator { background-color: #ccc; height: 1px; margin: .3em 0; } .pure-menu-horizontal .pure-menu-separator { width: 1px; height: 1.3em; margin: 0 .3em ; } /* Need to reset the separator since submenu is vertical */ .pure-menu-horizontal .pure-menu-children .pure-menu-separator { display: block; width: auto; } .pure-menu-heading { text-transform: uppercase; color: #565d64; } .pure-menu-link { color: #777; } .pure-menu-children { background-color: #fff; } .pure-menu-link, .pure-menu-heading { padding: .5em 1em; } .pure-menu-disabled { opacity: .5; } .pure-menu-disabled .pure-menu-link:hover { background-color: transparent; cursor: default; } .pure-menu-active > .pure-menu-link, .pure-menu-link:hover, .pure-menu-link:focus { background-color: #eee; } .pure-menu-selected > .pure-menu-link, .pure-menu-selected > .pure-menu-link:visited { color: #000; } ================================================ FILE: src/menus/tests/manual/menus.html ================================================ Menus CSS

plain div.pure-menu.pure-menu-horizontal

div.pure-menu.pure-menu-horizontal.pure-menu-custom-1

div.pure-menu.pure-menu-custom-2

plain div.pure-menu, with nested children. Note that with no width set, it's funky, but using inline-block would not be desirable for most cases.

div.pure-menu.pure-menu-custom-2, with nested children. Here, a width is set. Sub-sub menu functionality demonstrated as well.

div.pure-menu.pure-menu-custom-2, with nested children. Here, a width is set to limit the menu width. The .pure-menu-allow-hover class is in play as well, no click required to display a submenu.

div.pure-menu.pure-menu-horizontal with nested dropdown and separator

div.pure-menu.pure-menu-horizontal.pure-menu-scrollable

div.pure-menu.pure-menu-scrollable.pure-menu-custom-3

div.pure-menu.pure-menu-horizontal, with nested children, customized

================================================ FILE: src/tables/css/tables.css ================================================ .pure-table { /* Remove spacing between table cells (from Normalize.css) */ border-collapse: collapse; border-spacing: 0; empty-cells: show; border: 1px solid #cbcbcb; } .pure-table caption { color: #000; font: italic 85%/1 arial, sans-serif; padding: 1em 0; text-align: center; } .pure-table td, .pure-table th { border-left: 1px solid #cbcbcb; /* inner column border */ border-width: 0 0 0 1px; font-size: inherit; margin: 0; overflow: visible; /* to make this where the title is really long work */ padding: 0.5em 1em; /* cell padding */ } .pure-table thead { background-color: #e0e0e0; color: #000; text-align: left; vertical-align: bottom; } /* striping: even - #fff (white) odd - #f2f2f2 (light gray) */ .pure-table td { background-color: transparent; } .pure-table-odd td { background-color: #f2f2f2; } /* nth-child selector for modern browsers */ .pure-table-striped tr:nth-child(2n-1) td { background-color: #f2f2f2; } /* BORDERED TABLES */ .pure-table-bordered td { border-bottom: 1px solid #cbcbcb; } .pure-table-bordered tbody > tr:last-child > td { border-bottom-width: 0; } /* HORIZONTAL BORDERED TABLES */ .pure-table-horizontal td, .pure-table-horizontal th { border-width: 0 0 1px 0; border-bottom: 1px solid #cbcbcb; } .pure-table-horizontal tbody > tr:last-child > td { border-bottom-width: 0; } ================================================ FILE: src/tables/tests/manual/tables.html ================================================ Tables Tests

Tables Tests

Default Table

# Make Model Year
1 Honda Accord 2009
2 Toyota Camry 2012
3 Hyundai Elantra 2010

Checking alignment

# Make Model Year

Bordered Table

# Make Model Year
1 Honda Accord 2009
2 Toyota Camry 2012
3 Hyundai Elantra 2010

Bordered Table with rowspan

# Make Model Year
1 Honda Accord 2009
Toyota Camry 2012
Hyundai Elantra 2010

Bordered Table with colspan

# Make Model Year
1 Toyota Camry 2012
2 [ redacted ]
3 Hyundai Elantra 2010

Table with Horizontal Borders

# Make Model Year
1 Honda Accord 2009
2 Toyota Camry 2012
3 Hyundai Elantra 2010

Striped Table

# Make Model Year
1 Honda Accord 2009
2 Toyota Camry 2012
3 Hyundai Elantra 2010
4 Ford Focus 2008
5 Nissan Sentra 2011
6 BMW M3 2009
7 Honda Civic 2010
8 Kia Soul 2010

Nth Child Selector Styling

# Make Model Year
1 Honda Accord 2009
2 Toyota Camry 2012
3 Hyundai Elantra 2010
4 Ford Focus 2008
5 Nissan Sentra 2011
6 BMW M3 2009
7 Honda Civic 2010
8 Kia Soul 2010

Nested Table

# Make Model Type
1 Honda Accord
Fuel Year
Diesel 2009
Petrol 2009
2 Toyota Camry
Fuel Year
Diesel 2012
Petrol 2012
3 Hyundai Elantra
Fuel Year
Diesel 2010
Petrol 2010
================================================ FILE: tasks/license.js ================================================ 'use strict'; module.exports = function (grunt) { grunt.registerMultiTask('license', 'Stamps license banners on files.', function () { var options = this.options({banner: ''}), banner = grunt.template.process(options.banner), tally = 0; this.files.forEach(function (filePair) { filePair.src.forEach(function (file) { grunt.file.write(file, banner + grunt.file.read(file)); tally += 1; }); }); grunt.log.writeln('Stamped license on ' + String(tally).cyan + ' files.'); }); }; ================================================ FILE: tasks/suppress.js ================================================ 'use strict'; module.exports = function (grunt) { grunt.registerTask('suppress', 'Suppresses noisy logs', function () { var allowed = ['success', 'fail', 'warn', 'error']; grunt.util.hooker.hook(grunt.log, { passName: true, pre: function (name) { if (allowed.indexOf(name) === -1) { grunt.log.muted = true; } }, post: function () { grunt.log.muted = false; } }); }); }; ================================================ FILE: test/index.js ================================================ var tap = require('tap'); var pure = require('../index.js'); // api tap.ok(pure.getFile); tap.ok(pure.getFilePath); // assertions tap.match(pure.getFile('pure-min.css'), /pure-button/, 'should load the file'); tap.match(pure.getFilePath('pure-min.css'), /pure-min\.css/, 'should return file path'); tap.throws(pure.getFile, new Error('undefined does not exist'));