Eric  Bukenya

Eric Bukenya

1626271740

Bootstrap’s Garbage Bin Overflows! CSS For A Vanilla Rewrite Of Their “Blog” Template.

In our previous misadventure I did a rewrite of the HTML for Bootstrap’s “Blog” template. We reduced the total markup size by a third — _more than half if you count the non-Bootstrap content area _— _and now it’s time to make a stylesheet to match _— and improve upon — the original.

I will be fully documenting this is the same as my rewrites of templates for clients as a freelance consultant.

Live Demo

Rather than make people sit on pins and needles, the CSS is written so let’s see it working!

Is wide open for easy access to the gooey bits and pieces, and as always I dumped a .rar of the whole shebang in there for you folks who want to play with it quick-and-easy.

I didn’t even try to colour match it 100%, and just eyeballed it. In fact none of the measurements are directly copied either since it seemed to be all pretty standard 1/1.5/2/2.5 REM increments.

The big fixes and changes are:

  1. The categories header is now responsive instead of being cut off.
  2. The content table no longer stretches to full width, which was making it hard to follow each line.
  3. Most if not all measurements — including queries — are EM/REM. This fixes how the media queries of things like Bootstrap and Tailwind are broken for me as a user.
  4. Hover states were better implemented.
  5. The “back to top” link works, and has a smooth scroll applied to it.
  6. It’s no longer hard to navigate / digest gibberish for users of non-visual user-agents and/or non-mouse/touch interfaces.
  7. They had this odd scrolling of the sidebar in place that was utterly banjaxed here and made the page hard to use. I didn’t even try to implement whatever the devil that was supposed to be.

So Let’s Talk About The CSS

The way I design is done in the code, and I usually start out with the desktop layout first. I find the whole “mobile first” attitude to be utterly back-assward. Make the desktop layout first, once that’s complete narrow the browser window until it breaks, then make a media query to adjust from there. Lather, rinse, repeat until you’re down to around 256px. I really wouldn’t bother trying to support narrower than that anymore.

#bootstrap #html #framework #css

What is GEEK

Buddha Community

Bootstrap’s Garbage Bin Overflows! CSS For A Vanilla Rewrite Of Their “Blog” Template.
Eric  Bukenya

Eric Bukenya

1626271740

Bootstrap’s Garbage Bin Overflows! CSS For A Vanilla Rewrite Of Their “Blog” Template.

In our previous misadventure I did a rewrite of the HTML for Bootstrap’s “Blog” template. We reduced the total markup size by a third — _more than half if you count the non-Bootstrap content area _— _and now it’s time to make a stylesheet to match _— and improve upon — the original.

I will be fully documenting this is the same as my rewrites of templates for clients as a freelance consultant.

Live Demo

Rather than make people sit on pins and needles, the CSS is written so let’s see it working!

Is wide open for easy access to the gooey bits and pieces, and as always I dumped a .rar of the whole shebang in there for you folks who want to play with it quick-and-easy.

I didn’t even try to colour match it 100%, and just eyeballed it. In fact none of the measurements are directly copied either since it seemed to be all pretty standard 1/1.5/2/2.5 REM increments.

The big fixes and changes are:

  1. The categories header is now responsive instead of being cut off.
  2. The content table no longer stretches to full width, which was making it hard to follow each line.
  3. Most if not all measurements — including queries — are EM/REM. This fixes how the media queries of things like Bootstrap and Tailwind are broken for me as a user.
  4. Hover states were better implemented.
  5. The “back to top” link works, and has a smooth scroll applied to it.
  6. It’s no longer hard to navigate / digest gibberish for users of non-visual user-agents and/or non-mouse/touch interfaces.
  7. They had this odd scrolling of the sidebar in place that was utterly banjaxed here and made the page hard to use. I didn’t even try to implement whatever the devil that was supposed to be.

So Let’s Talk About The CSS

The way I design is done in the code, and I usually start out with the desktop layout first. I find the whole “mobile first” attitude to be utterly back-assward. Make the desktop layout first, once that’s complete narrow the browser window until it breaks, then make a media query to adjust from there. Lather, rinse, repeat until you’re down to around 256px. I really wouldn’t bother trying to support narrower than that anymore.

#bootstrap #html #framework #css

Ssekidde  Nat

Ssekidde Nat

1626416340

Bootstrap’s Garbage Bin Overflows! Rewriting Their Blog Template As Vanilla Code

