Professionalism and Professional PracticesGupta Pandiri
Characteristics and responsibilitiesof professional engineers
Professional engineers are expected to possess :
education, knowledge, and skills in an engineering specialty that exceed those of the general public.
willingness to stay abreast of discoveries and technological changes by participation in professional meetings and continuing education.
willingness to advance professional knowledge, ideals, and practice and to share their knowledge with their peers.
a sense of responsibility and service to society and to their employers and clients, and they must act honorably in their dealings with others.
willingness to follow established codes of ethics for their profession and to guard their professional integrity and ideals and those of their profession.
The Ethics Committee of the Engineers’ Council for Professional Development prepared the following statement describing the faith of the engineer:
I AM AN ENGINEER. In my profession I take deep pride, but without vainglory; to it I owe solemn obligations that I am eager to fulfill.
As an Engineer, I will participate in none but honest enterprise. To him that has engaged my services, as employer or client, I will give the utmost of performance and fidelity.
When needed, my skill and knowledge shall be given without reservation for the public good. From special capacity springs the obligation to use it well in the service to humanity; and I accept the challenge that this implies.
Jealous of the high repute of my calling, I will strive to protect the interests and the good name of any engineer that I know to be deserving; but I will not shrink, should duty dictate, from disclosing the truth regarding anyone that, by unscrupulous act, has shown himself unworthy of the Profession.
Ideals and obligations of professional engineers
Since the Age of Stone, human progress has been conditioned by the genius of my professional forebears. By them have been rendered usable to mankind Nature’s vast resources of material and energy. By them have been vitalized and turned to practical account the principles of science and the revelations of technology. Except for this heritage of accumulated experience, my efforts would be feeble. I dedicate myself to the dissemination of engineering knowledge, and especially to the instruction of younger members of my profession in all its arts and traditions.
To my fellows I pledge, in the same full measure I ask of them, integrity and fair dealing, tolerance and respect, and devotion to the standards and the dignity of our profession; with the consciousness, always, that our special expertness carries with it the obligation to serve humanity with complete sincerity.
Professionalism and Professional PracticesGupta Pandiri
Characteristics and responsibilitiesof professional engineers
Professional engineers are expected to possess :
education, knowledge, and skills in an engineering specialty that exceed those of the general public.
willingness to stay abreast of discoveries and technological changes by participation in professional meetings and continuing education.
willingness to advance professional knowledge, ideals, and practice and to share their knowledge with their peers.
a sense of responsibility and service to society and to their employers and clients, and they must act honorably in their dealings with others.
willingness to follow established codes of ethics for their profession and to guard their professional integrity and ideals and those of their profession.
The Ethics Committee of the Engineers’ Council for Professional Development prepared the following statement describing the faith of the engineer:
I AM AN ENGINEER. In my profession I take deep pride, but without vainglory; to it I owe solemn obligations that I am eager to fulfill.
As an Engineer, I will participate in none but honest enterprise. To him that has engaged my services, as employer or client, I will give the utmost of performance and fidelity.
When needed, my skill and knowledge shall be given without reservation for the public good. From special capacity springs the obligation to use it well in the service to humanity; and I accept the challenge that this implies.
Jealous of the high repute of my calling, I will strive to protect the interests and the good name of any engineer that I know to be deserving; but I will not shrink, should duty dictate, from disclosing the truth regarding anyone that, by unscrupulous act, has shown himself unworthy of the Profession.
Ideals and obligations of professional engineers
Since the Age of Stone, human progress has been conditioned by the genius of my professional forebears. By them have been rendered usable to mankind Nature’s vast resources of material and energy. By them have been vitalized and turned to practical account the principles of science and the revelations of technology. Except for this heritage of accumulated experience, my efforts would be feeble. I dedicate myself to the dissemination of engineering knowledge, and especially to the instruction of younger members of my profession in all its arts and traditions.
To my fellows I pledge, in the same full measure I ask of them, integrity and fair dealing, tolerance and respect, and devotion to the standards and the dignity of our profession; with the consciousness, always, that our special expertness carries with it the obligation to serve humanity with complete sincerity.
Ge6075 professional ethics in engineering unit 1Dr Geetha Mohan
Morals, values and Ethics – Integrity – Work ethic – Service learning – Civic virtue – Respect for others – Living peacefully – Caring – Sharing – Honesty – Courage – Valuing time – Cooperation – Commitment – Empathy – Self confidence – Character – Spirituality – Introduction to Yoga and meditation for professional excellence and stress management.
Senses of “Engineering Ethics” – Variety of moral issues – Types of inquiry – Moral dilemmas – Moral Autonomy – Kohlberg‟s theory – Gilligan‟s theory – Consensus and Controversy – Models of professional roles - Theories about right action – Self-interest – Customs and Religion – Uses of Ethical Theories
SCSS is a an extension of CSS that adds power and elegance to the basic language.
It helps keep large stylesheets well organized and get small stylesheets up and running quickly.
This recipe provides a structured approach for using SCSS Pre-processor for your web applications.
Features covered :
• Pre-processing
• Variables
• Nesting
• Partials
• Imports
• Mixins
• Inheritance
• Operators
I'm excited to announce that I've just released the stable version of Sass 3.5. This release focuses on compatibility with new CSS syntax, and helps lay the groundwork for the upcoming module system and compatibility with Dart Sass.
From this presentation, we will understand,
- Introduction to Sass
- Why adding Sass in our workflow
- Advantages of Sass
- How to convert our CSS into Sass
- Compass
- What is Compass
- How to use sass with compass
Ge6075 professional ethics in engineering unit 1Dr Geetha Mohan
Morals, values and Ethics – Integrity – Work ethic – Service learning – Civic virtue – Respect for others – Living peacefully – Caring – Sharing – Honesty – Courage – Valuing time – Cooperation – Commitment – Empathy – Self confidence – Character – Spirituality – Introduction to Yoga and meditation for professional excellence and stress management.
Senses of “Engineering Ethics” – Variety of moral issues – Types of inquiry – Moral dilemmas – Moral Autonomy – Kohlberg‟s theory – Gilligan‟s theory – Consensus and Controversy – Models of professional roles - Theories about right action – Self-interest – Customs and Religion – Uses of Ethical Theories
SCSS is a an extension of CSS that adds power and elegance to the basic language.
It helps keep large stylesheets well organized and get small stylesheets up and running quickly.
This recipe provides a structured approach for using SCSS Pre-processor for your web applications.
Features covered :
• Pre-processing
• Variables
• Nesting
• Partials
• Imports
• Mixins
• Inheritance
• Operators
I'm excited to announce that I've just released the stable version of Sass 3.5. This release focuses on compatibility with new CSS syntax, and helps lay the groundwork for the upcoming module system and compatibility with Dart Sass.
From this presentation, we will understand,
- Introduction to Sass
- Why adding Sass in our workflow
- Advantages of Sass
- How to convert our CSS into Sass
- Compass
- What is Compass
- How to use sass with compass
Sass is a powerful and professional grade css extension language in the world and improving your front-end css workflow.
This slide will teach you how to compile sass and how to use variables, nesting, mixins, data types, interpolation, operations and most important Sass Directives and so on.
Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themeable and extendable.
Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themeable and extendable.
Syntactically Awesome Stylesheet - A workshop by Citytech SoftwareRitwik Das
SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor which helps to reduce repetition with CSS and saves time. It is more stable and powerful CSS extension language that describes style of document cleanly and structurally.
Attached is an understanding of how SCSS works and can be used for implementation in website frameworks. One can apply certain techniques of scss in their website frameworks.
Sass is the most mature, stable, and powerful professional grade CSS extension language in the world.
Sass is a pre-processor and pre-processor is a program which used to change one type of data into another type of data
In other words, pre-processor take one type of data (sass data) and change into another type of data (css).
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
1. UNIT - III
RESPONSIVE WEB DESIGN
Sass for Responsive Web Design - Marking Content
with HTML5 - Mobile-First or Desktop-First - CSS
Grids, CSS Frameworks, UI Kits, and Flexbox for RWD
- Designing small UIs by Large Finger - Images and
Videos in Responsive Web Design - Meaningful
Typography for Responsive Web Design
Text Book (T2) :Ricardo Zea, "Mastering Responsive
Web Design", PACKT Publishing
2. Sass for Responsive Web Design
• Sass (Syntactically Awesome Style Sheets) is
an extension of CSS that enables you to use things like
variables, nested rules, inline imports and more. It
also helps to keep things organized and allows you to
create style sheets faster. Sass is compatible with all
versions of CSS. The only requirement for using it is
that you must have Ruby installed. (It is a dynamic and
general purpose programming language. Keywords are
used to define Class and Methods, whereas code
blocks can be both defined by keywords or braces)
• In short, Sass is a CSS preprocessor, which adds special
features such as variables, nested rules. The aim is to
make the coding process simpler and more efficient.
3. What is Sass?
• Sass stands for Syntactically Awesome Stylesheet
• Sass is an extension to CSS
• Sass is a CSS pre-processor
• Sass is completely compatible with all versions of
CSS
• Sass reduces repetition of CSS and therefore
saves time
• Sass is free to download and use
4. Why Use Sass?
• Stylesheets are getting larger, more complex, and
harder to maintain. This is where a CSS pre-processor
can help.
• Sass lets you use features that do not exist in CSS,
like variables, nested rules, mixins, imports,
inheritance, built-in functions, and other stuff.
• Mixins:
The @mixin directive lets you create CSS code that is
to be reused throughout the website. The @include
directive is created to let you use (include) the mixin.
A mixin is defined with the @mixin directive
To use a Mixin, we simply use @include followed by
the name of the Mixin and a semi-colon
5. A Simple Example why Sass is Useful
Let's say we have a website with three main
colors:
– #a2b9bc
– #b2ad7f
– #878f99
• So, how many times do you need to type those
HEX values? A LOT of times. And what about
variations of the same colors?
• Instead of typing the above values a lot of times,
you can use Sass and write this:
6. Sass Example
/* define variables for the primary colors */
$primary_1: #a2b9bc;
$primary_2: #b2ad7f;
$primary_3: #878f99;
/* use the variables */
.main-header {
background-color: $primary_1;
}
.menu-left {
background-color: $primary_2;
}
.menu-right {
background-color: $primary_3;
}
So, when using Sass, and the primary color changes, you only
need to change it in one place.
7. How Does Sass Work?
• A browser does not understand Sass code. Therefore, you
will need a Sass pre-processor to convert Sass code into
standard CSS.
• This process is called transpiling. So, you need to give a
transpiler (some kind of program) some Sass code and then
get some CSS code back.
• Transpiling is a term for taking a source code written in one
language and transform/translate it into another language.
Sass File Type
• Sass files has the ".scss" file extension.
Sass Comments
• Sass supports standard CSS comments /* comment */, and
in addition it supports inline comments // comment:
8. Sass Installation
System Requirements for Sass
– Operating system - Sass is platform independent
– Browser support - Sass works in Edge/IE (from IE 8), Firefox, Chrome,
Safari, Opera
– Programming language - Sass is based on Ruby
Installing Sass
Here are the steps we're going to follow:
– Download the Ruby installer
– Open the command line
– Install the Sass gem
Downloading the Ruby installer
• Windows: Download the Ruby installer from the following link:
• http://rubyinstaller.org/downloads/
• Mac: Ruby comes preinstalled on all Macs, so there's no need to
download anything.
9. Sass Installation
Opening the command line
• Windows and Mac: Open the command line.
Windows Tip!
– Press Windows + R, type CMD, and then press
Enter.
10. Opening the command line
Installing the Sass gem
Type the following command into the command prompt (it doesn't matter which folder
you're in):
1. Windows, use the following command:
gem install sass
2. Mac, use the following command:
sudo gem install sass
11. Using Sass
The following screenshots are on Windows, but the process can be applied
exactly the same regardless of platform.
In the following steps, you will see examples of how the necessary folders and files
look after being created, not how to create them:
1. Create a /Demo folder anywhere on your drive:
12. Using Sass
2. Inside that folder, create two subfolders, /css and /scss:
3.Create a .scss file. Go into the /scss folder and create a file called styles.scss:
13. Using Sass
4. Go back to the command line for a minute and follow these steps:
1. In the command line, type cd <space>
2. A space after cd means Change Directory. From your file manager, drag and drop
the /Demo folder into the command prompt/terminal window and press Enter.
15. Using Sass
5. Make Sass watch your /scss and /css folders by typing this in the command line:
sass --watch scss:css
6. Make Sass watch the /scss and /css folders.
16. Using Sass
7. Edit the .scss file and watch Sass compile it into a .css file:
1.Open your text editor (I use Sublime Text).
2.Open the styles.scss file.
3.Add some CSS to it.
4.Save the styles.scss file.
5. From your command line/terminal, verify that the compiling was successful.
6. Open your styles.css file and enjoy your new creation.
17. The basic concepts of Sass for RWD
Sass is a programming/scripting language
Let's discuss the following concepts :
• Sass or SCSS
• Variables
• Mixins
• Arguments
• Nesting
• Partial files
• @import
• Source maps
• Sass comments
18. The basic concepts of Sass for RWD
Sass is a programming/scripting language
Let's discuss the following concepts :
• Sass or SCSS
• Variables
• Mixins
• Arguments
• Nesting
• Partial files
• @import
• Source maps
• Sass comments
19. Sass or SCSS
• There are two ways we can write Sass-style CSS: the Sass syntax and the
SCSS syntax.
• The Sass syntax
• The Sass syntax, also known as the indented syntax, was the initial and
only way to write Sass. But it looked a bit too different than regular CSS,
making the learning curve steeper than it really needed to be.
• This syntax didn't use any braces or semicolons. In some cases, instead of
colons it used the equals sign. Unlike SCSS, indentation was very strict and
mandatory. Many developers weren't too fond of these aspects of the Sass
syntax.
• Here's a basic example:
.selector-a
• float: left
.selector-b
• background: orange
20. Sass or SCSS
This compiles to the following code:
.selector-a
{
float: left;}
.selector-b {
background: orange;}
Let's see that same example in a different way using the SCSS syntax as well:
.selector- {
&a {
float: left;
}
&a, &b
{ background: orange; }
}
21. Sass variables
• A variable is simply a way to store a value for later use
• This value is usually associated with a simple user-
friendly word
• Sass variables have to start with a dollar sign ($) symbol
• The great benefit of variables is that if we need to change
the value, we would make the change in a single place
rather than finding and replacing the value across the
entire document
• When listing more than one variable, there should be a
semicolon symbol (;) at the end of each variable.
Here's an example of a Sass variable:
• $brandBlue: #416e8e;
22. Example of how to use an SCSS
variable
$brandBlue: #416e8e;
body {
background: $brandBlue;
}
The preceding code compiles to the following:
body {
background: #416e8e;
}
23. Sass mixins
• Mixins are one of the most powerful features of Sass.
Mixins are a group of CSS declarations (a property and
value) that are stored for later use, just like a variable.
So instead of typing all those CSS declarations over and
over again, we just type the mixin's name.
• A few things to consider about Sass mixins are as follows:
• They start with the @mixin directive
• A mixin is called with the @include directive
• We can store any amount of CSS/SCSS data in a mixin
• Try to use arguments when creating a mixin so it's more
scalable
24. Example of a mixin
$brandBlue: #416e8e;
$supportGray: #ccc;
@mixin genericContainer
{
padding: 10px;
border: $brandBlue 1px solid;
background: $supportGray;
box-shadow: 1px 1px 1px rgba(black, .3);
}
We call a mixin in our SCSS file as follows:
.selector-a {
@include genericContainer;
}
25. Mixin
When compiled, it looks like this in the CSS:
.selector-a
{
padding: 10px;
border: #416e8e 1px solid;
background: #cccccc;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
26. Mixin
We used Sass variables within the mixin:
$brandBlue: #416e8e;$supportGray: #ccc;
@mixin genericContainer {
padding: 10px;
border: $brandBlue 1px solid;
background: $supportGray;
box-shadow: 1px 1px 1px rgba(black, .3);
}
We used the keyword black in the box-shadow color property instead of
using the hex #000 or rgb (0, 0, 0) values:
27. Sass arguments
• In our first mixin example, we didn't have any arguments. This
is really not ideal because it doesn't allow us to use different
values in the same properties. In the mixin example
mentioned earlier, let's add an argument:
$brandBlue: #416e8e;$supportGray: #ccc;
@mixin genericContainer($padding) {
padding: $padding;
border: $brandBlue 1px solid;
background: $supportGray;
box-shadow: 1px 1px 1px rgba(black, .3);
}
28. Sass arguments
• The argument for padding allows us to set any value we want.
We are not forced to have the padding as 10px every
time.This is how we set the value of the argument:
.selector-a {
@include genericContainer(10px);
}
This compiles to the following:
.selector-a {
padding: 10px;
border: #416e8e 1px solid;
background: #cccccc;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
• However, there's a potential problem with the argument; if
we don't set a value for the padding, we're going to get an
error when compiling.
29. Sass arguments
• Here's how we set a default value of an
argument:
$brandBlue: #416e8e;$supportGray: #ccc;
@mixin genericContainer($padding: 8px) {
padding: $padding;
border: $brandBlue 1px solid;
background: $supportGray;
box-shadow: 1px 1px 1px rgba(black, .3);
}
30. Sass arguments
This is how we call the mixin, without declaring any
padding value:
.selector-a {
@include genericContainer;
}
The compiled CSS is as follows:
.selector-a {
padding: 8px;
border: #416e8e 1px solid;
background: #cccccc;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
31. How to use several arguments in the same
mixin
Building on the preceding mixin, let's add a few more arguments to
make it more robust and scalable:
@mixin genericContainer($padding, $bdColor, $bgColor,
$boxShdColor)
{
padding: $padding;
border: $bdColor 1px solid;
background: $bgColor;
box-shadow: 1px 1px 1px $boxShdColor;
}
This is how we declare the arguments when including our mixin:
.selector-a
{
@include genericContainer(2%, $brandBlue, #ccc, black);
32. The preceding mixin and its arguments compile
to the following code:
.selector-a {
padding: 2%;
border: #416e8e 1px solid;
background: #cccccc;
box-shadow: 1px 1px 1px #000000;
}
33. Nesting in Sass
• Nesting in Sass is a perfect way to make our SCSS more readable. Just like
in HTML where tags get nested based on their parent elements, Sass uses
exactly the same structure.
• Here's an example of two-level selector nesting for a navigation bar:
• $brandBlue: #416e8e;nav {
ul {
display: flex;
margin: 0;
padding: 0;
list-style: none;
}
li {
margin: 5px;
background: #000;
}
a {
display: block;
padding: 5px 15px;
text-decoration:
none;
color: $brandBlue;
}
}
34. Partial files (partials) in Sass
• Partials allow us to modularize our files, for example, _variables.scss.
Partials start with the underscore symbol (_) and end with the extension
.scss. The underscore symbol tells the compiler that this file and its
contents do not need to be compiled into a separate CSS file.
• Partials are called using the @import directive, just like it is done in CSS.
The main differences are that there's no need to specify the underscore
symbol and the file extension.
• Let's create a partial file and put these color variables in it. We're going to
call this partial file, _variables.scss. The variables (snippets) in the
_variables.scss partial are as follows:
$brandBlue: #416e8e;
$brandRed: #c03;
$brandYellow: #c90;
• Let's then say that our main SCSS file is named styles.scss. We now have
two files: styles.scss and _variables.scss.
35. Partial files (partials) in Sass
• Let's then say that our main SCSS file is named
styles.scss. We now have two files: styles.scss and
_variables.scss.
• We call _variables.scss into styles.scss using the
@import directive:
• @import "variables";
• Notice that the underscore symbol and file extension
are not needed when referencing a partial; they can
be omitted. However, if you want to add them, that's
fine too. Omitting them keeps the code cleaner.
36. The Sass extend/inherit feature
• Many professionals say extend or inherit is one of the most
useful features of Sass. Others actually recommend staying
away from it.
• Extending in Sass means that we can use a selector's
properties in another selector without having to type all those
properties again. This is called inheriting. We use the
@extend directive for this.
• For example, consider the following selector:
$brandBlue: #416e8e;.generic-container {
padding: 10px;
border: $brandBlue 1px solid;
background: #ccc;
box-shadow: 1px 1px 1px rgba(black, .3);
}
37. The Sass extend/inherit feature
using the @extend directive to reuse the styles of the first selector in
the second one:
.box-customer-service {
@extend .generic-container;
padding: 25px;
}
This compiles to the following:
.generic-container, .box-customer-service {
padding: 10px;
border: #416e8e 1px solid;
background: #cccccc;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
.box-customer-service {
padding: 25px;
38. Marking Content with HTML5
• HTML5 elements in action
• Using Web Accessibility Initiative - Accessible
Rich Internet Applications (WAI-ARIA)
landmark roles to increase accessibility
• Important meta tags to consider for RWD
40. HTML5 elements
• The <main> element
• The element As per the Mozilla Developer
Network (MDN) definition:
• The HTML Main Element () can be used as a
container for the dominant contents of the
document. The main content area consists of
content that is directly related to, or expands
upon the central topic of a section or the
central functionality of an application
41. • few important points to remember about the
element:
• The top-level content of a page should be
included in the element.
• The content should be exclusive and unique to it.
• The element should never be included inside the ,
<header>,<footer><aside> or<article> elements.
• There can only be one element per page. Consider
the following example:
42. <html>
<body>
<h1>The main element</h1>
<main>
<h1>Most Popular Browsers</h1>
<p>Chrome, Firefox, and Edge are the most used browsers today.</p>
<article>
<h2>Google Chrome</h2>
<p>Google Chrome is a web browser developed by Google, released in 2008.
Chrome is the world's most popular web browser today!</p>
</article>
<article>
<h2>Mozilla Firefox</h2>
<p>Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has
been the second most popular web browser since January, 2018.</p>
</article>
<article>
<h2>Microsoft Edge</h2>
<p>Microsoft Edge is a web browser developed by Microsoft, released in 2015.
Microsoft Edge replaced Internet Explorer.</p>
</article> </main></body></html>
43. <article> tag
• The <article> tag specifies independent, self-contained
content.
• An article should make sense on its own and it should be
possible to distribute it independently from the rest of the
site.
• Potential sources for the <article> element:
– Forum post
– Blog post
– News story
• Note: The <article> element does not render as anything
special in a browser. However, you can use CSS to style
the <article> element
44. <aside> tag
• Definition and Usage
• The <aside> tag defines some content aside from the content
it is placed in.
• The aside content should be indirectly related to the
surrounding content.
• Tip: The <aside> content is often placed as a sidebar in a
document.
• Note: The <aside> element does not render as anything
special in a browser. However, you can use CSS to style
the <aside> element
45. <header> Tag
• The <header> element represents a container
for introductory content or a set of
navigational links.
• A <header> element typically contains:
• one or more heading elements (<h1> - <h6>)
• logo or icon
• authorship information
46. <footer>
• Definition and Usage
– The <footer> tag defines a footer for a document or
section.
– A <footer> element typically contains:
– authorship information
– copyright information
– contact information
– sitemap
– back to top links
– related documents
47. <section> Tag
• The <section> element can be used to
encapsulate a group of related content. This
related content doesn't necessarily have to
make sense if we take it out of the page's
context.
48. <nav> Tag
• The <nav> tag defines a set of navigation links.
• Notice that NOT all links of a document should
be inside a <nav> element. The <nav> element
is intended only for major block of navigation
links.
• Browsers, such as screen readers for disabled
users, can use this element to determine
whether to omit the initial rendering of this
content.
•
52. Mobile-first or Desktop-first?
• Best practices recommend building mobile-
first, but many web professionals don't really
know why we build mobile-first in the first
place.
• The reason we build mobile-first is because of
three principles mentioned by Luke
Wroblewski
53. Mobile is exploding
• This basically means that it's a lot easier,
faster, and more convenient for people to use
their mobile devices to access the web.
• .
54. Mobile forces you to focus:
• Since there's a lot less space on a mobile
device's screen than on a desktop screen,
there's a mandatory need to prioritize. This
means that the most important tasks and/or
messages need to be visible right away.
55. Mobile extends your capabilities:
• Mobile devices have features that a desktop
device doesn't have: GPS, accelerometer,
multitouch inputs, voice recognition, front and
rear cameras, and soon.
56. Create your designs in a desktop-first
view, but implement them with mobile-
first
• Wireframe: This is a very basic visual representation
of a layout using only outlines, in other words, in
black and white. There are no colors, no branding,
and no defined styles of any kind.
• Design/Comp: This is a fleshed out wireframe with
colors, branding, and styles. It's a very close
representation (usually, say, 95 percent close to the
final product) of the final page/site/app without
going into markup or coding of any kind
57. • HTML mockup or HTML template: This is
when the design has been implemented into
an actual HTML page with CSS and—
sometimes—JavaScript. It can only be viewed
in the browser. It's practically an exact
representation (99 percent close to the final
product) of how the page/site/web app will
look and work like.
58. Sass mixins for the mobile-first
and desktop-first media queries
• A mobile-first mixin that uses the min-width
property and a desktop-first mixin that uses
the max-width property.
59. The mobile-first mixin
Style.scss
@mixin forLargeScreens($media) {
@media (min-width: $media/16+em) { @content; }
}
This is how we use it:
header {
//Properties for small screens
width: 50%;
background: red;
@include forLargeScreens(640) {
//Properties for large screens
width: 100%;
background: blue;
}
}
60. The mobile-first mixin
This compiles to the following:
header {
width: 50%;
background: red;
}
@media (min-width: 40em) {
header {
width: 100%;
background: blue;
}
}
61. The desktop-first mixin
@mixin forSmallScreens($media) {
@media (max-width: $media/16+em) { @content; }
}
This is how we use it:
header {
//Properties for large screens
width: 100%;
background: purple;
@include forSmallScreens(640) {
//Properties for small screens
width: 50%;
background: yellow;
}
}
@include forSmallScreens
62. The desktop-first mixin
This compiles to the following:
header {
width: 100%;
background: purple;
}
@media (max-width: 40em) {
header {
width: 50%;
background: yellow;
}
}
64. The desktop-first mixin
In our styles.scss file, we type the following lines:
//Mobile-first declaration
article { background: red;
//Target screens 640px wide and larger
@include forLargeScreens(640) {
& { background: green; }
}
}
This compiles to the following:
article {
background: red;
}
@media (min-width: 40em) {
article {
background: green;
}
}
65. Grids
• What is a grid?
A grid is a set of visual guidelines (vertical,
horizontal, or both, hence the term grid) that
help define where elements can be placed.
Once the elements have been placed, we end
up with a layout.
66. CSS grids
• A CSS grid is basically a compound of vertical
guidelines that form columns. The properties
of these columns are defined in a CSS file. This
file contains a list of classes with specific
widths that match the amount of columns
that a specific grid is built for.
74. <body>
<h1>The grid-column Property</h1>
<p>Use the <em>grid-column</em> property to specify
where to place an item.</p>
<p>Item1 will start on column 1 and end before column
5:</p>
<div class="grid-container">
<div class="item1">1</div>
<div class="item2">2</div>
<div class="item3">3</div>
<div class="item4">4</div>
<div class="item5">5</div>
<div class="item6">6</div>
<div class="item7">7</div>
<div class="item8">8</div>
<div class="item9">9</div>
<div class="item10">10</div>
<div class="item11">11</div>
<div class="item12">12</div>
<div class="item13">13</div>
<div class="item14">14</div>
<div class="item15">15</div>
</div>
</body>
</html>
75. CSS frameworks
• A CSS framework is a group of prebuilt
features that basically help speed up frontend
development for the Web.
Characteristics of CSS frameworks:
– CSS frameworks are focused solely on web-based
development, not native mobile apps.
– CSS frameworks always offer a CSS grid.
– Both CSS frameworks and web-oriented UI kits can be
called frontend frameworks.
76. UI kits
Features and characteristics of UI kits:
• There are basically two types of UI kits: those that are built
with web technologies (HTML and CSS) and can be used to
prototype web-based applications, and those that are made
of (usually) Photoshop (PSD) files to help mock up and design
native mobile apps.
• • Very few web-oriented UI kits offer a grid of some sort.
77. UI kits
Features and characteristics of UI kits:
• • UI kits are focused on providing user interface components
such as sliders, paginations, navigation bars, dialog boxes,
overlays/modals, buttons, typography, tooltips, lists,
accordions, tab systems, carousels/slideshows, forms, and so
on.
• • In a web-oriented UI kit, the architecture is very modular.
This means that each component can be incorporated into
any CSS framework.
78.
79. Designing Small UIs Driven by
Large Finger
• The ideal target sizes on small UIs.
• The posture patterns and the touch zones.
• The basic guidelines to consider for RWD.
• The navigation patterns for RWD.
80. The posture patterns
patterns of posture most users have when holding their smartphones, tablets, and
touch-enabled laptops
81. The touch zones
Luke also talks about touch zones, which are basically the areas of a
device that are either easy or hard to reach, depending on the posture.
82. The nav icon – basic guidelines to
consider for RWD
Common navigation icon patterns:
• The hamburger icon.
• The word Menu.
• The hamburger icon plus the word Menu.
• .
83. • The hamburger icon
This is by far the most popular icon used to
represent the navigation button: ≡
84. The HTML is as follows:
<button class="hamburger-icon"><span>Menu</span></button>SCSS
//Hamburger Icon
.hamburger-icon {
//Basic styling, modify if you want
font-size: 40px;
color: #666;
background: #efefef;
padding: 0 10px;
border-radius: 3px;
cursor: pointer;
//Hamburger Icon
&:before {
content: '≡';
}
//Hide the term Menu from displaying without sacrificing accessibility
span {
display: inline-block;
width: 0;
[ 184 ] height: 0;
text-indent: -100%;
overflow: hidden;
white-space: nowrap;
}
}
85. The word Menu
Some informal tests on the web have yielded
that using the word Menu is the most trusted
solution to the drawbacks of the hamburger
icon.
86.
87. The hamburger icon plus the word
Menu
• One alternative to the hamburger icon versus
the word Menu discussion is to use both at the
same time. Some argue that we may get the
best of both worlds by doing this.
88.
89. Working with Images and Videos in
Responsive Web Design
Tips for reducing the file size in images for RWD
• Resizing-Just by resizing the image from 2496
x 1664 pixels to 1024 x 683 pixels, the file size
is now 331 KB. This is nearly a 40 percent
reduction in file size from 556 KB. A huge
improvement
• Blurring the background- After blurring the
background, the file now weighs 185 KB.
That's about a 67 percent reduction in file size
from 556 KB.
93. Image
If the width property is set to a percentage and
the height is set to "auto", the image will be
responsive and scale up and down
If the max-width property is set to 100%, the
video player will scale down if it has to, but
never scale up to be larger than its original
size:
94. <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-
width, initial-scale=1.0">
<style>
img {
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<img src="img_chania.jpg" width="460"
height="345">
<p>Resize the browser window to see how the
image will scale when the width is less than
460px.</p>
</body>
</html>
95. <head>
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<style>
video {
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<video width="400" controls>
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
<p>Resize the browser window to see how the size of
the video player will scale when the width is less than
400px.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="width=device-width,
initial-scale=1.0">
<style>
video {
max-width: 100%;
height: auto;
}
</style>
96. Media query is a CSS technique
introduced in CSS3.
It uses the @media rule to include a
block of CSS properties only if a
certain condition is true.
97. <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: lightgreen;
}
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
</style>
</head>
<body>
<p>Resize the browser window. When the width of this document is 600
pixels or less, the background-color is "lightblue", otherwise it is
"lightgreen".</p>
</body>
</html>
99. CSS Flexbox
<body>
<h1>Flexible Boxes</h1>
<div class="flex-container">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</div>
<p>Try to resize the browser window.</p>
<p>A container with "flex-wrap: nowrap;"
will never wrap its items.</p>
<p><strong>Note:</strong> Flexbox is not
supported in Internet Explorer 10 or earlier
versions.</p>
</body>
</html>