0

I'm making a website using Laravel and I'm happy with the standard CSS of it in the app.css file. However for one page I'd like to change the font size. Is there a way to import both the app.css and a customized CSS, so that the latter overrides the app.css? Or is there an easier way to do this? I want to change the style of text in tables, so I thought I had to use CSS for that. It's pretty much impossible to edit the app.css file because it's minimalized and I can't understand it.

Thanks in advance!

2
  • Best way is create a new css file and define it after app.css. all your overwritten code will be write in new file. Commented Oct 25, 2017 at 19:05
  • You should be editing app.scss, not app.css. If you're using layout, you could extend it with a @stack and on your desired page @push into that stack. Commented Oct 25, 2017 at 19:21

3 Answers 3

2

Put them in public folder and call it in the view with something like
<link href="{{ asset('css/mystyle.css') }}" rel="stylesheet">.
Make sure You put it after <link href="{{ asset('css/app.css') }}" rel="stylesheet">

Sign up to request clarification or add additional context in comments.

Comments

0

you can try this: i use scss + scoped for this problem,

I add class cpl-lesson behind template then import css of vue in style tag

<template>
    <div class="row cpl-lesson"></div>
</template>

<style scoped lang="scss">
    .cpl-lesson {
        @import "bootstrap/scss/bootstrap.scss";
        @import url("~bootstrap-vue/dist/bootstrap-vue.css");
    }

</style>

Comments

-1
  1. Create a new stylesheet in public/css/style.css
  2. Include it into your blade template just like
    <link href="{{ asset('css/style.css') }}" rel="stylesheet">

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.