My article dissecting the “Tailwind Starter Kit” with a matching rewrite prompted some folks to ask if I could do the same to Bootstrap’s examples. Bootstrap is the tired old whipping boy, having stolen the crown of “eye cans haz teh intarwebs” from the mental midgetry that is jQuery well over a decade past. I feel like the subject of how mind-numbingly STUPID Bootstrap is a wee bit worn out, particularly when I recently did a hit piece about version 5. I mean, I’ve called it “bootcrap” for well over a decade since as I often say, people need to go find a stick to scrape it off with before tracking it all over the web’s carpets.

The very nature by which front-end frameworks do their thing — pissing all over the HTML using presentational classes dragging things back to the worst of HTML 3.2 and undoing 20+ years of progress — is so utterly flawed it’s hard to say anything nice about the entire concept.

That said, in the ~11 months or so since I wrote that I’ve had more time to work with Bootstrap 5, giving me more insights into it. And if people actually want to hear me go on about it more, I’ll gladly do so when it plays into my current theme of how bad examples results in people developing bad habits and writing bad code. Assuming they write code at all and don’t just blindly copy what others have done.

When it comes to bad examples, Bootstrap, Tailwind, and their kind doth have their cup runneth over. If if you’re learning from their examples — what examples are FOR — it means you’re learning bad habits making you a bad developer!

Actual Improvements In Bootstrap 5.

Before I start ripping the people who created it and those who use it a new bung-hole, I feel I should mention how they have made legitimate improvements to it. Even if the entire concept is flawed to the bone, at least they’re TRYING now.

  • Custom Properties, AKA “CSS Variables”
  • It Tells Legacy IE To Suck It
  • They’re Using Less JavaScript

So It’s Better? NO!

For the handful of “improvements” it’s still the same tired, lame, garbage. The various faults remain.

The Bad Examples

… has some really nasty code smell to it. A deathly stench that finds root in the simple fact that those who create and use frameworks do not know enough about HTML or CSS to be making websites.

So What’s Wrong With Their Blog Example?

There are many issues that if you just blindly copy the example could bite you, separate from the wasteful code and lack of proper separation of concerns.

Gibberish Heading Orders

I’m shocked how after nearly three decades of HTML tags having meanings, people STILL have their head stuck up the backside of the worst of the mid-90’s browser wars era presentational methodology.

#web-development #css #bootstrap #html

Mike  Kozey

Mike Kozey

1656151740

Test_cov_console: Flutter Console Coverage Test

Flutter Console Coverage Test

This small dart tools is used to generate Flutter Coverage Test report to console

How to install

Add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dev_dependencies:
  test_cov_console: ^0.2.2

How to run

run the following command to make sure all flutter library is up-to-date

flutter pub get
Running "flutter pub get" in coverage...                            0.5s

run the following command to generate lcov.info on coverage directory

flutter test --coverage
00:02 +1: All tests passed!

run the tool to generate report from lcov.info

flutter pub run test_cov_console
---------------------------------------------|---------|---------|---------|-------------------|
File                                         |% Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------------------------------|---------|---------|---------|-------------------|
lib/src/                                     |         |         |         |                   |
 print_cov.dart                              |  100.00 |  100.00 |   88.37 |...,149,205,206,207|
 print_cov_constants.dart                    |    0.00 |    0.00 |    0.00 |    no unit testing|
lib/                                         |         |         |         |                   |
 test_cov_console.dart                       |    0.00 |    0.00 |    0.00 |    no unit testing|
---------------------------------------------|---------|---------|---------|-------------------|
 All files with unit testing                 |  100.00 |  100.00 |   88.37 |                   |
---------------------------------------------|---------|---------|---------|-------------------|

Optional parameter

If not given a FILE, "coverage/lcov.info" will be used.
-f, --file=<FILE>                      The target lcov.info file to be reported
-e, --exclude=<STRING1,STRING2,...>    A list of contains string for files without unit testing
                                       to be excluded from report
-l, --line                             It will print Lines & Uncovered Lines only
                                       Branch & Functions coverage percentage will not be printed
-i, --ignore                           It will not print any file without unit testing
-m, --multi                            Report from multiple lcov.info files
-c, --csv                              Output to CSV file
-o, --output=<CSV-FILE>                Full path of output CSV file
                                       If not given, "coverage/test_cov_console.csv" will be used
-t, --total                            Print only the total coverage
                                       Note: it will ignore all other option (if any), except -m
-p, --pass=<MINIMUM>                   Print only the whether total coverage is passed MINIMUM value or not
                                       If the value >= MINIMUM, it will print PASSED, otherwise FAILED
                                       Note: it will ignore all other option (if any), except -m
-h, --help                             Show this help

example run the tool with parameters

flutter pub run test_cov_console --file=coverage/lcov.info --exclude=_constants,_mock
---------------------------------------------|---------|---------|---------|-------------------|
File                                         |% Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------------------------------|---------|---------|---------|-------------------|
lib/src/                                     |         |         |         |                   |
 print_cov.dart                              |  100.00 |  100.00 |   88.37 |...,149,205,206,207|
