I'll love if you can help me with a problem.
I'm developing a task app (just to practice) and I started with the styles using SASS.
Just to validate that the SASS is running I added a body background color, but this style does not applying for all views.
When I saw the console to see the html structure, I noticed that some views doesn't have the html structure from the application.html.erb, just the html that I have in that file.
NOTE: I have the style applied in a main.scss file, where all the files should have the style.
This is the root route
This is another view, where the style is applied
EDIT: I found the next message when inspect the element, but I don't know why is this happening
Related
We're using the Angular flavor of Material 2 (https://material.angular.io/) for a main project, but would like to create a separate static (HTML/CSS) prototyping workspace that is able to access just the Material 2 CSS styles from that main project. The idea is that this separate directory will pull the compiled CSS from the Angular project, but allow for experimentation in HTML/CSS styling without configuring any JS.
Is it possible to compile the full CSS (components, typography, etc.) from the Angular Material 2 project, without needing AngularJS? It seems like there are styles being inserted by JS using the <style> tag.
Here's a basic demo of the SCSS file I've tried to build to load the Material styles:
#import "~#angular/material/theming";
#include mat-core();
This works for adding things like typography and the class names, but it doesn't add all of the possible styles for those classes. For example, the card component only gets very basic styles—it's missing the other styles such as padding that seem to be injected via JS.
I also tried the material-components-web project, which has compiled CSS here. It comes very close to doing the job. But unfortunately just renaming .mdc- to .mat- is not enough. The component names and usage aren't quite the same.
For example, material-components-web uses BEM: mdc-card__actions.
Whereas the Angular versions calls it .mat-card-actions.
I have a huge site with a lot of sass partials getting processed in one single css file. We are also using sourcemap for debugging the styles.
Is it possible in the browser to get a list of the used sass partials files for a given html page ?
thanks!
I'm currently working on a project and Im attempting to load my scss/sass through webpack. I'm currently loading it in successfully using the following libs:
node-sass
sass-loader
css loader
style-loader
I am able to require/import the styles in successfully but the problem occurs that when I load up the application the page loads without the styles for about 1.5 seconds and then after the page "blinks" and the styles finally load in.
Is there a way to get around this through webpack? I have heard of ExtractTextPlugin and a few others but I've tried to implement it by looking at article examples and github examples but they don't seem to work by using require/import where they are needed. I'd like to only require the styles based on my react component needs. Not loading any styles that the components don't need.
You have (at least) two options to prevent this FOUC (Flash of unstyled content):
Use a plugin like mini-css-extract-plugin or extract-text-webpack-plugin to extract the compiled CSS into a separate file that you can load normally in your <head> (read more) or
Hide your content, using CSS, until styles are ready, the loaded styles should contain the styles that will make the content visible.
I'm writing a post for my Github-hosted site. I'm writing to my-first-post.md.
I have Javascript in script tags, CSS in style tags, and HTML in divs and spans.
When I paste the code in the .md and run jekyll serve thru Ruby, all I get is a page with the raw HTML.
What am I doing wrong?
"HTML is a publishing format; Markdown is a writing format." --daringfireball
Markdown is supposed to be simple.
You shouldn't be putting javascript into markdown unless you have a good reason to be doing so and even then I don't think every markdown converter will process javascript.
Ideally, your markdown should be confined to this list and maybe some simple HTML.
Any CSS or javascript should be included as part of your theme.
Edit, explaining jekyll filestructure:
So your Jekyll site should have a file structure that looks something like this. In very broad terms, your CSS and javascript should be in the default.html file located in the _layouts folder. You'll probably notice that the file appears to be a regular HTML file, more or less. The blog post--which is the markdown after it has been converted to HTML--will insert itself into the layout at the {{ content }} tag.
Also, the CSS and javascript doesn't have to be in default.html. It can also be in external files that you link to from default.html
Use MDX. It can do a lot. But if you want to use something more appropriate for the task at hand, I'd suggest looking into Astro . You can find more on these websites. For astro you can install the CLI and write markdown in less than 2 minutes. And also, it's very fast and integrates with a lot of frameworks.
i want to make a new joomla template, i dropped into that but i am confused now.
i want to know where is the joomla autogenerated css class list.
for example i insert a module in template and what is the css class for example for menu title or the css class for search input box or what is the default css class for readmore link in main.
i found a little in joomla doc but i want the whole list
I fail to understand how you are prepared to make a Joomla template which is far more complex than a plain CSS template, yet you are unable to find the necessary CSS files. You said you wanted to make a new template therefore shouldn't you know where you have put the CSS file?
You are in dire need of Firebug for starters. Have a look at all it's features. It will help you to find CSS files and the specific line you need to edit.
I assume you are editing someone elses template in which case this is the sort of location you will be looking for.
templates/you_template/css/file.css
It varies with different template so I suggest you download Firebug as I suggested above.