Change the font size of the index bar - sencha-touch-2

I am new for sencha touch. I need to set the font size of the index bar
Please see the picture below
Here is my scss file
$base-color: #1674B6;
$active-color: #BCC8DA;
$index-bar-height: 50em ;
#import 'sencha-touch/default/all';
// You may remove any of the following modules that you
// do not use in order to create a smaller css file.
#include sencha-panel;
#include sencha-buttons;
#include sencha-sheet;
#include sencha-picker;
#include sencha-tabs;
#include sencha-toolbar;
#include sencha-toolbar-forms;
#include sencha-indexbar;
#include sencha-list;
#include sencha-layout;
#include sencha-carousel;
#include sencha-form;
#include sencha-msgbox;
#include sencha-loading-spinner;
#include sencha-list-paging;
#include sencha-list-pullrefresh;
#include sencha-toolbar-ui('cusToolbar', #E1E4ED, 'glossy');
// Your custom code goes here...
#include pictos-iconmask('card2');
#include pictos-iconmask('button3');
#include pictos-iconmask('circle2');
#include pictos-iconmask('circle3');
#include pictos-iconmask('bullseye1');
#include pictos-iconmask('reply');
#include pictos-iconmask('add_black');
#include pictos-iconmask('user_list');
#include pictos-iconmask('user_list2');
#include pictos-iconmask('list');
#include pictos-iconmask('note1');
#include pictos-iconmask('team1');
#include pictos-iconmask('user');
//--Custom GroupBy List css --
.tweet-wrapper {
h2 { font-weight: bold; padding-bottom: 3px; }
img { border-radius: 5px; float: left; }
.tweet {
font-size: 63%;
margin-left: 60px;
min-height: 40px;
}
.posted { float: right; }
}
.txtwhite {
font-family: "Helvetica Neue",HelveticaNeue,"Helvetica-Neue",Helvetica,"BBAlpha Sans",sans-serif;
font-size: .7em;
margin-left: 60px;
min-height: 50px;
font-weight: bold;
color:white;
}
h2 { font-weight: bold; padding-bottom: 3px; }
img { border-radius: 5px; float: left; }
.tweet {
font-size: 70%;
margin-left: 60px;
color: #333;
min-height: 50px;
}
.posted { float: right; }
.x-pullmenu {
display: -webkit-box!important;
display: box!important;
-webkit-box-orient: horizontal;
box-orient: horizontal;
-webkit-box-align: center;
box-align: center;
-webkit-box-pack: center;
box-pack: center;
position: absolute!important;
}
.x-pullmenu-top {
top: -30px;
left: 0;
width: 100%;
height: 30px;
}
.x-pullmenu-left {
top: 0px;
left: -100px;
width: 100px;
height: 100%;
}
.pullmenu#my-top-menu .x-body {
background-color: black!important;
}
.bottom-menu {
background-image: url(../images/bottom-menu.png) ;
background-repeat: no-repeat ;
background-size: 100% 100% ;
}
.menu-top {
background-image: url(../images/top-menu.png) ;
background-repeat: no-repeat ;
}
.doc-button {
background-image: url(../images/info.png)!important;
background-repeat: no-repeat ;
background-size: 100% 100% ;
width: 30px ;
height: 30px ;
margin: 5px 20px 0 20px;
}
.ok-button {
background-image: url(../images/ok.png)!important;
background-repeat: no-repeat ;
background-size: 100% 100% ;
width: 30px ;
height: 30px ;
margin: 5px 0 5px 20px;
}
.saving {
margin-top: 8px;
}
#doc-content {
font-size: 15px ;
}
.doc-opt-label {
display: inline-block;
width: 100px ;
}
.doc-opt-expl {
display: inline-block ;
width: 100% ;
}
.pull-menu-doc {
color: white ;
}
#import '../global';
/**
* #class Ext.dataview.IndexBar
*/
/**
* #var {measurement} $index-bar-width
* Width of the index bar.
*/
$index-bar-width: 1.1em !default;
/**
* #var {color} $index-bar-bg-color
* Background-color of the index bar.
*/
$index-bar-bg-color: hsla(hue($base-color), 10%, 60%, .8) !default;
/**
* #var {color} $index-bar-color
* Text color of the index bar.
*/
$index-bar-color: darken(desaturate($base-color, 5%), 15%) !default;
/**
* Includes default index bar styles.
*/
#mixin sencha-indexbar {
.x-indexbar {
padding: 0 .3em;
width: $index-bar-width;
#include display-box;
#include box-orient(vertical);
#include box-align(stretch);
#include box-pack(center);
position: absolute;
top: 1.5em;
right: 0;
bottom: 1em;
z-index: 3;
}
.x-indexbar-body {
padding: .3em 0;
}
.x-indexbar-pressed .x-indexbar-body {
#include border-radius(($index-bar-width - .6em)/2);
background-color: $index-bar-bg-color;
}
.x-indexbar-item {
color: $index-bar-color;
font-size: 3em;
text-align: center;
line-height: 3em;
font-weight: bold;
display: block;
}
}
I need to set the font size to become more bigger.

