When we have an array which is bigger in size and some specific element is need to be fetched the _.filter() function is used to check and filter those elements which satisfy some specific conditions. It stores them into a new variable. This function is applied to an array, and it creates a new array… Continue reading To get a specific element in a large array which satisfy the condition given using underscore js _.filter function
Author: Abhilash Venkataramana
Use of CSS subgrid in replacement of CSS flexbox
In making any website responsible every alignment is being consider To align contents in grid we need maintain equal height when we use flex box to align grids height will be vary according to contents inside In order to make it align in propper manner in place of flexbox css subgrid can be used to… Continue reading Use of CSS subgrid in replacement of CSS flexbox
To add a information popup when hover using tooltip
The Tooltipis a property a pop-up box that appears when we hover over an element Here we can add a introduction about the element without opening it When moves hover it just gives a pop up containing information Here data-placement is a attribute used to specify the position of pop up to appear Tooltips must… Continue reading To add a information popup when hover using tooltip
RangeError
If a value is given and the value given is above the specific range RangeError is thrownCompiler will stops execution of rest of code To solve this we need to use try catch block Ex: 100 is not fit100 digits will not be allowed here
To change $ to USD in entry point file
Currency by default it will be in $ symbol if it is given USD in design we need to change as per requirement so directly we cannot change it in tpl file as it will be comming from source Then the view need to be extend in entry point file to redirect $ to USD… Continue reading To change $ to USD in entry point file
Resolve error: cannot find module ‘object-assign’ when run gulp deploy
The error was due to a node module that was not fully upgraded. I searched the entire node modules directory using the search function on atom for “PropTypes } from ‘react’” and react-router-dom came up. I upgraded the package to the most recent one and the warning was gone. Well the warning seems like you… Continue reading Resolve error: cannot find module ‘object-assign’ when run gulp deploy
To add tag to all the elements except to the element in the last
In tpl file we need to create <hr> tag along with class nameExample: In corresponding sass file
Change the name of page in breadcrumb and website
Create a new extension Extend and wrap .js file Extend the view of file need to be changed This is to change name of website on all section
To get variable for screen sizes
In SCA it is suggested not to use direct values for different screen sizesHence we need to use screen sizes as variables accordingly To get variable in themes navigation is given below to find variables theme/Modules/twitter-bootstrap-sass/3.4.1/assets/stylesheets/bootstrap/_variables.scss For example 768px we can use $screen-sm-min Screen sizes here will be defined for different devices such as tablets,… Continue reading To get variable for screen sizes
Adding a style in themes and making it as variable
In theme development styles are used by calling variables Here is an example of adding a color and making it as variableIn files open BaseSassStyle, go to variables, select colors use $ in beginning to declare variableEx; $sc-color-primary: #e23200; Next open skin1.JSON There declare the variable followed by syntax“$sc-color-primary”: “#e23200”, Now we can use #e23200… Continue reading Adding a style in themes and making it as variable