# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8

__all__ = (
    'load',
)

from . import ui

BPSUPPL_CSS = "bpsuppl.css"
def load(prefix=None, suppl=True):
    if prefix is None:
        prefix = "/static/blueprint/"
        bpsuppl = "/static/%s" % BPSUPPL_CSS
    else:
        pprefix = path.split(prefix)[0]
        bpsuppl = path.join(pprefix, BPSUPPL_CSS)
        if not prefix.endswith("/"): prefix = prefix + "/"
    lines = [
        ui.css("%sscreen.css" % prefix, "screen, projection"),
        ui.css("%sprint.css" % prefix, "print"),
        u"<!--[if lt IE 8]>",
        ui.css("%sie.css" % prefix, "screen, projection"),
        u"<![endif]-->",
    ]
    if suppl:
        lines.extend([
            ui.css(bpsuppl),
        ])
    return u"\n".join(lines)

