Skip to content

Instantly share code, notes, and snippets.

@Saminou24
Created October 3, 2013 23:15
Show Gist options
  • Save Saminou24/6818560 to your computer and use it in GitHub Desktop.
Save Saminou24/6818560 to your computer and use it in GitHub Desktop.
A Pen by Thibaut.
<table class="datepicker">
<caption class="datepicker-caption">
<a href="#" class="datepicker-prev">Previous</a>
<span class="datepicker-title">April 2013</span>
<a href="#" class="datepicker-next">Next</a>
</caption>
<thead class="datepicker-head">
<tr>
<th class="datepicker-th">Mo</th>
<th class="datepicker-th">Tu</th>
<th class="datepicker-th">We</th>
<th class="datepicker-th">Th</th>
<th class="datepicker-th">Fr</th>
<th class="datepicker-th">Sa</th>
<th class="datepicker-th">Su</th>
</tr>
</thead>
<tbody class="datepicker-body">
<tr>
<td class="datepicker-td"><a href="#">1</a></td>
<td class="datepicker-td"><a href="#">2</a></td>
<td class="datepicker-td"><a href="#">3</a></td>
<td class="datepicker-td"><a href="#">4</a></td>
<td class="datepicker-td"><a href="#">5</a></td>
<td class="datepicker-td"><a href="#">6</a></td>
<td class="datepicker-td"><a href="#">7</a></td>
</tr>
<tr>
<td class="datepicker-td"><a href="#">8</a></td>
<td class="datepicker-td"><a href="#">9</a></td>
<td class="datepicker-td today"><a href="#">10</a></td>
<td class="datepicker-td"><a href="#">11</a></td>
<td class="datepicker-td"><a href="#">12</a></td>
<td class="datepicker-td"><a href="#">13</a></td>
<td class="datepicker-td"><a href="#">14</a></td>
</tr>
<tr>
<td class="datepicker-td"><a href="#">15</a></td>
<td class="datepicker-td"><a href="#">16</a></td>
<td class="datepicker-td"><a href="#">17</a></td>
<td class="datepicker-td"><a href="#">18</a></td>
<td class="datepicker-td"><a href="#">19</a></td>
<td class="datepicker-td"><a href="#">20</a></td>
<td class="datepicker-td"><a href="#">21</a></td>
</tr>
<tr>
<td class="datepicker-td"><a href="#">22</a></td>
<td class="datepicker-td"><a href="#">23</a></td>
<td class="datepicker-td"><a href="#">24</a></td>
<td class="datepicker-td"><a href="#">25</a></td>
<td class="datepicker-td"><a href="#">26</a></td>
<td class="datepicker-td"><a href="#">27</a></td>
<td class="datepicker-td"><a href="#">28</a></td>
</tr>
<tr>
<td class="datepicker-td"><a href="#">29</a></td>
<td class="datepicker-td"><a href="#">30</a></td>
<td class="datepicker-td off"><a href="#">1</a></td>
<td class="datepicker-td off"><a href="#">2</a></td>
<td class="datepicker-td off"><a href="#">3</a></td>
<td class="datepicker-td off"><a href="#">4</a></td>
<td class="datepicker-td off"><a href="#">5</a></td>
</tr>
</tbody>
</table>
/*
* Copyright (c) 2013 Thibaut Courouble
* http://www.cssflow.com
* Licensed under the MIT License
*
* Sass/SCSS source: http://goo.gl/itkvz
* PSD by Alexey Anatolievich: http://goo.gl/oLPEk
*/
body {
font: 12px/20px 'Lucida Grande', Verdana, sans-serif;
color: #404040;
background: #313944;
}
.datepicker {
position: relative;
margin: 30px auto;
padding: 4px;
font-size: 10px;
text-align: center;
background: #242930;
border: 1px solid #0e1013;
border-collapse: separate;
border-radius: 4px 4px 3px 3px;
-webkit-box-shadow: 0 1px #181c21, 0 2px #14171b, 0 3px 3px rgba(0, 0, 0, 0.3);
box-shadow: 0 1px #181c21, 0 2px #14171b, 0 3px 3px rgba(0, 0, 0, 0.3);
}
.datepicker:before, .datepicker:after {
content: '';
position: absolute;
top: -8px;
left: 50%;
width: 0;
height: 0;
margin-left: -4px;
border: 4px solid transparent;
border-bottom-color: #242930;
}
.datepicker:before {
top: -9px;
border-bottom-color: #14171b;
}
.datepicker-caption {
display: block;
position: relative;
line-height: 29px;
background: #333941;
border: 1px solid #1b1e24;
border-bottom-color: #181b21;
border-radius: 3px 3px 0 0;
background-image: -webkit-linear-gradient(top, #414b56, #323841 50%, #2b323a 50%, #252a31);
background-image: -moz-linear-gradient(top, #414b56, #323841 50%, #2b323a 50%, #252a31);
background-image: -o-linear-gradient(top, #414b56, #323841 50%, #2b323a 50%, #252a31);
background-image: linear-gradient(to bottom, #414b56, #323841 50%, #2b323a 50%, #252a31);
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.2);
}
.datepicker-prev,
.datepicker-next {
position: absolute;
top: 0;
bottom: 0;
width: 28px;
font: 0/0 a;
color: transparent;
}
.datepicker-prev:before, .datepicker-prev:after,
.datepicker-next:before,
.datepicker-next:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
margin-top: -6px;
border: 6px solid transparent;
}
.datepicker-prev:before,
.datepicker-next:before {
margin-top: -5px;
}
.datepicker-prev { left: 0; }
.datepicker-prev:before, .datepicker-prev:after { margin-left: -9px; }
.datepicker-prev:before { border-right-color: rgba(255, 255, 255, 0.1); }
.datepicker-prev:after { border-right-color: #181b21; }
.datepicker-next { right: 0; }
.datepicker-next:before, .datepicker-next:after { margin-left: -3px; }
.datepicker-next:before { border-left-color: rgba(255, 255, 255, 0.1); }
.datepicker-next:after { border-left-color: #181b21; }
.datepicker-title {
display: inline-block;
vertical-align: top;
line-height: 18px;
margin: 4px 0;
padding: 0 8px 1px;
font-weight: bold;
color: #8a99af;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
background: #242930;
border: 1px solid;
border-color: #151a1f #191c21 #1c2025;
border-radius: 2px;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px rgba(255, 255, 255, 0.08);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px rgba(255, 255, 255, 0.08);
}
.datepicker-head {
display: block;
background: #2a3139;
border: 1px solid #1b1e25;
border-width: 0 1px;
}
.datepicker-th {
width: 28px;
line-height: 24px;
padding-bottom: 1px;
font-weight: bold;
color: #18b165;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
border-bottom: 1px solid #232833;
}
.datepicker-body {
display: block;
background: #404854;
border: 1px solid #1b1e25;
border-top: 0;
border-radius: 0 0 3px 3px;
}
.datepicker-td {
width: 28px;
line-height: 26px;
padding-bottom: 1px;
color: #8ba0b8;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
border-bottom: 1px solid #323841;
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}
.datepicker-td > a {
display: block;
color: inherit;
text-decoration: none;
}
.datepicker-td > a:hover { color: #1dd87e; }
.datepicker-td.today {
color: white;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 0 14px rgba(255, 255, 255, 0.6);
}
.datepicker-td.off {
color: #677387;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
tr:last-child > .datepicker-td { border-bottom: 0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment