Commit a70c391c by E. Kolpakov

Better approach to inlining html light child output

parent 19082640
...@@ -51,6 +51,8 @@ class HTMLBlock(LightChild): ...@@ -51,6 +51,8 @@ class HTMLBlock(LightChild):
block.light_children = [] block.light_children = []
node.tag = 'div' node.tag = 'div'
node_classes = (cls for cls in [node.get('class', ''), 'html_child'] if cls)
node.set('class', " ".join(node_classes))
block.content = unicode(etree.tostring(node)) block.content = unicode(etree.tostring(node))
node.tag = 'html' node.tag = 'html'
......
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
line-height: 1.3; line-height: 1.3;
} }
.mentoring .choices-list .choice-text > div.xblock-light-child, .mentoring .choices-list .choice-text > .xblock-light-child,
.mentoring .choices-list .choice-text > div.xblock-light-child > div{ .mentoring .choices-list .choice-text > .xblock-light-child > .html_child{
/* /*
HTML Light Child content is wrapped in two divs: div.xblock-light-child and just div HTML Light Child content is wrapped in two divs: div.xblock-light-child and just div
On the other hand, choice are usually rendered inline. On the other hand, choice are usually rendered inline.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment