GC tables
Unstable feature
To be used at your own risks. All functionalities described below could be removed in any subsequent minor/major release and are excluded from the GCWeb public API.
Documentation and/or working examples for those features could be incomplete or not available.
- Status
- Provisional
- Type
- Canada.ca design pattern
- Last review
- 2021-06-16
- Conforming to
- Content and IA spec 2.1
- Guidance
- Tables - Canada.ca design pattern [coming soon]
- Technical name
- 
		- gc-table
 
Working example
A simple CSS solution to that turns tables into responsive cards for smaller viewports.
This pattern currently is:
- only for basic/simple tables
- not supported by IE 11
Responsive cards
| City | Population in 2007 | Population in 2017 | Percentage change | 
|---|---|---|---|
| Toronto | 5,418,207 | 6,346,088 | 17.1% | 
| Montréal | 3,714,846 | 4,138,254 | 11.4% | 
| Vancouver | 2,218,134 | 2,571,262 | 15.9% | 
| Ottawa–Gatineau | 1,188,073 | 1,377,016 | 15.9% | 
Responsive cards with text left on one item
Optional
The class text-left can be added to any <td> so that it aligns to the left side on the cards.
| Reason for your call | Number | Hours | 
|---|---|---|
| 
 | 1-XXX-XXX-XXXX | Always open (automated line) | 
| 
 | 1-XXX-XXX-XXXX | Always open (automated line) | 
| 
 | 1-XXX-XXX-XXXX | Always open (automated line) | 
| 
 | 1-XXX-XXX-XXXX | Always open (automated line) | 
Responsive cards with small class for smaller text
Optional
The class small can be added to the <table> to make all the text smaller
| Company | Product Name/Active Pharmaceutical Ingredient (API) | DIN | Strength | Lot | Date added | 
|---|---|---|---|---|---|
| Apotex Inc. | Acid Reducer (ranitidine) sold under the brand names Equate and Selection | 02296160 | 150 mg | All lots | September 25, 2019 | 
| Apotex Inc. | Apo-Ranitidine Oral Solution | 02280833 | 15 mg/mL | All lots | September 25, 2019 | 
| Apotex Inc. | Apo-Ranitidine Tablet 150mg | 00733059 | 300 mg | All lots | September 25, 2019 | 
Responsive cards with table-bordered class for table borders
Optional
The class table-bordered can be added to the <table> to add borders to the table in medium view and over.
| Name | Engine | Developer | 
|---|---|---|
| Chrome | Blink | |
| Firefox | Gecko | Mozilla | 
| Safari | WebKit | Apple | 
Responsive cards with ``wb-tables`` class for filterable tables
Optional
The class wb-tables can be added to the <table> to make it use WET's tables plugin. Please note that scrollable and responsive WET tables are unsupported.
| Name | City | Province | 
|---|---|---|
| Clinic 1 | Edmonton | Alberta | 
| Clinic 2 | Toronto | Ontario | 
| Clinic 3 | Montréal | Québec | 
Page details
- Date modified: