mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Rename "underline" class to accelerator to preserve separation of semantics & presentation.
This commit is contained in:
parent
52ba45f458
commit
0301dccdda
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
sphinx.roles
|
sphinx.roles
|
||||||
@ -231,11 +232,11 @@ def menusel_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
|
|||||||
textnode = nodes.Text(span)
|
textnode = nodes.Text(span)
|
||||||
node += textnode
|
node += textnode
|
||||||
continue
|
continue
|
||||||
underline_node = nodes.inline()
|
accel_node = nodes.inline()
|
||||||
letter_node = nodes.Text(span[0])
|
letter_node = nodes.Text(span[0])
|
||||||
underline_node += letter_node
|
accel_node += letter_node
|
||||||
underline_node['classes'].append('underline')
|
accel_node['classes'].append('accelerator')
|
||||||
node += underline_node
|
node += accel_node
|
||||||
textnode = nodes.Text(span[1:])
|
textnode = nodes.Text(span[1:])
|
||||||
node += textnode
|
node += textnode
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ dl.glossary dt {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.underline {
|
.accelerator {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user