WordPress.org

Support

Support » Plugins and Hacks » Crayon Syntax Highlighter » [Resolved] Custom CSS breaks with parens in theme name

[Resolved] Custom CSS breaks with parens in theme name

  • Minor issue. I just created a custom Crayon theme by duplicating an existing template and calling it While (1).

    The jQuery UI widgets in the theme creator rendered properly and the colours in the widgets seemed to correctly reflect the original theme’s colour selections.

    However, the live preview in the admin page and the existing crayons in posts were all completely unstyled. I fixed it by reduplicating the same original theme and giving it While One as a name.

    Enjoy!

    http://wordpress.org/extend/plugins/crayon-syntax-highlighter/

Viewing 1 replies (of 1 total)
  • Plugin Author akarmenia

    @akarmenia

    Thanks, that’s fixed now – if you try to name it “While (1)” it will name it “While 1”. This is because CSS element names can’t have parentheses and I’ve tried to keep the structure standardised with the folder names for themes. This means you can only use alphanumerics and spaces in the names of Themes. When Crayon looks through the themes folder to populate the dropdown of themes, it only checks the filenames to construct the theme names until you load the actual theme. This means the id and name functions are bijective and inverse:

    f(id) = name
    g(name) = id
    f(g(name)) = name
    g(f(id)) = id

    f(x) takes an id and replaces hyphens with spaces and turns it into Title Case.
    g(x) takes a name and replaces spaces with hyphens and turns it to lowercase.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Custom CSS breaks with parens in theme name’ is closed to new replies.
Skip to toolbar