|
|
(4 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| -- This module implements {{key press}}. | | -- This module implements {{key press}}. |
|
| |
|
| local kbdPrefix = | | local kbdPrefix = '<kbd class="keyboard-key nowrap">' |
| '<kbd class=' ..
| |
| '"keyboard-key nowrap" ' ..
| |
| 'style="border: 1px solid #aaa; ' ..
| |
| -- The following is an expansion of {{border-radius|0.2em}}
| |
| '-moz-border-radius: 0.2em; -webkit-border-radius: 0.2em; border-radius: 0.2em; ' ..
| |
| -- The following is an expansion of {{box-shadow|0.1em|0.1em|0.2em|rgba(0,0,0,0.1)}}
| |
| '-moz-box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); -webkit-box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); ' ..
| |
| 'background-color: #f9f9f9; ' ..
| |
| -- The following is an expansion of {{linear-gradient|top|#eee, #f9f9f9, #eee}}
| |
| 'background-image: -moz-linear-gradient(top, #eee, #f9f9f9, #eee); background-image: -o-linear-gradient(top, #eee, #f9f9f9, #eee); background-image: -webkit-linear-gradient(top, #eee, #f9f9f9, #eee); background-image: linear-gradient(to bottom, #eee, #f9f9f9, #eee); ' ..
| |
| -- Force black color to fix [[phab:T200258]]
| |
| 'color: #000; ' ..
| |
| 'padding: 0.1em 0.3em; ' ..
| |
| 'font-family: inherit; ' ..
| |
| 'font-size: 0.85em;">'
| |
|
| |
|
| local kbdSuffix = '</kbd>' | | local kbdSuffix = '</kbd>' |
Line 182: |
Line 167: |
| result:add(kbdPrefix .. text .. kbdSuffix) | | result:add(kbdPrefix .. text .. kbdSuffix) |
| end | | end |
| return result:join() | | return mw.getCurrentFrame():extensionTag{ |
| | name = 'templatestyles', args = { src = 'Template:Key press/styles.css'} |
| | } .. result:join() |
| end | | end |
|
| |
|