Recently I started to work with prestashop 1.7.
Does anyone know how to force recompilation of css by changing the ../_dev/css/theme.scss?
I try:
#wrapper {background: red;}
But in ../assets/css/theme.css remains
#wrapper {background: #ebebeb;}
compiled by Webpack from the _dev files.
Related
I have written the following css class in my Blazor WASM project from the standard template:
.edit-field {
input {
border-top: none;
border-left: none;
border-right: none;
outline: none;
display: block;
}
span {
font-size: 12px;
}
}
This is a .scss file.
I then import it to the main css file, which is loaded to page.
It seems hard to have it broken, but I get this:
If I take the properties out of the class in the same file, the issue doesn't appear and all works expectably.
I don't mean this or any other .scss file to be a css isolation style sheet.
Please help.
Actually, this is no blazor issue at all. It appears, css does not support nested styling originally and all my time using it, I exploited an scss feature. I installed and configured Web Compiler extension in my VS-19 and it started working as I wanted.
I'm using custom font files with Nuxt project. I tried to add font files to /static/fonts and import them using
font-family: 'coconregular';
src: url('fonts/cocon-regular-font.woff2') format('woff2'),
url('fonts/cocon-regular-font.woff') format('woff');
font-weight: normal;
font-style: normal;
}
$cocon: 'coconregular';
.brand-name {
font-family: $cocon;
}
I'm having '#nuxtjs/style-resources' installed and all other variables and SCSS loading is working totally fine but fonts are not loading.
This is my file structure
files screenshot
I can't find a way to add fonts properly neither i don't know how to check if the font is loaded. There aren't any errors.
What is the correct way for Nuxt and SCSS to load fontfiles?
So i finally figured out good workaround. I don't know if this is good or not, but i separated fonts download from anything else. Therefore i added another entrypoint to nuxt.config.js to include fonts stylesheet before other stuff.
css: [
'#/assets/scss/theme/fonts/stylesheet.css',
'#/assets/scss/main.scss'
],
It worked good because My fonts stylesheet for Woff and Woff2 files were generated by font squirrel generator anyway.
Hope this helps you guys
I had installed magento 2.0.2 and also override the templates
I am stuck on a point that where do i write my css for my own styling.
How do i change the css of existing template.
app/design/frontend/namespace/yourtheme/web/css/source/_theme.less
start with changing the header background
.page-header {
background-color: #000;
}
check this also
I have the following CSS in my main.css file:
background-image:-moz-linear-gradient(top, #eeeeee, #aaaaaa) !important;
background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#aaaaaa)) !important;
background-image:-webkit-linear-gradient(top, #eeeeee, #aaaaaa) !important;
background-image:-o-linear-gradient(top, #eeeeee, #aaaaaa) !important;
background-image:linear-gradient(to bottom, #eeeeee, #aaaaaa) !important;
background-repeat:repeat-x;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffaaaaaa', GradientType=0) !important;
Which keeps changing itself to:
background-image: linear-gradient(to bottom, #eeeeee, #aaaaaa) !important;
Why could this be happening? The selector is .navbar .nav which is defined in another CSS file too, the Bootstrap CSS file. Could it be that Visual Studio is automatically cleaning up duplicate definitions or something?
edit: It changes every few builds. I can't pinpoint what action is causing it to automatically change.
Those are browser based CSS tags:
This only works in mozilla:
background-image:-moz-linear-gradient(top, #eeeeee, #aaaaaa) !important;
Works in Chrome/Webkit based browsers:
background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#aaaaaa)) !important;
background-image:-webkit-linear-gradient(top, #eeeeee, #aaaaaa) !important;
Actually this cross browser technique is somewhat deprecated in the release of CSS3. You need to find the corresponding CSS that works on the browser you are using.
It's not 'changing' just that, other CSS was ignored by the browser.
Have a look to see if there are any build events setup in Visual Studio. It's possible the project has been configured to run something like csstidy or a css minimizer that is attempting to cleanup duplicate properties.
Alternatively, if you're using source control (which I would hope you are), your source control may be configured to run a commit hook that does the same sort of thing. How that is configured will depend on the source control that you're using.
I wouldn't expect this to be a problem with a modern version of csstidy (or any other modern css optimising tool for that matter). However, if this is a project that you've inherited, it's possible it was setup some time ago with a tool that is now out of date.
I have a really strange situation where the CSS images are not displayed after the site is deployed to Windows Azure.
The images are part of the project (all the files and sub-folder are included in the project)
All images have a build action of Content
I'm not using relative path, always use absolute path on my views /content/path/to/images, but on CSS there is relative path url(../img/image.png) but this should not be a problem.
Static files are OK (CSS and Javascript work correctly), except for the images not showing up.
I deployed using git, but even with the Publishing Wizard I get the same result.
The images are there if I request them with the full path. This is "unreal" ;)
I'm must be neglecting a key thing here, but can't find it.
Thanks for your time.
Edit:
The image work via the img tag. So only the CSS images, which make no sense, they are working correctly locally.
I guess I can share the link, so you can see this thing live ;)
http://receivably.azurewebsites.net
Look at the top left logo, nothing appear, here is the HTML and CSS (this was working well a couple of deplyment ago, and work fine locally.
<a class="brand" href="/">name</a>
In the CSS:
.navbar .brand {
display: block;
width: 180px;
height: 34px;
padding-top: 0;
padding-bottom: 0;
margin-top: 2px;
margin-left: 10px;
overflow: hidden;
font-size: 18px;
line-height: 600px;
color: #333;
background: url(../img/logo.png) no-repeat 0 0;
}
And if we request the file directly it's there: http://receivably.azurewebsites.net/content/site/img/logo.png
The CSS file is placed in /content/site/css and images on /content/site/img.
May I add that I'm now unable to git push. Only the publishing wizard work. I've having LOTS of problem with that website on Azure, my other 3 app work flawlessly.
I think your css bundler is breaking things.
Here's what I see in your bundled CSS from the homepage (I've de-minified it a bit):
.brand
{
display:block;width:180px;height:34px;padding-top:0;padding-bottom:0;margin-top:2px;
margin-left:10px;overflow:hidden;font-size:18px;line-height:600px;color:#333;
background:url(../img/logo.png) no-repeat 0 0
}
Notice:
background:url(../img/logo.png) which may not be correct from the CSS which is executing from /bundles/
It should say:
../content/site/img/logo.png
Or as you said /content/site/img/logo.png
This would explain why it works locally (non bundled) and even in prior deployments -- because bundling related code may have changed recently. This is a classic release-time issue and it's one reason why turning on bundling full time (not just in Release mode) is wise, even though it takes an extra 0.500 seconds at Compile time. :-)
Hope that helps.