Foundation 5 - change default font size without impacting grid - responsive-design

I'm working on a project using Zurb Foundation and need to change the base font-size from the default 16px to 13px without impacting the grid.
I attempted to do so by following the instructions in Foundation's settings as follows:
$base-font-size: 13px;
$rem-base: $base-font-size;
However, this seems to have no impact on the size the font is rendered at. Am I simply missing something? Thanks!

This should work as the variables are correctly used, you may be overriding the font size in the css. I have tested the code and it changes the font-size and does not affect the grid.

Related

How is the size of the StatusBar (in the Toolbar) set?

In my app, on iphone as well as in the iPhoneX skin on the simulator, the size of StatusBar (inside the Toolbar) is for some reason too small/thin, so the title of the Form is shown partially hidden by the iPhoneX notch.
I've tried to understand how to fix this, but I simply can't figure out how the size of the StatusBar is set. I don't change the size of the StatusBar UIID in my css file, nor in my code and yet it is smaller than if I create a fresh Hello World example with the iPhoneX.skin.
I first thought it could be the SafeArea which changed the size, but it doesn't seem so. Then I thought the default theme (or the values of the Default UIID in the css) could change the size, but it doesn't seem to be that either. I probably miss something obvious, but I'm stuck so any help would be greatly appreciated.
PS. I could of course force the size of the StatusBar in css myself, but then I'm not sure it will work on the various devices, so I prefer rely on the default value defined by CN1.
The StatusBar UIID is defined internally and is generally hard coded to a value that fits for most themes. This very much depends on the padding in your Title UIID which is often large and works in tandem with the status bar. Assuming your title has 0 padding you might need more padding to the StatusBar.
Assuming you're using CSS you can use something like:
#media platform-ios {
StatusBar {
padding: 7mm;
}
}

What theme variable addresses the thickness of window resize handles?

Using a theme that extends Triton, I find that the resize handles on instances of Ext.window.Window are 10px wide. That thickness interferes with scrollbars (and maybe other things). I cannot, however, figure out how what theme variable influences resize handle thickness.
https://fiddle.sencha.com/#fiddle/1fun
I'm not sure which version of Ext you're using, so hereby I assume you use 6.0.2. I found in the documentation there's a Resizer component that is used by several components including Window. Here's a link: http://docs.sencha.com/extjs/6.0.2-classic/Ext.resizer.Resizer.html
If you there look into the theme veriables you'll find this: $resizer-handle-size. By default this is set to the same width of $panel-frame-border-width. To override that you'll need to change the number in your sass yourself.
Hope this helps you out!

Responsive font size according to window width, is it possible with CSS?

I have made a responsive design on Wordpress and have adjusted everything. The whole layout and slideshows and plugins adjust to the window width, but I can't make the fonts responsive. I have tried many different options with percentages and also now with Vw and Vh. It does work but viewport width and height units have too big intervals and unfortunately when the window resizes the changes are very dramatic. I need some smooth way of reducing font size with the window size with little changes and also preferably minimum width to be set to some fixed unit. Please help me, is it possible with just CSS?
Sounds like you want to have pretty fine control over the font sizing.
There's a great article over on CSS-Tricks that outlines some of your options. Chris recommends using vmin to control the font-size. After experimenting I'd recommend using vmax because it will select the max of vw and vh, which kinda serves as the minimum font-size you mentioned.
Something like:
p {
font-size: 2vmax;
}
Also note: there's a bug in Chrome 20+/Safara 6+ that prevents the font from resizing itself according to the new viewport size.
If this isn't fine-grained enough unfortunately I think you're going to have to use js. I'd recommend going with one of these fine plugins:
SlabText
FitText

How to set max-height to image's original height in a responsive design?

I'm building a responsive site using WordPress, and images are automatically set to height:100%; width:auto; and the div resizes according to window size. But this often means some images have their height set to higher than their actual height causing pixelation. What i need is something like height: 100%; width:auto; max-height:"image height here". How, if this is possible, is this possible?
The page where this is an issue is here: http://wheretoimmigrate.com/onthemouse/?portfolio=atomic-clothings-2012-campaign
I resolved it by simply making the images larger by adding a transparent background of larger size and different proportions. Tricked the system into treating it like a larger image. Worked perfectly.

Which format and size of icons to use for NotifyIcon

i couldn't find any information regarding system tray icons, what size should they be in to get the best possible quality. Should i use more than one size (16x16,32x32,64x64)?
I'm currently using 16x16 .ICO icons and they look disorted.
They are small icons (ICON_SMALL). You can find out the size by calling:
GetSystemMetrics(SM_CXSMICON)
I think it's pretty safe to assume that they are square, but if you are paranoid then you can always inquire about SM_CYSMICON.
On my Windows 7 machine they are 16px in size. But if you are using font scaling then they will be larger. For a 125% font scaling (e.g. large fonts) you will need a 20px icon.
If you don't have a 20px version at hand then the best approach is to generate one on the fly and put your 16px version in the middle of the new 20px icon.
Update
The documentation of NOTIFYICONDATA recommends using LoadIconMetric passing LIM_SMALL which is equivalent to the approach I outline above.
However, the NOTIFYICONDATA topic also says to use an icon resource containing just16px and 32px versions of the icon. That advice is bogus because, as anyone can see for themselves, notification icons under large fonts are 20px icons and LoadIconMetric will have scale from 32 to 20. I would recommend supplying 16, 20, 24, 32px versions.
On XP LoadIconMetric doesn't exist so you'd need to implement a fallback routine.
I believe it's best to create your icon in multiple sizes and let Windows choose the best one. You're never sure how large the system tray is, because different users may have different settings.
That could also be the reason yours seems distorted. Say you're using a 16x16, but you've set Windows to display them 18x18. If you haven't provided an 18x18 icon, it'll be distorted.
See this question and Larry Osterman's answer.

Resources