From what I can see when I inspect the indexbar, you need to override the css .x-indexbar > font-size :
.x-indexbar > div {
font-size: 1em; // for instance
}
Hope this helps

Related

CleanCSS warning when finds Import statements

I have the following file:
styles.css
#import url("https://fonts.googleapis.com/css2?family=Oxygen:wght#300;400;700&display=swap");
html,
body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
min-height: 100vh;
justify-content: flex-start;
overflow-x: hidden;
padding: 0;
margin: 0;
-webkit-text-size-adjust: none;
font: normal normal normal 16px Oxygen;
letter-spacing: 0px;
color: #1b1018;
background-repeat: no-repeat;
background-size: cover;
}
body > header {
flex-shrink: 0;
color: #fff;
background: #69b684;
text-align: center;
padding: 20px;
}
body > main {
margin: 0 auto;
max-width: 1150px;
text-align: center;
padding: 50px 10px;
max-width: 860px;
background: #ffffff 0% 0% no-repeat padding-box;
border: 9px solid #ffffff53;
}
which I want to minify with: CleanCSS.
For that, I did the following:
$ npm install clean-css-cli -g
$ cleancss --output styles.min.css styles.css
But when executing the command, I get the following warning:
WARNING: Skipping remote #import of "https://fonts.googleapis.com/css2?family=Oxygen:wght#300;400;700&display=swap" as resource is not allowed.
Is there any way to get rid that warning?
The output file is fine for me, though:
styles.min.css
#import url(https://fonts.googleapis.com/css2?family=Oxygen:wght#300;400;700&display=swap);body,html{height:100%}body{display:flex;flex-direction:column;min-height:100vh;justify-content:flex-start;overflow-x:hidden;padding:0;margin:0;-webkit-text-size-adjust:none;font:normal normal normal 16px Oxygen;letter-spacing:0;color:#1b1018;background-repeat:no-repeat;background-size:cover}body>header{flex-shrink:0;color:#fff;background:#69b684;text-align:center;padding:20px}body>main{margin:0 auto;max-width:1150px;text-align:center;padding:50px 10px;max-width:860px;background:#fff 0 0 no-repeat padding-box;border:9px solid #ffffff53}
Thanks in advance!

How to create range slider in angular 5

