- The Swiss Federal Administration on the Internet
- Contribution
- Grid System
- Print Classes
- Styleguide Theme
- FAQ
- Known Issues
The Confederation Web Guidelines define the design specifications for the presentation of the Swiss Federal Administration on the Internet and are binding for all websites within the domain admin.ch. These guidelines specify how the websites of the Federal authorities have to look and how they should behave. At the same time they give the government departments and public offices the necessary flexibility to be able to optimize their online communications to the requirements of their specific business purposes.
These design regulations allow web designers to create up-to-date, user-friendly and universally accessible websites. They define the compulsory corporate design elements as well as the obligatory navigation and content modules. Furthermore, they introduce a series of elements that can be used directly and, if required, expanded upon or further developed. The display presentation has been optimized for web browsers on both desktop computers and laptops as well as on tablets and smartphones.
The Confederation Web Guidelines are aimed at both internal Federal project managers and third party service providers. They offer project managers an overview of the design specifications. Developer teams can use the templates and elements directly. They have been created using standard HTML code (as of 2013) and can be used with CSS and JavaScript style sheets.
The design specifications described for use on the Internet or in intranets can also be used for other digital channels, such as for the creation of apps.
The latest release of the styleguide is available here: http://swiss.github.io/styleguide/
If you want to collaborate on the repo, go to this URL: https://github.com/swiss/styleguide
The styleguide is located in the /styleguide
directory. You can open /styleguide/index.html
directly in your browser. (If you can't find it, you have to build all the assets).
There are several ways to get started:
- Install with bower
bower install swiss-styleguide
- Use the provided build. Download the latest release and include all the built assets in your project.
- Clone the repo
git clone https://github.com/antistatique/Swiss-Admin-web-guidelines.git
If you want to contribute, fix a bug or suggest a new feature, please first create a new issue, so we can discuss it. Then, please make a Pull Request to the dev
branch. This is important, as we use the Git Flow workflow. We thank you in advance for your collaboration!
We use Gulp.js to run tasks and build our styleguide with Hologram.
Make sure you have Node.js installed.
Install all the dependencies you need:
$ npm install -g gulp
$ npm install
$ bower install
Install Hologram from the Gemfile (for version > 1.1.0):
$ bundle
Browser-sync is automatically set up and will allow you to make changes and see them in real time.
This is the not the recommended OS. If you have a choice, use OS X. We are therefore not perfectly sure of the process below, please report or make a PR to make this better.
Warning: This was tested on the Windows PowerShell but should work on any shell that support UTF8.
-
Download and Install Ruby
-
Install DevKit. Follow those instructions.
-
Download and install Node.js
-
Install Git for Windows (recommended) or alternatively Github for Windows
Then install SASS, Hologram & Bundle
$ gem install sass bundle hologram
Go in the project directory and install the dependencies:
C:\\projectPath> npm install gulp -g
C:\\projectPath> npm install
C:\\projectPath> node_module\.bin\bower install
Finally you will have to rebuild some gems:
$ gem uninstal yajl-ruby
$ gem install yajl-ruby --version=1.1.0 --platform=ruby
First run gulp:
$ gulp
Run gulp during development process: (with watch
tasks and browser-sync)
$ gulp serve
The grid system works exactly the same way as Bootstrap, no changes were made. Please refer to their documentation for more details.
You can add print specific classes by using the ones Bootstrap made.
Classes available: .visible-print-block
, .visible-print-inline
, .visible-print-inline-block
, .hidden-print
.
Please refer to their documentation for more details.
The stylguide theme is in styleguide-theme
. It's a theme for Trulia's Hologram.
It was based on Cortana.
The hologram_config.yml
has a reference to the styleguide theme:
source: ./path/to/your/source
destination: ./path/to/output
documentation_assets: ./path/to/theme
The theme has his own gulpfile (for the moment). So you have to do the following command to build the assets then generate the styleguide with $ hologram
:
$ cd styleguide-theme
$ gulp
The theme is used only to present all the styles. It's not part of the styleguide. All the !important
s were added to avoid conflict with other styles, for a better presentation.
When I try to build with $ gulp
I have the following error: Syntax error: Invalid US-ASCII character "\xC3"
The workaround is to force UTF8 by running:
$ LC_ALL="en_US.UTF-8" gulp
Or you can edit your .zshrc file with the following configuration:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
Edit file : C:\Ruby21-64\lib\ruby\2.1.0\registry.rb
Add line 70 == LOCALE = Encoding::UTF_8
Download rubygems 2.2.3
C:\>gem install --local C:\rubygems-update-2.2.3.gem
C:\>update_rubygems --no-ri --no-rdoc
There is a known issue with Internet Explorer when loading the page over HTTPS with Cache-Control or Pragma headers set. Disable cache control on fonts to fix it (refer to issue #359 for more information):
<FilesMatch "\.(eot|otf|woff|ttf)$">
Header unset Cache-Control
Header unset Pragma
</FilesMatch>