-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.html
69 lines (69 loc) · 2.89 KB
/
style.html
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
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>Style Example</title>
<!-- Load the required CSS file. -->
<link rel="stylesheet" type="text/css" href="../modules/style.css">
</head>
<body>
<div class="dlg-content-area">
<p>
The dialog style module is based on the Extension Manager look and feel,
with some adjustments.
This module is intended to unify the user experience between SketchUp
extension, and between extensions and native features.
</p>
<p>
Style elements as <strong>buttons</strong> by adding the class
<code>dlg-button</code>, or simply use a HTML button tag.
</p>
<button onclick="alert('Clicked Foo');">Foo</button>
<button onclick="alert('Clicked Bar');">Bar</button>
<p>
Add the class <code>dlg-button-call-to-action</code> for a call to action
button, styled in SketchUp red.
Typically there is only one call to action button at time in a dialog.
</p>
<p>
When using the controls module, the call to action button typically also
is the default action, denoted by the <code>dlg-default-action</code>
class.
</p>
<button class="dlg-button-call-to-action" onclick="alert('Clicked Foo');">Foo</button>
<button onclick="alert('Clicked Bar');">Bar</button>
<p>
The focused button is outlined in Trimble blue
(YAY, Trimble also got to have its color in this otherwise very SketchUppy color scheme).
This allows the user to see use the tab key to cycle through the commands.
This is functionality that is unfortunately too often omitted when design
only means appearance.
</p>
<button class="dlg-button-call-to-action" autofocus onclick="alert('Clicked Foo');">Foo</button>
<button onclick="alert('Clicked Bar');">Bar</button>
<p>
Text inputs are styled too.
</p>
<input type="text" value="some text" />
<p>
Disabled elements are styled to communicate their state.
</p>
<button disabled class="dlg-button-call-to-action" autofocus onclick="alert('Clicked Foo');">Foo</button>
<button disabled onclick="alert('Clicked Bar');">Bar</button>
<input disabled type="text" value="some text" />
<p>
For <strong>layout</strong>, wrap the commit buttons in an element with
the class <code>dlg-commit-buttons</code> and the rest of the dialog in an
element with the class <code>dlg-content-area</code>.
</p>
<p>
This places the commit buttons at the bottom, and adds a scrollbar to the
content if it doesn't fit above te fold.
</p>
</div>
<div class="dlg-commit-buttons">
<button class="dlg-button-call-to-action" onclick="alert('Clicked Foo');">Foo</button>
<button onclick="alert('Clicked Bar');">Bar</button>
</div>
</body>
</html>