I am having an issue with the following import
#import "../foundation/components/top-bar";
I get Line 342 of _top-bar.scss: Undefined variable: "$row-width"
Unfortunately I can't find much documentation about this variable.
Digging into the source of _top-bar.scss I get to the offnding line 342:
.contain-to-grid .top-bar { max-width: $row-width; margin: 0 auto; }
The documentation says about .contain-to-grid:
If you want your navigation to be set to your grid width, wrap it in div class="contain-to-grid".
This means the class is optional. Therefore shouldn't $row-width be set to some sort of default to prevent the above error appearing (i.e if I decide I don't want to use .contain-to-grid)?
Variables such as the one I encountered are defined either in a templates/project/scss/_settings.scss or my own settings.css. Therefore I created my own copy of the original _settings.scss and imported it (i.e #import "settings";).
In other words it was in the documentation the whole time under the section "Using Sass Standalone".
Related
I'm attempting to change the maximum row width from 1200px to 1560px however I'm having trouble finding anyway to do this. I'm using SASS to compile.
I'm assuming that settings just need to be changed in the settings.scss file however any changes I make seem to have no effect on row width.
I saw a breakpoints variable here
$breakpoints: (
small: 0,
medium: 1200px,
large: 1560px,
xlarge: 1440px,
xxlarge: 1440px,
);
There I changed large: from 1200px to 1560px and changed the other breakpoints as well.
I also changed the $global-width here
$global-width: rem-calc(1560);
None of these seemed to have had any effect. I made sure it was included in my main.scss file.
#import "vendors/foundation/settings";
#import "base/colors";
#import "base/global";
#import "base/typography";
My folder structure is
-_main.scss
-base
-_colors.scss
-_global.scss
-_typography.scss
-vendors
-foundation
-_settings.scss
Also I double checked and the effects of all the other scss files are working just fine. I'm getting no errors.
UPDATE: I also made sure that the settings import happened after my base foundation includes
#import '../bower_components/foundation-sites/scss/util/util';
#import '../bower_components/foundation-sites/scss/foundation.scss';
#include foundation-global-styles;
#include foundation-grid;
All occur before the rest of my imports.
How do you change the max width or rows/breakpoints in SASS in Foundation 6
UPDATE: I also added a test variable
$testcolor: #523432;
and used it elsewhere in base/colors like so
* { border: 1px solid $testcolor;}
And that works just fine.
Turns out it had to do with the order I imported. The _settings.scss file needs to be imported before the base _foundation.scss file.
I am trying to draw an interaction diagram with Doxygen, using the external Mscgen utility.
This is the source file:
/// test.h
/** Interaction diagram.
* Test.
* \msc "Test interaction diagram"
* A,B,C;
* B->C;
* A<-B;
* \endmsc
*/
class A {};
class B {};
class C {};
I installed the mscgen.exe executable, and I set its path in the environment variable.
When running Doxygen, from its log this is all I get in relation to interaction diagrams: "Searching for msc files...".
The final Doxygen output contains a place holder for a missing interaction diagram, and the "Test interaction diagram" label.
I must be missing something in the Doxyfile file. How can I make Doxygen call the mscgen.exe executable?
Looking at the PNG files generated, the one Doxygen is looking for is missing, so I suppose mscgen.exe has not run at all.
This is the Doxygen generated HTML code block:
<div align="center">
<img src="../../msc_inline_mscgraph_1.png" alt="msc_inline_mscgraph_1" border="0" usemap="#msc_inline_mscgraph_1.map">
<map name="msc_inline_mscgraph_1.map" id="msc_inline_mscgraph_1.map"></map>
<div class="caption">
Test interaction diagram</div>
</div>
Try removing the caption. I have the same problem on Windows. I do not have other platforms handy to compare results and see if it is a Windows-only problem. When I do:
#msc "hello, world"
a, b;
a => b;
#endmsc
The figure does not generate. If I remove the caption, like this:
#msc
a, b;
a => b;
#endmsc
The figure generates, but there is no caption. When the caption is present, I see the error:
error: failed to open map file path-on-my-local-computer-redacted/docs/html/inline_mscgraph_2.msc.map for inclusion in the docs!
The interesting part is that the file is not generated when there is no caption either -- the difference is that Doxygen does not seem to care that the map file does not exist. I do not seen an obvious option that controls map file generation.
Sorry, for just a partial answer several months after the original question. I got here Google searching for an answer the same question and hope this will at least let others get sequence charts without captions.
I had the exact same problem and found that a syntax error in the msc-part was the reason. Once I got it error-free, it all build well.
It take me a while to identify the problem. A search took me to a guy's thread "Problem with msc graph" who had the same problem and the solution:
[...]
If there is a syntax error in an msc tag then At the end of the
generation run I get the following error message:
error: failed to open map file [...]
I'm getting this syntax-error.
I enabled the button-radius in settings.scss in foundation and got returned with this error.
Syntax error: Undefined variable: "$global-radius".
on line 348 of scss/_settings.scss
from line 1 of scss/app.scss
Use --trace for backtrace.
checked both of the files and can't seem to see the problem.
// We use this to set the default radius used throughout the core.
$button-radius: $global-radius;
// $button-round: $global-rounded;
Thanks in advance!
$global-radius is either not defined, or is commented out. Try adding:
$global-radius = 3px;
at the top of your _settings.scss file and see if that fixes the problem. Or do a search for the $global-radius variable to make sure it's not commented out.
Specifying $include-html-classes to false and then importing Foundation 5 to your Sass file still generates a bunch of CSS. Looks like some of it is meta stuff for versioning information I suppose, but some of it looks like HTML classes. I thought the whole point of using this variable was to remove HTML classes?
Here's my SCSS file:
#import "../foundation/settings";
$include-html-classes: false;
#import "foundation";
This wasn't a problem in Foundation 4. What are these styles and how can I get rid of 'em?
This looks like it is a bug where new presentational classes have been added above the conditionals. Since you question is how to fix it, here is the process if you don't want to wait until it is fixed officially.
Move your Scss into a different directory or fork the foundation bower repo.
Update your config.rb (line 2) to point to the new files, this is relative to your project directory
# Require any additional compass plugins here.
add_import_path "some_other_directory/foundation/scss"
Then you will need to modify each file that generates presentational classes. Luckily Compass/Sass gives us the exact place to look.
/* line 259, ../bower_components/foundation/scss/foundation/components/_global.scss */
meta.foundation-version {
font-family: "/5.1.0/";
}
On line 296 you will see the conditional line:
#if $include-html-global-classes {
and all of the classes that have been added above it.
You will need to move this line to 260 and it should look like the following.
#include exports("global") {
#if $include-html-global-classes {
meta.foundation-version {
font-family: "/5.1.0/";
}
Since this is Scss you could either leave or correct the indentation to match.
You would need to repeat this for each file that generates CSS with Compass. If you are running compass watch, you can just check or reload your stylesheets/app.css after each correction.
I'm using ABCpdf 9.1 x64 .Net with Coldfusion to create PDF's based on HTML content. Each PDF document has a different header and footer which are generated as HTML with some Coldfusion code. The header is identical for every page where the footer is slightly different for every page (because it shows the page number). Here's the main part of my code:
// add content
theDoc.Get_Rect().Set_String("67 80 573 742");
theContentID = theDoc.AddImageHTML(pdfContent);
while (true) {
if (!theDoc.Chainable(theContentID)) {
break;
}
theDoc.Set_Page(theDoc.AddPage());
theContentID = theDoc.AddImageToChain(theContentID);
}
// add header & footer on each page
for (i=1; i <= theDoc.Get_PageCount(); i++) {
// set page
theDoc.Set_PageNumber(i);
// HEADER
theDoc.Get_Rect().Set_String("67 755 573 809");
theDoc.AddImageHTML(headerContent);
// FOOTER
theDoc.Get_Rect().Set_String("67 0 573 65");
theDoc.AddImageHTML(replace(footerContent, "[page]", i));
}
As you can see, the AddImageHTML() method gets called 2 times for every page and once for the content. So if I have content which creates 6 pages, the method gets called 13 times. This isn't ideal because the method consums a lot of time.
Is there a more efficient way to add a header and footer from HTML? There's a method AddImageCopy() but it doesn't work with objects created by AddImageHtml() .
Just for understandig: Those getter and setter methods are created by Coldfusion to access .Net properties.
If your HTML is relatively simple and does not rely on CSS, you can perhaps tweak it to HTML Styled text and use use AddHtml instead of AddImageHtml. AddHtml should perform much faster than AddImageHtml. As a side benefit you will be able to use referenced (not system-installed) fonts and CMYK colors if necessary.
Since your header is identical on every page, perhaps you could use AddImageHtml on a secondary Doc object, then add that as an image on each page. This would cut the calls for the header from one per page to one only per file.
Since the footer is different on each page, I don't see how you can avoid a call to something on each page.
I used this approach where the header is the same across all pages
doc.PageNumber = 1;
doc.Rect.Rectangle = headerRect; //headerrect should define the rect where the header is
doc.AddImageHtml(headerHtml); //perform addimage html once
//repeat for other pages (clones the header. much faster than calling addImageHtml every time)
for (int i = 1; i <= doc.PageCount; i++)
{
doc.PageNumber = i;
doc.AddImageDoc(doc, 1, doc.Rect);
}