Comments (10)
I checked this out and see the margins are lost when form element is added right after the body tag. While I can't speak with 100% accuracy I believe this was intentional as for regular forms you don't want to dictate certain styles. The margins I believe you are referring to are the gutters for the existing grid system. Could you add your opinion @pjackson28? I could be wrong.
I can't say I like the idea of having a form element just added to the body and wrapping the entire content though. It is my hope that we can keep pushing the idea of clean semantic markup. Does this form element persist when logged out or just for the admin interface?
from wet-boew.
I agree with you @sylus, but with dotNet, you can't do otherwise, this is how dotNet works, it automatically wraps the document in a form. So this means that with a dotNet web site, we'd have to patch everything to make it look nice, this is definitely not what we have in mind.
Still, I don't really understand why forms have margins and headings and p elements inside forms don't.
from wet-boew.
Having a form around the whole body is one of the most bizarre thing from Microsoft. However it is simple to fix by creating a class that inherits the Page class and override the render method to not include the form. Frankly, the Page class should be way more generic.
from wet-boew.
Although I agree with you that it is a weird thing from Microsoft, as far as I know, a dotNet page needs to have a form... Anyway, this will make the search feature in the header of the page to not work at all if there is no form. And even if you could wrap only the search feature in a form, if the page content is a form to register for an event or anything like that, you can't have 2 forms in a dotNet page. This is a major issue for a Web Application.
But again, wouldn't it be easier if forms did not have margins and if headings and p elements inside forms just behave the same way they do in div? Fieldsets would have margins and so would headings and p.
from wet-boew.
I understand you might be hesitant to do this but I have done it before and it works great. Plus having two form on a page is not a problem and is in fact desirable when they perform different actions (i.e. a search form and a login form). Forms can be created using .NET controls.
from wet-boew.
That's good to know. I've never experienced with multiple forms in a dotNet webpage but I will look into it.
But then again, wouldn't it be desirable to have all headings, paragraphs and other elements to behave the same way, whether they are in a form or not?
from wet-boew.
The reason
has margin-left:10px and margin-right:10px is is mimic a grid cell. If the form was in a grid cell, then the gutter has been created but the form wasn't, it would fill the width of the entire space, which is 20px wide. So basic elements (p, ul, ol, form, table etc), all have a 10px margin left/right when not in a grid and then a 0px when inside a grid. Also, form elements are being redone based blend on Twitter's bootstrap and formalize.me . Mark from RCMP is currently converting it to SCSS. This is a preview (prior to conversion to SCSS with some extra clutter in there so just scroll down and look at the form part). : http://wet.pre.pub.rcmp-grc.gc.ca/theme-rcmp-grc-pub-gcwu-fegc/style-guide-main.htmfrom wet-boew.
I'm glad you posted that link : http://wet.pre.pub.rcmp-grc.gc.ca/theme-rcmp-grc-pub-gcwu-fegc/style-guide-main.htm
Scroll down to "module-versatile" section. The fourth box with the form inside is a problem. Just set the "select" element width to 100% and you'll see a 20 pixels overflow, which means that module-form-fluid forms can't fit easily inside a box like this one.
from wet-boew.
Forms have been redone to this: http://wet-boew.github.com/wet-boew/demos/grids/grid-form-eng.html based on Twitter bootstrap and also formalize.me
Forms can now accommodate grids inside them so I think everything should be OK
from wet-boew.
Closing since issue addressed with recent Grids update.
from wet-boew.
Related Issues (20)
- Tables: Currently selected pagination not indicated to screen readers HOT 2
- Web Experience Toolkit (WET) theme: HOT 1
- Bootstrap 5 HOT 1
- Geomap: basemap down HOT 2
- How to initialize datatable with existing array? HOT 3
- Including server side errors in form validation summary HOT 2
- [OTHER] Intermittent errors when listening for 'wb-ready.wb' event HOT 5
- [BUG] Form Validation - Inline radio and checkbox inputs with wb-server-error class not recognized as errors to display
- [Bug] Menu without submenu doesn’t work in mobile mode when menu link point to modal popup. HOT 2
- [OTHER] Viewing password as user enters data in form HOT 6
- [FEATURE] Published Component Library for Figma or Mural HOT 3
- Exit Script - how to close user session prior to redirect? HOT 5
- Broken link on wet-boew.github.io
- [AUTRE] Avis sur l'Accessibilité d'un outil de visite virtuelle (Matterport)
- Pagination - Datatable Dom option - Pagination still show at the top when hidden at the bottom HOT 3
- Geomap: Popup French suggestions
- [BUG] Issue with datatables.net when sorting array HOT 1
- [BUG] Form Validation - null .arialive causing error
- Grammar on Hello World plugin example page
- [BUG] Can't get the load event to trigger HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wet-boew.