Skip to content

Commit

Permalink
Stylesheet rejig
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmcburnie committed Feb 27, 2024
1 parent c3cae57 commit a7acbec
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 20 deletions.
3 changes: 0 additions & 3 deletions docs/makeup-switch-style/docs.css → docs/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ li {
margin: 4px 0;
padding: 4px 8px;
}

span.makeup-switch,
makeup-switch-ssr,
makeup-switch {
margin-left: auto;
}
22 changes: 11 additions & 11 deletions docs/makeup-switch-element/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>makeup-switch-element</title>
<link href="../makeup-switch-style/docs.css" rel="stylesheet" />
<!-- <link href="../makeup-switch-style/theme-1.css" rel="stylesheet" /> -->
<link href="../makeup-switch-style/placeholder.css" rel="stylesheet" />
<link href="../docs.css" rel="stylesheet" />
<!-- <link href="../theme-1.css" rel="stylesheet" /> -->
<link href="skeleton.css" rel="stylesheet" />
<link rel="icon" href="../favicon.ico" type="image/x-icon">
</head>
<body>
Expand All @@ -19,7 +19,7 @@ <h2>Declarative</h2>
<span id="label1">makeup-switch 1</span>
<makeup-switch labelledby="label1">
<template shadowrootmode="open">
<link href="../makeup-switch-style/switch.css" rel="stylesheet" />
<link href="switch.css" rel="stylesheet" />
<span class="switch">
<span class="switch__control" role="switch" tabindex="0"></span>
<span class="switch__button"></span>
Expand All @@ -31,7 +31,7 @@ <h2>Declarative</h2>
<span id="label2">makeup-switch 2</span>
<makeup-switch labelledby="label2" checked>
<template shadowrootmode="open">
<link href="../makeup-switch-style/switch.css" rel="stylesheet" />
<link href="switch.css" rel="stylesheet" />
<span class="switch">
<span class="switch__control" role="switch" tabindex="0"></span>
<span class="switch__button"></span>
Expand All @@ -43,7 +43,7 @@ <h2>Declarative</h2>
<span id="label3">makeup-switch 3</span>
<makeup-switch labelledby="label3" disabled>
<template shadowrootmode="open">
<link href="../makeup-switch-style/switch.css" rel="stylesheet" />
<link href="switch.css" rel="stylesheet" />
<span class="switch">
<span class="switch__control" role="switch" tabindex="0"></span>
<span class="switch__button"></span>
Expand All @@ -55,7 +55,7 @@ <h2>Declarative</h2>
<span id="label4">makeup-switch 4</span>
<makeup-switch labelledby="label4" checked disabled>
<template shadowrootmode="open">
<link href="../makeup-switch-style/switch.css" rel="stylesheet" />
<link href="switch.css" rel="stylesheet" />
<span class="switch">
<span class="switch__control" role="switch" tabindex="0"></span>
<span class="switch__button"></span>
Expand All @@ -69,19 +69,19 @@ <h2>Imperative</h2>
<ul>
<li>
<span id="label5">makeup-switch 5</span>
<makeup-switch labelledby="label5" placeholder="true"></makeup-switch>
<makeup-switch labelledby="label5" skeleton="true"></makeup-switch>
</li>
<li>
<span id="label6">makeup-switch 6</span>
<makeup-switch labelledby="label6" placeholder="true" checked></makeup-switch>
<makeup-switch labelledby="label6" skeleton="true" checked></makeup-switch>
</li>
<li>
<span id="label7">makeup-switch 7</span>
<makeup-switch labelledby="label7" placeholder="true" disabled></makeup-switch>
<makeup-switch labelledby="label7" skeleton="true" disabled></makeup-switch>
</li>
<li>
<span id="label8">makeup-switch 8</span>
<makeup-switch labelledby="label8" placeholder="true" checked disabled></makeup-switch>
<makeup-switch labelledby="label8" skeleton="true" checked disabled></makeup-switch>
</li>
</ul>
</main>
Expand Down
2 changes: 1 addition & 1 deletion docs/makeup-switch-element/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/makeup-switch-element/index.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
makeup-switch[placeholder="true"] {
makeup-switch[skeleton="true"] {
align-items: center;
display: inline-flex;
height: 40px;
}
makeup-switch[placeholder="true"]::after {
makeup-switch[skeleton="true"]::after {
background-color: #eee;
border-radius: 400px;
content: '';
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/makeup-switch-element/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MakeupSwitchElement extends HTMLElement {
return ['checked', 'disabled', 'label', 'labelledby'];
}
connectedCallback(e) {
this.removeAttribute('placeholder');
this.removeAttribute('skeleton');
this.model._observeEvents();
}
disconnectedCallback(e) {
Expand Down
2 changes: 1 addition & 1 deletion packages/makeup-switch-element/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MakeupSwitchElement extends HTMLElement {
}

connectedCallback(e) {
this.removeAttribute('placeholder');
this.removeAttribute('skeleton');
this.model._observeEvents();
}

Expand Down

0 comments on commit a7acbec

Please sign in to comment.