From 98fddaa3557b1c872f1e585d579ec7e5e989e95d Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Fri, 25 Nov 2011 17:23:14 -0800 Subject: [PATCH] new plugin "collapse" for collapsible lists and "accordion" like support --- bootstrap.css | 28 ++++++- bootstrap.min.css | 2 + docs/assets/css/docs.css | 16 ++++ docs/javascript.html | 157 +++++++++++++++++++++++++++++++++------ js/bootstrap-collapse.js | 127 +++++++++++++++++++++++++++++++ lib/patterns.less | 23 ++++-- 6 files changed, 322 insertions(+), 31 deletions(-) create mode 100644 js/bootstrap-collapse.js diff --git a/bootstrap.css b/bootstrap.css index 895f1c8613..19d07745e4 100644 --- a/bootstrap.css +++ b/bootstrap.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Thu Nov 24 13:45:21 PST 2011 + * Date: Fri Nov 25 12:09:37 PST 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -1879,6 +1879,32 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { .fade.in { opacity: 1; } +.collapse { + position: relative; + overflow: hidden; +} +.collapse.height { + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -ms-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; + height: 0; +} +.collapse.height.in { + height: auto; +} +.collapse.width { + -webkit-transition: width 0.35s ease; + -moz-transition: width 0.35s ease; + -ms-transition: width 0.35s ease; + -o-transition: width 0.35s ease; + transition: width 0.35s ease; + width: 0; +} +.collapse.width.in { + width: auto; +} .label { padding: 1px 3px 2px; font-size: 9.75px; diff --git a/bootstrap.min.css b/bootstrap.min.css index 333e4db18c..f0e1a8dec4 100644 --- a/bootstrap.min.css +++ b/bootstrap.min.css @@ -278,6 +278,8 @@ button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0; .alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;} .well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} .fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} +.collapse{position:relative;overflow:hidden;}.collapse.height{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;height:0;}.collapse.height.in{height:auto;} +.collapse.width{-webkit-transition:width 0.35s ease;-moz-transition:width 0.35s ease;-ms-transition:width 0.35s ease;-o-transition:width 0.35s ease;transition:width 0.35s ease;width:0;}.collapse.width.in{width:auto;} .label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;} .label.warning{background-color:#f89406;} .label.success{background-color:#46a546;} diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index cde8ff1e0d..0873d443f6 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -473,3 +473,19 @@ h2 + table { } } +#accordion dt a{ + display:block; + padding: 9px 15px; + line-height: 1; + background-color: whiteSmoke; + border: 1px solid #EEE; + border-top-color: #fff; +} + +#accordion dt:first-child a { + border-top-color:#eee; +} + +#accordion dd p { + padding: 10px; +} \ No newline at end of file diff --git a/docs/javascript.html b/docs/javascript.html index f625e2323c..fae1038566 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -37,6 +37,7 @@ +