Content-Length: 553565 | pFad | http://github.com/vueuse/vueuse/commit/f78be1cb52d17c103ce29a0fcb7c70d3684e7f15

81 docs: radio style (#4865) · vueuse/vueuse@f78be1c · GitHub
Skip to content

Commit f78be1c

Browse files
authored
docs: radio style (#4865)
1 parent 303b703 commit f78be1c

File tree

4 files changed

+37
-83
lines changed

4 files changed

+37
-83
lines changed

packages/.vitepress/theme/styles/demo.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,39 @@
135135
border: 1px solid var(--vp-c-border);
136136
}
137137

138+
.radio {
139+
@apply inline-flex items-center my-auto cursor-pointer select-none;
140+
}
141+
142+
.radio input {
143+
appearance: none;
144+
padding: 0;
145+
-webkit-print-color-adjust: exact;
146+
color-adjust: exact;
147+
display: inline-block;
148+
vertical-align: middle;
149+
background-origen: border-box;
150+
user-select: none;
151+
flex-shrink: 0;
152+
height: 1rem;
153+
width: 1rem;
154+
@apply bg-gray-400/30;
155+
@apply rounded-full h-4 w-4 select-none relative;
156+
@apply mr-1;
157+
--tw-ring-offset-width: 1px !important;
158+
--tw-ring-color: #8885 !important;
159+
--tw-ring-offset-color: transparent !important;
160+
}
161+
162+
.radio input:checked::after {
163+
content: '';
164+
@apply absolute inset-[3px] rounded-full bg-primary;
165+
}
166+
167+
.radio span {
168+
@apply ml-1.5 text-13px opacity-70;
169+
}
170+
138171
pre,
139172
.code-block {
140173
opacity: 0.8;

packages/core/useSpeechRecognition/demo.vue

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ watch(isListening, isListening => isListening ? null : selectedLanguage.value =
7171
>more details</a>
7272
</div>
7373
<div v-else>
74-
<div space-x-4>
74+
<div flex="~ items-center gap-x-4 wrap">
7575
<label class="radio">
7676
<input v-model="lang" value="en-US" type="radio">
7777
<span>English (US)</span>
@@ -119,49 +119,3 @@ watch(isListening, isListening => isListening ? null : selectedLanguage.value =
119119
</div>
120120
</div>
121121
</template>
122-
123-
<!-- <style scoped>
124-
.tag {
125-
padding: 0.3rem 0.6rem;
126-
margin-right: 0.5rem;
127-
border-radius: 4px;
128-
}
129-
</style> -->
130-
131-
<style scoped lang="postcss">
132-
input {
133-
--tw-ring-offset-width: 1px !important;
134-
--tw-ring-color: #8885 !important;
135-
--tw-ring-offset-color: transparent !important;
136-
}
137-
138-
.radio {
139-
@apply inline-flex items-center my-auto cursor-pointer select-none;
140-
}
141-
142-
.radio input {
143-
appearance: none;
144-
padding: 0;
145-
-webkit-print-color-adjust: exact;
146-
color-adjust: exact;
147-
display: inline-block;
148-
vertical-align: middle;
149-
background-origen: border-box;
150-
user-select: none;
151-
flex-shrink: 0;
152-
height: 1rem;
153-
width: 1rem;
154-
@apply bg-gray-400/30;
155-
@apply rounded-full h-4 w-4 select-none relative;
156-
@apply mr-1;
157-
}
158-
159-
.radio input:checked::after {
160-
content: '';
161-
@apply absolute inset-[3px] rounded-full bg-primary;
162-
}
163-
164-
.checkbox span {
165-
@apply ml-1.5 text-13px opacity-70;
166-
}
167-
</style>

packages/integrations/useChangeCase/demo.vue

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,9 @@ const changeCase = useChangeCase(input, type)
2121
<pre lang="yaml">{{ changeCase }}</pre>
2222
</template>
2323

24-
<style scoped lang="postcss">
25-
input {
26-
--tw-ring-offset-width: 1px !important;
27-
--tw-ring-color: #8885 !important;
28-
--tw-ring-offset-color: transparent !important;
29-
}
30-
24+
<style scoped>
3125
.radio {
3226
width: 9rem;
33-
@apply ml-2;
34-
@apply inline-flex items-center my-auto cursor-pointer select-none;
35-
}
36-
37-
.radio input {
38-
appearance: none;
39-
padding: 0;
40-
-webkit-print-color-adjust: exact;
41-
color-adjust: exact;
42-
display: inline-block;
43-
vertical-align: middle;
44-
background-origen: border-box;
45-
user-select: none;
46-
flex-shrink: 0;
47-
height: 1rem;
48-
width: 1rem;
49-
@apply bg-gray-400/30;
50-
@apply rounded-full h-4 w-4 select-none relative;
51-
@apply mr-1;
52-
}
53-
54-
.radio input:checked::after {
55-
content: '';
56-
@apply absolute inset-[3px] rounded-full bg-primary;
57-
}
58-
59-
.checkbox span {
60-
@apply ml-1.5 text-13px opacity-70;
27+
margin-left: 0.5rem;
6128
}
6229
</style>

packages/shared/useDateFormat/demo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const formatted = useDateFormat(useNow(), formatter, { locales: lang })
1616
Formatter Editor :
1717
</span>
1818
<input v-model="formatter" type="text">
19-
<div space-x-4>
19+
<div flex="~ items-center gap-x-4 wrap">
2020
<label class="radio">
2121
<input v-model="lang" value="en-US" type="radio">
2222
<span>English (US)</span>

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/vueuse/vueuse/commit/f78be1cb52d17c103ce29a0fcb7c70d3684e7f15

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy