David Scotson的帖子

Moodle in English -> Themes -> Bootstrap v3

David Scotson -
In case anyone is interested I've done the initial conversion of Bootstrapbase to use the (as yet unfinished and unreleased) next version of the upstream Bootstrap.

Mostly this involves updating the less files they provide and lots of simple search and replace (e.g. @linkColorHover is now @link-hover-color) on the less files we wrote.

The biggest thing not yet done is faking the CSS grid to align the form elements, but I'm a bit burned out on CSS hacks at the moment so I'm going to focus on renderers (that can be used across Bootstrap2, Bootstrap3 & YUI Pure, etc.) in the short term and come back to that later.

https://tracker.moodle.org/browse/MDL-40177

I've got a theme based on Bootstrapbase & Clean, but backported to 2.4. It's got a text entry area in the theme settings that lets you add some extra CSS.

If you were adding CSS to that box on a live site (i.e. not in theme developer mode) what would you expect to happen? Would the changes be reflected instantly? Would you have to clear the theme caches? Or would you have to "purge all caches"?

I currently seem to have to do the latter, "purge all caches" in order to see a change, but as with all sorts of caches it can be a bit tricky to figure out exactly what has changed when. What is supposed to happen? I would have expected one of the first two options.
<div class="navbar">
  <a class="navbar-brand" href="#">Title</a>

  <ul class="nav navbar-nav"><li class="active"><a href="#">Home</a></li>
    <li><a href="#">Link</a></li>
    <li class="disabled"><a href="#">Disabled</a></li>
    <li>
    <a href="#" class="dropdown-toggle">Dropdown <b class="caret"></b></a>
      <ul class="dropdown-menu"><li><a href="#">Regular link</a></li>
        <li class="disabled"><a href="#">Disabled link</a></li>
        <li class="divider"></li>
        <li><a href="#">Another link</a></li>
      </ul></li>
  </ul></div>

vs.

<div class="pure-menu pure-menu-open pure-menu-horizontal">
  <a href="#" class="pure-menu-heading">Site Title</a>

  <ul><li class="pure-menu-selected"><a href="#">Home</a></li>
    <li><a href="#">Flickr</a></li>
    <li class="pure-menu-disabled"><a href="#">Disabled Item</a></li>
    <li>
        <a href="#">Other</a>
        <ul><li class="pure-menu-heading">More from Yahoo!</li>
            <li class="pure-menu-separator"></li>
            <li><a href="#">Autos</a></li>
            <li><a href="#">Flickr</a></li>      
            <li><a href="#">Answers</a></li>
       </ul></li>
  </ul></div>

So we're talking pretty darn close for most things since they both follow standard industry practices for the actual HTML.

I believe you are using the Bootstrap theme for Moodle 2.4 from the Plugins directory, so some of the documentation for core Moodle won't apply, but the general drift is the same:

For how to create CSS files after modifying .less files see here:

http://docs.moodle.org/dev/LESS

But for small changes overriding the CSS you want to change with more CSS is much easier.