Posts made by David Scotson

I agree with this diagnosis, though I think the fundamental reason is in YUI_combo.php, line 398 (not sure how that translates into the actual original file) where it sets

th, td {
    border: 1px solid rgb(0, 0, 0);
    padding: 0.5em;
}

This would add a border to every table cell in Moodle, so the line in core.css seem like a heavy handed fix for this issue.

I'm fairly suprised that YUI could add this and not cause widespread uproar, and on Googling to see if anyone else was complaining about it I found the bug MDL-27774 which claims the issue was fixed a few days ago.

Actually, on a second read, it seems like it was marked fixed by mistake.

I really like the way the text "Beach Hut" and "Moodle Studio" looks there, the combination of distinctive display font and color choice makes it seem like a custom logo rather than "real" text.

A neat twist would be to let users specify a short bit of text, and a color, then select a Google Font. Google lets you tell them what text you want to display by adding text=Blah to the end of their font URL and they only send the bits of the font you require to make it faster to load (http://googlewebfonts.blogspot.co.uk/2011/04/streamline-your-web-font-requests.html).

You can then add all sorts of text effects with CSS3 (e.g. http://www.1stwebdesigner.com/css/css3-text-effects-typography/). I wonder if you can recreate the Moodle logo just with CSS?

Is the setting:whatever stuff part of core Moodle or do you need to add that to the csspostprocessor yourself?

I'm getting my theme CSS from upstream sources, so it would actually be best for me if I didn't have to manually edit the CSS at all in order to get it to work with Moodle. So I'm currently doing this:

function processor($css, $theme) {

    $find[] = "../img/glyphicons-halflings";
    $replace[] = current_theme() . '/pix/glyphicons-halflings';

    $find[] = "../font/fontawesome-webfont";
    $replace[] = current_theme() . '/font/fontawesome-webfont';

    return str_replace($find, $replace, $css);
}

As far as I can tell (and semi-confirmed by one of the comments in the code you point to) the CSS and images are always created from the same place in the theme directory, so you can create relatively straightforward relative links as long as you know the theme name as that gives you the directory.

So I think just hardcoding "theme_name/folder_within_theme/item.ext" should work for fonts (and images too, if you know for sure what the extension is going to be).

The only difficulty then is that if you rename the font directory then things will break until you do some find'n'replace. It might make sense to have a

theme

variable that can be used for those purposes.

edit: so that explains why people keep leaving links to non-existing docs pages, you need to escape the double square brackets!

Moodle in English -> Themes -> CSS files in subfolders?

by David Scotson -

Is it possible to locate some of your CSS files in subfolders?

I've got a bunch of sub-themes that I'm getting from a 3rd party source, and they're all formatted sub-theme-name/bootstrap.css.

I'm trying to create a settings page to switch between them, so I'd like to point to a file in one of the subfolders. The obvious thing of adding "folder/name" to ->sheets didn't seem to work.

Average of ratings: -