Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors changes #580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/css/components/pagination.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.pagination-button {
@apply !font-semibold !font-sans !border !border-border !rounded !bg-white !text-neutral !shadow;
@apply !font-semibold !font-sans !border !border-inactive-110 !rounded !bg-white !text-neutral !shadow;
}

.pagination-button.active {
Expand Down
6 changes: 3 additions & 3 deletions resources/css/components/price-slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ div.vue-slider-rail {
}

div.vue-slider-rail {
@apply bg-highlight !important;
@apply bg-inactive-100 !important;
}

div.vue-slider .vue-slider-dot {
@apply size-6 !important;
}

div.vue-slider-dot-tooltip-inner {
@apply bg-white text-neutral border-border border px-1.5 !important;
@apply bg-white text-neutral border-inactive-110 border px-1.5 !important;
}

span.vue-slider-dot-tooltip-text {
Expand All @@ -28,7 +28,7 @@ div.vue-slider-dot-tooltip::before {
}

div.vue-slider-dot .vue-slider-dot-handle {
@apply border border-border shadow;
@apply border border-inactive-110 shadow;
}

div.vue-slider-tooltip-wrap.vue-slider-tooltip-top {
Expand Down
6 changes: 4 additions & 2 deletions resources/css/theme-variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
--secondary-text: 255 255 255;
--neutral: 51 65 85;
--inactive: 100 116 139;
--highlight: 241 245 249;
--border: 231 235 239;
--inactive-100: 241 245 249;
--inactive-110: 231 235 239;
--disabled: 235 232 222;
--enhanced: 54 180 34;
}
2 changes: 1 addition & 1 deletion resources/views/checkout/steps/credentials.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 class="mb-5 text-4xl font-bold">@lang('Credentials')</h1>

<form v-on:submit.prevent="save(['credentials'], 3)" class="flex flex-col gap-5 rounded bg-highlight p-4 md:p-8">
<form v-on:submit.prevent="save(['credentials'], 3)" class="flex flex-col gap-5 rounded bg-inactive-100 p-4 md:p-8">
<div class="flex flex-col gap-2">
<div class="grid grid-cols-12 gap-4">
<p class="col-span-12 text-2xl font-bold">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/checkout/steps/payment.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@php($checkoutAgreements = \Rapidez\Core\Models\CheckoutAgreement::all())

<h1 class="font-bold text-4xl mb-5">@lang('Payment method')</h1>
<form class="bg-highlight p-8 rounded mt-6" v-on:submit.prevent="save(['payment_method'], 4)">
<form class="bg-inactive-100 p-8 rounded mt-6" v-on:submit.prevent="save(['payment_method'], 4)">
<div class="my-2 border bg-white p-4 rounded" v-for="(method, index) in checkout.payment_methods">
<x-rapidez::radio
v-bind:value="method.code"
Expand Down
10 changes: 5 additions & 5 deletions resources/views/checkout/steps/success.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<template slot-scope="{ order, hideBilling, shipping, billing, items }">
<div dusk="checkout-success" v-cloak v-if="order">
<h1 class="font-bold text-4xl mb-5">@lang('Order placed succesfully')</h1>
<div class="bg-highlight rounded p-8">
<div class="bg-inactive-100 rounded p-8">
<p>@lang('We will get to work for you right away')</p>
<p>@lang('We will send a confirmation of your order to') <span class="font-bold">@{{ order.customer_email }}</span></p>
</div>
Expand Down Expand Up @@ -41,7 +41,7 @@ class="mx-auto"
</div>
</div>
<div class="flex flex-col mt-4 gap-x-4 md:flex-row">
<div class="w-full p-8 bg-highlight rounded border-l-2 border-neutral md:w-1/2" v-if="billing">
<div class="w-full p-8 bg-inactive-100 rounded border-l-2 border-neutral md:w-1/2" v-if="billing">
<p class="text-neutral font-lg font-bold mb-2">@lang('Billing address')</p>
<ul>
<li>@{{ billing.firstname }} @{{ billing.lastname }}</li>
Expand All @@ -50,7 +50,7 @@ class="mx-auto"
<li>@{{ billing.telephone }}</li>
</ul>
</div>
<div class="w-full p-8 bg-highlight rounded border-l-2 border-neutral mt-4 md:mt-0 md:w-1/2" v-if="shipping">
<div class="w-full p-8 bg-inactive-100 rounded border-l-2 border-neutral mt-4 md:mt-0 md:w-1/2" v-if="shipping">
<p class="text-neutral font-lg font-bold mb-2">@lang('Shipping address')</p>
<ul>
<li>@{{ shipping.firstname }} @{{ shipping.lastname }}</li>
Expand All @@ -62,11 +62,11 @@ class="mx-auto"
</div>

<div class="flex flex-col mt-4 gap-x-4 md:flex-row">
<div class="w-full p-8 bg-highlight rounded border-l-2 border-neutral md:w-1/2">
<div class="w-full p-8 bg-inactive-100 rounded border-l-2 border-neutral md:w-1/2">
<p class="text-neutral font-lg font-bold mb-2">@lang('Shipping method')</p>
<p>@{{ order.shipping_description }}</p>
</div>
<div class="w-full p-8 bg-highlight rounded border-l-2 border-neutral mt-4 md:mt-0 md:w-1/2">
<div class="w-full p-8 bg-inactive-100 rounded border-l-2 border-neutral mt-4 md:mt-0 md:w-1/2">
<p class="text-neutral font-lg font-bold mb-2">@lang('Payment method')</p>
<p v-for="method in order.sales_order_payments">@{{ method.additional_information.method_title || method.additional_information.raw_details_info.method_title }}</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/button/primary.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<x-rapidez::button.base {{ $attributes->class('bg-primary text-primary-text') }}>
<x-rapidez::button.base {{ $attributes->class('bg-primary text-white') }}>
{{ $slot }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So when the primary color is a light color; the text is unreadable and you've to override this template?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, buttons are always custom in projects. there's not much to override either since its only classes you would add to a base.blade.php or index.blade.php

</x-rapidez::button.base>
2 changes: 1 addition & 1 deletion resources/views/components/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'type' => 'text',
'placeholder' => __($placeholder ?? ''),
'dusk' => $attributes->get('v-bind:dusk') ? null : $name,
'class' => 'w-full py-2 px-3 border-border rounded !ring-0 focus:!border-inactive sm:text-sm text-neutral',
'class' => 'w-full py-2 px-3 border-inactive-110 rounded !ring-0 focus:!border-inactive sm:text-sm text-neutral',
]) }}
>
</div>
2 changes: 1 addition & 1 deletion resources/views/components/textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
'name' => $name,
'placeholder' => __($placeholder ?? ucfirst($name)),
'dusk' => $attributes->get('v-bind:dusk') ? null : $name,
'class' => 'w-full py-2 px-3 border-border rounded !ring-0 focus:!border-inactive sm:text-sm text-neutral',
'class' => 'w-full py-2 px-3 border-inactive-110 rounded !ring-0 focus:!border-inactive sm:text-sm text-neutral',
]) }}></textarea>
</div>
2 changes: 1 addition & 1 deletion resources/views/listing/products.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@php $dropdownClasses = '!h-auto !border-solid !border !border-border !rounded !py-2 !ring-0 focus:!border-inactive !text-sm !text-neutral !outline-none ' @endphp
@php $dropdownClasses = '!h-auto !border-solid !border !border-inactive-110 !rounded !py-2 !ring-0 focus:!border-inactive !text-sm !text-neutral !outline-none ' @endphp
<reactive-list
id="products"
component-id="products"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/product/overview.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<div>
<div class="mb-2 border-t pt-5 text-lg font-bold">@lang('Specifications')</div>
<dl class="flex flex-col text-inactive [&>dd]:rounded [&>dd]:p-2 odd:[&>dd]:bg-highlight odd:[&>dd]:font-semibold odd:[&>dd]:text-neutral even:[&>dd]:pl-4">
<dl class="flex flex-col text-inactive [&>dd]:rounded [&>dd]:p-2 odd:[&>dd]:bg-inactive-100 odd:[&>dd]:font-semibold odd:[&>dd]:text-neutral even:[&>dd]:pl-4">
<dd>ID</dd>
<dd>{{ $product->entity_id }}</dd>
<dd>SKU</dd>
Expand All @@ -54,7 +54,7 @@
</div>
</div>
@if (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
<div class="my-5 py-8 bg-highlight min-h-[515px]">
<div class="my-5 py-8 bg-inactive-100 min-h-[515px]">
<div class="container grid w-full grid-cols-1 gap-5 p-5 md:grid-cols-3">
@include('rapidez-reviews::form', ['sku' => $product->sku])
<div class="md:col-span-2">
Expand Down
22 changes: 10 additions & 12 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ module.exports = {
theme: {
extend: {
colors: {
primary: {
DEFAULT: 'rgb(var(--primary) / <alpha-value>)', // Theme color
text: 'rgb(var(--primary-text) / <alpha-value>)', // Text color that goes onto primary color
},
secondary: {
DEFAULT: 'rgb(var(--secondary) / <alpha-value>)', // Conversion color
text: 'rgb(var(--secondary-text) / <alpha-value>)', // Text color that goes onto secondary color
},
primary: 'rgb(var(--primary) / <alpha-value>)', // Theme color
secondary: 'rgb(var(--secondary) / <alpha-value>)', // Conversion color
neutral: 'rgb(var(--neutral) / <alpha-value>)', // Default text color
inactive: 'rgb(var(--inactive) / <alpha-value>)', // Inactive text color
highlight: 'rgb(var(--highlight) / <alpha-value>)', // Background highlight color
border: 'rgb(var(--border) / <alpha-value>)', // Border color
enhanced: 'rgb(var(--enhanced) / <alpha-value>)', // Enhanced color
disabled: 'rgb(var(--disabled) / <alpha-value>)', // Disabled color
inactive: {
DEFAULT: 'rgb(var(--inactive) / <alpha-value>)', // Inactive text color
100: 'rgb(var(--inactive-100) / <alpha-value>)', // Background color
110: 'rgb(var(--inactive-110) / <alpha-value>)', // Border color
},
Comment on lines +25 to +29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inactive implies it's used for inactive states but it's used for backgrounds, borders, etc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because the inactive color is always some sort of gray, the color we use for backgrounds and borders is also always some sort of gray. Thats why we call them this way

},
borderColor: {
DEFAULT: 'rgb(var(--border) / <alpha-value>)', // Border color default so it gets used when only using border
DEFAULT: 'rgb(var(--inactive-110) / <alpha-value>)', // Border color default so it gets used when only using border
},
},
container: {
Expand Down
Loading