Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
aa886db7
Commit
aa886db7
authored
Aug 20, 2011
by
addyosmani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding first round of visual changes to yui demo
parent
69a59e39
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
461 additions
and
15 deletions
+461
-15
todo-example/yuilibrary/css/style.css
todo-example/yuilibrary/css/style.css
+444
-9
todo-example/yuilibrary/index.html
todo-example/yuilibrary/index.html
+17
-6
No files found.
todo-example/yuilibrary/css/style.css
View file @
aa886db7
/*
#todo-app {
margin: 1em;
text-align: center;
}
}
*/
#todo-list
,
#todo-stats
{
...
...
@@ -31,13 +33,19 @@
.editing
.todo-edit
{
display
:
block
;
}
.todo-input
{
display
:
block
;
font-family
:
Helvetica
,
sans-serif
;
font-size
:
20px
;
line-height
:
normal
;
margin
:
5px
auto
0
;
width
:
466px
;
font-size
:
24px
;
font-family
:
inherit
;
line-height
:
1.4em
;
border
:
0
;
outline
:
none
;
padding
:
6px
;
width
:
420px
;
border
:
1px
solid
#999999
;
-moz-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
-webkit-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
-o-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
}
.todo-item
{
...
...
@@ -84,3 +92,430 @@
.todo-remove
:focus
.todo-remove-icon
{
visibility
:
visible
;
}
.editing
.todo-remove-icon
{
visibility
:
hidden
;
}
.todo-clear
{
display
:
block
;
float
:
right
;
line-height
:
20px
;
text-decoration
:
none
;
background
:
rgba
(
0
,
0
,
0
,
0.1
);
color
:
#555555
;
font-size
:
11px
;
margin-top
:
8px
;
padding
:
0
10px
1px
;
-moz-border-radius
:
12px
;
-webkit-border-radius
:
12px
;
-o-border-radius
:
12px
;
border-radius
:
12px
;
-moz-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
-1px
0
0
;
-webkit-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
-1px
0
0
;
-o-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
-1px
0
0
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
-1px
0
0
;
cursor
:
pointer
;
}
/************************************************/
body
{
margin
:
0
;
padding
:
0
;
font-family
:
Helvetica
;
color
:
#444
;
}
#surface
{
position
:
relative
;
margin
:
0
auto
;
width
:
600px
;
}
h1
{
position
:
relative
;
top
:
18px
;
z-index
:
2
;
margin
:
0
;
padding
:
0
;
width
:
100%
;
height
:
1.2em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
font-size
:
25px
;
font-weight
:
normal
;
}
#lists
{
position
:
absolute
;
top
:
50px
;
left
:
400px
;
z-index
:
2
;
}
dl
{
margin
:
0
;
padding
:
0
;
color
:
#555
;
}
dt
{
margin
:
0
0
5px
0
;
padding
:
0
;
font-size
:
20px
;
font-weight
:
normal
;
}
dd
{
margin
:
0
0
5px
15px
;
padding
:
0
;
font-size
:
17px
;
cursor
:
pointer
;
}
#page
{
float
:
left
;
position
:
relative
;
z-index
:
1
;
width
:
400px
;
height
:
600px
;
}
#page
{
}
h2
{
position
:
absolute
;
top
:
56px
;
left
:
77px
;
margin
:
0
;
font-size
:
30px
;
width
:
275px
;
height
:
1.2em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
font-weight
:
normal
;
}
/*ul { position: absolute; top: 116px; left: 80px; margin: 0; padding: 0; width: 275px; list-style: none; }*/
li
{
position
:
relative
;
margin
:
0
0
0
25px
;
padding
:
0
;
font-size
:
20px
;
line-height
:
27px
;
}
p
{
position
:
absolute
;
top
:
116px
;
left
:
80px
;
margin
:
0
;
padding
:
0
;
width
:
275px
;
font-size
:
20px
;
line-height
:
27px
;
}
[
contenteditable
]
:hover
{
outline
:
1px
dotted
#999
;
}
.new
{
opacity
:
.25
;
cursor
:
pointer
;
}
.new
:hover
{
opacity
:
.75
;
}
.trashcan
{
position
:
absolute
;
top
:
63px
;
left
:
57px
;
width
:
25px
;
height
:
25px
;
cursor
:
pointer
;
background
:
url(assets/destroy.png)
no-repeat
;
}
.trashcan
:hover
{
opacity
:
.75
;
}
li
.trashcan
{
float
:
right
;
left
:
95%
;
top
:
15px
;
}
#page
:hover
.trashcan
{
display
:
inline-block
;
}
/*todos*/
html
,
body
,
div
,
span
,
applet
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
acronym
,
address
,
big
,
cite
,
code
,
del
,
dfn
,
em
,
font
,
img
,
ins
,
kbd
,
q
,
s
,
samp
,
small
,
strike
,
strong
,
sub
,
sup
,
tt
,
var
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
{
margin
:
0
;
padding
:
0
;
border
:
0
;
outline
:
0
;
font-weight
:
inherit
;
font-style
:
inherit
;
font-size
:
100%
;
font-family
:
inherit
;
vertical-align
:
baseline
;
}
body
{
line-height
:
1
;
color
:
black
;
background
:
white
;
}
ol
,
ul
{
list-style
:
none
;
}
a
img
{
border
:
none
;
}
html
{
background
:
#eeeeee
;
}
body
{
font-family
:
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
14px
;
line-height
:
1.4em
;
background
:
#eeeeee
;
color
:
#333333
;
}
#todo-app
{
width
:
480px
;
margin
:
0
auto
40px
;
background
:
white
;
padding
:
20px
;
-moz-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
5px
6px
0
;
-webkit-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
5px
6px
0
;
-o-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
5px
6px
0
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
5px
6px
0
;
}
#todo-app
h1
{
font-size
:
36px
;
font-weight
:
bold
;
text-align
:
center
;
padding
:
20px
0
30px
0
;
line-height
:
1
;
}
#create-todo
{
position
:
relative
;
}
#create-todo
input
{
width
:
466px
;
font-size
:
24px
;
font-family
:
inherit
;
line-height
:
1.4em
;
border
:
0
;
outline
:
none
;
padding
:
6px
;
border
:
1px
solid
#999999
;
-moz-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
-webkit-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
-o-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
}
#create-todo
input
::-webkit-input-placeholder
{
font-style
:
italic
;
}
#create-todo
span
{
position
:
absolute
;
z-index
:
999
;
width
:
170px
;
left
:
50%
;
margin-left
:
-85px
;
}
#todo-list
{
margin-top
:
10px
;
}
#todo-list
li
{
padding
:
12px
20px
11px
0
;
position
:
relative
;
font-size
:
24px
;
line-height
:
1.1em
;
border-bottom
:
1px
solid
#cccccc
;
}
#todo-list
li
:after
{
content
:
"\0020"
;
display
:
block
;
height
:
0
;
clear
:
both
;
overflow
:
hidden
;
visibility
:
hidden
;
}
#todo-list
li
.editing
{
padding
:
0
;
border-bottom
:
0
;
}
#todo-list
.editing
.display
,
#todo-list
.edit
{
display
:
none
;
}
#todo-list
.editing
.edit
{
display
:
block
;
}
#todo-list
.editing
input
{
width
:
444px
;
font-size
:
24px
;
font-family
:
inherit
;
margin
:
0
;
line-height
:
1.6em
;
border
:
0
;
outline
:
none
;
padding
:
10px
7px
0px
27px
;
border
:
1px
solid
#999999
;
-moz-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
-webkit-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
-o-box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.2
)
0
1px
2px
0
inset
;
}
#todo-list
.check
{
position
:
relative
;
top
:
9px
;
margin
:
0
10px
0
7px
;
float
:
left
;
}
#todo-list
.done
.todo-content
{
text-decoration
:
line-through
;
color
:
#777777
;
}
#todo-list
.todo-destroy
{
position
:
absolute
;
right
:
5px
;
top
:
14px
;
display
:
none
;
cursor
:
pointer
;
width
:
20px
;
height
:
20px
;
background
:
url(destroy.png)
no-repeat
0
0
;
}
#todo-list
li
:hover
.todo-destroy
{
display
:
block
;
}
#todo-list
.todo-destroy
:hover
{
background-position
:
0
-20px
;
}
#todo-stats
{
*
zoom
:
1
;
margin-top
:
10px
;
color
:
#777777
;
}
#todo-stats
:after
{
content
:
"\0020"
;
display
:
block
;
height
:
0
;
clear
:
both
;
overflow
:
hidden
;
visibility
:
hidden
;
}
#todo-stats
.todo-count
{
float
:
left
;
}
#todo-stats
.todo-count
.number
{
font-weight
:
bold
;
color
:
#333333
;
}
#todo-stats
.todo-clear
{
float
:
right
;
}
#todo-stats
.todo-clear
a
{
color
:
#777777
;
font-size
:
12px
;
}
#todo-stats
.todo-clear
a
:visited
{
color
:
#777777
;
}
#todo-stats
.todo-clear
a
:hover
{
color
:
#336699
;
}
#instructions
{
width
:
520px
;
margin
:
10px
auto
;
color
:
#777777
;
text-shadow
:
rgba
(
255
,
255
,
255
,
0.8
)
0
1px
0
;
text-align
:
center
;
}
#instructions
a
{
color
:
#336699
;
}
#credits
{
width
:
520px
;
margin
:
30px
auto
;
color
:
#999
;
text-shadow
:
rgba
(
255
,
255
,
255
,
0.8
)
0
1px
0
;
text-align
:
center
;
}
#credits
a
{
color
:
#888
;
}
/*
* François 'cahnory' Germain
*/
.ui-tooltip
,
.ui-tooltip-top
,
.ui-tooltip-right
,
.ui-tooltip-bottom
,
.ui-tooltip-left
{
color
:
#ffffff
;
cursor
:
normal
;
display
:
-moz-inline-stack
;
display
:
inline-block
;
font-size
:
12px
;
font-family
:
arial
;
padding
:
.5em
1em
;
position
:
relative
;
text-align
:
center
;
text-shadow
:
0
-1px
1px
#111111
;
-webkit-border-top-left-radius
:
4px
;
-webkit-border-top-right-radius
:
4px
;
-webkit-border-bottom-right-radius
:
4px
;
-webkit-border-bottom-left-radius
:
4px
;
-khtml-border-top-left-radius
:
4px
;
-khtml-border-top-right-radius
:
4px
;
-khtml-border-bottom-right-radius
:
4px
;
-khtml-border-bottom-left-radius
:
4px
;
-moz-border-radius-topleft
:
4px
;
-moz-border-radius-topright
:
4px
;
-moz-border-radius-bottomright
:
4px
;
-moz-border-radius-bottomleft
:
4px
;
border-top-left-radius
:
4px
;
border-top-right-radius
:
4px
;
border-bottom-right-radius
:
4px
;
border-bottom-left-radius
:
4px
;
-o-box-shadow
:
0
1px
2px
#000000
,
inset
0
0
0
1px
#222222
,
inset
0
2px
#666666
,
inset
0
-2px
2px
#444444
;
-moz-box-shadow
:
0
1px
2px
#000000
,
inset
0
0
0
1px
#222222
,
inset
0
2px
#666666
,
inset
0
-2px
2px
#444444
;
-khtml-box-shadow
:
0
1px
2px
#000000
,
inset
0
0
0
1px
#222222
,
inset
0
2px
#666666
,
inset
0
-2px
2px
#444444
;
-webkit-box-shadow
:
0
1px
2px
#000000
,
inset
0
0
0
1px
#222222
,
inset
0
2px
#666666
,
inset
0
-2px
2px
#444444
;
box-shadow
:
0
1px
2px
#000000
,
inset
0
0
0
1px
#222222
,
inset
0
2px
#666666
,
inset
0
-2px
2px
#444444
;
background-color
:
#3b3b3b
;
background-image
:
-moz-linear-gradient
(
top
,
#555555
,
#222222
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
color-stop
(
0
,
#555555
),
color-stop
(
1
,
#222222
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorStr
=
#555555
,
EndColorStr
=
#222222
);
-ms-filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorStr
=
#555555
,
EndColorStr
=
#222222
);
}
.ui-tooltip
:after
,
.ui-tooltip-top
:after
,
.ui-tooltip-right
:after
,
.ui-tooltip-bottom
:after
,
.ui-tooltip-left
:after
{
content
:
"\25B8"
;
display
:
block
;
font-size
:
2em
;
height
:
0
;
line-height
:
0
;
position
:
absolute
;
}
.ui-tooltip
:after
,
.ui-tooltip-bottom
:after
{
color
:
#2a2a2a
;
bottom
:
0
;
left
:
1px
;
text-align
:
center
;
text-shadow
:
1px
0
2px
#000000
;
-o-transform
:
rotate
(
90deg
);
-moz-transform
:
rotate
(
90deg
);
-khtml-transform
:
rotate
(
90deg
);
-webkit-transform
:
rotate
(
90deg
);
width
:
100%
;
}
.ui-tooltip-top
:after
{
bottom
:
auto
;
color
:
#4f4f4f
;
left
:
-2px
;
top
:
0
;
text-align
:
center
;
text-shadow
:
none
;
-o-transform
:
rotate
(
-90deg
);
-moz-transform
:
rotate
(
-90deg
);
-khtml-transform
:
rotate
(
-90deg
);
-webkit-transform
:
rotate
(
-90deg
);
width
:
100%
;
}
.ui-tooltip-right
:after
{
color
:
#222222
;
right
:
-0.375em
;
top
:
50%
;
margin-top
:
-.05em
;
text-shadow
:
0
1px
2px
#000000
;
-o-transform
:
rotate
(
0
);
-moz-transform
:
rotate
(
0
);
-khtml-transform
:
rotate
(
0
);
-webkit-transform
:
rotate
(
0
);
}
.ui-tooltip-left
:after
{
color
:
#222222
;
left
:
-0.375em
;
top
:
50%
;
margin-top
:
.1em
;
text-shadow
:
0
-1px
2px
#000000
;
-o-transform
:
rotate
(
180deg
);
-moz-transform
:
rotate
(
180deg
);
-khtml-transform
:
rotate
(
180deg
);
-webkit-transform
:
rotate
(
180deg
);
}
/* new additions - cleanup required*/
/* line 109 */
#todo-app
#todo-stats
{
*
zoom
:
1
;
margin-top
:
10px
;
color
:
#555555
;
-moz-border-radius-bottomleft
:
5px
;
-webkit-border-bottom-left-radius
:
5px
;
-o-border-bottom-left-radius
:
5px
;
-ms-border-bottom-left-radius
:
5px
;
-khtml-border-bottom-left-radius
:
5px
;
border-bottom-left-radius
:
5px
;
-moz-border-radius-bottomright
:
5px
;
-webkit-border-bottom-right-radius
:
5px
;
-o-border-bottom-right-radius
:
5px
;
-ms-border-bottom-right-radius
:
5px
;
-khtml-border-bottom-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
background
:
#f4fce8
;
border-top
:
1px
solid
#ededed
;
padding
:
0
20px
;
line-height
:
36px
;
}
/* line 22, /opt/ree/lib/ruby/gems/1.8/gems/compass-0.10.5/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
#todo-app
#todo-stats
:after
{
content
:
"\0020"
;
display
:
block
;
height
:
0
;
clear
:
both
;
overflow
:
hidden
;
visibility
:
hidden
;
}
/* line 118 */
#todo-app
#todo-stats
.todo-done
{
float
:
left
;
}
/* line 120 */
#todo-app
#todo-stats
.todo-done
.number
{
font-weight
:
bold
;
color
:
#555555
;
}
/* line 123 */
#todos
{
display
:
block
}
todo-example/yuilibrary/index.html
View file @
aa886db7
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head>
<title>
Todo
</title>
<title>
YUIlibrary.js
</title>
<link
rel=
"stylesheet"
href=
"css/style.css"
type=
"text/css"
/>
</head>
<body>
...
...
@@ -10,14 +10,26 @@
<!-- This is the main container and "shell" for the todo app. -->
<div
id=
"todo-app"
>
<label
class=
"todo-label"
for=
"new-todo"
>
What do you want to do today?
</label>
<div
class=
"title"
>
<h1>
Todos
</h1>
</div>
<label
class=
"todo-label"
for=
"new-todo"
></label>
<input
type=
"text"
id=
"new-todo"
class=
"todo-input"
placeholder=
"
buy milk
"
>
placeholder=
"
What needs to be done?
"
>
<div
id=
"todos"
>
<ul
id=
"todo-list"
></ul>
</div>
<div
id=
"todo-stats"
></div>
</div>
<div
id=
"credits"
>
This version by
<br
/>
<a
href=
"http://twitter.com/addyosmani"
>
Addy Osmani
</a>
<br
/>
based on code by the YUILibrary team.
</div>
<!-- This template HTML will be used to render each todo item. -->
...
...
@@ -45,8 +57,7 @@
<
/span
>
<
a
href
=
"
#
"
class
=
"
todo-clear
"
>
Clear
<
span
class
=
"
todo-done
"
>
{
numDone
}
<
/span
>
completed
<
span
class
=
"
todo-done-label
"
>
{
doneLabel
}
<
/span
>
Clear
{
numDone
}
completed
<
span
class
=
"
todo-done-label
"
>
{
doneLabel
}
<
/span
>
<
/a
>
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment