Wide Code

Categories

Component ID

1306436

Component name

Wide Code

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

640

Component created

Component changed

Component body

Wide blocks of text in code blocks can get cut off leaving important bits of information unavailable to the user. Wide code adds javascript to pre elements and automatically grows/shrinks those blocks on hover.

Leave your pre elements with overflow: scroll to allow non-javascript users to scroll to the content. The module adds javascript that takes care of the overflow rules. Then it adds an event on hover which measures the current width of the pre, grows to the needed width and returns it to the original size.

There is also preliminary support for jQuery Mobile tap events to allow mobile users to expand and contract the code areas.