Setting the font size for the entire body of a webpage globally is ineffective

  • Technology Stack: Nuxt.js + Vuetify.js
  • Problem: Unable to set global body font size
  • Solution Attempt: I tried to adjust the body font size to 40px in ~/assets/style/app.styl:

    // Import Vuetify styling                                                                                                                        
    $body-font-size = 40px;                                                                                                                          
    @require '~vuetify/src/stylus/app.styl'                                                                                            
    
  • Result: Unfortunately, it didn't work as expected:

https://i.sstatic.net/wHi3P.png

  • Note: Similar issue is observed with @body-font-weight

  • Question: Why is this happening and how can I resolve it?

  • Link to the problem repository: here

Answer №1

The reason behind this issue is related to the usage of the vuetify loader plugin. Your modified variables should be placed in the variables file instead of the app.styl file.

Therefore, your assets/style/variables.styl file should be structured like this:

$font-size-root = 40px;                                                                                                                          
@require '~vuetify/src/stylus/settings/_variables.styl'

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Help needed with parsing nested JSON using the $.each function

Here is a JSON response sample that needs to be parsed in a more generic manner, rather than using transactionList.transaction[0]. "rateType": interestonly, "relationshipId": consumer, "sourceCode": null, "subType": null, "transactionList": { "transac ...

When you hover over a dropdown menu, the content underneath it is raised slightly and a margin is formed on the right side of the page

I am facing some technical difficulties with my photography website, specifically on the "Contact" and "Bio" pages. The issue arises when the screen is resized, causing layout changes. When hovering over the "Albums" menu tab and the drop-down menu appears ...

Strategies for concealing and revealing content within dynamically loaded AJAX data

I am attempting to show and hide data that is loaded using Ajax. $.ajax({ type: "POST", url: "/swip.php", data: {pid:sldnxtpst,sldnu:sldnu}, success: function(result) { $('.swip').prepend(result); } }); This data gets ...

Chrome is giving me trouble with the Select (dropdown) background image feature

Is it possible to set an image as the background for a select/drop-down menu? I've tried using the following CSS, which works in Firefox and IE but not in Chrome: #main .drop-down-loc { width:506px; height: 30px; border: none; background-color: Tr ...

Unexpected behavior with scrollTop

Note Reopening bounty as I forgot to award it last time. This question has already been answered by Master A.Woff. I am looking for a way to automatically scroll to a specific row when a user expands it, so that the content is immediately visible witho ...

Looking for assistance in establishing a connection between Node.js and Angular.js

I have a decent understanding of mongodb and node.js, but I'm struggling with angular.js. I need some help in figuring out how to retrieve data from my node.js code using angular.js. If there are any errors in my node.js code, please let me know. var ...

React - Incorrect components experiencing style changes due to setTimeout

Check out the code snippet here: https://jsfiddle.net/69z2wepo/204131/ A main component displays two 'notifications' each with different disappearance timings. class Page extends React.Component { constructor(props) { super(props); t ...

The click-handler method in VueJS Paginate Component fails to activate

I'm currently working on a Vue Component code that involves pagination for a list. The pagination seems to be working fine, except for the issue I encounter when trying to navigate to the next page, which in this case is page 2. I've added a cons ...

What is the process for resetting the v-money form fields?

I am facing an issue with resetting monetary value fields in my vuetify v-form. I use v-money to mask the values inserted, but when attempting to reset the form using ".reset()" or by setting the values at the end of my function, the values are not being r ...

When the div is loaded, automatically navigate to the crucial li element within it, such as the one with the class "import

Welcome to my first webpage: <html> <head> <script type="text/javascript" src="js/jquery.min.js"></script> </head> <body> <div id="comment"></div> <script type="text/ja ...

Creating interactive panorama hotspots with THREE.js SphereGeometry and DOMElements

After creating a WebGL 3D Panorama application using a SphereGeometry, PerspectiveCamera, and CanvasTexture, I am now trying to enhance the scene by adding "HotSpots" over specific areas of the SphereGeometry. However, I am facing difficulty in updating th ...

Incorporating Bootstrap 5 with Nuxt 3 and Vite

I'm currently in the process of incorporating Bootstrap 5 into a fresh Nuxt 3 project, but I've encountered an issue that has me stumped: I am aiming to streamline it by only importing the necessary modules (both scss and javascript) as outlined ...

Can the selected week be highlighted along with the corresponding week number in a row?

Can we display the number of the week in a row along with the selected week, either in the toolbar or somewhere else? I attempted to utilize ToolbarComponent, but it overrides the entire header. However, I would like to keep it as is and just add informat ...

the display outcome appears fuzzy and lacks sharpness

Currently, I am engaged in prototyping and showcasing data in a 3D format using three.js (version 68). The intended outcome of the entire animation is to have a collection of colored spheres representing protons and neutrons, each colored based on a specif ...

Arranging Controls in a Grid in a Vertical Formation?

I have a Paper element with checkboxes in it. Here is the image of what I am talking about: https://i.stack.imgur.com/Epmk5.png Currently, the checkboxes are arranged horizontally, but I want them to be stacked vertically. The Paper element containing the ...

Is there a different option to use instead of the onChange event for the <select> element in ReactJS?

As I work on developing a Component with numerous <select> elements, the challenge arises when only one option is available and onChange event fails to trigger. Is there an alternative event in ReactJS, such as onSelect, that can be employed for this ...

Implementing the OnClick method for the button component

After successfully creating a reusable button component, I now want to assign different onClick links to each Button component. How can I achieve this? import styled from 'styled-components' const Button = styled.button` background: #0070f3; ...

Choosing between cjs and esm for a React components library

I'm working on a components library that will soon be published to npm for use in a razzle app. My main query revolves around the best practices for building these packages - should they be built with CommonJS (cjs) or ECMAScript Modules (esm)? And wh ...

Customizing the appearance of Indicators and Paginator in PrimeNG Carousel

I have integrated a carousel using PrimeNG which has the following design here Take note of the style of the carousel indicators and navigators. I want to achieve the default style of indicators/navigators for the carousel as shown here I have included t ...

Changing the loading spinner icon in WooCommerce

Could someone help me change the loading spinner icon in WooCommerce? The current icon is defined in the woocommerce.css: .woocommerce .blockUI.blockOverlay::before { height: 1em; width: 1em; display: block; position: absolute; top: 50 ...