Woocommerce How to use my own CSS - css

I have de-enqued the WooCommerce default CSS styles.
I also enqued my own CSS style .
Now the question is how will I know which class names to use in my own CSS for styling the WooCommerce?
Will I copy the original CSS to my own CSS and then edit them? I don't know LESS and the original CSS is in compreseed form making it hard to edit it.
2ndly, is using the Firebug tool and then copying the CSS used is a good method to go with?
I want to know the most easiest method of using my own CSS on the WC templates.
Thank you

Related

Embed other code to Wordpress whitout using theme css files

I have a wordpress theme, and it looks good now, however, I want to add a custom html form to it. But when I put the code in it whith path to its own css and js. The form looks terrible because of the css from the theme.
Is there any plugin or option to fix this or do I need to do it by an other way?
I looked everywhere on the internet but couldt find any solution.
Any help is welcome.
Thanks alot.
CSS means cascading stylesheets, and that's because the CSS from the page cascades downwards onto all the elements on the page. You either have to manually reset the CSS before it hits your form, or you need to embed your form as an iframe to avoid the cascade.
Theme and bootstrap css will override input fields with ton's of styles. You don't have much options but to find and "ran over" problematic styles with your own.
Use !important only if needed.

WordPress Gutenberg handling CSS in the editor

I've created my website that compiles my scss (boostrap, node_modules, my own custom css) to a single file. Now I'm wondering what would be the best way of styling gutenberg blocks in the editor?
I want to keep the responsive nature of my blocks from bootstrap and my styling what would be the best approach to do this?
If I'm understanding correctly, you want the CSS file for the front-end of your site to also apply to the block editor?
If so, that's as simple as adding add_theme_support('editor-styles'); in your theme files (such as in functions.php).
I find it helpful to create a second block-editor stylesheet to use only in the editor. Sometimes I find the media query breakpoints are too different or just need to tweak the front-end styles a little for the editor. For that file, you can use wp_enqueue_script() on the enqueue_block_editor_assets action hook so it applies only to the editor.

Avada theme overwrite own css

I'm using Avada template and create child theme. In style.css I don't have any solution to overwrite default .css styles from Avada. Only possible solution is using !important , anyone know how to overwrite Avada .css without using !important
Please use custom css option. You can write css here it would overwrite the Avada css. Please check out the documentation https://theme-fusion.com/knowledgebase/how-to-make-custom-css-changes/
You can make usage of the Custom CSS feature available in the backend or many of the blocks being used by the Fusion Builder, which comes with Avada, have the availability to configure certain design elements from within them.
If you do want to use a child theme, be aware that Avada uses many !important rules in their stylesheet while other styling is being handled by either the fusion builder or javascript logic.

In WordPress, I am trying to configure TinyMCE so styles are treated as inline spans

I am using inline styles in spans because I am making an email CMS which means certain elements need to be styled inline so they will be universally read across email clients. What I encounter with Wordpress is bold injects <strong> italic <em> however underline injects <span style="text-decoration: underline;">
I want to be able to use span and the appropriate inline style property. The version of Wordpress I am using is bundled with tinymce, a wysiwyg editor. I read a little bit about overriding the formats for tinymce TinyMCE Formats
It looks like much of the tinyMCE is defined in this PHP include
/wp-includes/class-wp-editor.php
I am still not sure how to go about overriding the definitions. I was thinking there ought to be a way of overriding them in my theme's functions.php
The WordPress Codex has a whole page on TinyMCE Custom Styles, including code samples that should help get you started. You might also want to look at add_editor_style() to register a custom editor stylesheet to apply some of the styles within the editor window itself.

Where do I apply custom CSS color changes to Wordpress Theme?

I'm creating a small WordPress theme, which has a separate control panel. This panel has a lot of color and font changes. I had no problem in saving all the data into mysql, but I can't figure out the best way to apply these changes to the design.
What I want to ask, is what is the best, most efficient and popular way to apply color and font settings?
Should I apply these changes with style="" while generating the design? Should I edit it with JavaScript? Include it in headers <style>, or maybe even edit the .css file?
The best way would be to make the changes directly to the css file. For this you would need to parse the css content. Grab a specific selector content and change it's properties.
An easy way is to output the custom properties in the page header (after the style.css in order to overwrite the default properties) or to put them in a separate css file.
Also, it my be helpful an existing Wordepress theme generator, like http://www.lubith.com

Resources