I tried ng2-ion-range-slider and ng2-nouislider using documentation described in github.
When i add these component it showing "it is not a known element of ngModule"
I import ng2-nouislider, ng2-ion-range-slider in my app module
APP MODULE
import 'hammerjs';
import {SharedModule} from './core/modules/shared.module';
import {AppComponent} from './app.component';
import {VoifinityMainModule} from './main/main.module';
import {FuseSplashScreenService} from './core/services/splash-screen.service';
import {VoifinityConfigService} from './core/services/config.service';
import {FuseNavigationService} from './core/components/navigation/navigation.service';
import {AppRoutingModule} from './app-routing.module';
import {AuthenticationModule} from './authentication/authentication.module';
import {VoifinityAuthInterceptor} from './core/auth/voifinity-auth.interceptor';
import {AuthService} from './core/auth/auth.service';
import {AuthGuardService} from './core/auth/auth-guard.service';
import {SimpleNotificationsModule} from 'angular2-notifications';
import {AppService} from './app.service';
import {NgHttpLoaderModule} from 'ng-http-loader/ng-http-loader.module';
import {IonRangeSliderModule} from 'ng2-ion-range-slider';
#NgModule({
declarations: [
AppComponent
],
imports : [
BrowserModule,
HttpClientModule,
BrowserAnimationsModule,
AppRoutingModule,
SharedModule,
SimpleNotificationsModule.forRoot(),
AuthenticationModule,
VoifinityMainModule,
NgHttpLoaderModule,
IonRangeSliderModule
],
providers : [
AuthService,
AppService,
AuthGuardService,
{
provide: HTTP_INTERCEPTORS,
useClass: VoifinityAuthInterceptor,
multi: true
},
FuseSplashScreenService,
VoifinityConfigService,
FuseNavigationService
],
bootstrap : [
AppComponent
]
})
export class AppModule
{
}
app.component.html, added ion-range slider component. but it shows template parse error. ion-range-slider is not a known element
<ion-range-slider #sliderElement
type="double"
[min]="myMinVar"
max="100"
from="28"
from_min="10"
from_max="30"
from_shadow="true"
to="40"
to_min="40"
to_max="90"
to_shadow="true"
grid="true"
grid_num="10"
prefix="Weight: "
postfix=" million pounds"
decorate_both="false"
(onUpdate)="myOnUpdate($event)"
(onChange)="myOnChange($event)"
(onFinish)="myOnFinish($event)"></ion-range-slider>
Seems to be working fine in my case after installing the required dependencies, have a look at my working demo.
Don't forget to include NouisliderModule in the imports of your app.module, and #import "~nouislider/distribute/nouislider.min.css"; in your styles.css
giphy animated gif link
I have developed a range slider but it uses html css and angular (typescript). You may have to modify code slightly but it works by using a CSS circle, placing the number value at a position in that circle, and placing that over the input range.
html section
<div class="row small-margin"><div class="col-lg-8 small-padding">
<div class="form-group has-success">
<label>Credit Score</label>
<br />
<div class="ui medium-padding">
<div class="slidecontainer">
<input #creditSlider (input)="updateCreditSlider()" (change)="updateCreditSlider()" type="range" min="300" max="850" value="{{ creditSliderValue }}" class="slider" id="myRange">
</div>
</div>
<div #creditSliderSpan class="sliderValue circle" >
<span class="noselect">{{ creditSliderValue }}</span>
</div>
<div #creditSliderTrack class="sliderTrack" ></div>
</div>
typescript section (In the angular component class)
creditSliderValue : any;
#ViewChild('creditSlider') creditSlider;
#ViewChild('creditSliderSpan') creditSliderSpan;
.
.
.
updateCreditSlider() {
let horizontalOffset:number = 0;
//values from 300 to 850 - Next value needs to be adjusted based on your placement of slider object
horizontalOffset = ( (Number.parseInt(this.creditSlider.nativeElement.value )- 280)/2.45);
this.creditSliderSpan.nativeElement.style.left = ( horizontalOffset )+ 'px';
this.creditSliderSpan.nativeElement.style.top = this.creditSliderSpan.nativeElement.style.top + 'px';
this.creditSliderValue = this.creditSlider.nativeElement.value;
}
css section
.smallPadding {
margin-bottom: 0px;
padding: 4px;
}
.slidecontainer {
width: 100%; /* Width of the outside container */
}
/* The slider itself */
.slider {
position: relative;
-webkit-appearance: none; /* Override default CSS styles */
appearance: none;
width:275px;
//width: 100%; /* Full-width */
height: 15px;
border-radius: 5px;
//background: #d3d3d3; /* Grey background */
background: rgba(211,211,211, 0.00);
outline: none; /* Remove outline */
opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
-webkit-transition: .2s; /* 0.2 seconds transition on hover */
transition: opacity .2s;
z-index: 20;
}
/* Mouse-over effects */
.slider:hover {
//opacity: 1; /* Fully shown on mouse-over */
}
/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
.slider::-webkit-slider-thumb {
position: relative;
-webkit-appearance: none; /* Override default look */
appearance: none;
width: 50px; /* Set a specific slider handle width */
height: 50px;
border-radius: 50%;
border-style: none;
//background: #4CAF50; /* Green background */
background: rgba(76,175,80, 0.00);
cursor: pointer; /* Cursor on hover */
}
.slider::-moz-range-thumb {
width: 25px; /* Set a specific slider handle width */
height: 25px;
border-radius: 50%;
border-style: none;
//background: #4CAF50; /* Green background */
background: rgba(76,175,80, 0.00);
cursor: pointer; /* Cursor on hover */
}
.sliderValue {
position: absolute;
top: 25px;
left: 0px;
width: 100%; /* Width of the outside container */
z-index: 15;
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
#media screen and (max-width: 992px) {
}
.circle {
width: 50px;
height: 50px;
border-radius: 50%;
font-size: 14pt;
color: black;
line-height: 46px;
text-align: center;
background: white;
vertical-align: center;
//display: table-cell;
border-style: solid;
border-color: #7E7E7E;
}
.medium-padding {
padding-top: 14px;
padding-bottom: 14px;
}
.sliderTrack {
position: relative;
width: 220px;
height: 10px;
background-color: #E0E1E2;
vertical-align: center;
border-radius: 5px;
top: -35px;
left: 25px;
//display: table-cell;
//border-style: solid;
//border-color: #7E7E7E;
}
.left-padding {
padding-left: 14px;
}
.small-margin {
margin-left: 4px;
}
.medium-margin {
margin-left: 10px;
}
.small-padding{
padding: 4px;
}

