Skip to content

Commit d370fca

Browse files
style(table): init css style
1 parent 19e32ff commit d370fca

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

js/PureCSS/Table.vue

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="dt-container">
33
<div class="table-filters">
44
<slot
55
name="tableFilter"
@@ -11,6 +11,7 @@
1111
v-if="hasFilters"
1212
:filters="filters"
1313
:on-change="changeFilterValue"
14+
:translations="translations"
1415
/>
1516
</slot>
1617

@@ -24,6 +25,7 @@
2425
v-if="search && search.global"
2526
:value="search.global.value"
2627
:on-change="changeGlobalSearchValue"
28+
:translations="translations"
2729
/>
2830
</div>
2931
</slot>
@@ -40,6 +42,7 @@
4042
:rows="search"
4143
:new="newSearch"
4244
:on-add="enableSearch"
45+
:translations="translations"
4346
/>
4447
</slot>
4548

@@ -53,6 +56,7 @@
5356
v-if="hasColumns"
5457
:columns="columns"
5558
:on-change="changeColumnStatus"
59+
:translations="translations"
5660
/>
5761
</slot>
5862
</div>
@@ -72,6 +76,7 @@
7276
:new="newSearch"
7377
:on-remove="disableSearch"
7478
:on-change="changeSearchValue"
79+
:translations="translations"
7580
/>
7681
</slot>
7782

@@ -125,14 +130,61 @@ export default {
125130
};
126131
</script>
127132
<style>
128-
:root {
133+
.dt-container {
129134
--dt-text-opacity: 1;
130135
--dt-bg-opacity: 1;
131136
--dt-divide-y-reverse: 0;
132137
--dt-divide-opacity: 1;
133138
--dt-border-opacity: 1;
134139
--dt-input-border-color: 209, 213, 219;
135140
}
141+
142+
.dt-container [type="button"],
143+
.dt-container [type="reset"],
144+
.dt-container [type="submit"],
145+
.dt-container button {
146+
/* -webkit-appearance: button; */
147+
-webkit-appearance: none;
148+
/* background-color: transparent; */
149+
background-image: none;
150+
}
151+
.dt-container input {
152+
padding-top: 0.5rem;
153+
padding-right: 0.75rem;
154+
padding-bottom: 0.5rem;
155+
padding-left: 0.75rem;
156+
}
157+
158+
.dt-container .sr-only {
159+
position: absolute;
160+
width: 1px;
161+
height: 1px;
162+
padding: 0;
163+
margin: -1px;
164+
overflow: hidden;
165+
clip: rect(0, 0, 0, 0);
166+
white-space: nowrap;
167+
border-width: 0;
168+
}
169+
170+
.dt-container select {
171+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
172+
background-position: right 0.5rem center;
173+
background-repeat: no-repeat;
174+
background-size: 1.5em 1.5em;
175+
padding-right: 2.5rem;
176+
print-color-adjust: exact;
177+
appearance: none;
178+
background-color: #fff;
179+
padding-bottom: 0.5rem;
180+
padding-left: 0.75rem;
181+
font-size: 1rem;
182+
line-height: 1.5rem;
183+
padding-top: 0.5rem;
184+
border-width: 0;
185+
--dt-shadow: 0 0 #0000;
186+
text-transform: none;
187+
}
136188
</style>
137189

138190
<style scoped>

0 commit comments

Comments
 (0)