lib/                                         |         |         |         |                   |
 test_cov_console.dart                       |    0.00 |    0.00 |    0.00 |    no unit testing|
---------------------------------------------|---------|---------|---------|-------------------|
 All files with unit testing                 |  100.00 |  100.00 |   88.37 |                   |
---------------------------------------------|---------|---------|---------|-------------------|

report for multiple lcov.info files (-m, --multi)

It support to run for multiple lcov.info files with the followings directory structures:
1. No root module
<root>/<module_a>
<root>/<module_a>/coverage/lcov.info
<root>/<module_a>/lib/src
<root>/<module_b>
<root>/<module_b>/coverage/lcov.info
<root>/<module_b>/lib/src
...
2. With root module
<root>/coverage/lcov.info
<root>/lib/src
<root>/<module_a>
<root>/<module_a>/coverage/lcov.info
<root>/<module_a>/lib/src
<root>/<module_b>
<root>/<module_b>/coverage/lcov.info
<root>/<module_b>/lib/src
...
You must run test_cov_console on <root> dir, and the report would be grouped by module, here is
the sample output for directory structure 'with root module':
flutter pub run test_cov_console --file=coverage/lcov.info --exclude=_constants,_mock --multi
---------------------------------------------|---------|---------|---------|-------------------|
File                                         |% Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------------------------------|---------|---------|---------|-------------------|
lib/src/                                     |         |         |         |                   |
 print_cov.dart                              |  100.00 |  100.00 |   88.37 |...,149,205,206,207|
lib/                                         |         |         |         |                   |
 test_cov_console.dart                       |    0.00 |    0.00 |    0.00 |    no unit testing|
---------------------------------------------|---------|---------|---------|-------------------|
 All files with unit testing                 |  100.00 |  100.00 |   88.37 |                   |
---------------------------------------------|---------|---------|---------|-------------------|
---------------------------------------------|---------|---------|---------|-------------------|
File - module_a -                            |% Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------------------------------|---------|---------|---------|-------------------|
lib/src/                                     |         |         |         |                   |
 print_cov.dart                              |  100.00 |  100.00 |   88.37 |...,149,205,206,207|
lib/                                         |         |         |         |                   |
 test_cov_console.dart                       |    0.00 |    0.00 |    0.00 |    no unit testing|
---------------------------------------------|---------|---------|---------|-------------------|
 All files with unit testing                 |  100.00 |  100.00 |   88.37 |                   |
---------------------------------------------|---------|---------|---------|-------------------|
---------------------------------------------|---------|---------|---------|-------------------|
File - module_b -                            |% Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------------------------------|---------|---------|---------|-------------------|
lib/src/                                     |         |         |         |                   |
 print_cov.dart                              |  100.00 |  100.00 |   88.37 |...,149,205,206,207|
lib/                                         |         |         |         |                   |
 test_cov_console.dart                       |    0.00 |    0.00 |    0.00 |    no unit testing|
---------------------------------------------|---------|---------|---------|-------------------|
 All files with unit testing                 |  100.00 |  100.00 |   88.37 |                   |
---------------------------------------------|---------|---------|---------|-------------------|

Output to CSV file (-c, --csv, -o, --output)

flutter pub run test_cov_console -c --output=coverage/test_coverage.csv

#### sample CSV output file:
File,% Branch,% Funcs,% Lines,Uncovered Line #s
lib/,,,,
test_cov_console.dart,0.00,0.00,0.00,no unit testing
lib/src/,,,,
parser.dart,100.00,100.00,97.22,"97"
parser_constants.dart,100.00,100.00,100.00,""
print_cov.dart,100.00,100.00,82.91,"29,49,51,52,171,174,177,180,183,184,185,186,187,188,279,324,325,387,388,389,390,391,392,393,394,395,398"
print_cov_constants.dart,0.00,0.00,0.00,no unit testing
All files with unit testing,100.00,100.00,86.07,""

Installing

Use this package as an executable

Install it

You can install the package from the command line:

dart pub global activate test_cov_console

Use it

The package has the following executables:

$ test_cov_console

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add test_cov_console

With Flutter:

 $ flutter pub add test_cov_console

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  test_cov_console: ^0.2.2

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:test_cov_console/test_cov_console.dart';

example/lib/main.dart

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Author: DigitalKatalis
Source Code: https://github.com/DigitalKatalis/test_cov_console 
License: BSD-3-Clause license

#flutter #dart #test 

Nayan Dalwadi

Nayan Dalwadi

