Skip to content

Commit 0e595ee

Browse files
authored
Base CSS (#10)
* Update composer.json * Add CSS reset * Add base typography styling * Add base form styling * Add base form component styling * Add base button styling * Add spacing helpers * Add simple styling to all pages
1 parent dce4dc0 commit 0e595ee

File tree

20 files changed

+296
-13
lines changed

20 files changed

+296
-13
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
"composer install",
4646
"php artisan migrate:fresh --seed",
4747
"npm install",
48-
"npm run dev"
48+
"npm run build"
4949
],
5050
"build:prod": [
5151
"composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev",
5252
"php artisan migrate",
5353
"npm install",
54-
"npm run prod"
54+
"npm run build"
5555
],
5656
"build:test": "composer install --no-interaction",
5757
"lint": [

resources/js/Components/AppButton.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@
2828
},
2929
};
3030
</script>
31+
32+
<style lang="scss">
33+
.btn {
34+
@include rem(16px);
35+
padding: 12px 20px;
36+
display: inline-flex;
37+
cursor: pointer;
38+
border-radius: border-radius(buttons);
39+
background-color: $ui-color-1;
40+
// Type
41+
font-weight: bold;
42+
color: #fff;
43+
}
44+
</style>

resources/js/Layouts/App.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<div class="app-page">
77
<div class="app-page__inner">
88
<Link :href="route('home')">Home</Link>
9-
<br>
9+
<br />
1010
<Link :href="route('account.edit')">Account</Link>
11-
<br>
11+
<br />
1212
<Link :href="route('logout')" method="post" as="button"
1313
>Logout</Link
1414
>
@@ -27,3 +27,17 @@
2727
},
2828
};
2929
</script>
30+
31+
32+
<style lang="scss">
33+
body {
34+
background-color: #eee;
35+
}
36+
37+
.app-page__inner {
38+
max-width: 900px;
39+
margin: 120px auto;
40+
padding: 60px;
41+
background-color: #fff;
42+
}
43+
</style>

resources/js/Layouts/Guest.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,16 @@
1919
},
2020
};
2121
</script>
22+
23+
<style lang="scss">
24+
body {
25+
background-color: #eee;
26+
}
27+
28+
.guest-page__inner {
29+
max-width: 600px;
30+
margin: 120px auto;
31+
padding: 60px;
32+
background-color: #fff;
33+
}
34+
</style>

resources/js/Pages/Account/Edit.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Head :title="title" />
33

4-
<h1 v-text="title"></h1>
4+
<h1 v-text="title" class="mt-regular mb-regular"></h1>
55

66
<form class="form" @submit.prevent="login">
77
<div class="form__section">
@@ -59,7 +59,7 @@
5959
</div>
6060

6161
<div class="form__row">
62-
<div class="form__item">
62+
<div class="form__action">
6363
<AppButton
6464
text="Update"
6565
tabindex="5"

resources/js/Pages/Index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Head :title="title" />
33

4-
<h1 v-text="title"></h1>
4+
<h1 v-text="title" class="mt-regular mb-regular"></h1>
55

66
<p v-if="userCan($page.props, 'create-posts')">User can create posts.</p>
77
</template>

resources/js/Pages/Login/Show.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Head :title="title" />
33

4-
<h1 v-text="title"></h1>
4+
<h1 v-text="title" class="mb-regular"></h1>
55

66
<form class="form" @submit.prevent="login">
77
<div class="form__section">
@@ -49,7 +49,7 @@
4949
</div>
5050

5151
<div class="form__row">
52-
<div class="form__item">
52+
<div class="form__action">
5353
<AppButton
5454
text="Login"
5555
tabindex="4"
@@ -60,7 +60,9 @@
6060
</div>
6161
</form>
6262

63-
<Link :href="route('register')">Register</Link>
63+
<div class="mt-regular">
64+
<Link :href="route('register')">Register</Link>
65+
</div>
6466
</template>
6567

6668
<script>

resources/js/Pages/Register/Show.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Head :title="title" />
33

4-
<h1 v-text="title"></h1>
4+
<h1 v-text="title" class="mb-regular"></h1>
55

66
<form class="form" @submit.prevent="login">
77
<div class="form__section">
@@ -60,7 +60,7 @@
6060
</div>
6161

6262
<div class="form__row">
63-
<div class="form__item">
63+
<div class="form__action">
6464
<AppButton
6565
text="Register"
6666
tabindex="5"
@@ -71,7 +71,9 @@
7171
</div>
7272
</form>
7373

74-
<Link :href="route('login')">Login</Link>
74+
<div class="mt-regular">
75+
<Link :href="route('login')">Login</Link>
76+
</div>
7577
</template>
7678

7779
<script>

resources/scss/app.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
@use "@scss/utilities/placeholders";
2+
3+
@import "@scss/common/reset", "@scss/common/typography", "@scss/common/forms", "@scss/common/spacing";
4+
5+
@import "@scss/components/form";
6+
17
body {
28
background-color: #fff;
39
}

resources/scss/common/_forms.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
input {
2+
width: 100%;
3+
height: 40px;
4+
padding: 10px;
5+
border-radius: border-radius(forms);
6+
border: border(form-fields);
7+
}
8+
9+
input[type="checkbox"],
10+
input[type="radio"] {
11+
width: 20px;
12+
height: 20px;
13+
padding: 0;
14+
}
15+
16+
label {
17+
@extend %text-small;
18+
}
19+
20+
button {
21+
cursor: pointer;
22+
appearance: none;
23+
border: none;
24+
background-color: transparent;
25+
}

0 commit comments

Comments
 (0)