public
Last active

Ruby Polyfill

  • Download Gist
ruby-polyfill.css
CSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
/* Simplified version of http://www.useragentman.com/blog/2010/10/29/cross-browser-html5-ruby-annotations-using-css/
for use with Modernizr.load() */
 
ruby {
display: inline-table;
text-align: center;
border-collapse: collapse;
border: none;
vertical-align: middle;
border-bottom: solid 0.75em transparent;
}
 
ruby > rt,
rtc {
display: table-header-group;
}
 
ruby > rb,
rbc,
ruby > rt + rt,
rtc + rtc {
display: table-row;
}
 
ruby > rt + rt,
rtc + rtc {
border-bottom: hidden;
}
 
rb,
rbc,
rt,
rtc {
white-space: nowrap;
}
 
rtc > rt,
rbc > rb {
display: table-cell;
}
 
rtc > rt[rbspan] {
column-span: attr(rbspan);
}
 
ruby > rt,
rtc {
font-size: 0.5em;
line-height: 1.2em;
}
 
rp {
display: none;
}
 
ruby {
ruby-align: center;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.