From e38b3eeaa740a0c3290a15cc7092b169444c7d1e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 18 Sep 2018 02:15:31 +0300 Subject: [PATCH] Drop media component --- scss/_media.scss | 8 -- scss/bootstrap.scss | 1 - site/_data/nav.yml | 1 - site/docs/4.3/components/media-object.md | 144 ----------------------- 4 files changed, 154 deletions(-) delete mode 100644 scss/_media.scss delete mode 100644 site/docs/4.3/components/media-object.md diff --git a/scss/_media.scss b/scss/_media.scss deleted file mode 100644 index b573052c14af..000000000000 --- a/scss/_media.scss +++ /dev/null @@ -1,8 +0,0 @@ -.media { - display: flex; - align-items: flex-start; -} - -.media-body { - flex: 1; -} diff --git a/scss/bootstrap.scss b/scss/bootstrap.scss index 9f15c2a8bc83..112e28af8f9a 100644 --- a/scss/bootstrap.scss +++ b/scss/bootstrap.scss @@ -31,7 +31,6 @@ @import "jumbotron"; @import "alert"; @import "progress"; -@import "media"; @import "list-group"; @import "close"; @import "toasts"; diff --git a/site/_data/nav.yml b/site/_data/nav.yml index 664be04dad1e..541c540d6f2e 100644 --- a/site/_data/nav.yml +++ b/site/_data/nav.yml @@ -41,7 +41,6 @@ - title: Input group - title: Jumbotron - title: List group - - title: Media object - title: Modal - title: Navs - title: Navbar diff --git a/site/docs/4.3/components/media-object.md b/site/docs/4.3/components/media-object.md deleted file mode 100644 index 32628e723f05..000000000000 --- a/site/docs/4.3/components/media-object.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -layout: docs -title: Media object -description: Documentation and examples for Bootstrap's media object to construct highly repetitive components like blog comments, tweets, and the like. -group: components -toc: true ---- - -## Example - -The [media object](http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/) helps build complex and repetitive components where some media is positioned alongside content that doesn't wrap around said media. Plus, it does this with only two required classes thanks to flexbox. - -Below is an example of a single media object. Only two classes are required—the wrapping `.media` and the `.media-body` around your content. Optional padding and margin can be controlled through [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/). - -{% capture example %} -
- {% include icons/placeholder.svg width="64" height="64" class="mr-3" %} -
-
Media heading
- Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -
-
-{% endcapture %} -{% include example.html content=example %} - -{% capture callout %} -##### Flexbug #12: Inline elements aren't treated as flex items - -Internet Explorer 10-11 do not render inline elements like links or images (or `::before` and `::after` pseudo-elements) as flex items. The only workaround is to set a non-inline `display` value (e.g., `block`, `inline-block`, or `flex`). We suggest using `.d-flex`, one of our [display utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/), as an easy fix. - -**Source:** [Flexbugs on GitHub](https://github.com/philipwalton/flexbugs#flexbug-12) -{% endcapture %} -{% include callout.html content=callout type="warning" %} - -## Nesting - -Media objects can be infinitely nested, though we suggest you stop at some point. Place nested `.media` within the `.media-body` of a parent media object. - -{% capture example %} -
- {% include icons/placeholder.svg width="64" height="64" class="mr-3" %} -
-
Media heading
- Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. - -
- - {% include icons/placeholder.svg width="64" height="64" %} - -
-
Media heading
- Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -
-
-
-
-{% endcapture %} -{% include example.html content=example %} - -## Alignment - -Media in a media object can be aligned with flexbox utilities to the top (default), middle, or end of your `.media-body` content. - -{% capture example %} -
- {% include icons/placeholder.svg width="64" height="64" class="align-self-start mr-3" %} -
-
Top-aligned media
-

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

-

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
-
-{% endcapture %} -{% include example.html content=example %} - -{% capture example %} -
- {% include icons/placeholder.svg width="64" height="64" class="align-self-center mr-3" %} -
-
Center-aligned media
-

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

-

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
-
-{% endcapture %} -{% include example.html content=example %} - -{% capture example %} -
- {% include icons/placeholder.svg width="64" height="64" class="align-self-end mr-3" %} -
-
Bottom-aligned media
-

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

-

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
-
-{% endcapture %} -{% include example.html content=example %} - -## Order - -Change the order of content in media objects by modifying the HTML itself, or by adding some custom flexbox CSS to set the `order` property (to an integer of your choosing). - -{% capture example %} -
-
-
Media object
- Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -
- {% include icons/placeholder.svg width="64" height="64" class="ml-3" %} -
-{% endcapture %} -{% include example.html content=example %} - -## Media list - -Because the media object has so few structural requirements, you can also use these classes on list HTML elements. On your `