Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added Medias code and documentation #3168

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants

Added media.less and edited bootstrap.less and responsive.less to manage media components.

Added a section to the documentation (Media, in components.html) outlining how Medias work. Edited bootstrap.css and bootstrap-responsive.css to add the code for the demos

Signed-off-by: Giuliano Velli wpbrains@giusi.org

Giuliano Velli Added Medias code and documentation
Added media.less and edited bootstrap.less and responsive.less to manage media components.

Added a section to the documentation (Media, in components.html) outlining how Medias work. Edited bootstrap.css and bootstrap-responsive.css to add the code for the demos

Signed-off-by: Giuliano Velli <wpbrains@giusi.org>
f5fd5e7

As proposed (by me) in issue 1711

twitter#1711

Contributor

barryvdh commented Apr 22, 2012

Well, it looks nice, but your pull request is against the master, instead of the current branch, 2.0.3.. (And the documentation could probably be a lot shorter and have to be changed in moustache); https://github.com/twitter/bootstrap/wiki/Contributing-to-Bootstrap

Looks like a nice addition though.

@barryvdh thanks for the suggestions, i can redo the the pull request; as for the documentation it was more a way to show how the component works than a real doc. Do you know how I can point a new pull request to and old issue? I opened the original issues for this, but when I made the pull request (my first time) he created this new one. I would like to attach the code to the original one. Thanks.

Contributor

barryvdh commented Apr 24, 2012

I don't know if you can attach the code, but you can reference the issue in your description by saying something like "Fix for Issue # 1711" (without the space)

Giuliano Velli added some commits Apr 20, 2012

Giuliano Velli Added Medias code and documentation
Fix for Issue #1711

Added media.less and edited bootstrap.less and responsive.less to
manage media components.

Added a section to the documentation (Media, in components.html) outlining how Medias work. Edited bootstrap.css and bootstrap-responsive.css to add the code for the demos

Signed-off-by: Giuliano Velli <wpbrains@giusi.org>
4fbb400
Giuliano Velli Merge branch 'media-component' of github.com:wpbrains/bootstrap into …
…media-component

Conflicts:
	docs/components.html

Signed-off-by: Giuliano Velli <wpbrains@giusi.org>
3aa89de

@giulianovelli giulianovelli reopened this Jun 20, 2012

Reopened the request that has been accidentally closed.

@mdo mdo commented on the diff Jul 10, 2012

less/media.less
+}
+
+@media (max-width: 480px) {
+ .media .pull-left,
+ .media .pull-right {
+ float: none;
+ display: block;
+ margin-bottom: 10px;
+ }
+ .media .pull-left {
+ margin-right: 0;
+ }
+ .media .pull-right {
+ margin-left: 0;
+ }
+}
@mdo

mdo Jul 10, 2012

Owner

Fix indenting here (2 spaces, not 4). Add comments for why we nuke the margins.

@mdo mdo commented on the diff Jul 10, 2012

less/media.less
+ border-bottom: none;
+}
+.medias > .media .media {
+ margin-bottom: 0;
+ padding-bottom: 0;
+ border-bottom: none;
+}
+
+// Media box
+.media-box {
+ margin-bottom: 19px;
+ padding: 10px;
+ background-color: #fff;
+ border: 1px solid rgba(0,0,0,.09);
+ .border-radius(4px);
+ .box-shadow(1px 1px 2px rgba(0, 0, 0, 0.1));
@mdo

mdo Jul 10, 2012

Owner

rgba(0,0,0,.1)—no extra spaces, no extra 0 before decimals.

@mdo mdo commented on the diff Jul 10, 2012

less/media.less
@@ -0,0 +1,68 @@
+// COMMON STYLES
+// -------------
+
+.media, .media-body {
@mdo

mdo Jul 10, 2012

Owner

Break selectors to two lines.

Also, add spaces after every :.

@mdo mdo commented on the diff Jul 10, 2012

less/media.less
+}
+.media .media-object {
+ display: block;
+}
+
+// Media list
+.medias {
+ margin-top: 20px;
+ margin-left: 0;
+ list-style-type: none;
+}
+.medias .media {
+ padding-bottom: 10px;
+ border-bottom: 1px solid rgba(0, 0, 0, .07);
+}
+.medias > .media:last-child {
@mdo

mdo Jul 10, 2012

Owner

No go in IE7—need an alternate approach.

@giulianovelli

giulianovelli Sep 6, 2012

What's exactly the no go ? The whole block of code or the selectors in the last line?

Owner

mdo commented Jul 10, 2012

Added a couple notes inline, but this needs a bit of touchup and should be submitted against 2.1.0-wip (or whatever the latest WIP branch is when you're ready). Go ahead and submit a new one when you're set please.

Thanks!

@mdo mdo closed this Jul 10, 2012

I will look into your notes as soon as possible, refine the cod eand submit again. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment