Quantcast
Channel: XWiki Forum - Latest topics
Viewing all articles
Browse latest Browse all 1369

StyleSheetExtension : how to extend bootstrap classes with LESS

$
0
0

I created an XWiki.StyleSheetExtension object with the following LESS code, which works just fine. Applying myClass to an element does indeed apply the CSS styles defined by the classes myClass1 and myClass2 :

.myClass1 {
  /* some CSS style */
}

.myClass2 {
  /* some more CSS style */
}

.myClass {
  &:extend(.myClass1, .myClass2);
}

Now, I’d like to create a class that extends the bootstrap classes table-bordered, table-striped, table-condensed and table-hover. Something like :

.myClass {
  &:extend(.table-bordered, .table-striped, .table-condensed, .table-hover);
}

I quite often apply those 4 classes to tables, so I’d like to have a more concise way to do this, e.g. I’d like to have to apply only 1 class (myClass) instead of all 4.

But it doesn’t work. I guess LESS doesn’t know where to find those classes (which are defined in skins/flamingo/less/bootstrap/tables.less).

Any idea how to make it work ?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1369

Trending Articles