Trying to create a new component style using the $display-breakpoints stylus variabled from Vuetify (as described in this answer) but it doesn't seem to work.
<style lang="stylus">
.submit-container
#media $display-breakpoints.sm-and-up
font-size 5em
</style>
I get the following error:
$display-breakpoints has no property .sm-and-up
I needed to import the variables stylus file:
<style lang="stylus">
#import '../../assets/style/variables.styl'
.submit-container
#media $display-breakpoints.sm-and-up
color #ef4655;
</style>
Related
My npm project: Vue 2 with Bulma as the CSS framework
I am trying to create a card component and want to change the color of the header's text that is inside a div with class card-header. However, the color of the text just won't change.
Component.vue
<template>
<div class="card">
<div class="card-header p-3">MON</div>
<div class="card-content">
<slot></slot>
</div>
</div>
</template>
main.scss
i have used sass variable $card-header-color: white; but it does not change the text color. How do i do this?
....
$card-radius: 0;
$card-shadow: transparent;
$card-header-color: white;
$card-header-shadow: transparent;
$card-header-background-color: black;
#import "../node_modules/bulma/sass/utilities/_all.sass";
#import "../node_modules/bulma/sass/base/_all.sass";
#import "../node_modules/bulma/sass/elements/container.sass";
#import "../node_modules/bulma/sass/helpers/_all.sass";
#import "../node_modules/bulma/sass/components/card.sass";
I know I would be able to achieve this using pure CSS by overwriting the styles of that element but wanted to know why using $card-header-color won't work in my case.
I hope to be able to achieve the desired result using SASS variable $card-header-color as documented in the Bulma docs. under the variables section of the card component.
https://bulma.io/documentation/components/card/
here I have a problem. in nuxt 2 I can use #import inside the tag, but not in nuxt 3?
does anyone know how i should make it work in nuxt 3?
I was expecting like this.
...
<style scoped>
#import url('assets/css/custom.select2.css');
...
</style>
and what do I need to install and what setup should I do?.
Thank you in advance
After integrating stylus into my Vue3 application, my global css variables no longer work (loaded through prependData as mentioned here).
Old, working code (no stylus):
<style>
.item {
background-color: $bgColor;
}
</style>
New code, doesn't work (w/ stylus):
<style lang="stylus">
.item
background-color: $bgColor;
</style>
Is it possible to update my old code to leverage stylus and keep my variable structure? Thanks for your ideas.
I have a stencil component that I want to set a font to.
What I have now:
index.html
<body>
<sidebar-component webpagename="dashboard"></sidebar-component>
</body>
<style>
* {
margin: 0;
font-family: Lab_Grotesque_Light;
}
#font-face {
font-family: 'Lab_Grotesque_Medium';
src: url('./assets/fonts/Lab_Grotesque_Medium.otf');
font-weight: normal;
font-style: normal;
}
</style>
This sets the font when I start my component locally.
But I want to use the component in a Vue application (imported from npm). There the custom font wont work. Is there another way to implement this.
This is covered in the docs now. You can save the font to your src folder and reference it directly. https://stenciljs.com/docs/local-assets
Update: Actually it looks like there is an issue where it is not possible to load custom fonts within a Shadow DOM https://github.com/ionic-team/stencil/issues/2072
If I put the #font-face{} in the header of the index-file. It actually worked from my other applications that uses the stencil component.
In index.html
<head>
<style type="text/css" media="screen, print">
#font-face {
font-family: "LabGrotesque-light";
src: url("../assets/font/lab-grotesque-light.otf") format("opentype");
}
</style>
</head>
You have to manually define the font face in your Vue application to make this work. Just like you did in the index.html of stencil.
If you dont want to include the font assets in you vue application you can either copy the font assets with https://stenciljs.com/docs/copy-tasks or https://docs.npmjs.com/files/package.json#files to your npm package.
I am using Sitefinity Stylesheet widget.When i try to apply inline style sheet inside Write CSS tab,the styles are not applied as expected
This is my code:
<style>
.menu a{
text-decoration: none;
}
.....
......
</style>
Could you please help me to figure out the issue here?
Remove the tags <style> and </style>
There is already an instruction in "Write CSS tab".