Media query fails for only one property

I am unable to change padding for one element on mobile devices. The queries are working for several properties, but padding will not work (neither will line height if I try to use that). Basic styling in custom css is:
#topright {
font-size: 20px;
letter-spacing: 4px;
color: rgba(255,255,255,1.0);
padding-top: 8px !important;
padding-bottom: 8px !important;
font-weight: 200;
}
Media query for phone is
/* Custom, iPhone Retina */
#media only screen and (min-width : 320px) {
.header-2 .logo {
width: 250px;
}
.footer-widget ul li {
width: 100%;
}
.footer-widget ul {
padding-left: 0;
padding-right: 0;
}
div.vc_column-inner vc_custom_1476556729591 {
padding-left: 0;
padding-right: 0;
}
.footer-widget .textwidget p {
text-align: center;
}
#topright {
padding-top: 1px;
padding-bottom: 1px
}
}
The smaller padding number will not be applied. If I remove !important from main css, then the phone query gets applied to all devices. It's weird because all the other properties for the phone query are working fine.
From this helpful page on media queries, min-width: 320px means:
"If [device width] is greater than or equal to 320px, then do {...}"
In other words, the media query you think you created to target only iPhone will actually be firing for all devices which have a width of 320px or greater. Instead, I think you intended to use max-width
So use this CSS:
/* Custom, iPhone Retina */
#media only screen and (max-width : 320px) {
.header-2 .logo {
width: 250px;
}
...
#topright {
padding-top: 1px;
padding-bottom: 1px
}
}
And you should also remove the !important directives from your main.css file.

Bootstrap collapse nav at 991px

Building a site using Bootstrap. Having an issue with the van. I want it to collapse at 991px. Searched online and found this code, however it has changed the function of the nav as the nav wont stay open. Any ideas? The code used to override default is in my custom.css
http://nurdit.com/styleengineered/
#media (max-width: 991px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin: 7.5px -15px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
}
Try changing the CSS above to:
#media (max-width: 991px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin: 7.5px -15px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar-collapse.collapse.in { /* NEW */
display: block!important;
}
}
As far as I can tell, this does the trick on your site. Credit for this suggestion goes to Dave Forber , see Bootstrap 3 Navbar Collapse

saas Error building app when using scss file from example code (Sencha Touch 2.3)

