How to scale down the UI size in ExtJS crisp theme - extjs

Comparing Extjs crisp and classic themes, apart from styling, the there is a difference with size / scale of ui.
The Crisp theme looks its zoomed up 110% of classic.
Is it possible to scale down the size of crisp theme to that of classic ?
I realize that with styling comes padding, borders and image sizes which would be set for compoentns under each theme.
But i would still like to know if scaling down the size is possible ?
Thanks in advance

Yes, the font size is larger (13px in crisp, 12px in classic), plus each them is using a different font scheme, which will add a bit of a difference as well.
To your question of scaling down the font size, the answer, of course, is yes this is possible. You could go down a bad road of creating a bunch of CSS rules to override what's already in crisp, and that would certainly work.
However, the better option would be to create your own theme altogether. You could create a theme that extends crisp, and then simply tweak the various areas that you want to be different (font sizes, paddings on different components, etc). If you do this, keep in mind that the crisp theme extends the neptune theme, while classic only extends neutral (which neptune also extends). I say this because if you look at the actual crisp theme, it's pretty bare in terms of the things you're looking to tweak (padding, margins, etc). That's because the majority of these derive from the neptune theme, so you'll probably do yourself a favor to become acquainted with both themes in order to most efficiently achieve the result you're after.
If you've not done a custom Ext JS theme before, be sure to check out the guide here: http://docs.sencha.com/extjs/5.0/core_concepts/theming.html. This guide also has a nice chart that illustrates the theme inheritance for the default theme packages, so be sure to take a look at that as well.
Hope that helps!

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;
}
}

Angular Material intentions and hues used by components

I am trying to use angular material,
I read everything in the documentation's theming section revied most of the demos and directive docs and even tried to have a look into the source code and I was wandering if there is a guide somewhere that explains how each angular material ui directive uses the different intention palettes and hues set in a theme.
The reason I am asking for this is that it feels like as long as we choose standard palettes everything plays nice but the moment we want to make any change we are blind as to the implications.
(e.g. how to prevent a situation where you choose a background color the ends up being the same color as some accent color used for example as the underline color for a textbox causing the undeline not to be visible.)
There is one part in the mentioned documentation that comes to mind.
Specifying Custom Hues For Color Intentions
You can specify the hues from a palette that will be used by an intention group by default and for the md-hue-1, md-hue-2, md-hue-3 classes.
By default, shades 500, 300 800 and A100 are used for primary and warn intentions, while A200, A100, A400 and A700 are used for accent.
You can check the hues/shades used by each component in the source. There is a *-theme.scss file for each component: https://github.com/angular/material/blob/master/src/components/input/input-theme.scss
And there is the official material design style guide, telling you which hues/shades are used for what.
https://material.google.com/style/color.html#color-color-palette

How to build a modular grid?

A lot of the websites these days is built using grids, pre-made or custom ones. What I noticed is that most of these grids are based on rows, and usually work with the width of the columns, not taking the height of the elements (modules) into account.
I was wondering what the best way (or what the possibilities are) of building a modular grid is? By modular grid I understand such grid where the individual modules could be set in both width and height and be fluid in dependence on the screen. A grid where you'd know you have let's say 12 columns and 9 rows (the width / height of each would be given), and you'd be able to fill it with modules like a mosaic (that makes it sound almost too simple).
Here's an example picture of what I have in mind (picture borrowed from here):
I came upon a couple of examples, but most of them weren't responsive or were built using Flash. I believe there is a way to do it, just not sure myself how.
I know there might not be ONE correct way, but I'm curious about the possible techniques to go about it. Thank you!
This layout technique is commonly known as masonry, here are a couple of responsive masonry links to get you started:
http://masonry.desandro.com
http://osvaldas.info/responsive-jquery-masonry-or-pinterest-style-layout
good luck!
I would have to say your best option would be to build it using Bootstrap or Foundation, since they are set up to handle this kind of thing.They have classes that, assuming you use a 12 column grid to start, let you pick how many columns they can take up.
links:
http://getbootstrap.com/
http://foundation.zurb.com/

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

Respecting XP themes when designing WinForms UI

How do you deal with the different XP themes when designing a WinForms UI? Do you avoid hard coded color values or just accept that your UI will not look good on non standard themes?
For instance, I have a light blue gradient panel that looks good against the standard control background color but would clash with other custom themes. What's a good approach to take?
Avoid hex colors and colors with names like "White" or "Green". The color picker for most objects should be able to show you colors with names like "ActiveWindow" or "ForegroundText". Those are the colors you want to be using. They are available via code also, and you want to choose them so that the names have some relationship to how they're used. For example, don't set "ForegroundText" as your background color just because you want a black background. If you have a gradient, then use those colors to build the gradient. Also, there's an event you may need to handle for when the theme changes.
That's if you choose to respect the themes. If you have a really out-there interface then you may want to specify your own colors. In that case, never use the windows colors, because they won't be reliable and you might end up with something real ugly. That means you'll need to go and change all the defaults in the standard controls, but if you're doing this you probably have your own controls anyway.
In summary, the thing to remember is that it's an all or nothing shot: either respect themes and always use colors defined based on Windows widget elements, or don't use themes and never use those colors at all.

Resources