Applying custom css to default theme in sharepoint 2010 - css

I have created a custom styles css and registered it as follows in v4.master using SharePoint:CssRegistration option name="<% $SPUrl:~SiteCollection/Style ibrary/Custom.css%>" after="corev4.css" runat="server"/>
I assumed that my custom styling would be applied to any new site, however any new sites open in the standard default style, obviously I want my custom branding to automatically apply..
I have to mess around in site settings to use the parent theme etc, but even that does not always apply the styles correctly, so I have to go to the parent site and apply the parent styling to substitutes etc.
Other users will be using the site so I want to make it as easy as possible, can anyone offer help?

In order to apply your custom styles & master pages, you need to create sharepoint module (your styles, files & configuration) and Feature with Event receiver(when activated in sharepoint site/sitecollection, it'll apply your module, when deactivated, it rollback default settings related to styles/master page).
Here is the step-by-step article,
Article 1
Article 2

Related

Is there a way I can create (and update) a stylesheet using 2sxc and razor template?

DNN 9.3.2 / 2sxc 10.25.2
I have a DNN theme that I use for a certain type of subportal - I will have 8 subportals ultimately. Each subportal has the same layout, but they will have different colours in their respective theme. So I will have to create a stylesheet with the CSS rules and the colours for each theme. I know there is a couple of relatively simple ways I can do this:
Modifying the portal.css of each portal to override the theme or (simple but might be hard to maintain updates)
Building a custom theme for each portal (overkill)
Using SCSS to create a template with 8 different variable files (works fine but doesn't allow modifications by the Content Editors)
So, I'm curious if there's a more clever way through 2sxc that makes it easy for not only me to maintain, but also my portal's Content Editors.
I want to create 2sxc Content module with a few different fields for colour pickers that will allow me (and my content editors) to simply open up the 2sxc edit modal (on the homepage), fill out all the colour fields, and then a razor template will output the CSS template with the colours to override the theme styles on the DNN skin. I know I can do this with inline CSS but that would mean the module would have to appear on every page, and I'd also prefer to avoid inline CSS.
So my idea is that it would work like this:
Have a 2sxc Content module on a single page on each portal
Edit modal > the fields would be something like: primary colour (rgba), secondary colour (rgba), grey colour (rgba), etc
Once save is clicked, the template modifies a portal-level theme.css file which is loaded by the skin
Any changes to the module would result in a rewrite of the CSS file.
I could update the c# razor template to add, remove, or modify rules or transform the values of the input.
Is this possible or is it too complicated? Is there a better way of going about this?
So I've been away for a long time, I hope my answer will still help...
We have a very simple solution :). If you check out bootstrap instant template you'll see that we add various classes to the <body> tag.
https://github.com/2sic/dnn-theme-bootstrap4-instant/blob/master/controls/body-css-classes.ascx#L86-L91
That way we can just use normal CSS of the theme with rules based on portal-27 etc. to vary by portal.

WordPress / Gutenberg - Front and Editor Styles in One File?

I've got a lot of custom stuff to style inside my current project ( first one made with Gutenberg) and editing two files (that include a lot of media queries) makes the task deeply infuriating.
Is it possible (and viable) to merge the 'frontend' styles and the editor styles within one CSS file in WordPress? So I can have the 'frontend' and 'editor' versions opposite one another in the CSS file and nothing flips out?
This will cause unnecessary code in the admin panel.
Write CSS Separately for Gutenberg(editor styles). Gutenberg CSS file must include these: heading(h1,h2 etc...), , quote etc... Add this style even if the style element is for your front end. These attributes must be placed in editor styles.
Then enqueue the editor styles CSS file both.
Ali is mostly right but the reasoning is kind of reversed.
You want the public views to be as small as possible, so while adding weight to Gutenberg would suck, adding weight to public views is much worse and will negatively impact page scores?

Fixing Style Layout for MediaWiki SpecialPages

The skin I've installed (foreground) runs fine on all my pages including special pages except the login account page.
I've tried going to my skins/foreground/assets/stylesheets folder and do some editing on their CSS scripts, but they just implement minor changes.
I want to see if there's a way I can rebuild/modify the CSS or general template of just the login page, with the foreground skin I've already installed.
Many wikis use pages like MediaWiki:Common.css to create a custom 'theme' for their wiki. However, due to security reasons, site-wide CSS on restricted special pages was disabled starting with MediaWiki versions 1.19.20.
By default such style sheets no longer load on login or preference pages creating an inconsistent user interface. In order to fix the UI you need to set the variable: $wgAllowSiteCSSOnRestrictedPages to true in LocalSettings.php.
This will enable the skin for the special pages mentioned.

How to make changes in wordpress template. Css direct edit not working

I want to make small changes in wordpress template css, but despite I change desired values (for instance font-height), changes are not applied on actual page(I've tried multiple browsers, cleaned browser and wordpress cache...).
I've noticed that this theme is using Redux framework, so it seems that this "cause" this problem with all these changes.
I would not mind to delete this (or any other) framework and make all my custom changes directly with css, but I'm not sure how to do it properly.
I have knowledge of html & css, but not wordpress system.
try using this plugin :
Simple Custom Css

Django CMS, per page CSS Styles

I often use small, page specific CSS files for a page in Typo3 using css_select. These styles usually apply only to some special element on these pages. Putting these styles in a global file doesn't feel right.
Using css_select I can select a bunch of files that may be included into the page's header, so that it loads it's special styles.
Now I'm looking for a way to do something similar in Django CMS 3. The only built in solution I'd know is to create a new template which seems a bit excessive for a single page where an image needs to be handled a bit differently from all the others, to name just one example.
Is there a way to do this using nothing but django CMS?
If not, is there an app that would do that?
If not, how could an app extend the page admin form in such a way that this function could be added.
You could extend the page.
See http://django-cms.readthedocs.org/en/latest/extending_cms/extending_page_title.html
A good example is https://github.com/nephila/djangocms-page-meta
This the above package allows you to add additional meta tags to page header.

Resources