├── .gitattributes
├── 9781484257494.jpg
├── Contributing.md
├── LICENSE.txt
├── README.md
├── chapter-2
├── at-rules
│ ├── image.png
│ ├── index.html
│ └── styles.css
├── attribute-selector
│ ├── icon-audio.png
│ ├── icon-pdf.png
│ ├── index.html
│ └── styles.css
├── class-selector
│ ├── image.png
│ ├── index.html
│ └── styles.css
├── combinators
│ ├── index.html
│ └── styles.css
├── functions
│ ├── index.html
│ └── styles.css
├── id-selector
│ ├── image.png
│ ├── index.html
│ └── styles.css
├── pseudo-classes
│ ├── index.html
│ └── styles.css
├── pseudo-elements
│ ├── index.html
│ ├── link.png
│ └── styles.css
├── type-selector
│ ├── index.html
│ └── styles.css
├── universal-selector
│ ├── index.html
│ └── styles.css
└── variables
│ ├── index.html
│ └── styles.css
├── chapter-3
├── exceptions
│ ├── index.html
│ └── styles.css
├── inheritance
│ ├── image.png
│ ├── index.html
│ └── styles.css
└── precedence
│ ├── index.html
│ ├── styles.css
│ └── user.css
├── chapter-4
├── box-sizing
│ ├── border-box
│ │ ├── index.html
│ │ └── styles.css
│ ├── float-margin
│ │ ├── index.html
│ │ └── styles.css
│ ├── margin
│ │ ├── index.html
│ │ └── styles.css
│ ├── outline-box-shadow
│ │ ├── index.html
│ │ └── styles.css
│ └── padding
│ │ ├── index.html
│ │ └── styles.css
├── display
│ ├── block-and-inline
│ │ ├── index.html
│ │ └── styles.css
│ ├── block
│ │ ├── index.html
│ │ └── styles.css
│ ├── inline-block
│ │ ├── index.html
│ │ └── styles.css
│ └── inline
│ │ ├── index.html
│ │ └── styles.css
├── flex
│ ├── image.png
│ ├── index.html
│ └── styles.css
├── float
│ ├── image.png
│ ├── index.html
│ └── styles.css
├── grid
│ ├── column-row-numbers
│ │ ├── index.html
│ │ └── styles.css
│ └── named
│ │ ├── index.html
│ │ └── styles.css
├── inline-block
│ ├── index.html
│ └── styles.css
└── responsiveness
│ ├── index.html
│ └── styles.css
├── chapter-5
├── base
│ ├── index.html
│ └── styles.css
├── defaults
│ └── index.html
├── fallbacks
│ ├── beach.png
│ ├── child.png
│ ├── index.html
│ └── styles.css
├── supports
│ ├── art.png
│ ├── index.html
│ └── styles.css
└── vendor-prefixes
│ ├── firefox
│ ├── index.html
│ └── styles.css
│ └── ie
│ ├── index.html
│ └── styles.css
├── chapter-6
├── animation
│ ├── index.html
│ ├── script.js
│ └── styles.css
└── transition
│ ├── index.html
│ └── styles.css
├── chapter-7
├── imports
│ ├── css
│ │ ├── styles.css
│ │ └── styles.css.map
│ ├── index.html
│ └── styles.scss
└── mixins
│ ├── css
│ └── styles.css
│ ├── index.html
│ └── styles.scss
├── chapter-8
├── animation-listener
│ ├── art.png
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── bootstrap-mixins
│ ├── index.html
│ ├── node_modules
│ │ ├── anymatch
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── binary-extensions
│ │ │ ├── binary-extensions.json
│ │ │ ├── binary-extensions.json.d.ts
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ ├── license
│ │ │ ├── package.json
│ │ │ └── readme.md
│ │ ├── bootstrap
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── dist
│ │ │ │ ├── css
│ │ │ │ │ ├── bootstrap-grid.css
│ │ │ │ │ ├── bootstrap-grid.css.map
│ │ │ │ │ ├── bootstrap-grid.min.css
│ │ │ │ │ ├── bootstrap-grid.min.css.map
│ │ │ │ │ ├── bootstrap-reboot.css
│ │ │ │ │ ├── bootstrap-reboot.css.map
│ │ │ │ │ ├── bootstrap-reboot.min.css
│ │ │ │ │ ├── bootstrap-reboot.min.css.map
│ │ │ │ │ ├── bootstrap.css
│ │ │ │ │ ├── bootstrap.css.map
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ └── bootstrap.min.css.map
│ │ │ │ └── js
│ │ │ │ │ ├── bootstrap.bundle.js
│ │ │ │ │ ├── bootstrap.bundle.js.map
│ │ │ │ │ ├── bootstrap.bundle.min.js
│ │ │ │ │ ├── bootstrap.bundle.min.js.map
│ │ │ │ │ ├── bootstrap.js
│ │ │ │ │ ├── bootstrap.js.map
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ └── bootstrap.min.js.map
│ │ │ ├── js
│ │ │ │ ├── dist
│ │ │ │ │ ├── alert.js
│ │ │ │ │ ├── alert.js.map
│ │ │ │ │ ├── button.js
│ │ │ │ │ ├── button.js.map
│ │ │ │ │ ├── carousel.js
│ │ │ │ │ ├── carousel.js.map
│ │ │ │ │ ├── collapse.js
│ │ │ │ │ ├── collapse.js.map
│ │ │ │ │ ├── dropdown.js
│ │ │ │ │ ├── dropdown.js.map
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── index.js.map
│ │ │ │ │ ├── modal.js
│ │ │ │ │ ├── modal.js.map
│ │ │ │ │ ├── popover.js
│ │ │ │ │ ├── popover.js.map
│ │ │ │ │ ├── scrollspy.js
│ │ │ │ │ ├── scrollspy.js.map
│ │ │ │ │ ├── tab.js
│ │ │ │ │ ├── tab.js.map
│ │ │ │ │ ├── toast.js
│ │ │ │ │ ├── toast.js.map
│ │ │ │ │ ├── tooltip.js
│ │ │ │ │ ├── tooltip.js.map
│ │ │ │ │ ├── util.js
│ │ │ │ │ └── util.js.map
│ │ │ │ └── src
│ │ │ │ │ ├── alert.js
│ │ │ │ │ ├── button.js
│ │ │ │ │ ├── carousel.js
│ │ │ │ │ ├── collapse.js
│ │ │ │ │ ├── dropdown.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── modal.js
│ │ │ │ │ ├── popover.js
│ │ │ │ │ ├── scrollspy.js
│ │ │ │ │ ├── tab.js
│ │ │ │ │ ├── toast.js
│ │ │ │ │ ├── tools
│ │ │ │ │ └── sanitizer.js
│ │ │ │ │ ├── tooltip.js
│ │ │ │ │ └── util.js
│ │ │ ├── package.json
│ │ │ └── scss
│ │ │ │ ├── _alert.scss
│ │ │ │ ├── _badge.scss
│ │ │ │ ├── _breadcrumb.scss
│ │ │ │ ├── _button-group.scss
│ │ │ │ ├── _buttons.scss
│ │ │ │ ├── _card.scss
│ │ │ │ ├── _carousel.scss
│ │ │ │ ├── _close.scss
│ │ │ │ ├── _code.scss
│ │ │ │ ├── _custom-forms.scss
│ │ │ │ ├── _dropdown.scss
│ │ │ │ ├── _forms.scss
│ │ │ │ ├── _functions.scss
│ │ │ │ ├── _grid.scss
│ │ │ │ ├── _images.scss
│ │ │ │ ├── _input-group.scss
│ │ │ │ ├── _jumbotron.scss
│ │ │ │ ├── _list-group.scss
│ │ │ │ ├── _media.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ ├── _modal.scss
│ │ │ │ ├── _nav.scss
│ │ │ │ ├── _navbar.scss
│ │ │ │ ├── _pagination.scss
│ │ │ │ ├── _popover.scss
│ │ │ │ ├── _print.scss
│ │ │ │ ├── _progress.scss
│ │ │ │ ├── _reboot.scss
│ │ │ │ ├── _root.scss
│ │ │ │ ├── _spinners.scss
│ │ │ │ ├── _tables.scss
│ │ │ │ ├── _toasts.scss
│ │ │ │ ├── _tooltip.scss
│ │ │ │ ├── _transitions.scss
│ │ │ │ ├── _type.scss
│ │ │ │ ├── _utilities.scss
│ │ │ │ ├── _variables.scss
│ │ │ │ ├── bootstrap-grid.scss
│ │ │ │ ├── bootstrap-reboot.scss
│ │ │ │ ├── bootstrap.scss
│ │ │ │ ├── mixins
│ │ │ │ ├── _alert.scss
│ │ │ │ ├── _background-variant.scss
│ │ │ │ ├── _badge.scss
│ │ │ │ ├── _border-radius.scss
│ │ │ │ ├── _box-shadow.scss
│ │ │ │ ├── _breakpoints.scss
│ │ │ │ ├── _buttons.scss
│ │ │ │ ├── _caret.scss
│ │ │ │ ├── _clearfix.scss
│ │ │ │ ├── _deprecate.scss
│ │ │ │ ├── _float.scss
│ │ │ │ ├── _forms.scss
│ │ │ │ ├── _gradients.scss
│ │ │ │ ├── _grid-framework.scss
│ │ │ │ ├── _grid.scss
│ │ │ │ ├── _hover.scss
│ │ │ │ ├── _image.scss
│ │ │ │ ├── _list-group.scss
│ │ │ │ ├── _lists.scss
│ │ │ │ ├── _nav-divider.scss
│ │ │ │ ├── _pagination.scss
│ │ │ │ ├── _reset-text.scss
│ │ │ │ ├── _resize.scss
│ │ │ │ ├── _screen-reader.scss
│ │ │ │ ├── _size.scss
│ │ │ │ ├── _table-row.scss
│ │ │ │ ├── _text-emphasis.scss
│ │ │ │ ├── _text-hide.scss
│ │ │ │ ├── _text-truncate.scss
│ │ │ │ ├── _transition.scss
│ │ │ │ └── _visibility.scss
│ │ │ │ ├── utilities
│ │ │ │ ├── _align.scss
│ │ │ │ ├── _background.scss
│ │ │ │ ├── _borders.scss
│ │ │ │ ├── _clearfix.scss
│ │ │ │ ├── _display.scss
│ │ │ │ ├── _embed.scss
│ │ │ │ ├── _flex.scss
│ │ │ │ ├── _float.scss
│ │ │ │ ├── _overflow.scss
│ │ │ │ ├── _position.scss
│ │ │ │ ├── _screenreaders.scss
│ │ │ │ ├── _shadows.scss
│ │ │ │ ├── _sizing.scss
│ │ │ │ ├── _spacing.scss
│ │ │ │ ├── _stretched-link.scss
│ │ │ │ ├── _text.scss
│ │ │ │ └── _visibility.scss
│ │ │ │ └── vendor
│ │ │ │ └── _rfs.scss
│ │ ├── braces
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ │ ├── compile.js
│ │ │ │ ├── constants.js
│ │ │ │ ├── expand.js
│ │ │ │ ├── parse.js
│ │ │ │ ├── stringify.js
│ │ │ │ └── utils.js
│ │ │ └── package.json
│ │ ├── chokidar
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ │ ├── constants.js
│ │ │ │ ├── fsevents-handler.js
│ │ │ │ └── nodefs-handler.js
│ │ │ ├── package.json
│ │ │ └── types
│ │ │ │ └── index.d.ts
│ │ ├── fill-range
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── fsevents
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── fsevents.js
│ │ │ ├── fsevents.node
│ │ │ └── package.json
│ │ ├── glob-parent
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── is-binary-path
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ ├── license
│ │ │ ├── package.json
│ │ │ └── readme.md
│ │ ├── is-extglob
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── is-glob
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── is-number
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── jquery
│ │ │ ├── .editorconfig
│ │ │ ├── .gitattributes
│ │ │ ├── .gitmodules
│ │ │ ├── .jshintrc
│ │ │ ├── .npmignore
│ │ │ ├── AUTHORS.docx
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── Gruntfile.js
│ │ │ ├── MIT-LICENSE.docx
│ │ │ ├── README.md
│ │ │ ├── build
│ │ │ │ ├── release-notes.js
│ │ │ │ └── release.js
│ │ │ ├── component.json
│ │ │ ├── composer.json
│ │ │ ├── jquery-migrate.js
│ │ │ ├── jquery-migrate.min.js
│ │ │ ├── jquery.js
│ │ │ ├── jquery.min.js
│ │ │ ├── jquery.min.map
│ │ │ ├── package.json
│ │ │ ├── speed
│ │ │ │ ├── benchmark.js
│ │ │ │ ├── benchmarker.css
│ │ │ │ ├── benchmarker.js
│ │ │ │ ├── closest.docx
│ │ │ │ ├── css.docx
│ │ │ │ ├── event.docx
│ │ │ │ ├── filter.docx
│ │ │ │ ├── find.docx
│ │ │ │ ├── index.docx
│ │ │ │ ├── jquery-basis.js
│ │ │ │ └── slice.vs.concat.docx
│ │ │ ├── src
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── ajax.js
│ │ │ │ ├── ajax
│ │ │ │ │ ├── jsonp.js
│ │ │ │ │ ├── script.js
│ │ │ │ │ └── xhr.js
│ │ │ │ ├── attributes.js
│ │ │ │ ├── callbacks.js
│ │ │ │ ├── core.js
│ │ │ │ ├── css.js
│ │ │ │ ├── data.js
│ │ │ │ ├── deferred.js
│ │ │ │ ├── deprecated.js
│ │ │ │ ├── dimensions.js
│ │ │ │ ├── effects.js
│ │ │ │ ├── event-alias.js
│ │ │ │ ├── event.js
│ │ │ │ ├── exports.js
│ │ │ │ ├── intro.js
│ │ │ │ ├── manipulation.js
│ │ │ │ ├── offset.js
│ │ │ │ ├── outro.js
│ │ │ │ ├── queue.js
│ │ │ │ ├── serialize.js
│ │ │ │ ├── sizzle-jquery.js
│ │ │ │ ├── support.js
│ │ │ │ └── traversing.js
│ │ │ └── test
│ │ │ │ ├── .jshintignore
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── csp.php
│ │ │ │ ├── data
│ │ │ │ ├── 1x1.jpg
│ │ │ │ ├── ajax
│ │ │ │ │ └── unreleasedXHR.docx
│ │ │ │ ├── atom+xml.php
│ │ │ │ ├── badcall.js
│ │ │ │ ├── badjson.js
│ │ │ │ ├── cleanScript.docx
│ │ │ │ ├── core
│ │ │ │ │ └── cc_on.docx
│ │ │ │ ├── dashboard.xml
│ │ │ │ ├── dimensions
│ │ │ │ │ ├── documentLarge.docx
│ │ │ │ │ └── documentSmall.docx
│ │ │ │ ├── echoData.php
│ │ │ │ ├── echoQuery.php
│ │ │ │ ├── errorWithText.php
│ │ │ │ ├── etag.php
│ │ │ │ ├── evalScript.php
│ │ │ │ ├── event
│ │ │ │ │ ├── longLoadScript.php
│ │ │ │ │ ├── promiseReady.docx
│ │ │ │ │ └── syncReady.docx
│ │ │ │ ├── headers.php
│ │ │ │ ├── if_modified_since.php
│ │ │ │ ├── iframe.docx
│ │ │ │ ├── jquery-1.8.2.ajax_xhr.min.js
│ │ │ │ ├── json.php
│ │ │ │ ├── json_obj.js
│ │ │ │ ├── jsonp.php
│ │ │ │ ├── manipulation
│ │ │ │ │ └── iframe-denied.docx
│ │ │ │ ├── name.docx
│ │ │ │ ├── name.php
│ │ │ │ ├── nocontent.php
│ │ │ │ ├── offset
│ │ │ │ │ ├── absolute.docx
│ │ │ │ │ ├── body.docx
│ │ │ │ │ ├── fixed.docx
│ │ │ │ │ ├── relative.docx
│ │ │ │ │ ├── scroll.docx
│ │ │ │ │ ├── static.docx
│ │ │ │ │ └── table.docx
│ │ │ │ ├── params_html.php
│ │ │ │ ├── readywaitasset.js
│ │ │ │ ├── readywaitloader.js
│ │ │ │ ├── script.php
│ │ │ │ ├── selector
│ │ │ │ │ ├── html5_selector.docx
│ │ │ │ │ └── sizzle_cache.docx
│ │ │ │ ├── statusText.php
│ │ │ │ ├── support
│ │ │ │ │ ├── bodyBackground.docx
│ │ │ │ │ ├── shrinkWrapBlocks.docx
│ │ │ │ │ └── testElementCrash.docx
│ │ │ │ ├── test.docx
│ │ │ │ ├── test.js
│ │ │ │ ├── test.php
│ │ │ │ ├── test2.docx
│ │ │ │ ├── test3.docx
│ │ │ │ ├── testinit.js
│ │ │ │ ├── testrunner.js
│ │ │ │ ├── testsuite.css
│ │ │ │ ├── text.php
│ │ │ │ ├── ua.docx
│ │ │ │ ├── with_fries.xml
│ │ │ │ └── with_fries_over_jsonp.php
│ │ │ │ ├── delegatetest.docx
│ │ │ │ ├── hovertest.docx
│ │ │ │ ├── index.docx
│ │ │ │ ├── localfile.docx
│ │ │ │ ├── networkerror.docx
│ │ │ │ ├── polluted.php
│ │ │ │ ├── readywait.docx
│ │ │ │ ├── unit
│ │ │ │ ├── ajax.js
│ │ │ │ ├── attributes.js
│ │ │ │ ├── callbacks.js
│ │ │ │ ├── core.js
│ │ │ │ ├── css.js
│ │ │ │ ├── data.js
│ │ │ │ ├── deferred.js
│ │ │ │ ├── deprecated.js
│ │ │ │ ├── dimensions.js
│ │ │ │ ├── effects.js
│ │ │ │ ├── event.js
│ │ │ │ ├── exports.js
│ │ │ │ ├── manipulation.js
│ │ │ │ ├── offset.js
│ │ │ │ ├── queue.js
│ │ │ │ ├── selector.js
│ │ │ │ ├── serialize.js
│ │ │ │ ├── support.js
│ │ │ │ └── traversing.js
│ │ │ │ └── xhtml.php
│ │ ├── normalize-path
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── picomatch
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md.docx
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ │ ├── constants.js
│ │ │ │ ├── parse.js
│ │ │ │ ├── picomatch.js
│ │ │ │ ├── scan.js
│ │ │ │ └── utils.js
│ │ │ └── package.json
│ │ ├── popper.js
│ │ │ ├── README.md.docx
│ │ │ ├── dist
│ │ │ │ ├── esm
│ │ │ │ │ ├── popper-utils.js
│ │ │ │ │ ├── popper-utils.js.map
│ │ │ │ │ ├── popper-utils.min.js
│ │ │ │ │ ├── popper-utils.min.js.map
│ │ │ │ │ ├── popper.js
│ │ │ │ │ ├── popper.js.map
│ │ │ │ │ ├── popper.min.js
│ │ │ │ │ └── popper.min.js.map
│ │ │ │ ├── popper-utils.js
│ │ │ │ ├── popper-utils.js.map
│ │ │ │ ├── popper-utils.min.js
│ │ │ │ ├── popper-utils.min.js.map
│ │ │ │ ├── popper.js
│ │ │ │ ├── popper.js.map
│ │ │ │ ├── popper.min.js
│ │ │ │ ├── popper.min.js.map
│ │ │ │ └── umd
│ │ │ │ │ ├── popper-utils.js
│ │ │ │ │ ├── popper-utils.js.map
│ │ │ │ │ ├── popper-utils.min.js
│ │ │ │ │ ├── popper-utils.min.js.map
│ │ │ │ │ ├── popper.js
│ │ │ │ │ ├── popper.js.map
│ │ │ │ │ ├── popper.min.js
│ │ │ │ │ ├── popper.min.js.map
│ │ │ │ │ └── poppper.js.flow
│ │ │ ├── index.d.ts
│ │ │ ├── index.js.flow
│ │ │ └── package.json
│ │ ├── readdirp
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── sass
│ │ │ ├── README.md
│ │ │ ├── package.json
│ │ │ ├── sass.dart.js
│ │ │ └── sass.js
│ │ └── to-regex-range
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ └── package.json
│ ├── package-lock.json
│ ├── package.json
│ ├── styles.css
│ ├── styles.css.map
│ └── styles.scss
├── bootstrap
│ ├── index.html
│ └── styles.css
└── web-components
│ ├── card.css
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── chapter-9
├── oocss
│ ├── index.html
│ └── styles.css
└── smaccss
│ ├── index.html
│ └── styles.css
└── errata.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/9781484257494.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/9781484257494.jpg
--------------------------------------------------------------------------------
/Contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing to Apress Source Code
2 |
3 | Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers.
4 |
5 | ## How to Contribute
6 |
7 | 1. Make sure you have a GitHub account.
8 | 2. Fork the repository for the relevant book.
9 | 3. Create a new branch on which to make your change, e.g.
10 | `git checkout -b my_code_contribution`
11 | 4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted.
12 | 5. Submit a pull request.
13 |
14 | Thank you for your contribution!
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Freeware License, some rights reserved
2 |
3 | Copyright (c) 2020 Martine Dowden and Michael Dowden
4 |
5 | Permission is hereby granted, free of charge, to anyone obtaining a copy
6 | of this software and associated documentation files (the "Software"),
7 | to work with the Software within the limits of freeware distribution and fair use.
8 | This includes the rights to use, copy, and modify the Software for personal use.
9 | Users are also allowed and encouraged to submit corrections and modifications
10 | to the Software for the benefit of other users.
11 |
12 | It is not allowed to reuse, modify, or redistribute the Software for
13 | commercial use in any way, or for a user’s educational materials such as books
14 | or blog articles without prior permission from the copyright holder.
15 |
16 | The above copyright notice and this permission notice need to be included
17 | in all copies or substantial portions of the software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 | SOFTWARE.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Apress Source Code
2 |
3 | This repository accompanies [*Architecting CSS*](http://www.apress.com/9781484257494) by Martine Dowden and Michael Dowden (Apress, 2020).
4 |
5 | [comment]: #cover
6 | 
7 |
8 | Download the files as a zip using the green button, or clone the repository to your machine using Git.
9 |
10 | ## Releases
11 |
12 | Release v1.0 corresponds to the code in the published book, without corrections or updates.
13 |
14 | ## Contributions
15 |
16 | See the file Contributing.md for more information on how you can contribute to this repository.
--------------------------------------------------------------------------------
/chapter-2/at-rules/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-2/at-rules/image.png
--------------------------------------------------------------------------------
/chapter-2/at-rules/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | At-Rules
6 |
7 |
8 |
9 |
10 | At-Rules
11 | Hello World
12 |
13 |
14 |
--------------------------------------------------------------------------------
/chapter-2/at-rules/styles.css:
--------------------------------------------------------------------------------
1 | p {
2 | text-decoration: underline;
3 | text-underline-offset: 1rem;
4 | }
5 |
6 | @supports not (text-underline-offset: 1rem) {
7 | p {
8 | text-decoration: none;
9 | padding-bottom: 1rem;
10 | border-bottom: solid 3px orange;
11 | display: inline-block;
12 | }
13 | }
--------------------------------------------------------------------------------
/chapter-2/attribute-selector/icon-audio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-2/attribute-selector/icon-audio.png
--------------------------------------------------------------------------------
/chapter-2/attribute-selector/icon-pdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-2/attribute-selector/icon-pdf.png
--------------------------------------------------------------------------------
/chapter-2/attribute-selector/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Attribute Selector
6 |
7 |
8 |
9 |
10 |
11 | Attribute Selector
12 |
34 |
35 | The World Wide Web Consortium (W3C) is an international community that develops open standards to ensure the long-term growth of the Web.
36 |
37 |
38 | Wikipedia is a multilingual online encyclopedia created and maintained as an open collaboration project by a community of volunteer editors using a wiki-based editing system. It is the largest and most popular general reference work on the World Wide Web, and is one of the most popular websites ranked by Alexa as of October 2019.
39 |
40 | PDF File
41 | Word Doc
42 |
43 |
44 |
--------------------------------------------------------------------------------
/chapter-2/attribute-selector/styles.css:
--------------------------------------------------------------------------------
1 | label, input, a, button {
2 | display: block;
3 | margin-bottom: 1rem;
4 | }
5 | button {
6 | display: flex;
7 | align-items: center;
8 | }
9 |
10 | /* Matches password input fields */
11 | input[type="password"] {
12 | color: red;
13 | }
14 |
15 | /* Strikes out any quotes cited from Wikipedia */
16 | blockquote[cite*="wikipedia.org"] {
17 | text-decoration: line-through;
18 | }
19 |
20 | /* Underlines any element with a title attribute containing
21 | the word "continue" with any Capitalization.
22 | */
23 | [title*="continue" i] {
24 | text-decoration: underline;
25 | }
26 |
27 | /* Display a gray border around any input which has an
28 | accept starting with image, such as image/png
29 | */
30 | input[accept^="image"] {
31 | border: solid 4px gray;
32 | }
33 |
34 | /* Display a PDF icon beside any .pdf download links */
35 | a[href$=".pdf"]::before {
36 | content: url(icon-pdf.png);
37 | }
38 |
39 | /* Matches a font-awesome icon such as fa-home */
40 | i[class|="material-icons"] {
41 | color: blue;
42 | width: 32px;
43 | }
44 |
--------------------------------------------------------------------------------
/chapter-2/class-selector/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-2/class-selector/image.png
--------------------------------------------------------------------------------
/chapter-2/class-selector/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Class Selector
6 |
7 |
8 |
9 |
10 | Class Selector
11 |
12 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt posuere sem, commodo dictum velit consequat quis. Curabitur a sodales massa. Nulla accumsan sapien in ex imperdiet, eu suscipit sapien congue. Vestibulum et ipsum ex. Vivamus viverra urna non fringilla fringilla. In rhoncus ullamcorper massa, nec lacinia justo tincidunt malesuada. Curabitur sagittis at massa nec tempor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
13 |
14 |
Cancel
15 |
OK
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-2/class-selector/styles.css:
--------------------------------------------------------------------------------
1 | img {
2 | width: 200px;
3 | }
4 | button {
5 | background-color: lightblue;
6 | }
7 | button.outline {
8 | border: 1px solid green;
9 | }
10 | button.outline.bold {
11 | border: 5px solid darkgreen;
12 | }
13 |
--------------------------------------------------------------------------------
/chapter-2/combinators/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Combinators
6 |
7 |
8 |
9 |
10 | Combinators
11 |
12 |
13 | Home
14 |
15 | Combinators
16 |
17 | " " (space)
18 | >
19 | ~
20 | +
21 |
23 |
24 |
25 |
26 | List of Combinators
27 | There are a few other combinators to make this possible, and they even provide for hierarchical context based upon the elements' relationship within the DOM.
28 |
29 |
30 | " " (space)
31 |
32 | nav li
33 | nav a
34 |
35 |
36 | >
37 | ~
38 | +
39 |
40 | By combining selectors together we can select elements to style based upon their natural location and ordering within an HTML documents.
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/chapter-2/combinators/styles.css:
--------------------------------------------------------------------------------
1 | nav a {
2 | display: block;
3 | margin: 0 1rem;
4 | }
5 |
6 | nav > ul > li {
7 | border: solid 1px gray;
8 | display: inline-block;
9 | list-style-type: none;
10 | vertical-align: top;
11 | }
12 |
13 | p ~ p {
14 | color: purple;
15 | font-weight: bold;
16 | }
17 |
18 | h2 + p {
19 | font-family: sans-serif;
20 | }
21 |
--------------------------------------------------------------------------------
/chapter-2/functions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Functions
6 |
7 |
8 |
9 |
10 | Functions
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chapter-2/functions/styles.css:
--------------------------------------------------------------------------------
1 | .shape {
2 | clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
3 | display: inline-block;
4 | position: relative;
5 | height: calc(100vw / 3);
6 | width: calc(100vw / 3);
7 | }
8 | .shape:nth-of-type(1) {
9 | background: rgba(255, 0, 255, 0.31);
10 | transform: rotate(-25deg);
11 | filter: saturate(15%);
12 | }
13 | .shape:nth-of-type(2) {
14 | background: rgb(255,116,0);
15 | background: linear-gradient(90deg, rgba(255,116,0,1) 0%, rgba(255,237,0,1) 47%, rgba(255,167,0,1) 100%);
16 | filter: opacity(.75);
17 | transform: translate(0, -50px);
18 | left: calc((100vw / 3) - 200px);
19 | }
20 | .shape:nth-of-type(3) {
21 | background: hsl(189, 100%, 50%);
22 | transform: rotate(25deg);
23 | opacity: .33;
24 | left: calc((100vw / 3) - 100px);
25 | top: -200px;
26 | }
--------------------------------------------------------------------------------
/chapter-2/id-selector/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-2/id-selector/image.png
--------------------------------------------------------------------------------
/chapter-2/id-selector/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ID Selector
6 |
7 |
8 |
9 |
10 | ID Selector
11 |
12 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt posuere sem, commodo dictum velit consequat quis. Curabitur a sodales massa. Nulla accumsan sapien in ex imperdiet, eu suscipit sapien congue. Vestibulum et ipsum ex. Vivamus viverra urna non fringilla fringilla. In rhoncus ullamcorper massa, nec lacinia justo tincidunt malesuada. Curabitur sagittis at massa nec tempor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
13 |
14 |
Cancel
15 |
OK
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-2/id-selector/styles.css:
--------------------------------------------------------------------------------
1 | img {
2 | width: 200px;
3 | }
4 |
5 | #ok {
6 | font-size: 1.5rem;
7 | font-weight: bold;
8 | }
9 | p#ok {
10 | color: pink;
11 | }
12 |
--------------------------------------------------------------------------------
/chapter-2/pseudo-classes/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Pseudo Classes
6 |
7 |
8 |
9 |
10 | Pseudo Classes
11 |
12 |
13 | Name
14 | Email
15 | Zip Code
16 |
17 |
18 |
19 | Jane
20 | jane@email.com
21 | 15978
22 |
23 |
24 | John
25 | john@email.com
26 | 11458
27 |
28 |
29 | Alex
30 | alex@email.com
31 | 68978
32 |
33 |
34 |
35 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/chapter-2/pseudo-classes/styles.css:
--------------------------------------------------------------------------------
1 | table {
2 | border-collapse: collapse;
3 | margin-bottom: 1rem;;
4 | width: 100%;
5 | }
6 | tr {
7 | border-top: solid 1px lightgrey;
8 | border-bottom: solid 1px lightgrey;
9 | }
10 | tbody tr:nth-last-of-type(odd) {
11 | background: lightblue;
12 | }
13 | th, td {
14 | padding: .5rem 1rem;
15 | text-align: left;
16 | }
17 |
18 | form {
19 | margin-top: 2rem;
20 | }
21 | form > *:not(button) {
22 | border-radius: 4px;
23 | box-sizing: border-box;
24 | display: block;
25 | }
26 | label {
27 | margin-bottom: .5rem;
28 | }
29 | input {
30 | border: solid 1px lightblue;
31 | padding: .5rem 1rem;
32 | width: 100%;
33 | }
34 | input:hover, input:active {
35 | border-color: slategray;
36 | }
37 | input:invalid {
38 | border-left: solid 5px red;
39 | }
40 | input:valid {
41 | border-left: solid 5px green;
42 | }
43 |
44 | button {
45 | padding: .5rem 1.5rem;
46 | border: solid 1px lightblue;
47 | border-radius: 3px;
48 | background: white;
49 | margin-top: .5rem;
50 | }
51 | button:hover, button:active {
52 | outline: dotted 1px blue;
53 | outline-offset: 2px;
54 | }
55 |
--------------------------------------------------------------------------------
/chapter-2/pseudo-elements/link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-2/pseudo-elements/link.png
--------------------------------------------------------------------------------
/chapter-2/pseudo-elements/styles.css:
--------------------------------------------------------------------------------
1 | p::first-letter {
2 | color: red;
3 | font-size: 3rem;
4 | line-height: 0;
5 | display: block;
6 | float: left;
7 | margin-top: .125rem;
8 | margin-right: .5rem;
9 | }
10 |
11 | p::first-line {
12 | color: red;
13 | }
14 |
15 | a {
16 | display: block;
17 | }
18 | a::before {
19 | content: url(link.png);
20 | display: inline-block;
21 | margin-right: .5rem;
22 | vertical-align: middle;
23 | }
24 | a::after {
25 | content: ' (link)'
26 | }
27 |
28 | input {
29 | box-sizing: border-box;
30 | border-radius: 4px;
31 | border: solid 1px gray;
32 | padding: .5rem 1rem;
33 | font-size: 1rem;
34 | width: 100%;
35 | }
36 | input[type=text]::placeholder {
37 | font-family: cursive;
38 | }
39 |
40 | ::selection {
41 | background-color: cornflowerblue;
42 | color: white;
43 | }
44 |
45 | ::backdrop {
46 | background: cornflowerblue;
47 | }
--------------------------------------------------------------------------------
/chapter-2/type-selector/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Type Selector
6 |
7 |
8 |
9 |
10 | Type Selector
11 | I am a paragrah
12 | I am also a paragrah
13 | Button
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chapter-2/type-selector/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | }
4 |
5 | p {
6 | padding: 0.5rem;
7 | }
--------------------------------------------------------------------------------
/chapter-2/universal-selector/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Universal Selector
6 |
7 |
8 |
9 |
10 | Universal Selector
11 | Button
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter-2/universal-selector/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | }
4 |
5 | *:focus {
6 | outline: 1px dotted grey;
7 | }
8 |
--------------------------------------------------------------------------------
/chapter-2/variables/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Variables
6 |
7 |
8 |
9 |
10 | Variables
11 |
12 | Apple
13 | Lettuce
14 | Corn
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-2/variables/styles.css:
--------------------------------------------------------------------------------
1 | ul {
2 | counter-reset: li;
3 | }
4 | li:before {
5 | content: counter(li)"-" attr(category)": ";
6 | counter-increment: li;
7 | text-transform: capitalize;
8 | background: lightblue;
9 | display: inline-block;
10 | padding: .5rem 1rem;
11 | border-radius: 25px;
12 | margin: 0 1rem 1rem 0;
13 | }
--------------------------------------------------------------------------------
/chapter-3/exceptions/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: sans-serif;
3 | padding: 10px;
4 | }
5 |
6 | p {
7 | padding: 20px;
8 | border: dashed 1px gray;
9 | }
10 | p::first-letter {
11 | display: block;
12 | float: left;
13 | font-size: 3rem;
14 | color: red;
15 | }
16 | p:nth-of-type(2) { padding: unset }
17 | p:nth-of-type(3) { padding: initial }
18 | p:nth-of-type(4) { padding: inherit }
19 |
20 | li { font-family: cursive; }
21 | li:nth-of-type(2) { font-family: unset; }
22 | li:nth-of-type(3) { font-family: initial; }
23 | li:nth-of-type(4) { font-family: inherit; }
24 |
--------------------------------------------------------------------------------
/chapter-3/inheritance/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-3/inheritance/image.png
--------------------------------------------------------------------------------
/chapter-3/inheritance/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Inheritance
6 |
7 |
8 |
9 |
10 | Inheritance
11 |
12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sodales erat fringilla turpis accumsan, at gravida nunc sollicitudin. Mauris vulputate purus a ultrices posuere. Etiam et est semper sem egestas faucibus vel eu nunc. Fusce ac massa nec libero aliquet feugiat. Fusce quis congue ligula, sit amet eleifend tellus. Phasellus ultrices venenatis enim suscipit malesuada. Cras pretium quam eros, in laoreet est lobortis at.
13 |
14 |
15 |
16 | Lorem Ipsum
17 | Lorem ipsum dolor sit amet, consectetur adipiscing elit.
18 |
19 |
20 | Pellentesque
21 | Pellentesque sit amet massa auctor est hendrerit ullamcorper ac in libero
22 |
23 |
24 | Pellentesque sit amet massa auctor est hendrerit ullamcorper ac in libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin rhoncus odio nec nisl porta fringilla. Morbi pulvinar tempus posuere. Quisque eu felis ullamcorper sapien gravida efficitur. Aenean hendrerit placerat elit.
25 | Duis vitae iaculis risus. Vivamus id egestas dolor, ac auctor ante. Praesent auctor nibh eget massa euismod, et ornare velit iaculis. Duis in mollis lacus, ac vulputate odio . Morbi ultricies lectus vitae sem efficitur, at condimentum nibh dignissim. Quisque a velit tempor eros blandit convallis suscipit a felis. Donec imperdiet vitae augue elementum pretium.
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/chapter-3/inheritance/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: gray;
3 | padding: 2rem;
4 | text-align: justify;
5 | line-height: 1.5rem;
6 | font-family: Helvetica, Arial, sans-serif;
7 | font-weight: lighter;
8 | }
9 |
10 | h1 {
11 | color: slategray;
12 | font-family: 'Comic Sans MS';
13 | font-size: 2.5rem;
14 | letter-spacing: .0625rem;
15 | }
16 | h1 {
17 | font-family: fantasy;
18 | }
19 |
20 | p:first-of-type::first-letter {
21 | color: gold;
22 | display: block;
23 | float: left;
24 | font-size: 3rem;
25 | line-height: 0;
26 | margin: .5rem .5rem 0 0;
27 | }
28 |
29 | table {
30 | border-collapse: collapse;
31 | }
32 | tr {
33 | color: slategray;
34 | border-top: solid 1px lightsteelblue;
35 | border-bottom: solid 1px lightsteelblue;
36 | }
37 | td {
38 | padding: .5rem 1rem;
39 | }
40 |
41 | img {
42 | margin: 0 0 0 1rem;
43 | float: right;
44 | width: 200px;
45 | }
46 |
--------------------------------------------------------------------------------
/chapter-3/precedence/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Precedence
6 |
7 |
8 |
9 |
10 |
11 | Precedence
12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sodales erat fringilla turpis accumsan, at gravida nunc sollicitudin. Mauris vulputate purus a ultrices posuere. Etiam et est semper sem egestas faucibus vel eu nunc. Fusce ac massa nec libero aliquet feugiat. Fusce quis congue ligula, sit amet eleifend tellus. Phasellus ultrices venenatis enim suscipit malesuada. Cras pretium quam eros, in laoreet est lobortis at.
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chapter-3/precedence/styles.css:
--------------------------------------------------------------------------------
1 | p {
2 | color: black !important;
3 | }
4 |
5 | p {
6 | animation: 3s linear 1s 1 alternate slidein;
7 | }
8 | @keyframes slidein {
9 | from { transform: scaleX(0); }
10 | to { transform: scaleX(1); }
11 | }
--------------------------------------------------------------------------------
/chapter-3/precedence/user.css:
--------------------------------------------------------------------------------
1 | body { background: black !important }
2 |
3 | *, p {
4 | animation: none !important;
5 | color: white !important
6 | }
7 |
--------------------------------------------------------------------------------
/chapter-4/box-sizing/border-box/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Box Sizing - Border-Box
6 |
7 |
8 |
9 |
10 | No Padding or Margin
11 |
19 | With Padding
20 |
28 | With Margin
29 |
37 |
38 |
39 | 50%
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/chapter-4/box-sizing/border-box/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | }
4 |
5 | .container { overflow:auto; }
6 | .container > div {
7 | width: 50%;
8 | box-sizing: border-box;
9 | float: left;
10 | }
11 | .container p {
12 | background: rgba(0, 0, 0, .16); /* light grey */
13 | text-align: center;
14 | margin: 0;
15 | }
16 | .container > div:last-of-type p { /* second rectangle */
17 | background: rgba(0, 0, 0, .32); /* dark grey */
18 | }
19 | .has-padding > div {
20 | outline: dashed 1px rgba(0, 0, 0, .5);
21 | padding: 10px;
22 | }
23 | .has-margin > div {
24 | border: dashed 1px rgba(0, 0, 0, .5);
25 | margin: 10px;
26 | outline: dotted 1px gray;
27 | outline-offset: 9px;
28 | }
29 |
30 | .line {
31 | position: absolute;
32 | width: 4px;
33 | left: calc(50% - 2px);
34 | top: 0;
35 | bottom: 0;
36 | background: grey;
37 | z-index: -1;
38 | }
39 |
40 | .label {
41 | text-align: center;
42 | margin-top: 36px;
43 | background: white;
44 | padding: 10px;
45 | }
--------------------------------------------------------------------------------
/chapter-4/box-sizing/float-margin/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Box-Sizing: Float Margin
6 |
7 |
8 |
9 |
10 | No Margin
11 |
19 | With Margin
20 |
28 |
29 |
30 | 50%
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/chapter-4/box-sizing/float-margin/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | }
4 |
5 | .container { overflow:auto; }
6 | .container > div {
7 | width: 50%;
8 | float: left;
9 | }
10 | .container p {
11 | background: rgba(0, 0, 0, .16); /* light grey */
12 | text-align: center;
13 | }
14 | .container > div:last-of-type p { /* second rectangle */
15 | background: rgba(0, 0, 0, .32); /* dark grey */
16 | }
17 | .has-margin > div {
18 | border: dashed 1px rgba(0, 0, 0, .5);
19 | margin: 10px;
20 | }
21 |
22 | .line {
23 | position: absolute;
24 | width: 4px;
25 | left: calc(50% - 2px);
26 | top: 0;
27 | bottom: 0;
28 | background: grey;
29 | z-index: -1;
30 | }
31 |
32 | .label {
33 | text-align: center;
34 | margin-top: 36px;
35 | background: white;
36 | padding: 10px;
37 | }
--------------------------------------------------------------------------------
/chapter-4/box-sizing/margin/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Box Sizing: Margin
6 |
7 |
8 |
9 |
10 | Content
11 | Content
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter-4/box-sizing/margin/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | padding: 0;
4 | margin: 0;
5 | }
6 |
7 | div {
8 | margin: 10px;
9 | background: rgba(0, 0, 0, .16); /* light grey */
10 | }
11 | div:last-of-type {
12 | background: rgba(0, 0, 0, .32); /* light grey */
13 | }
--------------------------------------------------------------------------------
/chapter-4/box-sizing/outline-box-shadow/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Box Sizing: Outline-Box-Shadow
6 |
7 |
8 |
9 |
10 | Outline
11 |
12 |
Content
13 |
Content
14 |
15 | Box-Shadow
16 |
17 |
Content
18 |
Content
19 |
20 | Both
21 |
22 |
Content
23 |
Content
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/chapter-4/box-sizing/outline-box-shadow/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | h1 { margin: 24px; }
8 |
9 | .container div {
10 | background: rgba(0, 0, 0, .16); /* light grey */
11 | height: 50px;
12 | }
13 | .container div:last-of-type {
14 | background: rgba(0, 0, 0, .32); /* dark grey */
15 | }
16 |
17 | .container.outline div:last-of-type {
18 | outline: dotted 15px rgba(0, 0, 0, .5);
19 | }
20 |
21 | .container.box-shadow div:last-of-type {
22 | box-shadow: 0px 0px 10px 10px rgba(0, 0, 0, .5)
23 | }
--------------------------------------------------------------------------------
/chapter-4/box-sizing/padding/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Box Sizing: Padding
6 |
7 |
8 |
9 |
10 | No Padding
11 |
19 | With Padding
20 |
28 |
29 |
30 | 50%
31 |
32 |
33 |
--------------------------------------------------------------------------------
/chapter-4/box-sizing/padding/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | }
4 |
5 | .container { overflow:auto; }
6 | .container > div {
7 | width: 50%;
8 | float: left;
9 | }
10 | .container p {
11 | background: rgba(0, 0, 0, .16); /* light grey */
12 | text-align: center;
13 | }
14 | .container > div:last-of-type p { /* second rectangle */
15 | background: rgba(0, 0, 0, .32); /* dark grey */
16 | }
17 | .has-padding > div {
18 | border: dashed 1px rgba(0, 0, 0, .5);
19 | padding: 10px;
20 | }
21 |
22 | .line {
23 | position: absolute;
24 | width: 4px;
25 | left: calc(50% - 2px);
26 | top: 0;
27 | bottom: 0;
28 | background: grey;
29 | z-index: -1;
30 | }
31 |
32 | .label {
33 | text-align: center;
34 | margin-top: 36px;
35 | background: white;
36 | padding: 10px;
37 | }
--------------------------------------------------------------------------------
/chapter-4/display/block-and-inline/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Display: Block-And-Inline
6 |
7 |
8 |
9 |
10 | Block Content
11 | Inline Content
12 |
13 |
14 |
--------------------------------------------------------------------------------
/chapter-4/display/block-and-inline/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | padding: 36px;
4 | margin: 0;
5 | }
6 |
7 | div {
8 | background: rgba(0, 0, 0, .16);
9 | height: 50px;
10 | width: 200px;
11 | }
12 |
--------------------------------------------------------------------------------
/chapter-4/display/block/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Display: Block
6 |
7 |
8 |
9 |
10 | Content
11 | Content
12 | Content
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter-4/display/block/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | padding: 36px;
4 | margin: 0;
5 | }
6 |
7 | div {
8 | background: rgba(0, 0, 0, .16);
9 | height: 50px;
10 | margin: 20px;
11 | outline: dotted 1px gray;
12 | outline-offset: 19px;
13 | text-align: center;
14 | }
15 |
16 | div:first-of-type {
17 | padding: 20px;
18 | }
19 |
20 | div:nth-of-type(2),
21 | div:last-of-type {
22 | width: 200px;
23 | }
--------------------------------------------------------------------------------
/chapter-4/display/inline-block/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Display: Inline-Block
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-4/display/inline-block/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | padding: 36px;
4 | margin: 0;
5 | }
6 |
7 | ul {
8 | margin: 0;
9 | padding-left: 0;
10 | background: lightgray;
11 | }
12 | li {
13 | list-style-type: none;
14 | display: inline-block;
15 | margin: 2rem;
16 | }
17 |
18 | a {
19 | padding: 1rem 2rem;
20 | background: white;
21 | border-radius: 2rem;
22 | }
--------------------------------------------------------------------------------
/chapter-4/display/inline/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Display: Inline
6 |
7 |
8 |
9 |
10 | I am some text.
11 | I am a span.
12 | More text goes here.
13 | I am code.
14 | And some more text.
15 | I am an anchor tag.
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chapter-4/display/inline/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-size: 24px;
3 | padding: 36px;
4 | margin: 0;
5 | }
6 | a {
7 | padding: 10px;
8 | outline: dotted 2px grey;
9 | }
10 |
11 | code {
12 | margin: 10px;
13 | outline: dotted 2px grey;
14 | outline-offset: 8px;
15 | }
--------------------------------------------------------------------------------
/chapter-4/flex/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-4/flex/image.png
--------------------------------------------------------------------------------
/chapter-4/flex/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 12px 36px;
3 | margin: 0;
4 | }
5 |
6 | h1 { text-align: center; }
7 | nav {
8 | border-top: solid 1px gray;
9 | border-bottom: solid 1px gray;
10 | }
11 |
12 | ul {
13 | display: flex;
14 | padding-left: 0;
15 | justify-content: space-around;
16 | }
17 |
18 | .container { display: flex; }
19 |
20 | aside {
21 | background: rgba(0, 0, 0, .16);
22 | flex-basis: 30%;
23 | flex-shrink: 0;
24 | padding: 30px;
25 | }
26 |
27 | section {
28 | background: rgba(0, 0, 0, .5);
29 | align-items: center;
30 | display: flex;
31 | flex-direction: column;
32 | justify-content: space-evenly;
33 | }
34 |
35 | section div {
36 | color: white;
37 | background: rgba(0, 0, 0, .50);
38 | align-items: center;
39 | display: flex;
40 | height: 100px;
41 | justify-content: center;
42 | width: 100px;
43 | }
44 |
45 | main {
46 | background: rgba(0, 0, 0, .05);
47 | padding: 30px;
48 | }
49 |
50 | li { list-style-type: none; }
51 | img {
52 | width: 100%;
53 | max-width: 250px;
54 | float: left;
55 | padding-right: 20px;
56 | }
--------------------------------------------------------------------------------
/chapter-4/float/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-4/float/image.png
--------------------------------------------------------------------------------
/chapter-4/float/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | h1 {
7 | text-align: center;
8 | }
9 | nav {
10 | border-top: solid 1px gray;
11 | border-bottom: solid 1px gray;
12 | display: flow-root;
13 | }
14 | nav ul {
15 | padding: 0;
16 | margin: 0;
17 | }
18 | nav li {
19 | box-sizing: border-box;
20 | list-style-type: none;
21 | float: left;
22 | padding: 1rem;
23 | text-align: center;
24 | width: 33.33%;
25 | }
26 |
27 | section {
28 | float: left;
29 | background: rgba(0, 0, 0, .16);
30 | }
31 | section div {
32 | box-sizing: border-box;
33 | color: white;
34 | background: rgba(0, 0, 0, .50);
35 | height: 100px;
36 | width: 100px;
37 | text-align: center;
38 | padding: 37px;
39 | margin-top: 5rem;
40 | margin-bottom: 5rem;
41 | }
42 |
43 | main {
44 | background: rgba(0, 0, 0, .05);
45 | box-sizing: border-box;
46 | padding: 30px;
47 | float: left;
48 | width: calc(100vw - 244px - 30%)
49 | }
50 |
51 | aside {
52 | box-sizing: border-box;
53 | background: rgba(0, 0, 0, .16);
54 | width: 30%;
55 | padding: 30px;
56 | float: right;
57 | }
58 |
59 | img {
60 | width: 100%;
61 | max-width: 250px;
62 | float: left;
63 | padding-right: 20px;
64 | }
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/chapter-4/grid/column-row-numbers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Grid - Column-Row-Numbers
6 |
7 |
8 |
9 |
10 | Grid
11 |
12 |
15 |
16 | Main
17 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec augue neque, porttitor in dolor in, hendrerit mattis erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer a mauris enim. Vestibulum non orci massa. Cras sit amet placerat mi. Phasellus at congue ante. Nullam ullamcorper eget urna sed lacinia. Sed a nibh pharetra, faucibus ligula in, mollis tellus. Donec in velit auctor, tempus dolor ac, sollicitudin justo.
18 | Quisque faucibus, augue sed varius ornare, sem neque dictum velit, a blandit urna nulla et urna. Nulla vehicula dolor eu arcu iaculis, sed porta mauris consectetur. Nunc eu pulvinar dolor. In magna ante, luctus sed consequat quis, facilisis id dui. Proin rhoncus, dui iaculis pretium ornare, ex est faucibus lorem, et dignissim felis lectus nec lorem. Phasellus sagittis interdum purus. Ut vel nunc eu erat finibus finibus vitae porttitor magna. Nulla fermentum vestibulum tincidunt. Fusce gravida, arcu ac egestas porttitor, augue enim aliquet elit, rhoncus dapibus velit libero a dui. Sed laoreet lacinia lacus convallis fermentum.
19 |
20 |
30 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/chapter-4/grid/column-row-numbers/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | header {
7 | grid-area: header;
8 | background: rgba(0, 0, 0, .1);
9 | text-align: center;
10 | padding: 5px;
11 | grid-row: 1;
12 | grid-column: 1 / 5;
13 | }
14 | main {
15 | grid-area: main;
16 | background: rgba(0, 0, 0, .2);
17 | padding: 10px;
18 | grid-row: 2;
19 | grid-column: 1;
20 | }
21 | .sidebar {
22 | grid-area: sidebar;
23 | padding: 10px;
24 | background: rgba(0, 0, 0, .3);
25 | grid-row: 2 / 4;
26 | grid-column: 4;
27 | }
28 | footer {
29 | grid-area: footer;
30 | background: rgba(0, 0, 0, .5);
31 | text-align: center;
32 | color: white;
33 | grid-row: 3;
34 | grid-column: 1 / 4;
35 | }
36 | .container {
37 | display: grid;
38 | grid-template-columns: 1fr 1fr 1fr 1fr;
39 | grid-template-rows: 46px auto 36px;
40 | }
41 |
42 | h1 { text-align: center; }
43 | header, footer {
44 | display: flex;
45 | align-items: center;
46 | justify-content: center;
47 | }
48 | header h2, footer h2 {
49 | margin: 0;
50 | }
51 |
--------------------------------------------------------------------------------
/chapter-4/grid/named/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Grid: Named
6 |
7 |
8 |
9 |
10 | Grid
11 |
12 |
15 |
16 | Main
17 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec augue neque, porttitor in dolor in, hendrerit mattis erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer a mauris enim. Vestibulum non orci massa. Cras sit amet placerat mi. Phasellus at congue ante. Nullam ullamcorper eget urna sed lacinia. Sed a nibh pharetra, faucibus ligula in, mollis tellus. Donec in velit auctor, tempus dolor ac, sollicitudin justo.
18 | Quisque faucibus, augue sed varius ornare, sem neque dictum velit, a blandit urna nulla et urna. Nulla vehicula dolor eu arcu iaculis, sed porta mauris consectetur. Nunc eu pulvinar dolor. In magna ante, luctus sed consequat quis, facilisis id dui. Proin rhoncus, dui iaculis pretium ornare, ex est faucibus lorem, et dignissim felis lectus nec lorem. Phasellus sagittis interdum purus. Ut vel nunc eu erat finibus finibus vitae porttitor magna. Nulla fermentum vestibulum tincidunt. Fusce gravida, arcu ac egestas porttitor, augue enim aliquet elit, rhoncus dapibus velit libero a dui. Sed laoreet lacinia lacus convallis fermentum.
19 |
20 |
30 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/chapter-4/grid/named/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | header {
7 | grid-area: header;
8 | background: rgba(0, 0, 0, .1);
9 | text-align: center;
10 | padding: 5px;
11 | }
12 | main {
13 | grid-area: main;
14 | background: rgba(0, 0, 0, .2);
15 | padding: 10px;
16 | }
17 | .sidebar {
18 | grid-area: sidebar;
19 | padding: 10px;
20 | background: rgba(0, 0, 0, .3);
21 | }
22 | footer {
23 | grid-area: footer;
24 | background: rgba(0, 0, 0, .5);
25 | text-align: center;
26 | color: white;
27 | }
28 | .container {
29 | display: grid;
30 | grid-template-columns: 1fr 1fr 1fr 1fr;
31 | grid-template-rows: 46px auto 36px;
32 | grid-template-areas:
33 | "header header header header"
34 | "main main . sidebar"
35 | "footer footer footer sidebar";
36 | }
37 |
38 | h1 { text-align: center; }
39 | header, footer {
40 | display: flex;
41 | align-items: center;
42 | justify-content: center;
43 | }
44 | header h2, footer h2 {
45 | margin: 0;
46 | }
47 |
--------------------------------------------------------------------------------
/chapter-4/inline-block/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Inline-Block
6 |
7 |
8 |
9 |
10 | Example 1
11 |
12 |
13 | inline-block element
14 | inline-block element
15 | inline-block element
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/chapter-4/inline-block/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 12px 36px;
3 | margin: 0;
4 | font-size: 32px;
5 | }
6 |
7 | ul {
8 | padding-left: 0;
9 | }
10 |
11 | li {
12 | display: inline-block;
13 | padding: 10px 20px;
14 | background: grey;
15 | color: white;
16 | }
17 |
--------------------------------------------------------------------------------
/chapter-5/base/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Base
6 |
7 |
8 |
9 |
10 | Theme
11 |
12 |
13 |
14 |
15 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia, magna sed efficitur cursus, tortor nisi dictum lorem, vitae dictum nibh mauris ut mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean ac consequat odio, ut convallis magna. Praesent at malesuada ex.
16 |
17 |
21 |
22 |
23 |
24 |
25 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia, magna sed efficitur cursus, tortor nisi dictum lorem, vitae dictum nibh mauris ut mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean ac consequat odio, ut convallis magna. Praesent at malesuada ex.
26 |
27 |
31 |
32 |
33 |
34 |
35 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia, magna sed efficitur cursus, tortor nisi dictum lorem, vitae dictum nibh mauris ut mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean ac consequat odio, ut convallis magna. Praesent at malesuada ex.
36 |
37 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/chapter-5/base/styles.css:
--------------------------------------------------------------------------------
1 | /* THEME */
2 |
3 | body {
4 | --border: solid 1px rgba(0, 0, 0, .2);
5 | --dark: rgba(0, 0, 0, .87);
6 | --light: rgba(255, 255, 255, .87);
7 | --shadow: box-shadow: 5px 5px 5px var(--dark);
8 | color: rgba(0, 0, 0, .87);
9 | font-family: sans-serif;
10 | }
11 |
12 | h1 { font-family: cursive; }
13 |
14 | a {
15 | font-size: .75rem;
16 | font-variant: small-caps;
17 | text-decoration: none;
18 | }
19 |
20 | button {
21 | background: none;
22 | border: var(--border);
23 | border-radius: 45px;
24 | box-shadow: var(--shadow);
25 | box-sizing: border-box;
26 | font-size: .75rem;
27 | font-variant: small-caps;
28 | padding: .5rem 1rem;
29 | }
30 |
31 | .actions {
32 | align-items: center;
33 | border-top: var(--border);
34 | display: flex;
35 | justify-content: flex-end;
36 | margin-top: 1rem;
37 | }
38 | .actions > * { margin-left: 1rem;}
39 |
40 | .card {
41 | border: var(--border);
42 | border-radius: 3px;
43 | margin-bottom: 1rem;
44 | }
45 | .card > div { padding: 1rem; }
46 | .card .header {
47 | background: rgba(0, 0, 0, .87);
48 | color: rgba(255, 255, 255, .87);
49 | }
50 |
51 | /* Layout */
52 | .container {
53 | column-width: 30rem;
54 | }
--------------------------------------------------------------------------------
/chapter-5/defaults/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Defaults
6 |
7 |
8 |
9 | Header 1
10 | Header 2
11 | Header 3
12 |
13 | Paragraph
14 |
15 |
37 |
38 | Button
39 | Link
40 |
41 |
42 | List Item
43 | List Item
44 | List Item
45 |
46 |
47 | Blockquote
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/chapter-5/fallbacks/beach.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-5/fallbacks/beach.png
--------------------------------------------------------------------------------
/chapter-5/fallbacks/child.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-5/fallbacks/child.png
--------------------------------------------------------------------------------
/chapter-5/fallbacks/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Fallbacks
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter-5/fallbacks/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | box-sizing: border-box;
3 | padding: 36px;
4 | margin: 0;
5 | }
6 |
7 | .container {
8 | background-image: url(child.png);
9 | background-repeat: no-repeat;
10 | background-size: contain;
11 | background-position: bottom;
12 | background-image: -webkit-cross-fade(url(beach.png), url(child.png), 50%);
13 | background-image: cross-fade(url(beach.png) 50%, url(child.png) 50% );
14 | box-sizing: border-box;
15 | padding: 1rem;
16 | height: 30rem;
17 | max-width: 100%;
18 | width: 100%;
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/chapter-5/supports/art.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-5/supports/art.png
--------------------------------------------------------------------------------
/chapter-5/supports/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Supports
6 |
7 |
8 |
9 |
10 |
11 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia, magna sed efficitur cursus, tortor nisi dictum lorem, vitae dictum nibh mauris ut mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean ac consequat odio, ut convallis magna. Praesent at malesuada ex.
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter-5/supports/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | .container {
7 | background-image: url('art.png');
8 | padding: 1rem;
9 | }
10 | p {
11 | background-color: rgba(255, 255, 255, 0.6);
12 | backdrop-filter: blur(20px);
13 | margin: 5rem;
14 | padding: 1rem;
15 | }
16 |
17 | @supports not (backdrop-filter: blur(20px) ) {
18 | p {
19 | background-color:white;
20 | }
21 | }
--------------------------------------------------------------------------------
/chapter-5/vendor-prefixes/firefox/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Vendor Prefixes - Firefox
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-5/vendor-prefixes/firefox/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | .grid-container {
7 | display: grid;
8 | grid-template-columns: 1fr 1fr 1fr;
9 | grid-template-rows: 5rem 5rem;
10 | grid-gap: 1rem;
11 | }
12 |
13 | aside {
14 | grid-row: 1/3;
15 | background: lightgray;
16 | }
17 |
18 | section {
19 | border: solid 1px gray;
20 | }
--------------------------------------------------------------------------------
/chapter-5/vendor-prefixes/ie/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Vendor Prefixes - IE
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-5/vendor-prefixes/ie/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | html, body {
7 | padding: 36px;
8 | margin: 0;
9 | }
10 |
11 | .grid-container {
12 | margin: -.5rem;
13 | display: -ms-grid;
14 | -ms-grid-columns: 1fr 1fr 1fr;
15 | -ms-grid-rows: 5rem 5rem;
16 | }
17 |
18 | aside {
19 | background: lightgray;
20 | -ms-grid-row-span: 2;
21 | margin: .5rem;
22 | }
23 |
24 | section {
25 | border: solid 1px gray;
26 | margin: .5rem;
27 | }
28 | section:nth-of-type(1) {
29 | -ms-grid-column: 2;
30 | -ms-grid-row: 1;
31 | }
32 | section:nth-of-type(2) {
33 | -ms-grid-column: 3;
34 | -ms-grid-row: 1;
35 | }section:nth-of-type(3) {
36 | -ms-grid-column: 2;
37 | -ms-grid-row: 2;
38 | }section:nth-of-type(4) {
39 | -ms-grid-column: 3;
40 | -ms-grid-row: 2;
41 | }
--------------------------------------------------------------------------------
/chapter-6/animation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Animations
6 |
7 |
8 |
9 |
10 | Animations
11 |
12 |
13 |
14 | Show
15 |
16 |
17 |
18 |
19 | jump-start
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/chapter-6/animation/script.js:
--------------------------------------------------------------------------------
1 | var show = false;
2 | var animationContainer;
3 | var button;
4 |
5 | (function() {
6 | console.log('loaded');
7 | animationContainer = document.getElementById('animationContainer');
8 | button = document.getElementById('button');
9 | }());
10 |
11 |
12 | function toggleAnimation() {
13 | if (show) {
14 | console.log('hide');
15 | hideContainer();
16 | } else {
17 | console.log('show');
18 | showContainer();
19 | }
20 | show = !show;
21 | }
22 |
23 | function showContainer() {
24 | button.innerText = 'Hide';
25 | animationContainer.classList.add('show');
26 | }
27 |
28 | function hideContainer() {
29 | animationContainer.addEventListener('animationend', cleanup);
30 | button.innerText = 'Show';
31 | animationContainer.classList.replace('show', 'close');
32 | }
33 |
34 | function cleanup() {
35 | animationContainer.classList.remove('close');
36 | animationContainer.removeEventListener('animationend', cleanup);
37 | }
--------------------------------------------------------------------------------
/chapter-6/transition/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Transition
6 |
7 |
8 |
9 |
10 |
11 | Transitions
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter-6/transition/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | a {
7 | align-items: center;
8 | background: gray;
9 | border: solid 1px white;
10 | color: white;
11 | display: flex;
12 | font-size: 36px;
13 | height: 100px;
14 | justify-content: center;
15 | text-decoration: none;
16 | transition: all 250ms ease-in-out;
17 | }
18 |
19 | a:hover {
20 | background: white;
21 | border-color: gray;
22 | color: gray;
23 | border-radius: 45px;
24 | }
--------------------------------------------------------------------------------
/chapter-7/imports/css/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 2rem;
3 | }
4 |
5 | .message, .error-message, .warning-message, .success-message, .info-message {
6 | padding: 1rem;
7 | }
8 |
9 | .info-message {
10 | background: #ccccff;
11 | border: solid 1px blue;
12 | }
13 |
14 | .success-message {
15 | background: #4dff4d;
16 | border: solid 1px green;
17 | }
18 |
19 | .warning-message {
20 | background: #ffedcc;
21 | border: solid 1px orange;
22 | }
23 |
24 | .error-message {
25 | background: #ffcccc;
26 | border: solid 1px red;
27 | }
28 |
29 | /*# sourceMappingURL=styles.css.map */
30 |
--------------------------------------------------------------------------------
/chapter-7/imports/css/styles.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sourceRoot":"","sources":["../styles.scss"],"names":[],"mappings":"AAMA;EACE;;;AAGF;EACE;;;AAGF;EAZE;EACA;;;AAgBF;EAjBE;EACA;;;AAqBF;EAtBE;EACA;;;AA0BF;EA3BE;EACA","file":"styles.css"}
--------------------------------------------------------------------------------
/chapter-7/imports/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Imports
6 |
7 |
8 |
9 |
10 |
14 | Information
15 | Success
16 | Warning
17 | Error
18 |
19 |
--------------------------------------------------------------------------------
/chapter-7/imports/styles.scss:
--------------------------------------------------------------------------------
1 |
2 | @mixin message($color) {
3 | background: lighten($color, 40%);
4 | border: solid 1px $color;
5 | }
6 |
7 | body {
8 | padding: 2rem;
9 | }
10 |
11 | .message {
12 | padding: 1rem;
13 | }
14 |
15 | .info-message {
16 | @include message(blue);
17 | @extend .message;
18 | }
19 |
20 | .success-message {
21 | @include message(green);
22 | @extend .message
23 | }
24 |
25 | .warning-message {
26 | @include message(orange);
27 | @extend .message
28 | }
29 |
30 | .error-message {
31 | @include message(red);
32 | @extend .message
33 | }
34 |
--------------------------------------------------------------------------------
/chapter-7/mixins/css/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 2rem; }
3 |
4 | h1 {
5 | margin: 0; }
6 |
7 | header {
8 | background: white;
9 | box-sizing: border-box;
10 | margin-bottom: 1rem;
11 | padding: 1rem;
12 | border: solid 1px silver; }
13 |
14 | div {
15 | background: white;
16 | box-sizing: border-box;
17 | margin-bottom: 1rem;
18 | padding: 1rem;
19 | box-shadow: 2px 2px 4px silver; }
20 |
21 | .message {
22 | padding: 1rem; }
23 |
24 | .info {
25 | background: #ccccff;
26 | border: solid 1px blue; }
27 |
28 | .success {
29 | background: #4dff4d;
30 | border: solid 1px green; }
31 |
32 | .warning {
33 | background: #ffedcc;
34 | border: solid 1px orange; }
35 |
36 | .error {
37 | background: #ffcccc;
38 | border: solid 1px red; }
39 |
--------------------------------------------------------------------------------
/chapter-7/mixins/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Mixins
6 |
7 |
8 |
9 |
10 |
14 | Information
15 | Success
16 | Warning
17 | Error
18 |
19 |
--------------------------------------------------------------------------------
/chapter-7/mixins/styles.scss:
--------------------------------------------------------------------------------
1 | @mixin card($elevation) {
2 | background: white;
3 | box-sizing: border-box;
4 | margin-bottom: 1rem;
5 | padding: 1rem;
6 |
7 | @if $elevation == 0 {
8 | border: solid 1px silver;
9 | } @else {
10 | $offset: $elevation * 1;
11 | $blur: $elevation * 2;
12 | box-shadow: #{$offset}px #{$offset}px #{$blur}px silver;
13 | }
14 | }
15 |
16 | @mixin message($color) {
17 | background: lighten($color, 40%);
18 | border: solid 1px $color;
19 | }
20 |
21 |
22 | body {
23 | padding: 2rem;
24 | }
25 |
26 | h1 {
27 | margin: 0;
28 | }
29 |
30 | header {
31 | @include card(0)
32 | }
33 |
34 | div {
35 | @include card(2);
36 | }
37 |
38 | .message {
39 | padding: 1rem;
40 | }
41 | .info {
42 | @include message(blue);
43 | }
44 | .success {
45 | @include message(green);
46 | }
47 | .warning {
48 | @include message(orange);
49 | }
50 | .error {
51 | @include message(red);
52 | }
53 |
--------------------------------------------------------------------------------
/chapter-8/animation-listener/art.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/animation-listener/art.png
--------------------------------------------------------------------------------
/chapter-8/animation-listener/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Animation Listener
6 |
7 |
8 |
9 |
10 |
11 |
12 |
Rotate Image
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chapter-8/animation-listener/script.js:
--------------------------------------------------------------------------------
1 | var image, button;
2 |
3 | (function() {
4 | 'use strict';
5 | console.log('loaded');
6 |
7 | image = document.getElementById('image');
8 | image.addEventListener('animationend', reEnableButton);
9 |
10 | button = document.getElementById('button');
11 | })();
12 |
13 | function reEnableButton() {
14 | button.disabled = false;
15 | image.classList.remove('rotate');
16 | }
17 |
18 | function rotateImage() {
19 | image.classList.add('rotate');
20 | button.disabled = true;
21 | }
--------------------------------------------------------------------------------
/chapter-8/animation-listener/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 | @keyframes rotate {
7 | 0% { transform: rotate(0deg); }
8 | 100% { transform: rotate(360deg); }
9 | }
10 | .rotate { animation: rotate ease-in-out 500ms 1; }
11 |
12 | .image { text-align: center; }
13 | img { max-width: 100%; }
14 | button {
15 | display: block;
16 | margin: 1rem auto;
17 | padding: 1rem;
18 | width: 25%;
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/anymatch/LICENSE:
--------------------------------------------------------------------------------
1 | The ISC License
2 |
3 | Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/anymatch/index.d.ts:
--------------------------------------------------------------------------------
1 | type AnymatchFn = (testString: string) => boolean;
2 | type AnymatchPattern = string|RegExp|AnymatchFn;
3 | type AnymatchMatcher = AnymatchPattern|AnymatchPattern[]
4 | type AnymatchTester = {
5 | (testString: string|any[], returnIndex: true): number;
6 | (testString: string|any[]): boolean;
7 | }
8 |
9 | type PicomatchOptions = {dot: boolean};
10 |
11 | declare const anymatch: {
12 | (matchers: AnymatchMatcher): AnymatchTester;
13 | (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number;
14 | (matchers: AnymatchMatcher, testString: string|any[]): boolean;
15 | }
16 |
17 | export {AnymatchMatcher as Matcher}
18 | export {AnymatchTester as Tester}
19 | export default anymatch
20 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/binary-extensions/binary-extensions.json.d.ts:
--------------------------------------------------------------------------------
1 | declare const binaryExtensionsJson: readonly string[];
2 |
3 | export = binaryExtensionsJson;
4 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/binary-extensions/index.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | List of binary file extensions.
3 |
4 | @example
5 | ```
6 | import binaryExtensions = require('binary-extensions');
7 |
8 | console.log(binaryExtensions);
9 | //=> ['3ds', '3g2', …]
10 | ```
11 | */
12 | declare const binaryExtensions: readonly string[];
13 |
14 | export = binaryExtensions;
15 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/binary-extensions/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./binary-extensions.json');
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/binary-extensions/license:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
4 |
5 | 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:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | 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.
10 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/binary-extensions/readme.md:
--------------------------------------------------------------------------------
1 | # binary-extensions [](https://travis-ci.org/sindresorhus/binary-extensions)
2 |
3 | > List of binary file extensions
4 |
5 | The list is just a [JSON file](binary-extensions.json) and can be used anywhere.
6 |
7 |
8 | ## Install
9 |
10 | ```
11 | $ npm install binary-extensions
12 | ```
13 |
14 |
15 | ## Usage
16 |
17 | ```js
18 | const binaryExtensions = require('binary-extensions');
19 |
20 | console.log(binaryExtensions);
21 | //=> ['3ds', '3g2', …]
22 | ```
23 |
24 |
25 | ## Related
26 |
27 | - [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file
28 | - [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions
29 |
30 |
31 | ## License
32 |
33 | MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com)
34 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2011-2019 Twitter, Inc.
4 | Copyright (c) 2011-2019 The Bootstrap Authors
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/js/dist/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * --------------------------------------------------------------------------
3 | * Bootstrap (v4.3.1): index.js
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | * --------------------------------------------------------------------------
6 | */
7 | (function ($) {
8 | if (typeof $ === 'undefined') {
9 | throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
10 | }
11 |
12 | var version = $.fn.jquery.split(' ')[0].split('.');
13 | var minMajor = 1;
14 | var ltMajor = 2;
15 | var minMinor = 9;
16 | var minPatch = 1;
17 | var maxMajor = 4;
18 |
19 | if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
20 | throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
21 | }
22 | })($);
23 | //# sourceMappingURL=index.js.map
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/js/src/index.js:
--------------------------------------------------------------------------------
1 | import $ from 'jquery'
2 | import Alert from './alert'
3 | import Button from './button'
4 | import Carousel from './carousel'
5 | import Collapse from './collapse'
6 | import Dropdown from './dropdown'
7 | import Modal from './modal'
8 | import Popover from './popover'
9 | import Scrollspy from './scrollspy'
10 | import Tab from './tab'
11 | import Toast from './toast'
12 | import Tooltip from './tooltip'
13 | import Util from './util'
14 |
15 | /**
16 | * --------------------------------------------------------------------------
17 | * Bootstrap (v4.3.1): index.js
18 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
19 | * --------------------------------------------------------------------------
20 | */
21 |
22 | (() => {
23 | if (typeof $ === 'undefined') {
24 | throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
25 | }
26 |
27 | const version = $.fn.jquery.split(' ')[0].split('.')
28 | const minMajor = 1
29 | const ltMajor = 2
30 | const minMinor = 9
31 | const minPatch = 1
32 | const maxMajor = 4
33 |
34 | if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
35 | throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
36 | }
37 | })()
38 |
39 | export {
40 | Util,
41 | Alert,
42 | Button,
43 | Carousel,
44 | Collapse,
45 | Dropdown,
46 | Modal,
47 | Popover,
48 | Scrollspy,
49 | Tab,
50 | Toast,
51 | Tooltip
52 | }
53 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_alert.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Base styles
3 | //
4 |
5 | .alert {
6 | position: relative;
7 | padding: $alert-padding-y $alert-padding-x;
8 | margin-bottom: $alert-margin-bottom;
9 | border: $alert-border-width solid transparent;
10 | @include border-radius($alert-border-radius);
11 | }
12 |
13 | // Headings for larger alerts
14 | .alert-heading {
15 | // Specified to prevent conflicts of changing $headings-color
16 | color: inherit;
17 | }
18 |
19 | // Provide class for links that match alerts
20 | .alert-link {
21 | font-weight: $alert-link-font-weight;
22 | }
23 |
24 |
25 | // Dismissible alerts
26 | //
27 | // Expand the right padding and account for the close button's positioning.
28 |
29 | .alert-dismissible {
30 | padding-right: $close-font-size + $alert-padding-x * 2;
31 |
32 | // Adjust close link position
33 | .close {
34 | position: absolute;
35 | top: 0;
36 | right: 0;
37 | padding: $alert-padding-y $alert-padding-x;
38 | color: inherit;
39 | }
40 | }
41 |
42 |
43 | // Alternate styles
44 | //
45 | // Generate contextual modifier classes for colorizing the alert.
46 |
47 | @each $color, $value in $theme-colors {
48 | .alert-#{$color} {
49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_badge.scss:
--------------------------------------------------------------------------------
1 | // Base class
2 | //
3 | // Requires one of the contextual, color modifier classes for `color` and
4 | // `background-color`.
5 |
6 | .badge {
7 | display: inline-block;
8 | padding: $badge-padding-y $badge-padding-x;
9 | @include font-size($badge-font-size);
10 | font-weight: $badge-font-weight;
11 | line-height: 1;
12 | text-align: center;
13 | white-space: nowrap;
14 | vertical-align: baseline;
15 | @include border-radius($badge-border-radius);
16 | @include transition($badge-transition);
17 |
18 | @at-root a#{&} {
19 | @include hover-focus {
20 | text-decoration: none;
21 | }
22 | }
23 |
24 | // Empty badges collapse automatically
25 | &:empty {
26 | display: none;
27 | }
28 | }
29 |
30 | // Quick fix for badges in buttons
31 | .btn .badge {
32 | position: relative;
33 | top: -1px;
34 | }
35 |
36 | // Pill badges
37 | //
38 | // Make them extra rounded with a modifier to replace v3's badges.
39 |
40 | .badge-pill {
41 | padding-right: $badge-pill-padding-x;
42 | padding-left: $badge-pill-padding-x;
43 | @include border-radius($badge-pill-border-radius);
44 | }
45 |
46 | // Colors
47 | //
48 | // Contextual variations (linked badges get darker on :hover).
49 |
50 | @each $color, $value in $theme-colors {
51 | .badge-#{$color} {
52 | @include badge-variant($value);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_breadcrumb.scss:
--------------------------------------------------------------------------------
1 | .breadcrumb {
2 | display: flex;
3 | flex-wrap: wrap;
4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x;
5 | margin-bottom: $breadcrumb-margin-bottom;
6 | list-style: none;
7 | background-color: $breadcrumb-bg;
8 | @include border-radius($breadcrumb-border-radius);
9 | }
10 |
11 | .breadcrumb-item {
12 | // The separator between breadcrumbs (by default, a forward-slash: "/")
13 | + .breadcrumb-item {
14 | padding-left: $breadcrumb-item-padding;
15 |
16 | &::before {
17 | display: inline-block; // Suppress underlining of the separator in modern browsers
18 | padding-right: $breadcrumb-item-padding;
19 | color: $breadcrumb-divider-color;
20 | content: $breadcrumb-divider;
21 | }
22 | }
23 |
24 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
25 | // without ``s. The `::before` pseudo-element generates an element
26 | // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
27 | //
28 | // To trick IE into suppressing the underline, we give the pseudo-element an
29 | // underline and then immediately remove it.
30 | + .breadcrumb-item:hover::before {
31 | text-decoration: underline;
32 | }
33 | // stylelint-disable-next-line no-duplicate-selectors
34 | + .breadcrumb-item:hover::before {
35 | text-decoration: none;
36 | }
37 |
38 | &.active {
39 | color: $breadcrumb-active-color;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_close.scss:
--------------------------------------------------------------------------------
1 | .close {
2 | float: right;
3 | @include font-size($close-font-size);
4 | font-weight: $close-font-weight;
5 | line-height: 1;
6 | color: $close-color;
7 | text-shadow: $close-text-shadow;
8 | opacity: .5;
9 |
10 | // Override 's hover style
11 | @include hover {
12 | color: $close-color;
13 | text-decoration: none;
14 | }
15 |
16 | &:not(:disabled):not(.disabled) {
17 | @include hover-focus {
18 | opacity: .75;
19 | }
20 | }
21 | }
22 |
23 | // Additional properties for button version
24 | // iOS requires the button element instead of an anchor tag.
25 | // If you want the anchor version, it requires `href="#"`.
26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27 |
28 | // stylelint-disable-next-line selector-no-qualifying-type
29 | button.close {
30 | padding: 0;
31 | background-color: transparent;
32 | border: 0;
33 | appearance: none;
34 | }
35 |
36 | // Future-proof disabling of clicks on ` ` elements
37 |
38 | // stylelint-disable-next-line selector-no-qualifying-type
39 | a.close.disabled {
40 | pointer-events: none;
41 | }
42 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_code.scss:
--------------------------------------------------------------------------------
1 | // Inline code
2 | code {
3 | @include font-size($code-font-size);
4 | color: $code-color;
5 | word-break: break-word;
6 |
7 | // Streamline the style when inside anchors to avoid broken underline and more
8 | a > & {
9 | color: inherit;
10 | }
11 | }
12 |
13 | // User input typically entered via keyboard
14 | kbd {
15 | padding: $kbd-padding-y $kbd-padding-x;
16 | @include font-size($kbd-font-size);
17 | color: $kbd-color;
18 | background-color: $kbd-bg;
19 | @include border-radius($border-radius-sm);
20 | @include box-shadow($kbd-box-shadow);
21 |
22 | kbd {
23 | padding: 0;
24 | @include font-size(100%);
25 | font-weight: $nested-kbd-font-weight;
26 | @include box-shadow(none);
27 | }
28 | }
29 |
30 | // Blocks of code
31 | pre {
32 | display: block;
33 | @include font-size($code-font-size);
34 | color: $pre-color;
35 |
36 | // Account for some code outputs that place code tags in pre tags
37 | code {
38 | @include font-size(inherit);
39 | color: inherit;
40 | word-break: normal;
41 | }
42 | }
43 |
44 | // Enable scrollable blocks of code
45 | .pre-scrollable {
46 | max-height: $pre-scrollable-max-height;
47 | overflow-y: scroll;
48 | }
49 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_grid.scss:
--------------------------------------------------------------------------------
1 | // Container widths
2 | //
3 | // Set the container width, and override it for fixed navbars in media queries.
4 |
5 | @if $enable-grid-classes {
6 | .container {
7 | @include make-container();
8 | @include make-container-max-widths();
9 | }
10 | }
11 |
12 | // Fluid container
13 | //
14 | // Utilizes the mixin meant for fixed width containers, but with 100% width for
15 | // fluid, full width layouts.
16 |
17 | @if $enable-grid-classes {
18 | .container-fluid {
19 | @include make-container();
20 | }
21 | }
22 |
23 | // Row
24 | //
25 | // Rows contain and clear the floats of your columns.
26 |
27 | @if $enable-grid-classes {
28 | .row {
29 | @include make-row();
30 | }
31 |
32 | // Remove the negative margin from default .row, then the horizontal padding
33 | // from all immediate children columns (to prevent runaway style inheritance).
34 | .no-gutters {
35 | margin-right: 0;
36 | margin-left: 0;
37 |
38 | > .col,
39 | > [class*="col-"] {
40 | padding-right: 0;
41 | padding-left: 0;
42 | }
43 | }
44 | }
45 |
46 | // Columns
47 | //
48 | // Common styles for small and large grid columns
49 |
50 | @if $enable-grid-classes {
51 | @include make-grid-columns();
52 | }
53 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_images.scss:
--------------------------------------------------------------------------------
1 | // Responsive images (ensure images don't scale beyond their parents)
2 | //
3 | // This is purposefully opt-in via an explicit class rather than being the default for all ` `s.
4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2,
5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
6 | // which weren't expecting the images within themselves to be involuntarily resized.
7 | // See also https://github.com/twbs/bootstrap/issues/18178
8 | .img-fluid {
9 | @include img-fluid;
10 | }
11 |
12 |
13 | // Image thumbnails
14 | .img-thumbnail {
15 | padding: $thumbnail-padding;
16 | background-color: $thumbnail-bg;
17 | border: $thumbnail-border-width solid $thumbnail-border-color;
18 | @include border-radius($thumbnail-border-radius);
19 | @include box-shadow($thumbnail-box-shadow);
20 |
21 | // Keep them at most 100% wide
22 | @include img-fluid;
23 | }
24 |
25 | //
26 | // Figures
27 | //
28 |
29 | .figure {
30 | // Ensures the caption's text aligns with the image.
31 | display: inline-block;
32 | }
33 |
34 | .figure-img {
35 | margin-bottom: $spacer / 2;
36 | line-height: 1;
37 | }
38 |
39 | .figure-caption {
40 | @include font-size($figure-caption-font-size);
41 | color: $figure-caption-color;
42 | }
43 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_jumbotron.scss:
--------------------------------------------------------------------------------
1 | .jumbotron {
2 | padding: $jumbotron-padding ($jumbotron-padding / 2);
3 | margin-bottom: $jumbotron-padding;
4 | color: $jumbotron-color;
5 | background-color: $jumbotron-bg;
6 | @include border-radius($border-radius-lg);
7 |
8 | @include media-breakpoint-up(sm) {
9 | padding: ($jumbotron-padding * 2) $jumbotron-padding;
10 | }
11 | }
12 |
13 | .jumbotron-fluid {
14 | padding-right: 0;
15 | padding-left: 0;
16 | @include border-radius(0);
17 | }
18 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_media.scss:
--------------------------------------------------------------------------------
1 | .media {
2 | display: flex;
3 | align-items: flex-start;
4 | }
5 |
6 | .media-body {
7 | flex: 1;
8 | }
9 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Toggles
2 | //
3 | // Used in conjunction with global variables to enable certain theme features.
4 |
5 | // Vendor
6 | @import "vendor/rfs";
7 |
8 | // Deprecate
9 | @import "mixins/deprecate";
10 |
11 | // Utilities
12 | @import "mixins/breakpoints";
13 | @import "mixins/hover";
14 | @import "mixins/image";
15 | @import "mixins/badge";
16 | @import "mixins/resize";
17 | @import "mixins/screen-reader";
18 | @import "mixins/size";
19 | @import "mixins/reset-text";
20 | @import "mixins/text-emphasis";
21 | @import "mixins/text-hide";
22 | @import "mixins/text-truncate";
23 | @import "mixins/visibility";
24 |
25 | // // Components
26 | @import "mixins/alert";
27 | @import "mixins/buttons";
28 | @import "mixins/caret";
29 | @import "mixins/pagination";
30 | @import "mixins/lists";
31 | @import "mixins/list-group";
32 | @import "mixins/nav-divider";
33 | @import "mixins/forms";
34 | @import "mixins/table-row";
35 |
36 | // // Skins
37 | @import "mixins/background-variant";
38 | @import "mixins/border-radius";
39 | @import "mixins/box-shadow";
40 | @import "mixins/gradients";
41 | @import "mixins/transition";
42 |
43 | // // Layout
44 | @import "mixins/clearfix";
45 | @import "mixins/grid-framework";
46 | @import "mixins/grid";
47 | @import "mixins/float";
48 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_progress.scss:
--------------------------------------------------------------------------------
1 | // Disable animation if transitions are disabled
2 | @if $enable-transitions {
3 | @keyframes progress-bar-stripes {
4 | from { background-position: $progress-height 0; }
5 | to { background-position: 0 0; }
6 | }
7 | }
8 |
9 | .progress {
10 | display: flex;
11 | height: $progress-height;
12 | overflow: hidden; // force rounded corners by cropping it
13 | @include font-size($progress-font-size);
14 | background-color: $progress-bg;
15 | @include border-radius($progress-border-radius);
16 | @include box-shadow($progress-box-shadow);
17 | }
18 |
19 | .progress-bar {
20 | display: flex;
21 | flex-direction: column;
22 | justify-content: center;
23 | color: $progress-bar-color;
24 | text-align: center;
25 | white-space: nowrap;
26 | background-color: $progress-bar-bg;
27 | @include transition($progress-bar-transition);
28 | }
29 |
30 | .progress-bar-striped {
31 | @include gradient-striped();
32 | background-size: $progress-height $progress-height;
33 | }
34 |
35 | @if $enable-transitions {
36 | .progress-bar-animated {
37 | animation: progress-bar-stripes $progress-bar-animation-timing;
38 |
39 | @media (prefers-reduced-motion: reduce) {
40 | animation: none;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_root.scss:
--------------------------------------------------------------------------------
1 | :root {
2 | // Custom variable values only support SassScript inside `#{}`.
3 | @each $color, $value in $colors {
4 | --#{$color}: #{$value};
5 | }
6 |
7 | @each $color, $value in $theme-colors {
8 | --#{$color}: #{$value};
9 | }
10 |
11 | @each $bp, $value in $grid-breakpoints {
12 | --breakpoint-#{$bp}: #{$value};
13 | }
14 |
15 | // Use `inspect` for lists so that quoted items keep the quotes.
16 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
17 | --font-family-sans-serif: #{inspect($font-family-sans-serif)};
18 | --font-family-monospace: #{inspect($font-family-monospace)};
19 | }
20 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_spinners.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Rotating border
3 | //
4 |
5 | @keyframes spinner-border {
6 | to { transform: rotate(360deg); }
7 | }
8 |
9 | .spinner-border {
10 | display: inline-block;
11 | width: $spinner-width;
12 | height: $spinner-height;
13 | vertical-align: text-bottom;
14 | border: $spinner-border-width solid currentColor;
15 | border-right-color: transparent;
16 | // stylelint-disable-next-line property-blacklist
17 | border-radius: 50%;
18 | animation: spinner-border .75s linear infinite;
19 | }
20 |
21 | .spinner-border-sm {
22 | width: $spinner-width-sm;
23 | height: $spinner-height-sm;
24 | border-width: $spinner-border-width-sm;
25 | }
26 |
27 | //
28 | // Growing circle
29 | //
30 |
31 | @keyframes spinner-grow {
32 | 0% {
33 | transform: scale(0);
34 | }
35 | 50% {
36 | opacity: 1;
37 | }
38 | }
39 |
40 | .spinner-grow {
41 | display: inline-block;
42 | width: $spinner-width;
43 | height: $spinner-height;
44 | vertical-align: text-bottom;
45 | background-color: currentColor;
46 | // stylelint-disable-next-line property-blacklist
47 | border-radius: 50%;
48 | opacity: 0;
49 | animation: spinner-grow .75s linear infinite;
50 | }
51 |
52 | .spinner-grow-sm {
53 | width: $spinner-width-sm;
54 | height: $spinner-height-sm;
55 | }
56 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_toasts.scss:
--------------------------------------------------------------------------------
1 | .toast {
2 | max-width: $toast-max-width;
3 | overflow: hidden; // cheap rounded corners on nested items
4 | @include font-size($toast-font-size);
5 | color: $toast-color;
6 | background-color: $toast-background-color;
7 | background-clip: padding-box;
8 | border: $toast-border-width solid $toast-border-color;
9 | box-shadow: $toast-box-shadow;
10 | backdrop-filter: blur(10px);
11 | opacity: 0;
12 | @include border-radius($toast-border-radius);
13 |
14 | &:not(:last-child) {
15 | margin-bottom: $toast-padding-x;
16 | }
17 |
18 | &.showing {
19 | opacity: 1;
20 | }
21 |
22 | &.show {
23 | display: block;
24 | opacity: 1;
25 | }
26 |
27 | &.hide {
28 | display: none;
29 | }
30 | }
31 |
32 | .toast-header {
33 | display: flex;
34 | align-items: center;
35 | padding: $toast-padding-y $toast-padding-x;
36 | color: $toast-header-color;
37 | background-color: $toast-header-background-color;
38 | background-clip: padding-box;
39 | border-bottom: $toast-border-width solid $toast-header-border-color;
40 | }
41 |
42 | .toast-body {
43 | padding: $toast-padding-x; // apply to both vertical and horizontal
44 | }
45 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_transitions.scss:
--------------------------------------------------------------------------------
1 | .fade {
2 | @include transition($transition-fade);
3 |
4 | &:not(.show) {
5 | opacity: 0;
6 | }
7 | }
8 |
9 | .collapse {
10 | &:not(.show) {
11 | display: none;
12 | }
13 | }
14 |
15 | .collapsing {
16 | position: relative;
17 | height: 0;
18 | overflow: hidden;
19 | @include transition($transition-collapse);
20 | }
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/_utilities.scss:
--------------------------------------------------------------------------------
1 | @import "utilities/align";
2 | @import "utilities/background";
3 | @import "utilities/borders";
4 | @import "utilities/clearfix";
5 | @import "utilities/display";
6 | @import "utilities/embed";
7 | @import "utilities/flex";
8 | @import "utilities/float";
9 | @import "utilities/overflow";
10 | @import "utilities/position";
11 | @import "utilities/screenreaders";
12 | @import "utilities/shadows";
13 | @import "utilities/sizing";
14 | @import "utilities/stretched-link";
15 | @import "utilities/spacing";
16 | @import "utilities/text";
17 | @import "utilities/visibility";
18 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/bootstrap-grid.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Grid v4.3.1 (https://getbootstrap.com/)
3 | * Copyright 2011-2019 The Bootstrap Authors
4 | * Copyright 2011-2019 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | */
7 |
8 | html {
9 | box-sizing: border-box;
10 | -ms-overflow-style: scrollbar;
11 | }
12 |
13 | *,
14 | *::before,
15 | *::after {
16 | box-sizing: inherit;
17 | }
18 |
19 | @import "functions";
20 | @import "variables";
21 |
22 | @import "mixins/breakpoints";
23 | @import "mixins/grid-framework";
24 | @import "mixins/grid";
25 |
26 | @import "grid";
27 | @import "utilities/display";
28 | @import "utilities/flex";
29 | @import "utilities/spacing";
30 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/bootstrap-reboot.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
3 | * Copyright 2011-2019 The Bootstrap Authors
4 | * Copyright 2011-2019 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
7 | */
8 |
9 | @import "functions";
10 | @import "variables";
11 | @import "mixins";
12 | @import "reboot";
13 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/bootstrap.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v4.3.1 (https://getbootstrap.com/)
3 | * Copyright 2011-2019 The Bootstrap Authors
4 | * Copyright 2011-2019 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | */
7 |
8 | @import "functions";
9 | @import "variables";
10 | @import "mixins";
11 | @import "root";
12 | @import "reboot";
13 | @import "type";
14 | @import "images";
15 | @import "code";
16 | @import "grid";
17 | @import "tables";
18 | @import "forms";
19 | @import "buttons";
20 | @import "transitions";
21 | @import "dropdown";
22 | @import "button-group";
23 | @import "input-group";
24 | @import "custom-forms";
25 | @import "nav";
26 | @import "navbar";
27 | @import "card";
28 | @import "breadcrumb";
29 | @import "pagination";
30 | @import "badge";
31 | @import "jumbotron";
32 | @import "alert";
33 | @import "progress";
34 | @import "media";
35 | @import "list-group";
36 | @import "close";
37 | @import "toasts";
38 | @import "modal";
39 | @import "tooltip";
40 | @import "popover";
41 | @import "carousel";
42 | @import "spinners";
43 | @import "utilities";
44 | @import "print";
45 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_alert.scss:
--------------------------------------------------------------------------------
1 | @mixin alert-variant($background, $border, $color) {
2 | color: $color;
3 | @include gradient-bg($background);
4 | border-color: $border;
5 |
6 | hr {
7 | border-top-color: darken($border, 5%);
8 | }
9 |
10 | .alert-link {
11 | color: darken($color, 10%);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_background-variant.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Contextual backgrounds
4 |
5 | @mixin bg-variant($parent, $color) {
6 | #{$parent} {
7 | background-color: $color !important;
8 | }
9 | a#{$parent},
10 | button#{$parent} {
11 | @include hover-focus {
12 | background-color: darken($color, 10%) !important;
13 | }
14 | }
15 | }
16 |
17 | @mixin bg-gradient-variant($parent, $color) {
18 | #{$parent} {
19 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_badge.scss:
--------------------------------------------------------------------------------
1 | @mixin badge-variant($bg) {
2 | color: color-yiq($bg);
3 | background-color: $bg;
4 |
5 | @at-root a#{&} {
6 | @include hover-focus {
7 | color: color-yiq($bg);
8 | background-color: darken($bg, 10%);
9 | }
10 |
11 | &:focus,
12 | &.focus {
13 | outline: 0;
14 | box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_border-radius.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable property-blacklist
2 | // Single side border-radius
3 |
4 | @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
5 | @if $enable-rounded {
6 | border-radius: $radius;
7 | }
8 | @else if $fallback-border-radius != false {
9 | border-radius: $fallback-border-radius;
10 | }
11 | }
12 |
13 | @mixin border-top-radius($radius) {
14 | @if $enable-rounded {
15 | border-top-left-radius: $radius;
16 | border-top-right-radius: $radius;
17 | }
18 | }
19 |
20 | @mixin border-right-radius($radius) {
21 | @if $enable-rounded {
22 | border-top-right-radius: $radius;
23 | border-bottom-right-radius: $radius;
24 | }
25 | }
26 |
27 | @mixin border-bottom-radius($radius) {
28 | @if $enable-rounded {
29 | border-bottom-right-radius: $radius;
30 | border-bottom-left-radius: $radius;
31 | }
32 | }
33 |
34 | @mixin border-left-radius($radius) {
35 | @if $enable-rounded {
36 | border-top-left-radius: $radius;
37 | border-bottom-left-radius: $radius;
38 | }
39 | }
40 |
41 | @mixin border-top-left-radius($radius) {
42 | @if $enable-rounded {
43 | border-top-left-radius: $radius;
44 | }
45 | }
46 |
47 | @mixin border-top-right-radius($radius) {
48 | @if $enable-rounded {
49 | border-top-right-radius: $radius;
50 | }
51 | }
52 |
53 | @mixin border-bottom-right-radius($radius) {
54 | @if $enable-rounded {
55 | border-bottom-right-radius: $radius;
56 | }
57 | }
58 |
59 | @mixin border-bottom-left-radius($radius) {
60 | @if $enable-rounded {
61 | border-bottom-left-radius: $radius;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_box-shadow.scss:
--------------------------------------------------------------------------------
1 | @mixin box-shadow($shadow...) {
2 | @if $enable-shadows {
3 | $result: ();
4 |
5 | @if (length($shadow) == 1) {
6 | // We can pass `@include box-shadow(none);`
7 | $result: $shadow;
8 | } @else {
9 | // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
10 | @for $i from 1 through length($shadow) {
11 | @if nth($shadow, $i) != "none" {
12 | $result: append($result, nth($shadow, $i), "comma");
13 | }
14 | }
15 | }
16 | @if (length($result) > 0) {
17 | box-shadow: $result;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_caret.scss:
--------------------------------------------------------------------------------
1 | @mixin caret-down {
2 | border-top: $caret-width solid;
3 | border-right: $caret-width solid transparent;
4 | border-bottom: 0;
5 | border-left: $caret-width solid transparent;
6 | }
7 |
8 | @mixin caret-up {
9 | border-top: 0;
10 | border-right: $caret-width solid transparent;
11 | border-bottom: $caret-width solid;
12 | border-left: $caret-width solid transparent;
13 | }
14 |
15 | @mixin caret-right {
16 | border-top: $caret-width solid transparent;
17 | border-right: 0;
18 | border-bottom: $caret-width solid transparent;
19 | border-left: $caret-width solid;
20 | }
21 |
22 | @mixin caret-left {
23 | border-top: $caret-width solid transparent;
24 | border-right: $caret-width solid;
25 | border-bottom: $caret-width solid transparent;
26 | }
27 |
28 | @mixin caret($direction: down) {
29 | @if $enable-caret {
30 | &::after {
31 | display: inline-block;
32 | margin-left: $caret-spacing;
33 | vertical-align: $caret-vertical-align;
34 | content: "";
35 | @if $direction == down {
36 | @include caret-down;
37 | } @else if $direction == up {
38 | @include caret-up;
39 | } @else if $direction == right {
40 | @include caret-right;
41 | }
42 | }
43 |
44 | @if $direction == left {
45 | &::after {
46 | display: none;
47 | }
48 |
49 | &::before {
50 | display: inline-block;
51 | margin-right: $caret-spacing;
52 | vertical-align: $caret-vertical-align;
53 | content: "";
54 | @include caret-left;
55 | }
56 | }
57 |
58 | &:empty::after {
59 | margin-left: 0;
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix() {
2 | &::after {
3 | display: block;
4 | clear: both;
5 | content: "";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_deprecate.scss:
--------------------------------------------------------------------------------
1 | // Deprecate mixin
2 | //
3 | // This mixin can be used to deprecate mixins or functions.
4 | // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5 | // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6 | @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7 | @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8 | @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_float.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @mixin float-left {
4 | float: left !important;
5 | @include deprecate("The `float-left` mixin", "v4.3.0", "v5");
6 | }
7 | @mixin float-right {
8 | float: right !important;
9 | @include deprecate("The `float-right` mixin", "v4.3.0", "v5");
10 | }
11 | @mixin float-none {
12 | float: none !important;
13 | @include deprecate("The `float-none` mixin", "v4.3.0", "v5");
14 | }
15 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_grid.scss:
--------------------------------------------------------------------------------
1 | /// Grid system
2 | //
3 | // Generate semantic grid columns with these mixins.
4 |
5 | @mixin make-container($gutter: $grid-gutter-width) {
6 | width: 100%;
7 | padding-right: $gutter / 2;
8 | padding-left: $gutter / 2;
9 | margin-right: auto;
10 | margin-left: auto;
11 | }
12 |
13 |
14 | // For each breakpoint, define the maximum width of the container in a media query
15 | @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
16 | @each $breakpoint, $container-max-width in $max-widths {
17 | @include media-breakpoint-up($breakpoint, $breakpoints) {
18 | max-width: $container-max-width;
19 | }
20 | }
21 | }
22 |
23 | @mixin make-row($gutter: $grid-gutter-width) {
24 | display: flex;
25 | flex-wrap: wrap;
26 | margin-right: -$gutter / 2;
27 | margin-left: -$gutter / 2;
28 | }
29 |
30 | @mixin make-col-ready($gutter: $grid-gutter-width) {
31 | position: relative;
32 | // Prevent columns from becoming too narrow when at smaller grid tiers by
33 | // always setting `width: 100%;`. This works because we use `flex` values
34 | // later on to override this initial width.
35 | width: 100%;
36 | padding-right: $gutter / 2;
37 | padding-left: $gutter / 2;
38 | }
39 |
40 | @mixin make-col($size, $columns: $grid-columns) {
41 | flex: 0 0 percentage($size / $columns);
42 | // Add a `max-width` to ensure content within each column does not blow out
43 | // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
44 | // do not appear to require this.
45 | max-width: percentage($size / $columns);
46 | }
47 |
48 | @mixin make-col-offset($size, $columns: $grid-columns) {
49 | $num: $size / $columns;
50 | margin-left: if($num == 0, 0, percentage($num));
51 | }
52 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_hover.scss:
--------------------------------------------------------------------------------
1 | // Hover mixin and `$enable-hover-media-query` are deprecated.
2 | //
3 | // Originally added during our alphas and maintained during betas, this mixin was
4 | // designed to prevent `:hover` stickiness on iOS-an issue where hover styles
5 | // would persist after initial touch.
6 | //
7 | // For backward compatibility, we've kept these mixins and updated them to
8 | // always return their regular pseudo-classes instead of a shimmed media query.
9 | //
10 | // Issue: https://github.com/twbs/bootstrap/issues/25195
11 |
12 | @mixin hover {
13 | &:hover { @content; }
14 | }
15 |
16 | @mixin hover-focus {
17 | &:hover,
18 | &:focus {
19 | @content;
20 | }
21 | }
22 |
23 | @mixin plain-hover-focus {
24 | &,
25 | &:hover,
26 | &:focus {
27 | @content;
28 | }
29 | }
30 |
31 | @mixin hover-focus-active {
32 | &:hover,
33 | &:focus,
34 | &:active {
35 | @content;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_image.scss:
--------------------------------------------------------------------------------
1 | // Image Mixins
2 | // - Responsive image
3 | // - Retina image
4 |
5 |
6 | // Responsive image
7 | //
8 | // Keep images from scaling beyond the width of their parents.
9 |
10 | @mixin img-fluid {
11 | // Part 1: Set a maximum relative to the parent
12 | max-width: 100%;
13 | // Part 2: Override the height to auto, otherwise images will be stretched
14 | // when setting a width and height attribute on the img element.
15 | height: auto;
16 | }
17 |
18 |
19 | // Retina image
20 | //
21 | // Short retina mixin for setting background-image and -size.
22 |
23 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
24 | background-image: url($file-1x);
25 |
26 | // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
27 | // but doesn't convert dppx=>dpi.
28 | // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
29 | // Compatibility info: https://caniuse.com/#feat=css-media-resolution
30 | @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
31 | only screen and (min-resolution: 2dppx) { // Standardized
32 | background-image: url($file-2x);
33 | background-size: $width-1x $height-1x;
34 | }
35 | @include deprecate("`img-retina()`", "v4.3.0", "v5");
36 | }
37 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_list-group.scss:
--------------------------------------------------------------------------------
1 | // List Groups
2 |
3 | @mixin list-group-item-variant($state, $background, $color) {
4 | .list-group-item-#{$state} {
5 | color: $color;
6 | background-color: $background;
7 |
8 | &.list-group-item-action {
9 | @include hover-focus {
10 | color: $color;
11 | background-color: darken($background, 5%);
12 | }
13 |
14 | &.active {
15 | color: $white;
16 | background-color: $color;
17 | border-color: $color;
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_lists.scss:
--------------------------------------------------------------------------------
1 | // Lists
2 |
3 | // Unstyled keeps list items block level, just removes default browser padding and list-style
4 | @mixin list-unstyled {
5 | padding-left: 0;
6 | list-style: none;
7 | }
8 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_nav-divider.scss:
--------------------------------------------------------------------------------
1 | // Horizontal dividers
2 | //
3 | // Dividers (basically an hr) within dropdowns and nav lists
4 |
5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) {
6 | height: 0;
7 | margin: $margin-y 0;
8 | overflow: hidden;
9 | border-top: 1px solid $color;
10 | }
11 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_pagination.scss:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
4 | .page-link {
5 | padding: $padding-y $padding-x;
6 | @include font-size($font-size);
7 | line-height: $line-height;
8 | }
9 |
10 | .page-item {
11 | &:first-child {
12 | .page-link {
13 | @include border-left-radius($border-radius);
14 | }
15 | }
16 | &:last-child {
17 | .page-link {
18 | @include border-right-radius($border-radius);
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_reset-text.scss:
--------------------------------------------------------------------------------
1 | @mixin reset-text {
2 | font-family: $font-family-base;
3 | // We deliberately do NOT reset font-size or word-wrap.
4 | font-style: normal;
5 | font-weight: $font-weight-normal;
6 | line-height: $line-height-base;
7 | text-align: left; // Fallback for where `start` is not supported
8 | text-align: start;
9 | text-decoration: none;
10 | text-shadow: none;
11 | text-transform: none;
12 | letter-spacing: normal;
13 | word-break: normal;
14 | word-spacing: normal;
15 | white-space: normal;
16 | line-break: auto;
17 | }
18 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_resize.scss:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | @mixin resizable($direction) {
4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5 | resize: $direction; // Options: horizontal, vertical, both
6 | }
7 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_screen-reader.scss:
--------------------------------------------------------------------------------
1 | // Only display content to screen readers
2 | //
3 | // See: https://a11yproject.com/posts/how-to-hide-content/
4 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
5 |
6 | @mixin sr-only {
7 | position: absolute;
8 | width: 1px;
9 | height: 1px;
10 | padding: 0;
11 | overflow: hidden;
12 | clip: rect(0, 0, 0, 0);
13 | white-space: nowrap;
14 | border: 0;
15 | }
16 |
17 | // Use in conjunction with .sr-only to only display content when it's focused.
18 | //
19 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
20 | //
21 | // Credit: HTML5 Boilerplate
22 |
23 | @mixin sr-only-focusable {
24 | &:active,
25 | &:focus {
26 | position: static;
27 | width: auto;
28 | height: auto;
29 | overflow: visible;
30 | clip: auto;
31 | white-space: normal;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_size.scss:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | @mixin size($width, $height: $width) {
4 | width: $width;
5 | height: $height;
6 | @include deprecate("`size()`", "v4.3.0", "v5");
7 | }
8 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_table-row.scss:
--------------------------------------------------------------------------------
1 | // Tables
2 |
3 | @mixin table-row-variant($state, $background, $border: null) {
4 | // Exact selectors below required to override `.table-striped` and prevent
5 | // inheritance to nested tables.
6 | .table-#{$state} {
7 | &,
8 | > th,
9 | > td {
10 | background-color: $background;
11 | }
12 |
13 | @if $border != null {
14 | th,
15 | td,
16 | thead th,
17 | tbody + tbody {
18 | border-color: $border;
19 | }
20 | }
21 | }
22 |
23 | // Hover states for `.table-hover`
24 | // Note: this is not available for cells or rows within `thead` or `tfoot`.
25 | .table-hover {
26 | $hover-background: darken($background, 5%);
27 |
28 | .table-#{$state} {
29 | @include hover {
30 | background-color: $hover-background;
31 |
32 | > td,
33 | > th {
34 | background-color: $hover-background;
35 | }
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_text-emphasis.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Typography
4 |
5 | @mixin text-emphasis-variant($parent, $color) {
6 | #{$parent} {
7 | color: $color !important;
8 | }
9 | @if $emphasized-link-hover-darken-percentage != 0 {
10 | a#{$parent} {
11 | @include hover-focus {
12 | color: darken($color, $emphasized-link-hover-darken-percentage) !important;
13 | }
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_text-hide.scss:
--------------------------------------------------------------------------------
1 | // CSS image replacement
2 | @mixin text-hide($ignore-warning: false) {
3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
4 | font: 0/0 a;
5 | color: transparent;
6 | text-shadow: none;
7 | background-color: transparent;
8 | border: 0;
9 |
10 | @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning);
11 | }
12 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_text-truncate.scss:
--------------------------------------------------------------------------------
1 | // Text truncate
2 | // Requires inline-block or block for proper styling
3 |
4 | @mixin text-truncate() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_transition.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable property-blacklist
2 | @mixin transition($transition...) {
3 | @if $enable-transitions {
4 | @if length($transition) == 0 {
5 | transition: $transition-base;
6 | } @else {
7 | transition: $transition;
8 | }
9 | }
10 |
11 | @if $enable-prefers-reduced-motion-media-query {
12 | @media (prefers-reduced-motion: reduce) {
13 | transition: none;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/mixins/_visibility.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Visibility
4 |
5 | @mixin invisible($visibility) {
6 | visibility: $visibility !important;
7 | @include deprecate("`invisible()`", "v4.3.0", "v5");
8 | }
9 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_align.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | .align-baseline { vertical-align: baseline !important; } // Browser default
4 | .align-top { vertical-align: top !important; }
5 | .align-middle { vertical-align: middle !important; }
6 | .align-bottom { vertical-align: bottom !important; }
7 | .align-text-bottom { vertical-align: text-bottom !important; }
8 | .align-text-top { vertical-align: text-top !important; }
9 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_background.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @each $color, $value in $theme-colors {
4 | @include bg-variant(".bg-#{$color}", $value);
5 | }
6 |
7 | @if $enable-gradients {
8 | @each $color, $value in $theme-colors {
9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value);
10 | }
11 | }
12 |
13 | .bg-white {
14 | background-color: $white !important;
15 | }
16 |
17 | .bg-transparent {
18 | background-color: transparent !important;
19 | }
20 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_clearfix.scss:
--------------------------------------------------------------------------------
1 | .clearfix {
2 | @include clearfix();
3 | }
4 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_display.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | //
4 | // Utilities for common `display` values
5 | //
6 |
7 | @each $breakpoint in map-keys($grid-breakpoints) {
8 | @include media-breakpoint-up($breakpoint) {
9 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
10 |
11 | @each $value in $displays {
12 | .d#{$infix}-#{$value} { display: $value !important; }
13 | }
14 | }
15 | }
16 |
17 |
18 | //
19 | // Utilities for toggling `display` in print
20 | //
21 |
22 | @media print {
23 | @each $value in $displays {
24 | .d-print-#{$value} { display: $value !important; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_embed.scss:
--------------------------------------------------------------------------------
1 | // Credit: Nicolas Gallagher and SUIT CSS.
2 |
3 | .embed-responsive {
4 | position: relative;
5 | display: block;
6 | width: 100%;
7 | padding: 0;
8 | overflow: hidden;
9 |
10 | &::before {
11 | display: block;
12 | content: "";
13 | }
14 |
15 | .embed-responsive-item,
16 | iframe,
17 | embed,
18 | object,
19 | video {
20 | position: absolute;
21 | top: 0;
22 | bottom: 0;
23 | left: 0;
24 | width: 100%;
25 | height: 100%;
26 | border: 0;
27 | }
28 | }
29 |
30 | @each $embed-responsive-aspect-ratio in $embed-responsive-aspect-ratios {
31 | $embed-responsive-aspect-ratio-x: nth($embed-responsive-aspect-ratio, 1);
32 | $embed-responsive-aspect-ratio-y: nth($embed-responsive-aspect-ratio, 2);
33 |
34 | .embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} {
35 | &::before {
36 | padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_float.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @each $breakpoint in map-keys($grid-breakpoints) {
4 | @include media-breakpoint-up($breakpoint) {
5 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
6 |
7 | .float#{$infix}-left { float: left !important; }
8 | .float#{$infix}-right { float: right !important; }
9 | .float#{$infix}-none { float: none !important; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_overflow.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | @each $value in $overflows {
4 | .overflow-#{$value} { overflow: $value !important; }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_position.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Common values
4 | @each $position in $positions {
5 | .position-#{$position} { position: $position !important; }
6 | }
7 |
8 | // Shorthand
9 |
10 | .fixed-top {
11 | position: fixed;
12 | top: 0;
13 | right: 0;
14 | left: 0;
15 | z-index: $zindex-fixed;
16 | }
17 |
18 | .fixed-bottom {
19 | position: fixed;
20 | right: 0;
21 | bottom: 0;
22 | left: 0;
23 | z-index: $zindex-fixed;
24 | }
25 |
26 | .sticky-top {
27 | @supports (position: sticky) {
28 | position: sticky;
29 | top: 0;
30 | z-index: $zindex-sticky;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_screenreaders.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Screenreaders
3 | //
4 |
5 | .sr-only {
6 | @include sr-only();
7 | }
8 |
9 | .sr-only-focusable {
10 | @include sr-only-focusable();
11 | }
12 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_shadows.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | .shadow-sm { box-shadow: $box-shadow-sm !important; }
4 | .shadow { box-shadow: $box-shadow !important; }
5 | .shadow-lg { box-shadow: $box-shadow-lg !important; }
6 | .shadow-none { box-shadow: none !important; }
7 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_sizing.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Width and height
4 |
5 | @each $prop, $abbrev in (width: w, height: h) {
6 | @each $size, $length in $sizes {
7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; }
8 | }
9 | }
10 |
11 | .mw-100 { max-width: 100% !important; }
12 | .mh-100 { max-height: 100% !important; }
13 |
14 | // Viewport additional helpers
15 |
16 | .min-vw-100 { min-width: 100vw !important; }
17 | .min-vh-100 { min-height: 100vh !important; }
18 |
19 | .vw-100 { width: 100vw !important; }
20 | .vh-100 { height: 100vh !important; }
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_stretched-link.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Stretched link
3 | //
4 |
5 | .stretched-link {
6 | &::after {
7 | position: absolute;
8 | top: 0;
9 | right: 0;
10 | bottom: 0;
11 | left: 0;
12 | z-index: 1;
13 | // Just in case `pointer-events: none` is set on a parent
14 | pointer-events: auto;
15 | content: "";
16 | // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color
17 | background-color: rgba(0, 0, 0, 0);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/bootstrap/scss/utilities/_visibility.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | //
4 | // Visibility utilities
5 | //
6 |
7 | .visible {
8 | visibility: visible !important;
9 | }
10 |
11 | .invisible {
12 | visibility: hidden !important;
13 | }
14 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/braces/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-2018, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/braces/lib/compile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const fill = require('fill-range');
4 | const utils = require('./utils');
5 |
6 | const compile = (ast, options = {}) => {
7 | let walk = (node, parent = {}) => {
8 | let invalidBlock = utils.isInvalidBrace(parent);
9 | let invalidNode = node.invalid === true && options.escapeInvalid === true;
10 | let invalid = invalidBlock === true || invalidNode === true;
11 | let prefix = options.escapeInvalid === true ? '\\' : '';
12 | let output = '';
13 |
14 | if (node.isOpen === true) {
15 | return prefix + node.value;
16 | }
17 | if (node.isClose === true) {
18 | return prefix + node.value;
19 | }
20 |
21 | if (node.type === 'open') {
22 | return invalid ? (prefix + node.value) : '(';
23 | }
24 |
25 | if (node.type === 'close') {
26 | return invalid ? (prefix + node.value) : ')';
27 | }
28 |
29 | if (node.type === 'comma') {
30 | return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
31 | }
32 |
33 | if (node.value) {
34 | return node.value;
35 | }
36 |
37 | if (node.nodes && node.ranges > 0) {
38 | let args = utils.reduce(node.nodes);
39 | let range = fill(...args, { ...options, wrap: false, toRegex: true });
40 |
41 | if (range.length !== 0) {
42 | return args.length > 1 && range.length > 1 ? `(${range})` : range;
43 | }
44 | }
45 |
46 | if (node.nodes) {
47 | for (let child of node.nodes) {
48 | output += walk(child, node);
49 | }
50 | }
51 | return output;
52 | };
53 |
54 | return walk(ast);
55 | };
56 |
57 | module.exports = compile;
58 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/braces/lib/constants.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | MAX_LENGTH: 1024 * 64,
5 |
6 | // Digits
7 | CHAR_0: '0', /* 0 */
8 | CHAR_9: '9', /* 9 */
9 |
10 | // Alphabet chars.
11 | CHAR_UPPERCASE_A: 'A', /* A */
12 | CHAR_LOWERCASE_A: 'a', /* a */
13 | CHAR_UPPERCASE_Z: 'Z', /* Z */
14 | CHAR_LOWERCASE_Z: 'z', /* z */
15 |
16 | CHAR_LEFT_PARENTHESES: '(', /* ( */
17 | CHAR_RIGHT_PARENTHESES: ')', /* ) */
18 |
19 | CHAR_ASTERISK: '*', /* * */
20 |
21 | // Non-alphabetic chars.
22 | CHAR_AMPERSAND: '&', /* & */
23 | CHAR_AT: '@', /* @ */
24 | CHAR_BACKSLASH: '\\', /* \ */
25 | CHAR_BACKTICK: '`', /* ` */
26 | CHAR_CARRIAGE_RETURN: '\r', /* \r */
27 | CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
28 | CHAR_COLON: ':', /* : */
29 | CHAR_COMMA: ',', /* , */
30 | CHAR_DOLLAR: '$', /* . */
31 | CHAR_DOT: '.', /* . */
32 | CHAR_DOUBLE_QUOTE: '"', /* " */
33 | CHAR_EQUAL: '=', /* = */
34 | CHAR_EXCLAMATION_MARK: '!', /* ! */
35 | CHAR_FORM_FEED: '\f', /* \f */
36 | CHAR_FORWARD_SLASH: '/', /* / */
37 | CHAR_HASH: '#', /* # */
38 | CHAR_HYPHEN_MINUS: '-', /* - */
39 | CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
40 | CHAR_LEFT_CURLY_BRACE: '{', /* { */
41 | CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
42 | CHAR_LINE_FEED: '\n', /* \n */
43 | CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
44 | CHAR_PERCENT: '%', /* % */
45 | CHAR_PLUS: '+', /* + */
46 | CHAR_QUESTION_MARK: '?', /* ? */
47 | CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
48 | CHAR_RIGHT_CURLY_BRACE: '}', /* } */
49 | CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
50 | CHAR_SEMICOLON: ';', /* ; */
51 | CHAR_SINGLE_QUOTE: '\'', /* ' */
52 | CHAR_SPACE: ' ', /* */
53 | CHAR_TAB: '\t', /* \t */
54 | CHAR_UNDERSCORE: '_', /* _ */
55 | CHAR_VERTICAL_LINE: '|', /* | */
56 | CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
57 | };
58 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/braces/lib/stringify.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const utils = require('./utils');
4 |
5 | module.exports = (ast, options = {}) => {
6 | let stringify = (node, parent = {}) => {
7 | let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
8 | let invalidNode = node.invalid === true && options.escapeInvalid === true;
9 | let output = '';
10 |
11 | if (node.value) {
12 | if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
13 | return '\\' + node.value;
14 | }
15 | return node.value;
16 | }
17 |
18 | if (node.value) {
19 | return node.value;
20 | }
21 |
22 | if (node.nodes) {
23 | for (let child of node.nodes) {
24 | output += stringify(child);
25 | }
26 | }
27 | return output;
28 | };
29 |
30 | return stringify(ast);
31 | };
32 |
33 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/chokidar/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the “Software”), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/chokidar/lib/constants.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const {sep} = require('path');
4 | const {platform} = process;
5 |
6 | exports.EV_ALL = 'all';
7 | exports.EV_READY = 'ready';
8 | exports.EV_ADD = 'add';
9 | exports.EV_CHANGE = 'change';
10 | exports.EV_ADD_DIR = 'addDir';
11 | exports.EV_UNLINK = 'unlink';
12 | exports.EV_UNLINK_DIR = 'unlinkDir';
13 | exports.EV_RAW = 'raw';
14 | exports.EV_ERROR = 'error';
15 |
16 | exports.STR_DATA = 'data';
17 | exports.STR_END = 'end';
18 | exports.STR_CLOSE = 'close';
19 |
20 | exports.FSEVENT_CREATED = 'created';
21 | exports.FSEVENT_MODIFIED = 'modified';
22 | exports.FSEVENT_DELETED = 'deleted';
23 | exports.FSEVENT_MOVED = 'moved';
24 | exports.FSEVENT_CLONED = 'cloned';
25 | exports.FSEVENT_UNKNOWN = 'unknown';
26 | exports.FSEVENT_TYPE_DIRECTORY = 'directory';
27 | exports.FSEVENT_TYPE_SYMLINK = 'symlink';
28 |
29 | exports.KEY_LISTENERS = 'listeners';
30 | exports.KEY_ERR = 'errHandlers';
31 | exports.KEY_RAW = 'rawEmitters';
32 | exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
33 |
34 | exports.DOT_SLASH = `.${sep}`;
35 |
36 | exports.BACK_SLASH_RE = /\\/g;
37 | exports.DOUBLE_SLASH_RE = /\/\//;
38 | exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
39 | exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
40 | exports.REPLACER_RE = /^\.[/\\]/;
41 |
42 | exports.SLASH = '/';
43 | exports.BRACE_START = '{';
44 | exports.BANG = '!';
45 | exports.ONE_DOT = '.';
46 | exports.TWO_DOTS = '..';
47 | exports.STAR = '*';
48 | exports.GLOBSTAR = '**';
49 | exports.ROOT_GLOBSTAR = '/**/*';
50 | exports.SLASH_GLOBSTAR = '/**';
51 | exports.DIR_SUFFIX = 'Dir';
52 | exports.ANYMATCH_OPTS = {dot: true};
53 | exports.STRING_TYPE = 'string';
54 | exports.FUNCTION_TYPE = 'function';
55 | exports.EMPTY_STR = '';
56 | exports.EMPTY_FN = () => {};
57 | exports.IDENTITY_FN = val => val;
58 |
59 | exports.isWindows = platform === 'win32';
60 | exports.isMacos = platform === 'darwin';
61 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/fill-range/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-present, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/fsevents/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 | -----------
3 |
4 | Copyright (C) 2010-2019 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/fsevents/fsevents.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/fsevents/fsevents.node
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/glob-parent/LICENSE:
--------------------------------------------------------------------------------
1 | The ISC License
2 |
3 | Copyright (c) 2015, 2019 Elan Shanker
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/glob-parent/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var isGlob = require('is-glob');
4 | var pathPosixDirname = require('path').posix.dirname;
5 | var isWin32 = require('os').platform() === 'win32';
6 |
7 | var slash = '/';
8 | var backslash = /\\/g;
9 | var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
10 | var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
11 | var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g;
12 |
13 | /**
14 | * @param {string} str
15 | * @param {Object} opts
16 | * @param {boolean} [opts.flipBackslashes=true]
17 | */
18 | module.exports = function globParent(str, opts) {
19 | var options = Object.assign({ flipBackslashes: true }, opts);
20 |
21 | // flip windows path separators
22 | if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
23 | str = str.replace(backslash, slash);
24 | }
25 |
26 | // special case for strings ending in enclosure containing path separator
27 | if (enclosure.test(str)) {
28 | str += slash;
29 | }
30 |
31 | // preserves full path in case of trailing path separator
32 | str += 'a';
33 |
34 | // remove path parts that are globby
35 | do {
36 | str = pathPosixDirname(str);
37 | } while (isGlob(str) || globby.test(str));
38 |
39 | // remove escape chars and return result
40 | return str.replace(escaped, '$1');
41 | };
42 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-binary-path/index.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | Check if a file path is a binary file.
3 |
4 | @example
5 | ```
6 | import isBinaryPath = require('is-binary-path');
7 |
8 | isBinaryPath('source/unicorn.png');
9 | //=> true
10 |
11 | isBinaryPath('source/unicorn.txt');
12 | //=> false
13 | ```
14 | */
15 | declare function isBinaryPath(filePath: string): boolean;
16 |
17 | export = isBinaryPath;
18 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-binary-path/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const path = require('path');
3 | const binaryExtensions = require('binary-extensions');
4 |
5 | const extensions = new Set(binaryExtensions);
6 |
7 | module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());
8 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-binary-path/license:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
4 |
5 | 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:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | 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.
10 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-binary-path/readme.md:
--------------------------------------------------------------------------------
1 | # is-binary-path [](https://travis-ci.org/sindresorhus/is-binary-path)
2 |
3 | > Check if a file path is a binary file
4 |
5 |
6 | ## Install
7 |
8 | ```
9 | $ npm install is-binary-path
10 | ```
11 |
12 |
13 | ## Usage
14 |
15 | ```js
16 | const isBinaryPath = require('is-binary-path');
17 |
18 | isBinaryPath('source/unicorn.png');
19 | //=> true
20 |
21 | isBinaryPath('source/unicorn.txt');
22 | //=> false
23 | ```
24 |
25 |
26 | ## Related
27 |
28 | - [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions
29 | - [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
30 |
31 |
32 | ## License
33 |
34 | MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com)
35 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-extglob/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-2016, Jon Schlinkert
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-extglob/index.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * is-extglob
3 | *
4 | * Copyright (c) 2014-2016, Jon Schlinkert.
5 | * Licensed under the MIT License.
6 | */
7 |
8 | module.exports = function isExtglob(str) {
9 | if (typeof str !== 'string' || str === '') {
10 | return false;
11 | }
12 |
13 | var match;
14 | while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
15 | if (match[2]) return true;
16 | str = str.slice(match.index + match[0].length);
17 | }
18 |
19 | return false;
20 | };
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-glob/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-2017, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-glob/index.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * is-glob
3 | *
4 | * Copyright (c) 2014-2017, Jon Schlinkert.
5 | * Released under the MIT License.
6 | */
7 |
8 | var isExtglob = require('is-extglob');
9 | var chars = { '{': '}', '(': ')', '[': ']'};
10 | var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
11 | var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
12 |
13 | module.exports = function isGlob(str, options) {
14 | if (typeof str !== 'string' || str === '') {
15 | return false;
16 | }
17 |
18 | if (isExtglob(str)) {
19 | return true;
20 | }
21 |
22 | var regex = strictRegex;
23 | var match;
24 |
25 | // optionally relax regex
26 | if (options && options.strict === false) {
27 | regex = relaxedRegex;
28 | }
29 |
30 | while ((match = regex.exec(str))) {
31 | if (match[2]) return true;
32 | var idx = match.index + match[0].length;
33 |
34 | // if an open bracket/brace/paren is escaped,
35 | // set the index to the next closing character
36 | var open = match[1];
37 | var close = open ? chars[open] : null;
38 | if (open && close) {
39 | var n = str.indexOf(close, idx);
40 | if (n !== -1) {
41 | idx = n + 1;
42 | }
43 | }
44 |
45 | str = str.slice(idx);
46 | }
47 | return false;
48 | };
49 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-number/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-present, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/is-number/index.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * is-number
3 | *
4 | * Copyright (c) 2014-present, Jon Schlinkert.
5 | * Released under the MIT License.
6 | */
7 |
8 | 'use strict';
9 |
10 | module.exports = function(num) {
11 | if (typeof num === 'number') {
12 | return num - num === 0;
13 | }
14 | if (typeof num === 'string' && num.trim() !== '') {
15 | return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
16 | }
17 | return false;
18 | };
19 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/.editorconfig:
--------------------------------------------------------------------------------
1 | # This file is for unifying the coding style for different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 |
7 | [*]
8 | end_of_line = lf
9 | charset = utf-8
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 |
13 | # Tabs in JS unless otherwise specified
14 | [**.js]
15 | indent_style = tab
16 |
17 | [Makefile]
18 | indent_style = tab
19 |
20 |
21 | [speed/**.html]
22 | indent_style = tab
23 |
24 | [speed/**.css]
25 | indent_style = tab
26 |
27 | [speed/benchmarker.js]
28 | indent_style = space
29 | indent_size = 2
30 |
31 |
32 | [test/**.xml]
33 | indent_style = tab
34 |
35 | [test/**.php]
36 | indent_style = tab
37 |
38 | [test/**.html]
39 | indent_style = tab
40 |
41 | [test/**.css]
42 | indent_style = space
43 | indent_size = 8
44 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/.gitattributes:
--------------------------------------------------------------------------------
1 | * eol=lf
2 | *.jar binary
3 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "src/sizzle"]
2 | path = src/sizzle
3 | url = git://github.com/jquery/sizzle.git
4 | [submodule "test/qunit"]
5 | path = test/qunit
6 | url = git://github.com/jquery/qunit.git
7 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "curly": true,
3 | "eqeqeq": true,
4 | "latedef": true,
5 | "noarg": true,
6 | "noempty": true,
7 | "quotmark": "double",
8 | "undef": true,
9 | "unused": true,
10 | "strict": true,
11 | "trailing": true,
12 |
13 | "node": true
14 | }
15 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/.npmignore:
--------------------------------------------------------------------------------
1 | src/selector.js
2 | dist
3 | .project
4 | .settings
5 | *~
6 | *.diff
7 | *.patch
8 | /*.html
9 | .DS_Store
10 | dist/.destination.json
11 | dist/.sizecache.json
12 | build/.sizecache.json
13 | node_modules
14 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/AUTHORS.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/AUTHORS.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/MIT-LICENSE.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/MIT-LICENSE.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/build/release-notes.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | /*
3 | * jQuery Release Note Generator
4 | */
5 |
6 | var fs = require("fs"),
7 | http = require("http"),
8 | extract = /(.*?)<[^"]+"component">\s*(\S+)/g,
9 | categories = [],
10 | version = process.argv[2];
11 |
12 | if ( !/^\d+\.\d+/.test( version ) ) {
13 | console.error( "Invalid version number: " + version );
14 | process.exit( 1 );
15 | }
16 |
17 | http.request({
18 | host: "bugs.jquery.com",
19 | port: 80,
20 | method: "GET",
21 | path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version
22 | }, function (res) {
23 | var data = [];
24 |
25 | res.on( "data", function( chunk ) {
26 | data.push( chunk );
27 | });
28 |
29 | res.on( "end", function() {
30 | var match,
31 | file = data.join(""),
32 | cur;
33 |
34 | while ( (match = extract.exec( file )) ) {
35 | if ( "#" + match[1] !== match[2] ) {
36 | var cat = match[3];
37 |
38 | if ( !cur || cur !== cat ) {
39 | if ( cur ) {
40 | console.log(" ");
41 | }
42 | cur = cat;
43 | console.log( "" + cat.charAt(0).toUpperCase() + cat.slice(1) + " " );
44 | console.log("");
55 | }
56 |
57 | });
58 | }).end();
59 |
60 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "1.9.1",
4 | "description": "jQuery component",
5 | "keywords": [
6 | "jquery",
7 | "component"
8 | ],
9 | "scripts": [
10 | "jquery.js"
11 | ],
12 | "license": "MIT"
13 | }
14 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "components/jquery",
3 | "description": "jQuery JavaScript Library",
4 | "type": "component",
5 | "homepage": "http://jquery.com",
6 | "license": "MIT",
7 | "support": {
8 | "irc": "irc://irc.freenode.org/jquery",
9 | "issues": "http://bugs.jquery.com",
10 | "forum": "http://forum.jquery.com",
11 | "wiki": "http://docs.jquery.com/",
12 | "source": "https://github.com/jquery/jquery"
13 | },
14 | "authors": [
15 | {
16 | "name": "John Resig",
17 | "email": "jeresig@gmail.com"
18 | }
19 | ],
20 | "require": {
21 | "robloach/component-installer": "*"
22 | },
23 | "extra": {
24 | "component": {
25 | "scripts": [
26 | "jquery.js"
27 | ],
28 | "files": [
29 | "jquery.min.js",
30 | "jquery-migrate.js",
31 | "jquery-migrate.min.js"
32 | ]
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_from": "jquery@1.9.1",
3 | "_id": "jquery@1.9.1",
4 | "_inBundle": false,
5 | "_integrity": "sha1-5M1INfqu+63lNYV2E8D8P/KtrzQ=",
6 | "_location": "/jquery",
7 | "_phantomChildren": {},
8 | "_requested": {
9 | "type": "version",
10 | "registry": true,
11 | "raw": "jquery@1.9.1",
12 | "name": "jquery",
13 | "escapedName": "jquery",
14 | "rawSpec": "1.9.1",
15 | "saveSpec": null,
16 | "fetchSpec": "1.9.1"
17 | },
18 | "_requiredBy": [
19 | "#USER",
20 | "/"
21 | ],
22 | "_resolved": "https://registry.npmjs.org/jquery/-/jquery-1.9.1.tgz",
23 | "_shasum": "e4cd4835faaefbade535857613c0fc3ff2adaf34",
24 | "_spec": "jquery@1.9.1",
25 | "_where": "/Users/martine/Sites/architecting-css/chapter-8/bootstrap-mixins",
26 | "author": {
27 | "name": "jQuery Foundation and other contributors",
28 | "url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt"
29 | },
30 | "bugs": {
31 | "url": "http://bugs.jquery.com"
32 | },
33 | "bundleDependencies": false,
34 | "dependencies": {},
35 | "deprecated": false,
36 | "description": "JavaScript library for DOM operations",
37 | "devDependencies": {
38 | "grunt": "~0.4.0",
39 | "grunt-compare-size": "~0.3.0",
40 | "grunt-contrib-jshint": "~0.1.1",
41 | "grunt-contrib-uglify": "~0.1.1",
42 | "grunt-contrib-watch": "~0.1.1",
43 | "grunt-git-authors": "~1.1.0",
44 | "grunt-update-submodules": "~0.2.0",
45 | "testswarm": "0.2.2"
46 | },
47 | "homepage": "http://jquery.com",
48 | "keywords": [],
49 | "licenses": [
50 | {
51 | "type": "MIT",
52 | "url": "https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt"
53 | }
54 | ],
55 | "name": "jquery",
56 | "repository": {
57 | "type": "git",
58 | "url": "git+https://github.com/jquery/jquery.git"
59 | },
60 | "scripts": {
61 | "test": "grunt"
62 | },
63 | "title": "jQuery",
64 | "version": "1.9.1"
65 | }
66 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/benchmark.js:
--------------------------------------------------------------------------------
1 | // Runs a function many times without the function call overhead
2 | function benchmark(fn, times, name){
3 | fn = fn.toString();
4 | var s = fn.indexOf('{')+1,
5 | e = fn.lastIndexOf('}');
6 | fn = fn.substring(s,e);
7 |
8 | return benchmarkString(fn, times, name);
9 | }
10 |
11 | function benchmarkString(fn, times, name) {
12 | var fn = new Function("i", "var t=new Date; while(i--) {" + fn + "}; return new Date - t")(times)
13 | fn.displayName = name || "benchmarked";
14 | return fn;
15 | }
16 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/benchmarker.css:
--------------------------------------------------------------------------------
1 |
2 | .dialog {
3 | margin-bottom: 1em;
4 | }
5 | a.expand {
6 | background: #e3e3e3;
7 | }
8 |
9 | div#time-test {
10 | font-family: Arial, Helvetica, sans-serif;
11 | font-size: 62.5%;
12 | }
13 |
14 | td.test button {
15 | float: right;
16 | }
17 |
18 | table {
19 | border: 1px solid #000;
20 | }
21 |
22 | table td, table th {
23 | border: 1px solid #000;
24 | padding: 10px;
25 | }
26 |
27 | td.winner {
28 | background-color: #cfc;
29 | }
30 |
31 | td.tie {
32 | background-color: #ffc;
33 | }
34 |
35 | td.fail {
36 | background-color: #f99;
37 | font-weight: bold;
38 | text-align: center;
39 | }
40 |
41 | tfoot td {
42 | text-align: center;
43 | }
44 |
45 | #time-test {
46 | margin: 1em 0;
47 | padding: .5em;
48 | background: #e3e3e3;
49 | }
50 | #time-taken {
51 | font-weight: bold;
52 | }
53 |
54 | span.wins {
55 | color: #330;
56 | }
57 |
58 | span.fails {
59 | color: #900;
60 | }
61 |
62 | div.buttons {
63 | margin-top: 10px;
64 | margin-bottom: 10px;
65 | }
66 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/closest.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/closest.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/css.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/css.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/event.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/event.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/filter.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/filter.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/find.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/find.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/index.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/index.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/speed/slice.vs.concat.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/speed/slice.vs.concat.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "curly": true,
3 | "expr": true,
4 | "newcap": false,
5 | "quotmark": "double",
6 | "regexdash": true,
7 | "trailing": true,
8 | "undef": true,
9 | "unused": true,
10 | "maxerr": 100,
11 |
12 | "eqnull": true,
13 | "evil": true,
14 | "sub": true,
15 |
16 | "browser": true,
17 | "wsh": true,
18 |
19 | "predef": [
20 | "define",
21 | "jQuery"
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/deprecated.js:
--------------------------------------------------------------------------------
1 | // Limit scope pollution from any deprecated API
2 | // (function() {
3 |
4 | // })();
5 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/dimensions.js:
--------------------------------------------------------------------------------
1 | // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
2 | jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
3 | jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
4 | // margin is only for outerHeight, outerWidth
5 | jQuery.fn[ funcName ] = function( margin, value ) {
6 | var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
7 | extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
8 |
9 | return jQuery.access( this, function( elem, type, value ) {
10 | var doc;
11 |
12 | if ( jQuery.isWindow( elem ) ) {
13 | // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
14 | // isn't a whole lot we can do. See pull request at this URL for discussion:
15 | // https://github.com/jquery/jquery/pull/764
16 | return elem.document.documentElement[ "client" + name ];
17 | }
18 |
19 | // Get document width or height
20 | if ( elem.nodeType === 9 ) {
21 | doc = elem.documentElement;
22 |
23 | // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
24 | // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
25 | return Math.max(
26 | elem.body[ "scroll" + name ], doc[ "scroll" + name ],
27 | elem.body[ "offset" + name ], doc[ "offset" + name ],
28 | doc[ "client" + name ]
29 | );
30 | }
31 |
32 | return value === undefined ?
33 | // Get width or height on the element, requesting but not forcing parseFloat
34 | jQuery.css( elem, type, extra ) :
35 |
36 | // Set width or height on the element
37 | jQuery.style( elem, type, value, extra );
38 | }, type, chainable ? margin : undefined, chainable, null );
39 | };
40 | });
41 | });
42 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/event-alias.js:
--------------------------------------------------------------------------------
1 | jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
2 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
3 | "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
4 |
5 | // Handle event binding
6 | jQuery.fn[ name ] = function( data, fn ) {
7 | return arguments.length > 0 ?
8 | this.on( name, null, data, fn ) :
9 | this.trigger( name );
10 | };
11 | });
12 |
13 | jQuery.fn.hover = function( fnOver, fnOut ) {
14 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
15 | };
16 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/exports.js:
--------------------------------------------------------------------------------
1 | // Expose jQuery to the global object
2 | window.jQuery = window.$ = jQuery;
3 |
4 | // Expose jQuery as an AMD module, but only for AMD loaders that
5 | // understand the issues with loading multiple versions of jQuery
6 | // in a page that all might call define(). The loader will indicate
7 | // they have special allowances for multiple jQuery versions by
8 | // specifying define.amd.jQuery = true. Register as a named module,
9 | // since jQuery can be concatenated with other files that may use define,
10 | // but not use a proper concatenation script that understands anonymous
11 | // AMD modules. A named AMD is safest and most robust way to register.
12 | // Lowercase jquery is used because AMD module names are derived from
13 | // file names, and jQuery is normally delivered in a lowercase file name.
14 | // Do this after creating the global so that if an AMD module wants to call
15 | // noConflict to hide this version of jQuery, it will work.
16 | if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
17 | define( "jquery", [], function () { return jQuery; } );
18 | }
19 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/intro.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery JavaScript Library v@VERSION
3 | * http://jquery.com/
4 | *
5 | * Includes Sizzle.js
6 | * http://sizzlejs.com/
7 | *
8 | * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
9 | * Released under the MIT license
10 | * http://jquery.org/license
11 | *
12 | * Date: @DATE
13 | */
14 | (function( window, undefined ) {
15 |
16 | // Can't do this because several apps including ASP.NET trace
17 | // the stack via arguments.caller.callee and Firefox dies if
18 | // you try to trace through "use strict" call chains. (#13335)
19 | // Support: Firefox 18+
20 | //"use strict";
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/outro.js:
--------------------------------------------------------------------------------
1 |
2 | })( window );
3 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/src/sizzle-jquery.js:
--------------------------------------------------------------------------------
1 | // Override sizzle attribute retrieval
2 | Sizzle.attr = jQuery.attr;
3 | jQuery.find = Sizzle;
4 | jQuery.expr = Sizzle.selectors;
5 | jQuery.expr[":"] = jQuery.expr.pseudos;
6 | jQuery.unique = Sizzle.uniqueSort;
7 | jQuery.text = Sizzle.getText;
8 | jQuery.isXMLDoc = Sizzle.isXML;
9 | jQuery.contains = Sizzle.contains;
10 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/.jshintignore:
--------------------------------------------------------------------------------
1 | qunit/
2 | data/badjson.js
3 | data/jquery-1.8.2.ajax_xhr.min.js
4 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "curly": true,
3 | "expr": true,
4 | "quotmark": "double",
5 | "trailing": true,
6 | "undef": true,
7 | "maxerr": 100,
8 |
9 | "eqnull": true,
10 | "evil": true,
11 | "smarttabs": true,
12 | "sub": true,
13 |
14 | "browser": true,
15 | "devel": true,
16 | "wsh": true,
17 |
18 | "predef": [
19 | "DOMParser",
20 | "jQuery",
21 | "QUnit",
22 | "module",
23 | "ok",
24 | "equal",
25 | "test",
26 | "asyncTest",
27 | "notEqual",
28 | "deepEqual",
29 | "strictEqual",
30 | "notStrictEqual",
31 | "start",
32 | "stop",
33 | "expect",
34 | "raises",
35 | "ajaxTest",
36 | "testIframe",
37 | "testIframeWithCallback",
38 | "createDashboardXML",
39 | "createXMLFragment",
40 | "moduleTeardown",
41 | "testFoo",
42 | "url",
43 | "t",
44 | "q",
45 | "amdDefined",
46 | "fireNative",
47 | "Globals",
48 | "hasPHP",
49 | "isLocal",
50 | "originaljQuery",
51 | "$",
52 | "original$",
53 | "externalHost"
54 | ]
55 | }
56 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/csp.php:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 | CSP Test Page
10 |
11 |
12 |
13 |
14 | CSP Test Page
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/1x1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/1x1.jpg
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/ajax/unreleasedXHR.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/ajax/unreleasedXHR.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/atom+xml.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/badcall.js:
--------------------------------------------------------------------------------
1 | undefined();
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/badjson.js:
--------------------------------------------------------------------------------
1 | {bad: toTheBone}
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/cleanScript.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/cleanScript.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/core/cc_on.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/core/cc_on.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/dashboard.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/dimensions/documentLarge.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/dimensions/documentLarge.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/dimensions/documentSmall.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/dimensions/documentSmall.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/echoData.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/echoQuery.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/errorWithText.php:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/evalScript.php:
--------------------------------------------------------------------------------
1 | ok( "" === "GET", "request method is " );
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/event/longLoadScript.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/event/promiseReady.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/event/promiseReady.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/event/syncReady.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/event/syncReady.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/headers.php:
--------------------------------------------------------------------------------
1 | $value ) {
10 |
11 | $key = str_replace( "_" , "-" , substr( $key , 0 , 5 ) == "HTTP_" ? substr( $key , 5 ) : $key );
12 | $headers[ $key ] = $value;
13 |
14 | }
15 |
16 | foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) {
17 | echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n";
18 | }
19 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/if_modified_since.php:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/iframe.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/iframe.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/json.php:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/json_obj.js:
--------------------------------------------------------------------------------
1 | { "data": {"lang": "en", "length": 25} }
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/jsonp.php:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/manipulation/iframe-denied.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/manipulation/iframe-denied.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/name.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/name.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/name.php:
--------------------------------------------------------------------------------
1 | $xml $result ";
12 | die();
13 | }
14 | $name = $_REQUEST['name'];
15 | if($name == 'foo') {
16 | echo "bar";
17 | die();
18 | } else if($name == 'peter') {
19 | echo "pan";
20 | die();
21 | }
22 |
23 | echo 'ERROR ';
24 | ?>
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/nocontent.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/absolute.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/absolute.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/body.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/body.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/fixed.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/fixed.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/relative.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/relative.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/scroll.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/scroll.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/static.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/static.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/table.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/offset/table.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/params_html.php:
--------------------------------------------------------------------------------
1 |
2 | $value )
4 | echo "$value ";
5 | ?>
6 |
7 |
8 | $value )
10 | echo "$value ";
11 | ?>
12 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/readywaitasset.js:
--------------------------------------------------------------------------------
1 | var delayedMessage = "It worked!";
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/readywaitloader.js:
--------------------------------------------------------------------------------
1 | // Simple script loader that uses jQuery.readyWait via jQuery.holdReady()
2 |
3 | //Hold on jQuery!
4 | jQuery.holdReady(true);
5 |
6 | var readyRegExp = /^(complete|loaded)$/;
7 |
8 | function assetLoaded( evt ){
9 | var node = evt.currentTarget || evt.srcElement;
10 | if ( evt.type === "load" || readyRegExp.test(node.readyState) ) {
11 | jQuery.holdReady(false);
12 | }
13 | }
14 |
15 | setTimeout( function() {
16 | var script = document.createElement("script");
17 | script.type = "text/javascript";
18 | if ( script.addEventListener ) {
19 | script.addEventListener( "load", assetLoaded, false );
20 | } else {
21 | script.attachEvent( "onreadystatechange", assetLoaded );
22 | }
23 | script.src = "data/readywaitasset.js";
24 | document.getElementsByTagName("head")[0].appendChild(script);
25 | }, 2000 );
26 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/script.php:
--------------------------------------------------------------------------------
1 |
11 | ok( true, "Script executed correctly." );
12 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/selector/html5_selector.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/selector/html5_selector.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/selector/sizzle_cache.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/selector/sizzle_cache.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/statusText.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/support/bodyBackground.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/support/bodyBackground.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/support/shrinkWrapBlocks.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/support/shrinkWrapBlocks.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/support/testElementCrash.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/support/testElementCrash.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test.js:
--------------------------------------------------------------------------------
1 | var testBar = "bar";
2 | jQuery("#ap").html("bar");
3 | ok( true, "test.js executed");
4 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test.php:
--------------------------------------------------------------------------------
1 | html text
2 |
6 |
7 | blabla
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test2.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test2.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test3.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/test3.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/text.php:
--------------------------------------------------------------------------------
1 | Lorem ipsum dolor sit amet
2 | consectetuer adipiscing elit
3 | Sed lorem leo
4 | lorem leo consectetuer adipiscing elit
5 | Sed lorem leo
6 | rhoncus sit amet
7 | elementum at
8 | bibendum at, eros
9 | Cras at mi et tortor egestas vestibulum
10 | sed Cras at mi vestibulum
11 | Phasellus sed felis sit amet
12 | orci dapibus semper.
13 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/ua.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/ua.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/with_fries.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 1
14 |
15 |
16 |
17 |
18 | foo
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/data/with_fries_over_jsonp.php:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/delegatetest.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/delegatetest.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/hovertest.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/hovertest.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/index.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/index.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/localfile.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/localfile.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/networkerror.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/networkerror.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/readywait.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/jquery/test/readywait.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/unit/deprecated.js:
--------------------------------------------------------------------------------
1 | module("deprecated");
2 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/unit/exports.js:
--------------------------------------------------------------------------------
1 | module("exports", { teardown: moduleTeardown });
2 |
3 | test("amdModule", function() {
4 | expect(1);
5 |
6 | equal( jQuery, amdDefined, "Make sure defined module matches jQuery" );
7 | });
8 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/jquery/test/xhtml.php:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/normalize-path/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-2018, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/normalize-path/index.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * normalize-path
3 | *
4 | * Copyright (c) 2014-2018, Jon Schlinkert.
5 | * Released under the MIT License.
6 | */
7 |
8 | module.exports = function(path, stripTrailing) {
9 | if (typeof path !== 'string') {
10 | throw new TypeError('expected path to be a string');
11 | }
12 |
13 | if (path === '\\' || path === '/') return '/';
14 |
15 | var len = path.length;
16 | if (len <= 1) return path;
17 |
18 | // ensure that win32 namespaces has two leading slashes, so that the path is
19 | // handled properly by the win32 version of path.parse() after being normalized
20 | // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
21 | var prefix = '';
22 | if (len > 4 && path[3] === '\\') {
23 | var ch = path[2];
24 | if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
25 | path = path.slice(2);
26 | prefix = '//';
27 | }
28 | }
29 |
30 | var segs = path.split(/[/\\]+/);
31 | if (stripTrailing !== false && segs[segs.length - 1] === '') {
32 | segs.pop();
33 | }
34 | return prefix + segs.join('/');
35 | };
36 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/picomatch/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2017-present, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/picomatch/README.md.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/picomatch/README.md.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/picomatch/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = require('./lib/picomatch');
4 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/picomatch/lib/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 | const win32 = process.platform === 'win32';
5 | const {
6 | REGEX_BACKSLASH,
7 | REGEX_REMOVE_BACKSLASH,
8 | REGEX_SPECIAL_CHARS,
9 | REGEX_SPECIAL_CHARS_GLOBAL
10 | } = require('./constants');
11 |
12 | exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
13 | exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
14 | exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
15 |
16 | exports.removeBackslashes = str => {
17 | return str.replace(REGEX_REMOVE_BACKSLASH, match => {
18 | return match === '\\' ? '' : match;
19 | });
20 | };
21 |
22 | exports.supportsLookbehinds = () => {
23 | const segs = process.version.slice(1).split('.').map(Number);
24 | if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
25 | return true;
26 | }
27 | return false;
28 | };
29 |
30 | exports.isWindows = options => {
31 | if (options && typeof options.windows === 'boolean') {
32 | return options.windows;
33 | }
34 | return win32 === true || path.sep === '\\';
35 | };
36 |
37 | exports.escapeLast = (input, char, lastIdx) => {
38 | const idx = input.lastIndexOf(char, lastIdx);
39 | if (idx === -1) return input;
40 | if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
41 | return input.slice(0, idx) + '\\' + input.slice(idx);
42 | };
43 |
44 | exports.removePrefix = (input, state = {}) => {
45 | let output = input;
46 | if (output.startsWith('./')) {
47 | output = output.slice(2);
48 | state.prefix = './';
49 | }
50 | return output;
51 | };
52 |
53 | exports.wrapOutput = (input, state = {}, options = {}) => {
54 | const prepend = options.contains ? '' : '^';
55 | const append = options.contains ? '' : '$';
56 |
57 | let output = `${prepend}(?:${input})${append}`;
58 | if (state.negated === true) {
59 | output = `(?:^(?!${output}).*$)`;
60 | }
61 | return output;
62 | };
63 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/popper.js/README.md.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/architecting-css/0778857492206cccd43737177335495f3e9b1fae/chapter-8/bootstrap-mixins/node_modules/popper.js/README.md.docx
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/readdirp/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/readdirp/index.d.ts:
--------------------------------------------------------------------------------
1 | // TypeScript Version: 3.2
2 |
3 | ///
4 |
5 | import * as fs from 'fs';
6 | import { Readable } from 'stream';
7 |
8 | declare namespace readdir {
9 | interface EntryInfo {
10 | path: string;
11 | fullPath: string;
12 | basename: string;
13 | stats?: fs.Stats;
14 | dirent?: fs.Dirent;
15 | }
16 |
17 | interface ReaddirpOptions {
18 | root?: string;
19 | fileFilter?: string | string[] | ((entry: EntryInfo) => boolean);
20 | directoryFilter?: (entry: EntryInfo) => boolean;
21 | type?: 'files' | 'directories' | 'files_directories' | 'all';
22 | lstat?: boolean;
23 | depth?: number;
24 | alwaysStat?: boolean;
25 | }
26 |
27 | interface ReaddirpStream extends Readable, AsyncIterable {
28 | read(): EntryInfo;
29 | [Symbol.asyncIterator](): AsyncIterableIterator;
30 | }
31 |
32 | function promise(
33 | root: string,
34 | options?: ReaddirpOptions
35 | ): Promise;
36 | }
37 |
38 | declare function readdir(
39 | root: string,
40 | options?: readdir.ReaddirpOptions
41 | ): readdir.ReaddirpStream;
42 |
43 | export = readdir;
44 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/sass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_from": "sass",
3 | "_id": "sass@1.23.2",
4 | "_inBundle": false,
5 | "_integrity": "sha512-ZfOl81QxcWmjxOgjPbyog3uELzOxd4X9OaqEIAi9r/d2kEjtEYaMAD9a3E+xgjcKeP3NDLMhU9GB/WMv+rAeSw==",
6 | "_location": "/sass",
7 | "_phantomChildren": {},
8 | "_requested": {
9 | "type": "tag",
10 | "registry": true,
11 | "raw": "sass",
12 | "name": "sass",
13 | "escapedName": "sass",
14 | "rawSpec": "",
15 | "saveSpec": null,
16 | "fetchSpec": "latest"
17 | },
18 | "_requiredBy": [
19 | "#DEV:/",
20 | "#USER"
21 | ],
22 | "_resolved": "https://registry.npmjs.org/sass/-/sass-1.23.2.tgz",
23 | "_shasum": "eef0163c7670c80e8824ff75e76a5b4004fe2fd2",
24 | "_spec": "sass",
25 | "_where": "/Users/martine/Sites/architecting-css/chapter-8/bootstrap-mixins",
26 | "author": {
27 | "name": "Natalie Weizenbaum",
28 | "email": "nweiz@google.com",
29 | "url": "https://github.com/nex3"
30 | },
31 | "bin": {
32 | "sass": "sass.js"
33 | },
34 | "bugs": {
35 | "url": "https://github.com/sass/dart-sass/issues"
36 | },
37 | "bundleDependencies": false,
38 | "dependencies": {
39 | "chokidar": ">=2.0.0 <4.0.0"
40 | },
41 | "deprecated": false,
42 | "description": "A pure JavaScript implementation of Sass.",
43 | "engines": {
44 | "node": ">=8.9.0"
45 | },
46 | "homepage": "https://github.com/sass/dart-sass",
47 | "keywords": [
48 | "style",
49 | "scss",
50 | "sass",
51 | "preprocessor",
52 | "css"
53 | ],
54 | "license": "MIT",
55 | "main": "sass.dart.js",
56 | "name": "sass",
57 | "repository": {
58 | "type": "git",
59 | "url": "git+https://github.com/sass/dart-sass.git"
60 | },
61 | "version": "1.23.2"
62 | }
63 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/sass/sass.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | // Copyright 2016 Google Inc. Use of this source code is governed by an
3 | // MIT-style license that can be found in the LICENSE file or at
4 | // https://opensource.org/licenses/MIT.
5 |
6 | var index = require('./sass.dart.js');
7 |
8 | index.run_(process.argv.slice(2));
9 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/node_modules/to-regex-range/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015-present, Jon Schlinkert.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap-mixins",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "scripts": {
6 | "watch:sass": "sass --watch styles.scss styles.css"
7 | },
8 | "devDependencies": {
9 | "sass": "^1.23.2"
10 | },
11 | "dependencies": {
12 | "bootstrap": "^4.3.1",
13 | "jquery": "^3.5.0",
14 | "popper.js": "^1.14.7"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap-mixins/styles.scss:
--------------------------------------------------------------------------------
1 | @import './node_modules/bootstrap/scss/functions';
2 | @import './node_modules/bootstrap/scss/variables';
3 | @import './node_modules/bootstrap/scss/mixins';
4 |
5 | @import './node_modules/bootstrap/scss/jumbotron';
6 | @import './node_modules/bootstrap/scss/buttons';
7 |
8 | html {
9 | padding: 36px;
10 | }
11 |
12 | body {
13 | padding: 36px 15px;
14 | margin: 0 auto;
15 | font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
16 | font-weight: 400;
17 | line-height: 1.5;
18 | color: #212529;
19 | box-sizing: border-box;
20 | }
21 |
22 | h1, h2 {
23 | margin-top: 0;
24 | margin-bottom: .5rem;
25 | font-weight: 500;
26 | line-height: 1.2;
27 | }
28 | h1 { font-size: 2.5rem ;}
29 | h2 { font-size: 2rem ;}
30 |
31 | .container {
32 | box-sizing: border-box;
33 | @include make-row(15px);
34 | & > * {
35 | box-sizing: border-box;
36 | @include make-col-ready(1rem);
37 | }
38 | }
39 |
40 | button { @extend .btn }
41 | .call-to-action {
42 | box-sizing: border-box;
43 | @extend .jumbotron;
44 | button {
45 | @include button-variant($yellow, $yellow);
46 | }
47 | }
48 | a.read-more {
49 | @extend .btn;
50 | @include button-variant($gray-100, $gray-100);
51 | }
52 |
53 | @media (min-width: 756px) {
54 | body { max-width: 540px; }
55 | }
56 |
57 | @media (min-width: 768px) {
58 | body { max-width: 720px; }
59 | main { @include make-col(9); }
60 | aside { @include make-col(3) }
61 | }
62 |
63 | @media (min-width: 992px) {
64 | body { max-width: 960px; }
65 | }
66 |
67 | @media (min-width: 1200px) {
68 | body { max-width: 1140px; }
69 | }
70 |
--------------------------------------------------------------------------------
/chapter-8/bootstrap/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 36px;
3 | margin: 0;
4 | }
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chapter-8/web-components/card.css:
--------------------------------------------------------------------------------
1 | :host {
2 | font-family: sans-serif;
3 | --primary: mediumvioletred;
4 | --background: white;
5 | --text: #242529;
6 | --buttonText: white;
7 | }
8 | :host(.dark) {
9 | --background: #242529;
10 | --text: white;
11 | }
12 |
13 | .card {
14 | background: var(--background);
15 | color: var(--text);
16 | box-shadow: 1px 1px 1px var(--primary), 0px 0px 2px lightgrey;
17 | padding: 1rem;
18 | }
19 |
20 | h2 { margin: 0 1rem 0 0; }
21 |
22 | .actions {
23 | text-align: right;
24 | margin-top: 1rem;
25 | }
26 |
27 | button {
28 | background: var(--primary);
29 | color: var(--buttonText);
30 | padding: .5rem 1.5rem;
31 | border: none;
32 | }
33 |
--------------------------------------------------------------------------------
/chapter-8/web-components/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Web Components
6 |
7 |
8 |
9 |
10 |
11 | Components
12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed neque semper ante mattis tempor. Morbi volutpat ex ante, eget vulputate ligula pulvinar gravida.
13 |
14 |
15 |
16 |
17 | Aged cortado, carajillo saucer wings aftertaste robusta americano plunger pot. Aromatic eu, skinny affogato saucer cinnamon barista robusta. Siphon, et redeye variety percolator sweet plunger pot. Macchiato, french press filter coffee beans wings redeye saucer id cinnamon.
18 |
19 |
20 |
21 |
22 |
23 | Chew master's slippers i is not fat, i is fluffy but i can haz yet eat prawns daintily with a claw then lick paws clean wash down prawns with a lap of carnation milk then retire to the warmest spot on the couch to claw at the fabric before taking a catnap.
24 |
25 |
26 |
27 |
28 | More Components ->
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/chapter-8/web-components/script.js:
--------------------------------------------------------------------------------
1 | const actionButtonEvent = new CustomEvent('actions', {
2 | bubbles: true,
3 | detail: { text: 'ok button' }
4 | });
5 |
6 | class MyCardComponent extends HTMLElement {
7 | constructor() {
8 | super();
9 |
10 | const shadow = this.attachShadow({ mode: 'open' });
11 |
12 | const card = document.createElement('div');
13 | card.setAttribute('class', 'card');
14 |
15 | const titleText = this.getAttribute('title');
16 | if (titleText) {
17 | const title = document.createElement('h2');
18 | title.innerText = titleText;
19 | card.appendChild(title);
20 | }
21 |
22 | const slot = document.createElement('slot');
23 | card.appendChild(slot);
24 |
25 | const actions = document.createElement('div');
26 | actions.setAttribute('class', 'actions');
27 | const button = document.createElement('button');
28 | button.innerText = 'OK';
29 | button.setAttribute('type', 'button');
30 | button.innerText = 'OK';
31 | button.addEventListener('click', () => {
32 | this.dispatchEvent(actionButtonEvent);
33 | });
34 | actions.appendChild(button);
35 | card.appendChild(actions);
36 |
37 | const style = document.createElement('style');
38 | style.textContent = `@import './card.css'`;
39 |
40 | card.appendChild(style);
41 | shadow.appendChild(card);
42 | }
43 |
44 | }
45 |
46 | (function() {
47 | 'use strict';
48 | customElements.define('my-card', MyCardComponent);
49 | document.querySelector('my-card').addEventListener('actions', e => console.log('outer actions event', e));
50 | })();
51 |
--------------------------------------------------------------------------------
/chapter-8/web-components/styles.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | background: #fafafa;
3 | padding: 36px;
4 | margin: 0;
5 | }
6 |
7 | section.components {
8 | display: flex;
9 | margin: 0 -1rem;
10 | }
11 |
12 | my-card { margin: 1rem; }
13 |
14 | .actions { text-align: center; }
15 |
16 | button {
17 | font-family: sans-serif;
18 | background: rgb(187, 255, 120);
19 | border: none;
20 | border-radius: 1rem;
21 | box-shadow: 1px 1px 1px 1px gray;
22 | margin-top: 2rem;
23 | padding: .5rem 3rem;
24 | }
25 |
26 | .dark {
27 | font-family: monospace;
28 | font-size: 1.0625rem;
29 | }
30 |
31 | p, h2 { font-variant: small-caps; }
32 |
33 |
--------------------------------------------------------------------------------
/chapter-9/oocss/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | OOCSS
6 |
7 |
8 |
9 |
10 |
23 |
24 |
25 | Lorem ipsum dolor sit amet...
26 | Subscribe
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/chapter-9/oocss/styles.css:
--------------------------------------------------------------------------------
1 | .theme-light {
2 | color: slategray;
3 | background-color: lightgoldenrodyellow;
4 | border: 1px solid navy;
5 | }
6 | .sidebar {
7 | padding: 1rem;
8 | float: left;
9 | width: 200px;
10 | }
11 | .hero {
12 | margin: 1rem 1rem 1rem 250px;
13 | padding: 1rem;
14 | }
15 |
16 | /* -- Not This --
17 |
18 | .sidebar {
19 | color: slategray;
20 | background-color: lightgoldenrodyellow;
21 | border: 1px solid navy;
22 | padding: 1rem;
23 | float: left;
24 | width: 200px;
25 | }
26 | .hero {
27 | color: slategray;
28 | background-color: lightgoldenrodyellow;
29 | border: 1px solid navy;
30 | margin: 1rem 1rem 1rem 250px;
31 | padding: 1rem;
32 | } */
33 |
--------------------------------------------------------------------------------
/chapter-9/smaccss/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SMACSS
6 |
7 |
8 |
9 |
10 |
27 |
28 |
29 | Lorem ipsum dolor sit amet...
30 | Subscribe
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/chapter-9/smaccss/styles.css:
--------------------------------------------------------------------------------
1 | .l-leftnav #sidebar { }
2 | .login input[type=password] { }
3 | .l-stacked > * { }
4 | .hero { height: 8rem; border: 2px solid green; }
5 | .hero-light { border-color: lightgreen; }
6 |
7 | /* Not this */
8 | /* #sidebar.sidebar-left { }
9 | .login .password { }
10 | .l-leftnav .nav li { }
11 | .hero { height: 8rem; border: 2px solid green; }
12 | .hero.hero-light {
13 | height: 8rem;
14 | border: 2px solid lightgreen;
15 | } */
16 |
--------------------------------------------------------------------------------
/errata.md:
--------------------------------------------------------------------------------
1 | # Errata for *Book Title*
2 |
3 | On **page xx** [Summary of error]:
4 |
5 | Details of error here. Highlight key pieces in **bold**.
6 |
7 | ***
8 |
9 | On **page xx** [Summary of error]:
10 |
11 | Details of error here. Highlight key pieces in **bold**.
12 |
13 | ***
--------------------------------------------------------------------------------