snippet

Mobile-Friendly API Documentation by travislaynewilson


Tags: table layouts api documentation document

The MIT License (MIT)

Copyright (c) 2017 travislaynewilson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Mobile-Friendly API Documentation

Emulate tables that collapse beautifully on mobile devices!

Row modifier class included

This feature uses a row modifier I created called ".margin-0". When applied to a ".row" element, it will ensure the margins between the columns will be 0.

This is important in order to emulate the table-like effect, but it will work in any environment.


CurrencyCode [Required]
String
Yes
The standard ISO 4217 3-letter currency code
PriceType [Required]
Int32
Yes
The type of price
WarehouseID [Required]
Int32
Yes
The unique identifier for the warehouse
ItemCodes
String[]
No
LanguageID
Int32?
No
The customer's preferred language ID (ex. 0 (English), 1 (Spanish), etc.)
/* Methods */ .method .header, .method .cell { padding: 6px 6px 6px 10px; } .method .list-header .header { font-weight: normal; text-transform: uppercase; font-size: 0.8em; color: #999; background-color: #eee; } .method [class^="row"], .method [class*=" row"] { border-bottom: 1px solid #ddd; } .method [class^="row"]:hover, .method [class*=" row"]:hover { background-color: #f7f7f7; } .method .cell { font-size: 0.85em; } .method .cell .mobile-isrequired { display: none; font-weight: normal; text-transform: uppercase; color: #aaa; font-size: 0.8em; } .method .cell .propertyname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .method .cell .type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .method .cell code { color: #428bca; } .method .cell a, .method .cell a:hover { text-decoration: none; } .method .cell code.custom { color: #8a6d3b; text-decoration: none; } .method .cell .text-muted { color: #ddd; } @media (max-width: 991px) { .method [class^="row"], .method [class*=" row"] { padding-top: 10px; padding-bottom: 10px; } .method .cell { padding: 0 10px; } .method .cell .propertyname { font-weight: bold; font-size: 1.2em; } .method .cell .propertyname .lookuplink { font-weight: normal; font-size: 1.5em; position: absolute; top: 0; right: 10px; } .method .cell .type { padding-left: 10px; font-size: 1.1em; } .method .cell .isrequired { padding-left: 10px; display: none; } .method .cell .description { padding-left: 10px; } .method .cell .mobile-isrequired { display: inline; } } /* Row Utilities */ [class^='row'].margin-0, [class*=' row'].margin-0, [class^='form-group'].margin-0, [class*=' form-group'].margin-0 { margin-left: -0px; margin-right: -0px; } [class^='row'].margin-0 > [class^='col-'], [class^='row'].margin-0 > [class*=' col-'], [class*=' row'].margin-0 > [class^='col-'], [class*=' row'].margin-0 > [class*=' col-'], [class^='form-group'].margin-0 > [class^='col-'], [class^='form-group'].margin-0 > [class*=' col-'], [class*=' form-group'].margin-0 > [class^='col-'], [class*=' form-group'].margin-0 > [class*=' col-'] { padding-right: 0px; padding-left: 0px; } [class^='row'].margin-0 [class^='row'], [class^='row'].margin-0 [class*=' row'], [class^='row'].margin-0 [class^='form-group'], [class^='row'].margin-0 [class*=' form-group'], [class*=' row'].margin-0 [class^='row'], [class*=' row'].margin-0 [class*=' row'], [class*=' row'].margin-0 [class^='form-group'], [class*=' row'].margin-0 [class*=' form-group'], [class^='form-group'].margin-0 [class^='row'], [class^='form-group'].margin-0 [class*=' row'], [class^='form-group'].margin-0 [class^='form-group'], [class^='form-group'].margin-0 [class*=' form-group'], [class*=' form-group'].margin-0 [class^='row'], [class*=' form-group'].margin-0 [class*=' row'], [class*=' form-group'].margin-0 [class^='form-group'], [class*=' form-group'].margin-0 [class*=' form-group'] { margin-left: 0; margin-right: 0; }