1611146455

DashboardKit - Bootstrap 5 Admin Template

DashboardKit Bootstrap 5 Admin Template

Free Download - download

Premium - click here

Live Preview – Video

Embed Video –
<iframe width="560" height="315" src="https://www.youtube.com/embed/X1EpcZXcD6A" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Preview Product Demo

Why DashboardKit?
DashboardKit is a Bootstrap 5 based Admin Template that comes with 170+ ready to use conceptual pages. We have made DashboardKit a really powerful backend template with having tons of UI components, form elements, charts, tables along with 7+ admin panels.
• Developer centric : Even a novice developer can customize the DashboardKit. Our code is readable and well optimized for any level of developer.
• Modern design : User experience is the major important part in DashboardKit. We’ve designed each page with conceptual user interface.
• Performance first : Code is handwritten from scratch & doing that we’ve achieved the best performance in DashboardKit.
• Well documented : Detailed documentation guide contains- Quick setup, Integrate into an existing project, How to use components, references, and changelog.
• Responsive : DashboardKit’s design renders fast & perfect on desktop, tablet & mobile without any lagging issue.
• Browsers Compatiblity : DashboardKit is well tested in Chrome, Firefox, Safari(macOS) , Edge & Internet Explorer(>=IE11).
• Regular updates : Any bug fixes, new features, improvements in DashboardKit will always free.
• Support : You can submit us the issues or any new feature request via our email support dashboardkit[at]gmail[dot]com.

Technology Stack
• Bootstrap : Most popular design framework for developing responsive and mobile-first websites.
• Sass : Sass is a preprocessor scripting language that is interpreted or compiled into CSS.
• npm/Gulp : Node Package Manager with Gulp build system for the fast development.

Features
DashboardKit free Bootstrap 5 admin template includes the basic layouts with below listed pages. For more features, please checkout pro version.

• Analytics Dashboard
• All Basic Bootstrap components
• 250+ Feather Icons
• Form Elements
• Bootstrap Basic Table
• Apex charts
• Google Map
• Login/Registration Pages
• Sample Page

We Solved your pain points?
You have seen lots of other admin templates but Is it really convenient for you? Has it resolve all your below pain points? We’re closely working on dashboard making since 2013 & we know the real pain points of our customer base.
• Hassle to start : Quickstart guide for start with DashboardKit. We also cover how to implement DashboardKit into your existing project with minimal effort. Guide for Quickstart
• Hard code structure : DashboardKit has a fully structured code with a well-commented guide that helps to ease your development.
• Hard to buid : We used Gulp build process for minification of CSS/Javascript files, the flexibility of repetitive workflows and compose them into efficient build pipelines. Check our Gulp helper guide.
• Components useability : You can easily access & use the DashboardKit’s all components using one-click code copy/paste mechanism. It will surely save your time.
• Responsive issues : Proper bug-free responsive design is a key factor for any project. DashboardKit is well optimized for that.
• Messy documentation : Simple easy to understand Documentation covers all aspects of setup, components guide, reference links, changelog.

Upgrated to Pro DashboardKit
For more Pages, UI components, forms variants & access to 7+ admin panels check out the Premium version of DashboardKit Bootstrap 5 Admin Template.

Documentation
DashboardKit documentation helps you in all aspects related to setup, how to use components, plugins references & changelog. Please refer this link.

Support
For support please contact us on dashboardkit[at].gmail[dot]com.

#dashboardkit #bootstrap 5 admin template #bootstrap admin template #admin dashboard #admin template #bootstrap

Tia  Gottlieb

Tia Gottlieb

1597459560

Creating Responsive Grid Vanilla using HTML,CSS and Bootstrap

Many modern websites use a grid system to display chunks of data on their home-page as well as other pages. To much extent grid resembles a table, however, it is much more visually appealing and most often displays sibling elements. A grid must be responsive, i.e. it should adjust to the screen size of the user.

Bootstrap is a very popular open-source HTMLCSS, and JavaScript library that helps to design the frontend of a website. Generally, bootstrap code is very compact and robust but there are a few reasons for which every developer should master Vanilla(Customizable) HTML and CSS :

  • Ample of utilities and components are never used and are therefore a burden on the web page.
  • Bootstrap code is difficult to customize.
  • Bootstrap slows downloading of websites a bit because it first loads jQuery, then bootstraps CSS and then bootstrap JS.

The Two Possible Approaches for Creating a Grid:

1. Grid without Bootstrap(Vanilla HTML CSS)

**HTML Code: **We start with defining three div each with class “customRow“. Then create an img tag within each of the customRow div.

#bootstrap #css #html #web technologies #bootstrap-misc #css-basics #html-basics