Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed styling bug of attribute hover in remix dialog.

  • Loading branch information...
commit 6c82ed325564a78178c8ec764a7373c7c8d3e295 1 parent 1ace988
@toolness authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 static-files/easy-remix-dialog/index.html
View
15 static-files/easy-remix-dialog/index.html
@@ -276,7 +276,19 @@ <h2 data-l10n="rendering-header">Preview</h2>
return attr;
}
- rendered.find("ul.attributes > li > .name").tipsy({
+ // Ugh, our CSS styling makes space before and the '=' after
+ // an attribute acquire the same hover style as the attribute
+ // name itself, which looks nasty, so we'll wrap the attribute
+ // name's text in an additional span and put our hover/click
+ // styling/handlers on that.
+ // TODO: Make it an anchor tag, not a span!
+ rendered.find("ul.attributes > li > .name").each(function() {
+ var name = $(this).text();
+ var wrappedName = $("<span></span>").text(name);
+ $(this).empty().append(wrappedName);
+ });
+
+ rendered.find("ul.attributes > li > .name span").tipsy({
html: false,
gravity: 'nw',
title: function() {
@@ -300,6 +312,7 @@ <h2 data-l10n="rendering-header">Preview</h2>
title: getElementDocs
});
+ // TODO: These should really be anchor tags, not click handlers.
rendered.find(".start > .name, .end > .name").click(function() {
window.open(BASE_MDN_HTML_ELEM_URL + $(this).text(), "info");
}).addClass("mdn-link");
Please sign in to comment.
Something went wrong with that request. Please try again.