Semantic UI: overriding a variable in site.variables - meteor

I would like to know how to override a variable in site.variables file. I am using Semantic UI with Meteor using the official meteor package.
Specifically, I want to override
#fontPath : '/lib/semantic-ui/src/themes/default/assets/fonts';
I tried to change the value directly in site.variables to no avail. Also, I added a value to site.override with no success.
Both files state at the top:
/*
DO NOT MODIFY - This file has been generated and will be regenerated
Semantic UI v2.0.8
*/
Where can I override this value? This is needed to fix this issue.

As stated here, the content of themes/ directory is not editable - it will get rewritten back when you run your Meteor server.
You need to edit site.variables.import.less file in your site/globals/ directory instead.

Related

Switching sass variables with angularjs

I am working on theme changer with angularjs and I can't seem to find a way how to replace one sass file with another (both of them contains variables) when user changes his theme. I know that when sass is compiled to css the variables are gone. Is there a way to switch up those files and recompile whole css? I have managed to find that it should be somehow possible to do by calling server to recompile css, but I couldn't find more information. Thank you.
One way we are doing these things is having multiple files for different themes. Example content =
variables ...
primary: '#smtng'
.themeName{
.header{
background-color: primary
}
}
And in your app.html you can add class to your html tag which will represent themeName. You can hold theme name in some storage and load it from there.
Basically you are loading all themes, but only rendering css for active theme

GWT, there is a way to ignore the CSS ID's generated when the code is compiled?

I'm using GWT in a new project that I'm working on and I'm facing a problem. Some of the CSS rules were defined into the XML file and not into a CSS file.
The problem is that when GWT compiles the code, my name classes defined into my XML file are changed to a new random ID.
Stuffs like GKA-VPPBPE or GKA-VPPBLE
Is there is a way to keep the original name instead of the generated ones?
The generation of obfuscated css classnames is a feature.
GWT has enabled CSS obfuscation activated by default. This will help reduce the download size and also reduce collision of css-classnames.
You can disable this in general:
<set-configuration-property name="CssResource.style" value="pretty"/>
Or for some classes only:
#external .myClassName
Look here for some more information
https://vcfvct.wordpress.com/2013/10/04/disable-obfuscation-in-gwt-css-resources/

Dynamic css file Server Error (Wordpress)

my theme uses a dynamic css file 'custom-style.php' which is included through wp_enqueue_style();
This file includes some styles depending on the theme options (colors,fonts,...)
On some installation there is no access to this file. Trying to access the file via the source code gets a "500 Internal Server Error". Changing file permissions to 777 does not solve it.
How can I solve this? Is there any other possibility to create dynamic css files?
Alternatively I could write a function to include this css in the head of the html but this is not the way I want go. There are some lines of css and I don't like css in html output.
This problem is from the server and is related to the server configuration. You can put your css code in variable and use the file_put_contents function to put your css code into the style.css file.
Like the code below
<?php
$customColor = #fff;
$css_code = "body{ background:{$customColor}; }";
file_put_contents('style.css',''); //First we empty the file
file_put_contents('style.css',$css_code);//Transfer Css code to file
I used this method and it was a good solution

CSS in vaadin plugin for grails

I am using the vaadin plugin for grails, and am trying to define some custom styles. Where within my grails appliction should I put the .css? My Vaadin application is in /vaadin/ I have tried creating a /vaadin/themes/mytheme/ folder and then putting my styles.css file in there, but still had no luck. Any help would be greatly appreciated. New to grails and new to vaadin, and am pulling my hair out over small stuff like this and can't get any of the actual legwork done until I can figure these things out..
Any way of doing inline styling would be fine with me too, at this point. I really just need some way to write explicit style..
Thanks
You need to put it into /web-app/VAADIN/themes/mytheme
You can have a look at the completed addressbook tutorial (with added Gorm and Spring Security Core support)
With the latest version of the plugin:
The name of the file must be styles.css (or styles.scss, which will then be compiled to styles.css by the command grails prod war)
The file must be located in /web-app/VAADIN/themes/mytheme , where the last part is the name of your style
In your UI file, use the #Theme annotation, for example
#Theme("mytheme")
#VaadinUI(path = '/')
class MyUI extends UI {
// ...
In VaadinConfig.groovy, specify the styles used by the application:
themes = ['mytheme']

Using directives in new files

Is it possible to have additional "using" directives automatically added to my new aspx.cs files so that I do not have to keep typing the same ones over and over again (i.e. custom namespace using directives)
You can edit the files that are used by the template. Better yet, create your own. File + Export Template.
You don't have to type them in. When writing the code, type in the name of the class (without the namespace). Then hit CTRL+.. That will open up the resolve type intellisense helper. It will add the using statement to the top of the file. No scrolling necessary.

Resources