Skip to content

Commit

Permalink
1.4.2 preview: Move styling to CSS file and toggle ui-alt-icon on swa…
Browse files Browse the repository at this point in the history
…tches
  • Loading branch information
Gabriel Schulhof committed Jun 2, 2014
1 parent f36f1bf commit 228ac93
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 10 deletions.
38 changes: 37 additions & 1 deletion css/tr.preview.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,40 @@

.preview .ui-content{
overflow-y: hidden !important;
}
}

/* Copying some things from the default theme's swatch a */
#alt-icon-preview-form {
background: none;
color: #333333;
text-shadow: 0 1px 0 #f3f3f3;
}

#alt-icon-preview-form .ui-btn {
background-color: #f6f6f6;
border-width: 1px;
border-style: solid;
border-color: #dddddd;
}

#alt-icon-preview-form a,
#alt-icon-preview-form a:visited {
color: #3388cc;
font-weight: bold;
}

#alt-icon-preview-form a:hover {
color: #005599;
}

#alt-icon-preview-form .ui-btn:hover {
background-color: #ededed;
}

#alt-icon-preview-form .ui-btn:active {
background-color: #e8e8e8;
}

#alt-icon-preview-form .ui-btn.ui-checkbox-on:after {
background-color: #3388cc;
}
14 changes: 5 additions & 9 deletions jqm/1.4.2/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,17 @@
event.preventDefault();
})
.on( "change", "#alt-icon-preview-checkbox", function() {
$( "body" ).toggleClass( "ui-alt-icon",
$( "#alt-icon-preview-checkbox" ).prop( "checked" ) );
$( ".swatch" )
.toggleClass( "ui-alt-icon",
$( "#alt-icon-preview-checkbox" ).prop( "checked" ) );
})
</script>
<style>
#alt-icon-preview-form {
border: 0;
}
</style>
</head>
<body>

<form id="alt-icon-preview-form" class="ui-body-a">
<form id="alt-icon-preview-form">
<label>Show alternative icons in preview<input type="checkbox" id="alt-icon-preview-checkbox" data-mini="true" data-wrapper-class="ui-btn-inline"></label>
See <a id="demo-link" class="ui-link" target="_blank" href="http://demos.jquerymobile.com/icons/#Blackvs.whiteiconsets">icon demos</a> for usage.
See <a id="demo-link" target="_blank" href="http://demos.jquerymobile.com/icons/#Blackvs.whiteiconsets">icon demos</a> for usage.
</form>

<div class="preview ui-shadow swatch">
Expand Down

0 comments on commit 228ac93

Please sign in to comment.