This seems to be a saas/scss related issue. I am trying to include some scss code from the example files in Touch 2.3 on Windows 7 to get the 'first time screen'. This is from the sample touchtomatoes app (touch-2.3.0\examples\touchtomatoes\resources\sass).
The scss files in question are as follows:
_welcomeOverlay.scss :
.x-ie .welcomeOverlay.x-panel, .x-android-2 .welcomeOverlay.x-panel {
background-color: rgba(0,0,0,.5);
}
.welcomeOverlay.x-panel {
#include background-image(radial-gradient(center, ellipse cover, rgba(0,0,0,0.7), rgba(0,0,0,0.9)));
background-color: transparent;
.x-innerhtml {
#include st-box;
#include st-box-orient(vertical);
#include st-box-align(center);
#include st-box-pack(center);
height: 100%;
color: white;
.message {
#include st-box;
#include st-box-orient(vertical);
#include st-box-align(center);
#include st-box-pack(center);
#include text-shadow(1px 1px 0px rgba(0,0,0,.7));
#include query-medium {
font-size: 2em;
}
#include query-large {
font-size: 2.2em;
}
#include query-small-landscape {
font-size: .8em;
}
h2 {
text-align: center;
font-weight: 300;
font-size: 1.2em;
padding-bottom:15px;
color: #41942e;
em {
display: block;
color: #125B8F;
font-weight: 800;
font-size: 1.6em;
}
}
p{
text-align: center;
font-weight: 600;
max-width: 75%;
}
}
.tap {
padding-top:30px;
font-weight: 100px;
font-size: .8em;
}
}
}
_media-queries.scss:
#mixin query-small {
#media screen and (max-width: 480px){
#content;
}
}
#mixin query-small-landscape {
#media screen and (orientation: landscape) and (max-height: 480px){
#content;
}
}
#mixin query-medium {
#media screen and (min-width:481px) and (max-width: 1024px){
#content;
}
}
#mixin query-large {
#media only screen and (min-width: 1024px) {
#content;
}
}
app.scss:
#import "compass/css3";
#import "media-queries";
// The following two lines import the default Sencha Touch theme. If you are building
// a new theme, remove them and the add your own CSS on top of the base CSS (which
// is already included in your app.json file).
#import 'sencha-touch/default';
#import 'sencha-touch/default/all';
#import "welcomeOverlay";
#include icon-font('Pictos', inline-font-files('pictos/pictos-web.woff', woff, 'pictos/pictos-web.ttf', truetype,'pictos/pictos-web.svg', svg));
// Custom code goes here..
// Examples of using the icon mixin:
// #include icon('user');
.tr_select_field_config
{
font-size:5em !important;
color:red;
font-color: blue !important;
}
.result_list_cfg
{
font-size:0.8em !important;
color:red;
}
.no_prod_found_parameters
{
font-size:0.75em !important;
color:red;
}
.no_prod_found_label_text
{
font-size:0.9em !important;
color:red !important;
}
.home_page_list_text
{
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
border: 0px solid #0000FF;
background-color:red;
}
.dist_list
{
font-size:0.9em !important;
//color:red !important;
}
//#include pictos-iconmask('mail');
#include icon('mail');
//Import Sencha SAAS
#import "media-queries";
#import "welcomeOverlay";
//New buton color
#include sencha-button-ui('trblue', #0067B0, 'glossy');
//Adding class(es) for list options for users (page 1)
//#include icon('search_black');
//#include icon('refresh5');
//#include icon('globe1');
//#include icon('tabbed_book');
//#include icon('phone');
//#include icon('mail');
//#include icon('globe1');
.userCls:after {
font-family: "Pictos";
content: "s";
//content: "⇝";
//icon: "mail";
font-size: 1.5 em;
}
//End of class(es) for list options
Now when I build my app (sencha app build testing) I get the following error:
[INF] executing compass using system installed ruby runtime
Sass::SyntaxError on line ["24"] of C: Invalid CSS after "...de query-medium": expected "}", was "{"
Run with --trace to see the full backtrace
error app.scss (Line 24 of _welcomeOverlay.scss: Invalid CSS after "...de query-medium": expected "}", was "{")
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: compass process exited with non-zero code
: 1
[ERR]
[ERR] Total time: 21 seconds
Now if I comment the following lines (in _welcomeOverlay.scss), the build goes through well :
#include query-medium{
font-size: 2em;
}
#include query-large {
font-size: 2.2em;
}
#include query-small-landscape {
font-size: .8em;
}
I am new to sass, can anyone help with this please ?
Ravi