Category : tailwind-css

I’m quite new, I need help. https://github.com/tailwindlabs/tailwindcss-aspect-ratio I have a laravel 8 project in production. I have installed this package and in local it works fine, but when I upload it to production it doesn’t work. This package requires the installation of a plugin in the tailwind.config.js file. const defaultTheme = require(‘tailwindcss/defaultTheme’); module.exports = { ..

Read more

So, I’m creating a project using laravel and tailwind. After using the paginate() method and then this code in the view @if ($posts->count()) @foreach ($posts as $post) <div class="mb-4"> <a class="font-bold" href="">{{ $post->user->name }}</a> <span class="text-gray-600 text-sm">{{ $post->created_at->diffForHumans() }}</span> <p class="mb-2">{{ $post->description }}</p> </div> @endforeach {{ $posts->links() }} (this line to create the link to ..

Read more

I cannot set background color of my tags. Website Image I don’t know what is the problem, cause classes like "justify-center" or "items-center" are working. Here is the code. <body class="bg-white"> <nav class="p-6 bg-gray-900 flex justify-between"> <ul class="flex items-center"> <li> <a href="" class="p-3">Home</a> </li> <li> <a href="" class="p-3">Dashboard</a> </li> <li> <a href="" class="p-3">Post</a> </li> </ul> ..

Read more

I’m writing a Laravel app with tailwind 3 and I would like to use two local fonts. But I’m having some truble. The first one is, if, my directory is right. in my app.css I added: @layer base { @font-face { font-family: ‘Noto Sans’, sans-serif; font-weight: 500; src: url(/fonts/noto-sans/NotoSans-Regular.woff2) format("woff2"); } The font is located ..

Read more

Everytime I try to run npm run dev or npm run watch, tailwind keeps purging unused styles in my local environment. webpack.mix.js const mix = require(‘laravel-mix’); mix.js(‘resources/js/app.js’, ‘public/js’).vue() .postCss(‘resources/css/app.css’, ‘public/css’, [ require(‘tailwindcss’), require(‘autoprefixer’), ]); tailwind.config.js module.exports = { content: [ ‘./resources/views/**/*.blade.php’, ‘./resources/js/**/*.vue’, ], theme: { extend: {}, }, plugins: [], } "tailwindcss": "^3.0.7" Sourc..

Read more

I am trying to upgrade tailwind to version 3 in my Laravel application. I followed the installation as instructed in https://tailwindcss.com/docs/upgrade-guide#upgrade-packages npm install -D [email protected] [email protected] [email protected] This worked fine. But when I run npm run dev I get this error: ERROR in ./resources/assets/css/tailwindcore.css Module build failed (from ./node_modules/css-loader/index.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js): ..

Read more

background image doesn’t appear, the image path is correct, I test it with it is worked >> <div class="flex items-end justify-end w-full h-56" style="background-image: {{url("/storage/images/services/".$order->image)}}"> <a href="{{route(‘services.details’, $order)}}"> <button class="p-2 mx-5 -mb-4 text-white bg-blue-600 rounded-full hover:bg-blue-500 focus:outline-none focus:bg-blue-500"> <svg class="w-5 h-5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor"> <path d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 ..

Read more

I’m new to the subject, I have a dropdown that fetches data from a table in the database, when I select another option and save, give me: Integrity constraint violation: 1048 Column ‘department_id’ cannot be null (SQL: update users set department_id = ?, users.updated_at = 2021-11-25 09:41:43 where id = 1) My Index: <div class="form-group ..

Read more

I was looking through the implementation of Laravel Breeze to see how they built the front end. I understand everything in the blade file except for a few things which have syntax I don’t understand. Within navigation.blade.php you can find the following: <button @click="open = !open" class…> <div :class="{‘block’:open, ‘hidden’: ! open}" As for the ..

Read more