summaryrefslogtreecommitdiff
path: root/addons/web/static/src/less/bootstrap_overridden.less
diff options
context:
space:
mode:
authorstefanorigano <sri@odoo.com>2017-08-26 13:48:45 +0200
committerqsm-odoo <qsm@odoo.com>2017-09-05 12:13:55 +0200
commit378fe92b6096d50648d6aa4aa22e8629f4531c14 (patch)
treeed897982d2d701b6f93f856dd80458023f55e036 /addons/web/static/src/less/bootstrap_overridden.less
parent1f78ae3c180120d51ff1ea1325d4aa832ca1b28d (diff)
[REF] web: add btn-links variations
Create variations for btn-link with UI color classes. These btns appear as default text (muted necessary) and they will use an UI color on hover.
Diffstat (limited to 'addons/web/static/src/less/bootstrap_overridden.less')
-rw-r--r--addons/web/static/src/less/bootstrap_overridden.less34
1 files changed, 34 insertions, 0 deletions
diff --git a/addons/web/static/src/less/bootstrap_overridden.less b/addons/web/static/src/less/bootstrap_overridden.less
index 4a677d8da87..1f3f22cac3a 100644
--- a/addons/web/static/src/less/bootstrap_overridden.less
+++ b/addons/web/static/src/less/bootstrap_overridden.less
@@ -108,9 +108,43 @@
}
//== Buttons
+// Mixin to define variations for btn-links and muted btn-links
+.o-btn-link-variant(@color, @color-active) {
+ text-transform: none;
+ .o-hover-text-color(@default-color: @color, @hover-color: @color-active);
+
+ &, &:hover, &:focus, &:active, &.active {
+ border-color: transparent;
+ background-color: transparent
+ }
+
+ &.text-muted, .text-muted {
+ .o-hover-opacity();
+ .o-hover-text-color(@default-color: @text-muted, @hover-color: @color-active);
+ }
+}
.btn-icon {
.button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
}
+.btn-link {
+ font-weight: @btn-font-weight;
+
+ &.btn-default {
+ .o-btn-link-variant(@text-color, @headings-color);
+ }
+ &.btn-success, &.text-success {
+ .o-btn-link-variant(@text-color, @brand-success);
+ }
+ &.btn-warning, &.text-warning {
+ .o-btn-link-variant(@text-color, @brand-warning);
+ }
+ &.btn-danger, &.text-danger {
+ .o-btn-link-variant(@text-color, @brand-danger);
+ }
+ &.btn-info, &.text-info {
+ .o-btn-link-variant(@text-color, darken(@brand-info, 20%));
+ }
+}
//== Printing improvements
@media print {