Comments (17)
I hesitate to enforce this in bootstrapper. Some people my try to reduce page weight my removing white space in the generated HTML.
Are you using blade? Blade should create newlines for you because of the way it wraps calls with ?>
I will leave the issue open and see what other people think.
from bootstrapper.
Yes I am using blade actually. But it's not adding the new lines...Where did you read that it should?
from bootstrapper.
In all cases better use the PHP_EOL constant. \n is platform-specific.
from bootstrapper.
Agreed for PHP_EOL
, would love to see this added
from bootstrapper.
Any movement on this, @patricktalmadge ? The HTML looks ugly as it is, would really prefer those EOLs added.
from bootstrapper.
Thing is, it's not as easy as just adding line breaks everywhere. It's just still as ugly if you don't add the corresponding tabs where required and that's where it gets tricky. I'm working on this in a branch somewhere but I have to edit all the tests accordingly so it really takes a while.
from bootstrapper.
I'm working on it in another branch as well, it appears to be that easy. What's the tricky part?
from bootstrapper.
Well the tricky part is when you get nested elements in navigation, dropdowns and such and need to keep track of the depth to output the correct amount of tabbing. It's not hard per se but as I haven't had much time to work on Boostraper lately it slowed me down
from bootstrapper.
Do you want me to continue adding EOL and tabs to the libraries per my commit above?
from bootstrapper.
Yeah if you can work up a pull request that'd be a great addition ! Just don't forget to edit the tests accordingly, most are made with matchers so they don't need to be edited but some are created with exact output and the added line breaks will fail. Thank you :)
from bootstrapper.
Your welcome to work on a pull request for this. But I still don't understand why this is needed. Most modern browsers will format your html in a nested and readable manor in developer tools for debugging. (Even IE does this). I've never had a client complain because the HTML was ugly.
I my experience it's never going to look good. The tabs be off because generated elements will be nested at different levels in the html.
from bootstrapper.
Yes, modern browsers will format your HTML when using developer tools. When not, such as viewing source ( CTRL + U ), the HTML will be however it's outputted by your application.
Say the rest of your HTML is pretty and well formatted. But then you use a helper and create a carousel rather than manually typing the HTML. That carousel will be all on one line, which is horrid to look at.
Before
After
from bootstrapper.
The problem is that the after still looks ugly. The generated code still sticks out because of the formatting. The carousel div isn't nested correctly with the parent span12. The child divs have a different tab indention then the rest of the HTML.
That being said. Your welcome to make a pull request. I will merge it in as long as the tests are also updated.
from bootstrapper.
It's far less ugly than what it was before. I'd accept the sticking out over the one line of code any day :)
If I have time I'll make a pull
from bootstrapper.
@patricktalmadge So turns out if you output your PHP as blade, the formatting will be inline with your HTML. So it won't be ugly anymore :).
All that has to happen now is PHP EOLs be added
from bootstrapper.
@Geczy good to hear. Hopefully it isn't a ton of work.
from bootstrapper.
We'll wait for an eventual pull request, in the meantime this isn't on the to-do list or at the very bottom as that would require adding a lot of code spaghetti and redoing some tests for not much.
from bootstrapper.
Related Issues (20)
- Protected vs private in service provider HOT 4
- 'Active' Class on Navbar Links HOT 9
- Upgrade Guide? HOT 3
- Specify data attributes (or other) on Button? HOT 2
- Laravel5 bug HOT 6
- Alternative alias configuration.. HOT 1
- Can't add HTML to a panel body HOT 2
- dependency on "illuminate/html": "~4.2||~5", HOT 2
- How do I create input group using the InputGroup Facade in Laravel 5 ? HOT 3
- Laravel 5.4 : Call to undefined method Illuminate\Session\Store::getToken() HOT 11
- Update to laravelcollective/html changes Select function parameters in Form.php [fix found] HOT 2
- How can I use bootstrapper inside Laravel 5 controllers?
- Error on blade files using bootstrapper on phpstorm HOT 1
- Bootstrap 4 support in the future? HOT 1
- Automatic Use Of repo without add Providers and aliases in Laravel >5.5
- bootstrap 4 is now released HOT 2
- Facade 'Icon' => Bootstrapper\Facades\Icon::class doesn't get glyphicon in Bootstrap 4
- Declaration of Bootstrapper\Form::select.....should be compatible with Collective\Html\FormBuilder::select
- blank page HOT 2
- Laravel 6 HOT 1
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 bootstrapper.