├── .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 | ![Cover image](9781484257494.jpg) 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 |
13 | 17 | 21 | 25 | 29 | 33 |
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 | art 14 | 15 | 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 | 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 | 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 | art 14 | 15 | 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 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
NameEmailZip Code
Janejane@email.com15978
Johnjohn@email.com11458
Alexalex@email.com68978
35 |
36 | 40 | 44 | 48 | 49 |
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 | 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 | 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 | 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 | art 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
Lorem IpsumLorem ipsum dolor sit amet, consectetur adipiscing elit.
PellentesquePellentesque sit amet massa auctor est hendrerit ullamcorper ac in libero
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 |
12 |
13 |

Content

14 |
15 |
16 |

Content

17 |
18 |
19 |

With Padding

20 |
21 |
22 |

Content

23 |
24 |
25 |

Content

26 |
27 |
28 |

With Margin

29 |
30 |
31 |

Content

32 |
33 |
34 |

Content

35 |
36 |
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 |
12 |
13 |

Content

14 |
15 |
16 |

Content

17 |
18 |
19 |

With Margin

20 |
21 |
22 |

Content

23 |
24 |
25 |

Content

26 |
27 |
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 |
12 |
13 |

Content

14 |
15 |
16 |

Content

17 |
18 |
19 |

With Padding

20 |
21 |
22 |

Content

23 |
24 |
25 |

Content

26 |
27 |
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 | 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 |
13 |

Header

14 |
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 |
31 |

Footer

32 |
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 |
13 |

Header

14 |
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 |
31 |

Footer

32 |
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 | 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 |
Header
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 |
18 | 19 | My Link 20 |
21 |
22 |
23 |
Header
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 |
28 | 29 | My Link 30 |
31 |
32 |
33 |
Header
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 |
38 | 39 | My Link 40 |
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 |
16 |
17 | Fieldset and Legend 18 | 22 | 29 | 30 | 31 | 35 |
36 |
37 | 38 | 39 | Link 40 | 41 | 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 |
Section 1
13 |
Section 2
14 |
Section 3
15 |
Section 4
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 |
Section 1
13 |
Section 2
14 |
Section 3
15 |
Section 4
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 | 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 | modern art 12 | 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 [![Build Status](https://travis-ci.org/sindresorhus/binary-extensions.svg?branch=master)](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 `"); 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 | 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 | 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 | 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 | *** --------------------------------------------------------------------------------